2010 Aug 18 8:31 AM
hi masters,
i am having a problem with call subscren
i have a main screen. in main screen i have an input screen called LOCATION.
in location if the user gives 'SIDING' then i need to call the subscreen '0111'.
so i have created a subscreen area in my main screen called SUB_AREA.
I have created a subscreen with '0111' type SUBSCREEN.
In PBO of main screen i have declared like this
CALL SUBSCREEN SUB_AREA INCLUDING 'ZDYNAMIX_SCREE_TOMS' '0111'..
PAI
CALL SUBSCREEN SUB_AREA .
when the user gives SIDING for LOCATION and clicks on ENTER i need to display my SUBSCREEN '0111'.
where and how i have to write a conditioanl logic?
can i have some info pls?
much appriciated and thanks to everyone for your support.
thank you,
pasala.
2010 Aug 18 8:47 AM
Hello
You can use a variable for screen number,
and change this screen number depend on your logic :
* --1-- describe a screen number variable in _global data of your program_
DATA: gv_screen_number LIKE sy-dynnr.
* --2-- call a module from PBO
* this modul will decide which number to be called :
PROCESS BEFORE OUTPUT.
MODULE decide_screen_number.
* --3-- use variable gv_screen_number for screen to be called :
CALL SUBSCREEN SUB_AREA INCLUDING 'ZDYNAMIX_SCREE_TOMS' gv_screen_number.
and MODULE decide_screen_number should look like that :
MODULE decide_screen_number.
if <...logic >.
gv_screen_number = '0111'.
else.
gv_screen_number = ...
endif.
ENDMODULE.Edited by: Bulent Balci on Aug 18, 2010 9:47 AM
hi masters,
i am having a problem with call subscren
i have a main screen. in main screen i have an input screen called LOCATION.
in location if the user gives 'SIDING' then i need to call the subscreen '0111'.
so i have created a subscreen area in my main screen called SUB_AREA.
I have created a subscreen with '0111' type SUBSCREEN.
In PBO of main screen i have declared like this
CALL SUBSCREEN SUB_AREA INCLUDING 'ZDYNAMIX_SCREE_TOMS' '0111'..
PAI
CALL SUBSCREEN SUB_AREA .
when the user gives SIDING for LOCATION and clicks on ENTER i need to display my SUBSCREEN '0111'.
where and how i have to write a conditioanl logic?
can i have some info pls?
much appriciated and thanks to everyone for your support.
thank you,
pasala.
2010 Aug 18 8:47 AM
Hello
You can use a variable for screen number,
and change this screen number depend on your logic :
* --1-- describe a screen number variable in _global data of your program_
DATA: gv_screen_number LIKE sy-dynnr.
* --2-- call a module from PBO
* this modul will decide which number to be called :
PROCESS BEFORE OUTPUT.
MODULE decide_screen_number.
* --3-- use variable gv_screen_number for screen to be called :
CALL SUBSCREEN SUB_AREA INCLUDING 'ZDYNAMIX_SCREE_TOMS' gv_screen_number.
and MODULE decide_screen_number should look like that :
MODULE decide_screen_number.
if <...logic >.
gv_screen_number = '0111'.
else.
gv_screen_number = ...
endif.
ENDMODULE.Edited by: Bulent Balci on Aug 18, 2010 9:47 AM
2010 Aug 18 9:31 AM
thank you so much it was a great reply.
small issue.
data : dynnr type sy-dynnr.
in PBO
module fill_dynamic_screen.
CALL SUBSCREEN SUB_AREA INCLUDING 'ZDYNAMIX_SCREE_TOMS' dynnr.
when i give condition such as
-
module FILL_DYNAMIC_SCREEN output-----.
if not location is initial.
if location = 'Depot'.
dynnr = '0111'.
endif.
endif.
endmodule-----.
and after module call i have a statement like this.
CALL SUBSCREEN SUB_AREA INCLUDING 'ZDYNAMIX_SCREE_TOMS' dynnr.
now at this stage in my DYNNR is eaither initial or '0100'(which is main screen) so it gives me runtime error saying dynpor does not exist.
can you please tell me as to how can i avoid this problem?
2010 Aug 18 9:49 AM
Hi,
You need one more Subscreen having no Screen element on it say this screen as 0112 in else case you can call this Screen like below.
if <logic>.
dynnr = '0111'.
else.
dynnr = '0112'.
endif.Hope this will solve our your problem, Please reply in case of any Confusion,
Thanks and Regards,
Faisal
2010 Aug 18 10:57 AM
Hi,
It's not possible to use logic in PBO directly,
so you can not use an if condition in PBO like that :
if <logic>.
call subscreen ....
endif.
I'm with Faisal , you have to use an empty screen.
2010 Aug 18 11:03 AM
thank you guys.... u both made my day a rocking day... thank you.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |