Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Probelm in module pool selection screen

former_member842213
Participant
0 Likes
625

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
595

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.

4 REPLIES 4
Read only

Former Member
0 Likes
595

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.

Read only

0 Likes
595

my requirement is to create a module pool selection screen and i ve to create transaction variant for that in shd0

Read only

Former Member
0 Likes
596

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.

Read only

Former Member
0 Likes
595

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