‎2009 Jan 13 7:15 AM
Hi,
I wanted to create transaction variant for my selection screen which i have to design through module pool
if use the following code im not able to get the screen fields during trancation varian creation
call screen 1001.
SELECTION-SCREEN BEGIN OF SCREEN 101.
SELECTION-SCREEN BEGIN OF BLOCK BL1.
select-options:s_matnr for mara-matnr.
SELECTION-SCREEN END OF BLOCK BL1.
Kindly giv me a solution for the above query.
Thanks In Advance,
Santhiya B
‎2009 Jan 13 7:36 AM
Here ur using screen number 1001 in Call Screen,
Where as in SELECTION-SCREEN BEGIN OF SCREEN ur using 101. First correct this. make sure ur Call Screen and SELECTION-SCREEN BEGIN OF SCREEN are in the same report.
‎2009 Jan 13 7:28 AM
Hi,
The easy way out is use a report program so you can have a normal selection screen and enjoy the variant capability for free. You can then do a 'call screen' so the rest of your processing will behave like a dialog program.
If that's not possible, here's another option. It's not elegant, but I've done it. If others have better ways, please do share.
1) Create a dummy program (ZXXXVARI). In this program, all it needs is the selection fields similar to what you have in your module pool.
2) Add buttons to your dialog screen so users can choose variants, save variant, etc.
3) Define internal array VALUTAB LIKE RSPARAMS.
4) When user wants to save their selection, populate VALUTAB, then call FUNCTION 'RS_CREATE_VARIANT' EXPORTING CURR_REPORT = "ZXXXVARI", etc., or call function 'RS_CHANGE_CREATED_VARIANT', depending on whether the variant already exists on the table VARI or not.
5) When user wants to choose a variant to use, just display the variants in VARI under his id. Once he selects a variant, CALL FUNCTION 'RS_VARIANT_CONTENTS' to retrieve the values saved and put them on the dialog screen.
‎2009 Jan 13 8:21 AM
my requirement is to create a module pool selection screen and i ve to create transaction variant for that in shd0
‎2009 Jan 13 7:36 AM
Here ur using screen number 1001 in Call Screen,
Where as in SELECTION-SCREEN BEGIN OF SCREEN ur using 101. First correct this. make sure ur Call Screen and SELECTION-SCREEN BEGIN OF SCREEN are in the same report.
‎2009 Jan 13 7:51 AM
hi san,
you are calling a screen 1001...ok
but in the SELECTION-SCREEN BEGIN OF SCREEN 101..
you written 101...insted of 1001
first correct this..
hope this help you..
Regards
Ritesh J