2009 Sep 23 7:10 AM
Hi,
I need to call subscreen 1001 when checkbox is clicked. I tried writing the IF statement in PBO but it returned me error "Statement 'IF' is not defined. Check your spelling..". But if I put it inside a module in PBO, it gave me error "." or "ID ... FIELD ..." expected after "SUBSCREEN". If I am not allowed to write the condition neither on PBO or MODULE, then how do I call a subscreen with a condition?
2009 Sep 23 8:35 AM
Hi,
<li>Define one variable to have screen number.
<li>Assign function code to the Checkbox. Goto Layout->double click on checkbox->set FctCode.
<li>Define subscreen area on main screen with name SUB1.
<li>Flow logic of screen
DATA:g_screen TYPE sy-dynnr.
<li>user_command_100 module should be like below
process before output.
MODULE status_100.
CALL subscreen: sub11 including sy-repid g_screen
process after input.
CALL subscreen: sub1.
MODULE user_command_100.
Thanks
Venkat.O*----------------------------------------------------------------------*
* MODULE user_command_100 INPUT
*----------------------------------------------------------------------*
MODULE user_command_100 INPUT.
IF g_checkbox = 'X'.
g_screen = '1001'.
ELSE.
g_screen = space.
ENDIF.
ENDMODULE.
Hi,
I need to call subscreen 1001 when checkbox is clicked. I tried writing the IF statement in PBO but it returned me error "Statement 'IF' is not defined. Check your spelling..". But if I put it inside a module in PBO, it gave me error "." or "ID ... FIELD ..." expected after "SUBSCREEN". If I am not allowed to write the condition neither on PBO or MODULE, then how do I call a subscreen with a condition?
2009 Sep 23 7:17 AM
2009 Sep 23 7:19 AM
Hi,
Put the IF condition in the main program. Based on the IF condition call the subscreen dyanmically.
Check program DEMO_DYNPRO_SUBSCREENS.
Regards,
Vinod
2009 Sep 23 7:45 AM
Hi,
Putting the code in FORM still give me error "." or "ID ... FIELD ..." expected after "SUBSCREEN". The demo program does not call subscreen with a condition. I need to know how to call a subscreen with condition.
2009 Sep 23 8:18 AM
Assign a function code to the check box..
and in PBO of the calling screen..
1) write the code
CALL SUBSCREEN: <area> INCLUDING sy-repid <dynpronum>.
// <area> is the subarea u define for the subscreen.
in the PAI of calling screen.
1)write the statemnt..
CALL SUBSCREEN <area>.
2) in a user_command module write the functionality
for the func code o check box accordingly..
useful link..
http://help.sap.com/saphelp_nw04/Helpdata/EN/9f/dbabfe35c111d1829f0000e829fbfe/content.htm
Regards,
Deeba
2009 Sep 23 8:35 AM
Hi,
<li>Define one variable to have screen number.
<li>Assign function code to the Checkbox. Goto Layout->double click on checkbox->set FctCode.
<li>Define subscreen area on main screen with name SUB1.
<li>Flow logic of screen
DATA:g_screen TYPE sy-dynnr.
<li>user_command_100 module should be like below
process before output.
MODULE status_100.
CALL subscreen: sub11 including sy-repid g_screen
process after input.
CALL subscreen: sub1.
MODULE user_command_100.
Thanks
Venkat.O*----------------------------------------------------------------------*
* MODULE user_command_100 INPUT
*----------------------------------------------------------------------*
MODULE user_command_100 INPUT.
IF g_checkbox = 'X'.
g_screen = '1001'.
ELSE.
g_screen = space.
ENDIF.
ENDMODULE.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |