Wednesday, April 6, 2011

Program to Upload or Download a report along with PF-Status, Text elements, Documentation and others

The purpose of this program is to download/upload a report from a flat file along with its Source code, Attributes, Text elements, PF-status and Documentation in different languages.

Program:

Create a program using the code provided here.

For Downloading the report:

The user has to select the download radio button on the selection screen and specify the report name which he wants to download. A file is thus generated in the default drive with the file name similar to the report name. This file consists of the source code, Attributes, Text elements, PF-status and Documentation of the given report not only in the logon language but also in all the languages in which it is maintained.

When downloading, if a file with the same name already exists then the system prompts the user whether to replace the existing file. If the user selects 'YES' then the content of the existing file is fully over written by the new content, but in case the user selects 'NO' then he has to enter a new file name.

Once the process of downloading is completed, a text file is generated in the specified drive with the file name similar to the program name.

The file content would be like this:

For uploading the report:

The user has to select the upload radio button on the selection screen, specify the report name with which it has to be generated in SAP R/3 (The name of the report should start with 'Y' or 'Z') and the flat file path from which it has to be uploaded. A report is thus generated in the R/3 in Active mode along with its Source code, Attributes, Text elements, PF-status and Documentation and is maintained in all the languages which exist in the file.

When uploading, if a report with the same name already exists then the system prompts for confirmation for overwriting the existing report. If the user selects 'YES' then the existing report is deleted and a new report is generated with the content in the file, but in case the user selects 'NO' then he has to enter a new report name.

Once the process of uploading is completed, a report is generated in the SAP R/3 in active mode with the program name as specified by the user. The source code of the report is shown in the screen shot below:

Note:

  • Once a report is downloaded into a flat file, please do not change the contents

  • Care must be taken when you are overwriting an existing report (in case of upload), or when you are overwriting an existing file (in case of download)


No comments:

Tutorials on SAP-ABAP

Adobe Interactive Forms Tutorials

Business Server Pages (BSP)

Userexits/BADIs

Web Dynpro for ABAP (Step by step procedure for web dynpro,Tutorials on Web Dynpro,)

ALV Tutorials

Blog Archive

goodsites