Pesquisar este blog

domingo, 12 de março de 2017

Três programas ABAP para organizar o seu código ABAP

 ABAP Clipboard Utilities for Beautiful Commented Code

" Any fool can write code that a computer can understand.
  Good programmers write code that humans can understand. "

  --- Martin Fowler, Refactoring: Improving the Design of Existing Code

ABAP pretty printer is good for code but not supportive for data declarations.
As a result ABAP code often tends to need more labour to maintain.


 1- REPORT  yclipjnc. 
*&---------------------------------------------------------------------*
* based on ideas from
* http://sap.ionelburlacu.ro/abap/sap2/Beautify_Source_Code.html
* Author Jayanta Narayan Choudhuri
*         Flat 302
*         395 Jodhpur Park
*         Kolkata 700 068
*       Email sss@cal.vsnl.net.in
*       URL:  http://www.geocities.com/ojnc
*-----------------------------------------------------------------------
* This program takes ABAP code in ClipBoard, and does the following:
*    - Attempts to move comments to the end of the line
*    - Adds comments (table name) for the tables listed after a TABLES
*      statement if the line has not been commented already.
*    - Adds comments (field name) for data elements, parameters, and
*      select-options that are defined using the LIKE or FOR statement
*    - For ENDLOOP/ENDSELECT adds comment identify the LOOP/SELECT
*      that is being closed
*    - For FORM/ENDFORM adds comment identify the FORM that is being
*      closed
*    - Calls function PRETTY_PRINTER to do the SAP standard pretty print
*      after the custom comments have been created
* Returns Modified Code Via ClipBoard
*-----------------------------------------------------------------------

 2- REPORT  yclip2jnc.

*&---------------------------------------------------------------------*
*&     Beautify ABAP Code Via Clip                                    
*&---------------------------------------------------------------------*
* Author Jayanta Narayan Choudhuri
*         Flat 302
*         395 Jodhpur Park
*         Kolkata 700 068
*       Email sss@cal.vsnl.net.in
*       URL:  http://www.geocities.com/ojnc
*-----------------------------------------------------------------------
* This program takes Structure & internal table declarations in ClipBoard,
* and does prefect alignment as possible
* Returns Modified Code Via ClipBoard
*-----------------------------------------------------------------------

3- PROGRAM yclip3jnc.

*&---------------------------------------------------------------------*
*&     Beautiful Function Module Call via clipboard                   
*
*&---------------------------------------------------------------------*
* Author Jayanta Narayan Choudhuri
*         Flat 302
*         395 Jodhpur Park
*         Kolkata 700 068
*       Email sss@cal.vsnl.net.in
*       URL:  http://www.geocities.com/ojnc
*-----------------------------------------------------------------------
* This program takes a parameter as a Function Module Name
* and does a documented "pattern paste"
* Returns pattern Code Via ClipBoard
*-----------------------------------------------------------------------

Link para 3 programas 

Nenhum comentário: