Introduction:

Most of the Standard report transaction codes do not have the option to upload the report data to the Application server (AL11), it can be achieved by using a wrapper program of the standard Tcode using SUBMIT program.

Blog content:

Let us take the standard tcode FBL5N for our case, initially have the selected input parameters from the FBL5N to the selection screen of our wrapper program, also we had options to either upload to an application server or just display.

Upload Standard Report
Upload Standard Report

In our case we had certain parameters in the dynamic selections, so we used the Function module FREE_SELECTIONS_RANGE_2_EX to the format which can be used in SUBMIT program

Upload Standard Report

Now pass the selection screen parameters to the standard program of FBL5N which is RFITEMAR using the SUBMIT along with dynamic selections

Upload Standard Report

To pass the data now from memory to our internal table, need to use a class method CL_SALV_BS_RUNTIME_INFO=> GET_DATA_REF, once we get the report data in the internal table GR_DATA, we can get the required fields and can appended to our local final internal table to display or upload to application server.

Upload Standard Report

Used factory method of CL_SALV_TABLE to display

Upload Standard Report

Used OPEN DATASET, TRANSFER, CLOSE DATA SET to upload the data to the Application server.

Upload Standard Report

Let’s run the program and see if it works…

Upload Standard Report

Conclusion:

We can say that any standard program can be called using SUBMIT and we can export the data from memory. We can do anything according to our requirement like upload to an application server or presentation server or pass to any function module, etc.

Leave a comment

Your email address will not be published. Required fields are marked *