‎2009 Jul 28 5:34 PM
Hi
i am structed at this point could you please tell me
how to create select-options in module pool program
‎2009 Jul 28 5:40 PM
‎2009 Jul 28 5:42 PM
Hi
In TOP include u need to define a SELECTION-SCREEN using SELECTION-SCREEN statament:
SELECTION-SCREEN BEGIN OF SCREEN <screen number>.
SELECT-OPTIONS: S_SELOPT FOR .........
PARAMETERS: PARAM LIKE ...............
SELECTION-SCREEN END OF SCREEN.In a module of PBO or PAI (that depends on your logic) u can call that screen using statament CALL SELECTION-SCREEN
Max
‎2009 Jul 28 9:50 PM
Alternatively to what Max have suggested you can include select-options to screen as subscreen.
This just give a bit more flexibility as you only define select-options as subscreen, the rest of the parameters are defined directly on screen layout.
Refer [Select-options in module pool screen|http://sample-code-abap.blogspot.com/2008/06/select-option-in-module-pool-screen.html]
Regards
Marcin
‎2009 Jul 28 11:52 PM
Hi,
Try using the function module COMPLEX_SELECTIONS_DIALOG. Create a variable of type rstabfield. Say you need to create select option for the field vbeln from table vbap, then define the structure tab (type rstabfield) and tab-fieldname = 'VBELN' and tab-tablename = 'VBAP'. Pass this to the parameter tab_and_field of the function module. Create a range say r_vbeln and paa it to the tables parameter range. The defined range will have the values you entered and you can read the table to access the values.
Hope this helps.
Regards,
Sachin
‎2009 Jul 29 3:02 AM
Steps to get SELECT-OPTIONS in module pool programs.
<li>. Start one dialog program with SAPZ_TEST.
<li>. Place the below code in the TOP include of the dialog program.
<li>. Create one screen 2000 .
<li>. Go to Layout of the screen and Define subscreen area on the screen and Name it as g_subscreen.
<li>. Place the below code in the Flow logic of the screen.
PROGRAM SAPMZ_TEST.
TABLES mara.
SELECTION-SCREEN BEGIN OF SCREEN 2100 AS SUBSCREEN.
SELECT-OPTIONS: matnr FOR mara-matnr.
SELECTION-SCREEN END OF SCREEN 2100.
<li>. Activate all.
<li>. Create Transaction code for the dialog program SAPZ_TEST.
<li>. Execute the transaction code. You will see the select-option like we see on Selection-screen.
I hope that it gets u clear idea.
Thanks
Venkat.OPROCESS BEFORE OUTPUT.
CALL SUBSCREEN g_subscreen INCLUDING 'SAPMZ_TEST' '2100'.
PROCESS AFTER INPUT.
CALL SUBSCREEN g_subscreen.
‎2009 Jul 29 6:01 AM
SELECTION-SCREEN BEGIN OF SCREEN <screen number>.
USE SELECT-OPTIONS HERE
SELECTION-SCREEN END OF SCREEN.
Regards,
Vijay
‎2009 Jul 29 6:14 AM
‎2009 Jul 29 6:18 AM
Hi,
Here is another [LINK|http://sample-code-abap.blogspot.com/2008/06/select-option-in-module-pool-screen.html].
Hope it helps.
Thanks,
Sreekanth