‎2009 Feb 03 6:39 AM
Hi experts...
I want to call a subscreen when a radiobutton is clicked.
I have written code as---
IF RB1 = 'X'.
CALL SUBSCREEN SA1 INCLUDING ZSCREEN_OMM 300.
ENDIF.
but syntax error is comming...
'' screen expeted not subscreen''.
how to resolve this..
thanks..
‎2009 Feb 03 7:11 AM
Hi
Try: CALL SUBSCREEN SA1 INCLUDING SY-REPID '0300'.
Sometimes it doesn't allow you to pass the subscreen no directly. So you may need to store it in a variable and use that in the CALL statement.
Hope this helps
Regards,
Jayanthi.K
‎2009 Feb 03 7:15 AM
Thanks..
But it doesn't work.
plz check wheather my syntax of calling screen is correct or not.
is it correct?
‎2009 Feb 03 8:18 AM
jus try this.
CALL SUBSCREEN SA1 INCLUDING 'ZSCREEN_OMM' '300'.
Also better declare a variable for the scr num. and use it instead of hardcoding.
‎2009 Feb 03 8:28 AM
Hi,
If you are having 2 radiobuttons, select both->right click->radio button group->define.
Give a name for that group.
Write code as:
case sy-ucomm.
when 'R_G'. "group name"
CALL SUBSCREEN SA1 INCLUDING ZSCREEN_OMM screen_no.you can pass the screen_no from the program.
Edited by: Deepthi S on Feb 3, 2009 1:59 PM
‎2009 Feb 03 9:32 AM
hi
Where are you writing the code? In the Flow logic or PAI module.
Check out the program DEMO_DYNPRO_SUBSCREENS. It calls different subscreens depending on the button pressed.
Following is the code that displays the subscreen depending on the radio button clicked. Main screen is 300 with subscreen area SA1. Subscreens are 301 and 302. They contain labels with different text.
REPORT YFEB3_SUBSCREEN .
DATA: OK_CODE LIKE SY-UCOMM,
RAD1(1),
NO(4).
no = '0301'.
call screen 300.
*&---------------------------------------------------------------------*
*& Module STATUS_0300 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE STATUS_0300 OUTPUT.
SET PF-STATUS 'BACK'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0300 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0300 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0300 INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'BACK'.
LEAVE PROGRAM.
WHEN 'GRP1'.
IF RAD1 = 'X'.
NO = 301.
ELSE.
NO = 302.
ENDIF.
ENDCASE.Flow Logic: For screen 300.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0300.
call subscreen sa1 including sy-repid no.
PROCESS AFTER INPUT.
call subscreen sa1.
MODULE USER_COMMAND_0300.Hope this helps
Regards,
Jayanthi.K
‎2009 Feb 05 7:00 AM
‎2009 Feb 03 9:45 AM
‎2009 Feb 03 9:55 AM
Hi ABAPER,
In addition to the above, Check whether you have declared your screen as a 'SUBSCREEN' instead of 'NORMAL SCREEN' and also check whether you have defined subscreen area in the screen where you are displaying the subscreen.
Regards,
Goutham.