Module Pool Select Option
Module Pool Select Option
Module Pool Select Option
Dialog programming)
By Debesh Page 1
Preliminary Knowledge on Module pool coding:
1.
Now right click the object and create a screen say ‘9500’.
It will take to SE51 screenfor Screen painter.5.
By default the screen flow logic has two modules. Status module in
PBO and UserCommand Module in PAI. Uncomment both and double click
each one to generatethe module in respective includes (PBO module in _O
and PAI module in _I include).The Status module has two specific
statements to create PF status and Title.6.
Uncomment the two statements from Status module. Give a name for the
title andfor PF status.7.
PF status is for menu bar, application tool bar and function keys. One can
give a newname for status or can provide an existing one. For new name
double click on thename . It will navigate to SE41 screen for menu
painter. And assign menu bar andapplication tool bar items for the
screen.8.
To design anything on screen go to Lay out and design the screen. During
designone can use fields from dictionary or fields from top include by
usingDictionary/Program fields option.9.
For the fields which are supposed to do some actions we assign function
code in theirattribute.10.
The function code gets captured by the OK_CODE field of type Sy-
Ucomm insideUser command module of PAI. Now specific action items
code can be written basedon the action chosen.11.
At last create a transaction and call it to execute the code.Scenario:Upon
selecting Sales document numbers in select options and choosing sales
organizationvalue (with search help) , a table control wizard to be
displayed which shows the certaindetails about the sales document
header.
Steps for Select Options:
1.
Now right click the module pool object and create a screen. Uncomment
both themodules and double click each to create them inside respective
includes . Nowcreate a sub screen area in the layout where select option
is needed and give it aname . Then call the below code in the flow logic in
PBO.
CALL SUBSCREEN <Sub Screen Area Name> including sy-repid
'100'.
Example on Module Pool Programming (Select Options, Search help,Table control in
Dialog programming)
By Debesh Page 4
Choose the fields that are needed from standard tool bar. Give proper
name and usethem in application tool bar. Now only these many fields will
get activated on ourmodule pool screen.Set Title.
Example on Module Pool Programming (Select Options, Search help,Table control in
Dialog programming)
By Debesh Page 5
Create a sub screen area for select option .Call it in PBO.Handle user
action in user command module.
Example on Module Pool Programming (Select Options, Search help,Table control in
Dialog programming)
By Debesh Page 6
5.
Similar to screen creation, right click on the module pool object and
create atransaction.6.
Create a button for user action. And provide a FCT code for that. Now
click on tablecontrol and follow the steps as follows.
Example on Module Pool Programming (Select Options, Search help,Table control in
Dialog programming)
By Debesh Page 10
Example on Module Pool Programming (Select Options, Search help,Table control in
Dialog programming)
By Debesh Page 11
Example on Module Pool Programming (Select Options, Search help,Table control in
Dialog programming)
By Debesh Page 12
Example on Module Pool Programming (Select Options, Search help,Table control in
Dialog programming)
By Debesh Page 13
Example on Module Pool Programming (Select Options, Search help,Table control in
Dialog programming)
By Debesh Page 14
11.
Write the following code in the User command module to populate table
.WHEN 'GET'.SELECT * FROM vbak INTO CORRESPONDING FIELDS OF
TABLE lt_vbak
Example on Module Pool Programming (Select Options, Search help,Table control in
Dialog programming)
By Debesh Page 15
WHERE vkorg GE lv_low AND vbeln LE lv_high.Result :