2007 Jul 16 10:24 AM
hello friends,
i have subscreen area called 'sub' and sub-screen num is 113.
my sub-screen area is in screen 112,so after the PBO module of 112 i have written the call subscreen statement, but i want the subscreen to be displayed only after i click a pushbutton is that possible,pls explain with help of some code.
thanks
2007 Jul 16 10:29 AM
Hi Amit..
It is possible..
You can call subscreen dynamically..
You can write a module in PBO in which u will check if push button is clicked or not by checking OKCode of push button u can set screen number dynamically...
and call subscreen in PBO le.g
data: dynnr like sy-dynnr.
if OK_CODE = ' PUSH BUTTON'.
dynnr = '113'.
endif.
CALL SUBSCREEN sub-area INCLUDING sy-repid dynnr.
Regards
Prax
2007 Jul 16 10:28 AM
Hi...,
You cannot put condition for the call subscreen in the PBO event directly...
take a variable for the screen no of the sub screen area.. lets say (w_screen).
declare w_screen in the module pool program !!
data w_screen(4) type n value '0199'.
and the screen '0199' should be an empty screen ... just create it and give sub description and select subscreen radio button....
In the PBO event of 112 screen
call subscreen <area> including sy-repid w_screen.
in the pbo event of 112 screen...
case ok_code.
when 'PUSH'.
w_screen = 113.
endcase.
regards,
sai ramesh
2007 Jul 16 10:29 AM
Hi Amit..
It is possible..
You can call subscreen dynamically..
You can write a module in PBO in which u will check if push button is clicked or not by checking OKCode of push button u can set screen number dynamically...
and call subscreen in PBO le.g
data: dynnr like sy-dynnr.
if OK_CODE = ' PUSH BUTTON'.
dynnr = '113'.
endif.
CALL SUBSCREEN sub-area INCLUDING sy-repid dynnr.
Regards
Prax
2007 Jul 16 10:32 AM
i have already tried putting condition with help of the ok code,like if the button is pressed then make dynnr = '113' else dynnr = ' ' but then im gettin a dump
2007 Jul 16 10:35 AM
Hi..,,
<b>You should not make dynnr = ' '. Then it goes for a dump like "call to screen 0000 is made"
</b> You should not do that. you have to create an empty screen and give this screen value to the dynnr field....
take a variable for the screen no of the sub screen area.. lets say (w_screen).
declare w_screen in the module pool program !!
data w_screen(4) type n value '0199'.
and the screen '0199' should be an empty screen ... just create it and give sub description and select subscreen radio button and activate it...dont write anything on this screen....
In the PBO event of 112 screen
call subscreen <area> including sy-repid w_screen.
in the pbo event of 112 screen...
case ok_code.
when 'PUSH'.
w_screen = 113.
endcase.
regards,
sai ramesh
2007 Jul 16 10:33 AM
Hello,
try this.
Regards,
Rakesh
wa_screen TYPE sy-dynnr value '0112'.
PROCESS BEFORE OUTPUT.
MODULE status_9200.
CALL SUBSCREEN sub1 INCLUDING sy-repid wa_screen.
*
PROCESS AFTER INPUT.
MODULE user_command_9200.
CALL SUBSCREEN sub1.
<b>In the user command write appropriate code to fill wa_screen</b>
eg:
CASE ok_code.
WHEN 'BACK'.
CLEAR ok_code.
LEAVE TO SCREEN '9100'.
WHEN 'BT1'.
wa_screen = '9201'.
CLEAR ok_code.
WHEN 'BT2'.
wa_screen = '9202'.
CLEAR ok_code.
<b>Reward all usefull answers</b>