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
457

hi all,

can we have a subscreen inside a subscreen.

if so how to call it.

waiting for your reply.

regards.

suki

3 REPLIES 3
Read only

Former Member
0 Likes
431

Hello Suki,

Havent tried this, but logically this shd be very much possible.

The call should be the same as what you do when you call a subscreen from a screen.

In the PBO of subscreen1, do a call screen subscreen2 using the standard syntax.

Similarly in the PAI.

Reward points if this was helpful.

Rgds,

Prashanth.

Read only

uwe_schieferstein
Active Contributor
0 Likes
431

Hello Suki

Here is a simple sample report showing the use of subscreens within a subscreen.

*&---------------------------------------------------------------------*
*& Report  ZUS_SDN_SUBSCREEN_IN_SUBSCREEN
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  zus_sdn_subscreen_in_subscreen.


DATA:
  gd_okcode    type ui_func.



START-OF-SELECTION.


* Call main screen
  CALL SCREEN '0100'.




END-OF-SELECTION.



*&---------------------------------------------------------------------*
*&      Module  STATUS_0100  OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
  SET PF-STATUS 'MAIN_0100'.
  SET TITLEBAR 'TITLE_0100'.  " Main Dynpro

  CLEAR: gd_okcode.

ENDMODULE.                 " STATUS_0100  OUTPUT


*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*       text
*       Flow logic of main screen 100:
*          PROCESS BEFORE OUTPUT.
*            MODULE status_0100.
*
*            CALL SUBSCREEN subscreen1 INCLUDING syst-repid '0110'.
*          *
*          PROCESS AFTER INPUT.
*
*            CALL SUBSCREEN subscreen1.
*
*            MODULE user_command_0100.
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.

  CASE gd_okcode.
    WHEN 'BACK'  OR
         'EXIT'  OR
         'CANC'.
      SET SCREEN 0. LEAVE SCREEN.

    WHEN OTHERS.
  ENDCASE.
  CLEAR: gd_okcode.

ENDMODULE.                 " USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0110  INPUT
*&---------------------------------------------------------------------*
*       text
*       Flow logic of subscreen1:
*          PROCESS BEFORE OUTPUT.
*          * MODULE status_0110.
*
*            CALL SUBSCREEN subscreen1_1 INCLUDING syst-repid '0112'.
*
*          *
*          PROCESS AFTER INPUT.
*
*            CALL SUBSCREEN subscreen1_1 .
*
*            MODULE USER_COMMAND_0110.
*----------------------------------------------------------------------*
MODULE user_command_0110 INPUT.

* Transfer ok-code from subscreen to main screen
*  gd_okcode = syst-ucomm.

ENDMODULE.                 " USER_COMMAND_0110  INPUT

*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0110  INPUT
*&---------------------------------------------------------------------*
*       text
*       Flow logic of subscreen1-1:
*          PROCESS BEFORE OUTPUT.
*          * MODULE STATUS_0112.
*          *
*          PROCESS AFTER INPUT.
*          * MODULE USER_COMMAND_0112.
*----------------------------------------------------------------------*
MODULE user_command_0112 INPUT.

* Transfer ok-code from subscreen to main screen
*  gd_okcode = syst-ucomm.

ENDMODULE.                 " USER_COMMAND_0112  INPUT

Regards

Uwe

Read only

gopi_narendra
Active Contributor
0 Likes
431

Yes you can definitely have a subscreen in a subscreen.

Its just similar to how you call a Subscreen in a main screen.

In the flow logic of the Subscreen just call the new subscreen.

Regards

Gopi