‎2010 Oct 05 10:58 AM
Hi All,
I have a requirement where i have to develop a module pool program , which uses subscreens.
My req is i have a drop down list.
if the values selected in drop down is dz then i have to display the receipt details in the subscreen area.
and if the value selected in the drop down is kz i have to display the payment details in the subscreen area.
i have designed two subscreen areas and two sub screens
now how should i get the subscreen to be dispalyed in the screen based on drop down input.
With Regards,
S.Asha.
‎2010 Oct 05 11:19 AM
Hi Asha
first define a variable of type sy_dynnr in your top include to capture the screen number .
definition:
data: dynnr1 type sy-dynnr values '0101'. " first subscreen (Receipt Detail),
dynnr2 type sy-dynnr values '0102'. " second subscreen(payment detail),
v_repid type sy-repid values sy-repid.
in the flowlogic PBO of your main screen.
Module PBO_9001.
call subscreen SUB1 including v_repid dynnr1. " sub1 is the subscreen area 1 in your main screen(Normal Screen)
call subscreen SUB2 including v_repid dynnr2. " sub2 is the subscreen area 2 in your main screen
In PAI flow logic of your main screen.
call subscreen sub1.
call subscreen sub2.
Module user_command_input_9001.
After that in your PAI in the main program.
apply the conditions and call your subscreen accordingly.
I hope this will work for you.
Thanks
Lalit Gupta
‎2010 Oct 05 11:09 AM
Hi
first create a pushbutton on the screen below dropdown field, When th value DZ is selected from the drop down, then click on the pushbutton to proceed to receipt details screen, to payment details screen when KZ is selected.
This should be done by calling the corresponding Subscreen by using CALL SUBSCREEN statement in the PAI of the corresponding screen.
Hope this gives an idea.
Regards
Abhii
‎2010 Oct 05 11:15 AM
Hi,
In the PAI of the screen. depending on the value selected from the drop down list.
call the subscreen.
regards,
Sakshi
‎2010 Oct 05 11:19 AM
Do you think I have written other than what you have wrote.
Regards
Abhii
‎2010 Oct 05 11:19 AM
Hi Asha
first define a variable of type sy_dynnr in your top include to capture the screen number .
definition:
data: dynnr1 type sy-dynnr values '0101'. " first subscreen (Receipt Detail),
dynnr2 type sy-dynnr values '0102'. " second subscreen(payment detail),
v_repid type sy-repid values sy-repid.
in the flowlogic PBO of your main screen.
Module PBO_9001.
call subscreen SUB1 including v_repid dynnr1. " sub1 is the subscreen area 1 in your main screen(Normal Screen)
call subscreen SUB2 including v_repid dynnr2. " sub2 is the subscreen area 2 in your main screen
In PAI flow logic of your main screen.
call subscreen sub1.
call subscreen sub2.
Module user_command_input_9001.
After that in your PAI in the main program.
apply the conditions and call your subscreen accordingly.
I hope this will work for you.
Thanks
Lalit Gupta
‎2010 Oct 05 11:54 AM
Hi Lalit Gupta,
I have followed the procedure which you have suggested.Now I am getting the subscreens visible when I execute the program.
But I the problem is i have to get the subscreen visible based on the selected value from drop down.
can you suggest me how to make a sub screen visible and invisible, i think it will work.
Thanks for reply.
With Regards,
S.Asha
‎2010 Oct 05 12:57 PM
Hi Asha
for that you need to define one blank subscreen.
change the DYNNR1 or DYNNR2 number with the blank subscreen number on the basis of your condition.
suppose at the run your data is coming.
but when you select one thing from your drop down list then set the DYNNR1 or DYNNR2 number to that blank subscreen number if you do not want to display any data.
Or display balnk screen at the run time and when you select the desired value fromthe drop down then change the value of DYNNR1 or DYNNR2 with the subscreen having the data.
for that you need to use if.........endif condition.
My SAP is not working right now otherwise I could have sent you the code fo IF condition.
Hope you will figure it out.
thanks
Lalit Gupta
‎2010 Oct 06 9:15 AM
Hi Lalit Gupta,
thank you,
my issue is solved.
With Regards,
S.Asha.