Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

subscreen

Former Member
0 Likes
862

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..

8 REPLIES 8
Read only

Former Member
0 Likes
841

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

Read only

0 Likes
841

Thanks..

But it doesn't work.

plz check wheather my syntax of calling screen is correct or not.

is it correct?

Read only

Former Member
0 Likes
841

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.

Read only

Former Member
0 Likes
841

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

Read only

Former Member
0 Likes
841

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

Read only

0 Likes
841

Thaks Jayanthi...

it works..

Read only

Former Member
0 Likes
841

hi

Check this link

[link|;

Edited by: R$SAP on Feb 3, 2009 10:46 AM

Read only

Former Member
0 Likes
841

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.