Do you Know ?

ABAP Code Generator Tool. ( Part 1 )


Preface:

This tool will help the ABAP developers to generate code  for certain commonly used logic. This tool is intended to reduce manual effort in researching and developing the code for commonly used logics. It will also evade the different design approaches taken by the developer and will help in following a standard approach within the project team. The output code can  be easily plugged into the custom programs with minimal changes.

Objective:

The objective of this tool is to output code based on the user selection.
The tool contains the following options; code will be generated for the option selected.

ALV: Normal list, Block list, Hierarchy list, Grid
Send E-mail
Download File to Presentation Server
Download File to Application Server
Create Outbound IDoc.

Functionality:

The user has to run the report by giving appropriate input; the output will be code for the selected logic.
The output will be displayed in ABAP Editor in display mode. 
The user has to copy the code and paste in appropriate position in the custom program.
The user will have to input certain details in the output code. The user has to search the output code for the statement starting with “<Enter” and fill in the appropriate details in that position, example: internal table name.
The Output code will also contain “Notes”, in the form of comments, in certain cases which will provide the user with additional information.

Sample Run:


To generate code for sending mail with HTML attachment.

Run the code generator tool (report).
Select ‘Trigger Mail’ option
Click on icon and enter the text, in the editor, which needs to be displayed in the mail.

‘Enter Mail Content (Body of Email)’: When user clicks on the Icon, an Editor will be displayed and the user can enter the mail content, in the editor, that needs to appear in the mail.

Select the checkbox ‘Attach File in Mail’

Checkbox ‘Attach file in mail’: When this checkbox is not selected then the output code will not contain logic to generate a mail attachment. When this checkbox is selected, based on the user selection the output will contain code to generate mail attachment.

Select the file type ‘HTML’ from the drop down list.
List box ‘File type’: Based on the file type selected the output code will be generated.

Select the radio button ‘Enter File table structure and corresponding column heading’ and click on the icon  

Radio Button ‘Use Field Catalog as file structure’: User may have a program which contains ALV and the requirement could be to send the ALV output as mail attachment, in such case the user can select this radio button and the output code will contain the logic to generate the mail attachment fields same as the field catalog.

Radio Button ‘Enter file table structure and corresponding column heading’: The user can select this radio button and click on the icon  and enter the field names in order as it in declared in the final internal table; populating column headings is optional.

When the Icon  is selected the following screen appears, enter the field name and column headings in it and click on ‘Continue (Enter)’.


Execute the report. The output code is displayed in ABAP Editor in display mode.


Click here to Continue...!