Professional Documents
Culture Documents
Billing Data of SO Using Oops
Billing Data of SO Using Oops
com
Scenario – This is an ALV report on the Sales Order Data as per the billing date given in the selection
screen with the help of Oops Concept
1) Create the program with the following attributes
2) We initially have to do all the declarations required for the progam.
3) Code for the program is in the following attachment
www.FreeSAPTutorial.com
www.FreeSAPTutorial.com
2 alv.txt
4) Now for displaying the data in an interactive report using oops, we need to make sure, we have
the data in an internal table that has to be displayed in the output. (perform data_retrieval)
5) We do the data retrieval in the first four performs.
6) In the perform form_title, we fill the variable ‘w_title’ with the title that has to come for the alv
report output.
www.FreeSAPTutorial.com
www.FreeSAPTutorial.com
7) In the perform process_data, we do all the calculations required in the FS and fill the data into
the final internal table it_data.
8) And finally in the perform populate_description we fill the final it_data with the description
fields and also we append this table with the Grand Total value in a different color.
9) After all this process we call the screen 9000.
www.FreeSAPTutorial.com
www.FreeSAPTutorial.com
10) Now the screen should have a status bar and the code for this is
www.FreeSAPTutorial.com
www.FreeSAPTutorial.com
11) Take the standard required fields and give the names of the push buttons as shown above.
12) In the module initialize_9000, do the following code.
endmodule.
13) In this perform ,we need to create an object of the instance of the class
cl_gui_custom_container and pass the container name which we created in the screen.
14) Now create an object for the instance of the class ‘cl_gui_alv_grid’ and pass the object created
in the step 13 as the parent in the export parameter.
15) Now create the field catalog in wt_filedcatalog.
16) Now call the method in the object created in step 14 as follows –
In this method pass the parameters layout, it_outtab and the field
catalog mandatorily.
17) In the PAI , user command input put in the following code.
www.FreeSAPTutorial.com
www.FreeSAPTutorial.com
Now we are ready with the code for ALV using Oops, screen 9000 with a container which is mandatory
while working on ALV with oops, and the status bar for the screen. Now execute the report and we get
the following selection screen.
Input some test data for the billing date and you get the output in the container area that is defined in
the screen 9000.
www.FreeSAPTutorial.com
www.FreeSAPTutorial.com
www.FreeSAPTutorial.com