Sap Abap On Hana - Module Pool-1
Sap Abap On Hana - Module Pool-1
Dialog program is also used when we need to navigate back and forth
between screens
Dialog programs are created with type as ‘M’ – Module Pool. They cannot be
executed independently and must be attached to at least one transaction code in
which you specify an initial screen.
Report Program:
A report is a program that typically reads and analyzes data in database tables
without changing the database.
Dialog Program:
A dialog program allows you to work interactively with the system and to
change the contents of the database tables. Each dialog program has a certain
sequence of screens that are processed by the system one after the other.
Transaction code
Screens
GUI status
ABAP Program
• Each screen and GUI status in the R/3 System belongs to one ABAP
program.
• The ABAP program contains the dialog modules that are called by the
screen flow logic, and also process the user input from the GUI status.
• ABAP programs that use screens are also known as dialog programs.
• In a module pool (type M program); the first processing block to be
called is always a dialog module. However, you can also use screens in
other ABAP programs, such as executable programs or function modules.
The first processing block is then called differently; for example, by the
• Process Before Output (PBO) event: which is processed before the screen
is displayed
• Process After Input (PAI) event: which is processed after a user action on
the screen
• Process on help request (POH): which is processed when F1 is pressed
• Process on value request (POV):which is processed when F4 is pressed
Dynpro
Step 4: Now right-click on the Program name and create a screen. Give Screen
Number “0001” and click on Tick. Give a short description and click on Layout.
Now Screen Painter will open. Click on “Dictionary/Program Fields Window”.
Enter the name of the Work Area you created in TOP Include and click on “Get
from Program” and select the fields you want to display. Now drag and drop it
on the screen painter. Now select “Text tool” from the side panel and drop it
next to the input tab and write the text which you want to display for the input
field. Do the same for all the input fields as shown below. Now double click on
the Input field and write the name for the input field as shown below. Now
select the Text tool to add some text on the screen, such as headings. Now
Table controls and step loops are objects for screen table display that you add to
a screen in the Screen Painter.
From a programming standpoint, table controls and step loops are almost
exactly the same. Table controls are simply improved step loops that display
data with the look and feel associated with tables in desktop applications.
Table controls also offer special formatting features (some automatic, some
optional) that make tables easier to look at and use. Table Control provides –
• automatic table resizing (vertical and horizontal) when the user resizes
the window
• separator lines between rows and between columns (vertical and
horizontal)
• column header fields for all columns
One feature of step loops is that their table rows can span more than one line on
the screen. A row of a table control, on the other hand, must always be
contained in a single line (although scrolling is possible).
2.Give a name to the table control. In the ABAP program declare a structure
with the same ( CONTROLS <tcl> type TABLEVIEW USING SCREEN <scrn
>)
If you want a selection column, check the appropriate check box in the
attributes and give it a name. Create the field in the ABAP program.
ENDLOOP.
In the PAI you should have.
LOOP at <itab>.
ENDLOOP.
It is within the loops that data transfer happens between the screen and the
internal table.When you populate the internal table use DESCRIBE TABLE
<itab> LINES <cntrl_name>-lines, to store the total number of lines in the
control.The FIELD statement can be used to control when the data transfer
happens
Fetching Columns:
1. Sales Document Number(VBELN)
2. Item Number (POSNR)
3. Material Number(MATNR)
4. Batch(CHARG)
5. Net value(NETWR)
Step 3: Double click on screen “100”, the below screen will be displayed there
we need to click on yes button. Enter the short description and click
on “Layout” button. Design the screen like as below. Save, check and activate.
Now for Screen 0101 , we have to create Table Control. Also create a Push
Step 4: Writing the code for fetching the data from VBAP table using
SELECT query on ‘DISPLAY’ button.
In PBO perform Loop at Internal Table IT_VBAP with table controls. And in
the PAI we should have empty loop.
Step 6:
Transaction Creation
Go to SE93 transaction code. Or you can create from se80 workbench also.
Provide Transaction code and click on create button. The below screen will be
displayed, Provide the required fields. Click on save button