How To Create Screen In Sap Abap
SAP ABAP Table Control and Subscreen
Table control is one of a ABAP displaying mechanisms. With the help of Table control we can see the output table in different visibility approach. Today, I will explain to you creating table control and subscreen, then I give you some example codes about this topic.
So, we starting how can you creating table control in a screen. With this document, this job is child's play :) I will explain in detail from 0 to 100.( I will skip creating program part, because you heard something about table control, you must know those parts :) )
Firs t ly, we create a simple program, as you can see program is totally empty. We right click to program name and follow this path Create->Screen.
Enter screen number (Numbers isn't important except 1000 because 1000 screen number using selection screen codes in program, I do not suggest). In this example i will give 9000 and next part entering Short Description then click Layout button in top layer.
Table control with wizard is the control provided by SAP, in which the users are not needed to code separately for table control operations. It generates automatically system generated code for the following table control operations.
- Insertion
- Deletion
- Scrolling
- First
- Last
- Next
- Previous
- Select
- Select all
- Deselect
- Deselect all
Go to the layout of the screen, where you can find the table control with wizard. Drag and drop the table control with wizard to the layout of the screen.
One you drag and drop the control a popup will appear.
Press Continue, in the next screen enter the table control name as "TC_9000" or your own name.
In the next screen you input the internal table and work area which has been created earlier.
Note: Before it is done, you must activate the page, in which you have declared the internal table and work area. Then only this table control screen will take its properties.
The next screen will automatically retrieve the fields available in the internal table and show. We have to select those fields, which and all should be displayed in table control.
Select the input/output attributes as "Input Control" and give the field for selection of table control rows. Select the single line selection because I will use this in an example code.
In this part, you will select checkbox about scrolling, insert/delete and select/ deselect.
Note: This Checkboxes relating table control width and high values.
Click on Continue, the table control with auto generated code will automatically be created.
This will automatically create PBO & PAI modules for table control operations.
SUBSCREEN
Creating a subscreen on a ABAP dynpro screen is a fairly simple process, you just add a subscreen area (i.e. SBSCRN) to your main program screen and then add the following ABAP code to the dynpro screens PBO flow logic.
For this example the main screen is 9000 and the subscreen is 0200. You then build the subscreen content as you would any other screen.
This is the PBO and PAI part. Call subscreen <subscreen_name> including <program_name><subscreen_number>.
•Subscreens do not have own ok_codes
•Ok_code is parsed by the main screen
•No changes to GUI status during subscreen flow logic
•Following instructions are not allowed in subscreens:
–SET TITLEBAR, SET PF-STATUS, SET SCREEN, LEAVE SCREEN, LEAVE TO SCREEN
EXAMPLE
Example report about table control and subscreen:
Thank you for reading. Stay tuned!
What do you guys think? I love to know your thoughts. Kindly like, share or comment below.
Ahmet Acar.
How To Create Screen In Sap Abap
Source: https://acarahmet.medium.com/sap-abap-table-control-and-subscreen-1e7bf58edb96
Posted by: kingassfor.blogspot.com
0 Response to "How To Create Screen In Sap Abap"
Post a Comment