Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Insert comment in your ABAP code on fly

Former Member
0 Likes
1,530

Once i have seen a tool on SDN which can insert comments in your code.

So basically if your code line is some thing like this

TABLES: KNA1.

the tool will change it to :

TABLES: KNA1. "Customer Master

I have tried searching it on SDN blogs but in vein.

I will appreciate if you can suggest links related to such a tool.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
603

Hi,

This program in the below link takes an existing ABAP report, and does the following:

  • - Attempts to move comments to the end of the line. Added because pretty printer in 4.6 no longer does this

  • - 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

  • - Checks to ensure that the program being modified is either a

  • Local Private Object, or on a transport that belongs to the

  • person running this program. This is to help prevent screwups.

  • - Calls function PRETTY_PRINTER to do the SAP standard pretty print after the custom comments have been created

http://sap.ionelburlacu.ro/abap/sap2/Beautify_Source_Code.html

2 REPLIES 2
Read only

Former Member
0 Likes
603

hi,

that's possible when if u record transaction code with 'SHDB' recording,,

u can study more about SHDB transaction code to learn more about this,,,

reward points if useful,

seshu.

Read only

Former Member
0 Likes
604

Hi,

This program in the below link takes an existing ABAP report, and does the following:

  • - Attempts to move comments to the end of the line. Added because pretty printer in 4.6 no longer does this

  • - 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

  • - Checks to ensure that the program being modified is either a

  • Local Private Object, or on a transport that belongs to the

  • person running this program. This is to help prevent screwups.

  • - Calls function PRETTY_PRINTER to do the SAP standard pretty print after the custom comments have been created

http://sap.ionelburlacu.ro/abap/sap2/Beautify_Source_Code.html