Application Development 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: 

subscreen

Former Member
0 Kudos

Can we use Subscreen in a subscreen

7 REPLIES 7

Former Member
0 Kudos

no u cannot use a subscreen within a subscreen

gopi_narendra
Active Contributor
0 Kudos

Yes you can surely use a subscreen in a subscreen.

Check this

Regards

Gopi

Shivaji16
Active Participant
0 Kudos

Hi Sriram,

Within a subscreen area, we can place a subscreen...

We can have number of subscreens and one subscreen area...

we can call the unique subscreen dynamically within the subscreen area...

Also, following restrictions apply:

1. You should arrange the screen elements so that they are not truncated if a subscreen area is too small.

2. If you want to create several subscreen screens in an ABAP program, you should make sure that the individual screen elements have names unique among the subscreens. If the subscreen screens belong to the same program as the main screen, you should also make sure that names are not used twice there. Otherwise, you must separate data transported from the screen in your ABAP program after each user action.

3. Subscreens cannot have their own OK_CODE field. Function codes linked to user actions on subscreens are placed in the OK_CODE field of the main screen. This also applies to subscreen screens defined in a different program to the main screen.

4. The flow logic of a subscreen screen may not contain a MODULE ... AT EXIT-COMMAND statement. Type E functions may only be handled in the main screen.

5. The flow logic of a subscreen screen may not contain any dialog modules containing the statements SET TITLEBAR, SET PF-STATUS, SET SCREEN, LEAVE SCREEN, or LEAVE TO SCREEN. Any of these statements causes a runtime error. You cannot change the GUI status of a main screen in a subscreen screen.

Former Member
0 Kudos

thanks sivaji

Former Member
0 Kudos

Sriram,

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

Pls. Mark if useful.

Former Member
0 Kudos

hi ,

ok experts i think within a subscreen area u can have many subscreens

but in a subscreen u cannot call another subscreen thats what i know