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

subscreens

Former Member
0 Likes
685

I need the easiest way to learn and use subscreens. Any code segment would be very heplful.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
658

Hi!

1. Create a zprogram in se38.

2. Come to se51, give the same program name and some screen no say 1000 then click on create.

3. click on layout, there you will have a subscreen area icon give some name to that screen ex vend_data and 2 push buttons one to call that subscreen and another to exit from program.

4. Come to original program and write the following code there :

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_1000.

*

CALL SUBSCREEN: VEND_data INCLUDING SY-REPID S_NO,

PROCESS AFTER INPUT.

MODULE USER_COMMAND_1000.

CALL SUBSCREEN : VEND_data.

5. Create another screen say 100 and change the screen type in attributes as subscreen.

6. Click on layout and create a vendor screen with some fields and push buttons.

7. Go to the main screen 1000 and double click on module user command.

8. There write the code to display data in the subscreen.

9. If you want object navigator then after creating program in se51 editor there you will have icon called Display Object List.

Regards

Tamá

I need the easiest way to learn and use subscreens. Any code segment would be very heplful.

Thanks.

4 REPLIES 4
Read only

Former Member
0 Likes
659

Hi!

1. Create a zprogram in se38.

2. Come to se51, give the same program name and some screen no say 1000 then click on create.

3. click on layout, there you will have a subscreen area icon give some name to that screen ex vend_data and 2 push buttons one to call that subscreen and another to exit from program.

4. Come to original program and write the following code there :

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_1000.

*

CALL SUBSCREEN: VEND_data INCLUDING SY-REPID S_NO,

PROCESS AFTER INPUT.

MODULE USER_COMMAND_1000.

CALL SUBSCREEN : VEND_data.

5. Create another screen say 100 and change the screen type in attributes as subscreen.

6. Click on layout and create a vendor screen with some fields and push buttons.

7. Go to the main screen 1000 and double click on module user command.

8. There write the code to display data in the subscreen.

9. If you want object navigator then after creating program in se51 editor there you will have icon called Display Object List.

Regards

Tamá

Read only

0 Likes
658

THANKS. IT CONTRIBUTED ME.

REGARDS.

DENIZ..

Read only

0 Likes
658

here is an example how to use a subscreen in tabstrip.

1.First create a screen (2000) in module pool program.

2.in layout option select tabstrip and give a name.

3.select the subscreen and paste it in any one tab for dynamic call , name the subscreen.

4.now create two screens(2100 ,2200) , with screen type as subscreen.

5. in 2100 layout and 2200 layout place ur requirements and continue

Example code.

in PBO of 2000 write this code.

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_2000.

CALL SUBSCREEN SUB INCLUDING SY-REPID DNR.

*

PROCESS AFTER INPUT.

CALL SUBSCREEN SUB.

MODULE USER_COMMAND_2000.

main prgram

ROGRAM ZSCREENSAMPLE .

CONTROLS MYTAB TYPE TABSTRIP. "tabstrip name

DATA : EXIT1, EXIT2.

DATA : DNR TYPE SY-DYNNR.

MYTAB-ACTIVETAB = 'TAB1'.

DNR = '2100'.

CALL SCREEN 2000.

MODULE USER_COMMAND_2000 INPUT.

CASE SY-UCOMM.

WHEN 'TAB1'.

MYTAB-ACTIVETAB = 'TAB1'.

DNR = '2100'.

WHEN 'TAB2'.

MYTAB-ACTIVETAB = 'TAB2'.

DNR = '2200'.

ENDCASE.

ENDMODULE.

&----


*& Module USER_COMMAND_2100 INPUT

&----


  • text

----


MODULE USER_COMMAND_2100 INPUT.

CASE SY-UCOMM.

WHEN 'EXIT1'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE. " USER_COMMAND_2100 INPUT

&----


*& Module USER_COMMAND_2200 INPUT

&----


  • text

----


MODULE USER_COMMAND_2200 INPUT.

CASE SY-UCOMM.

WHEN 'EXIT2'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE. " USER_COMMAND_2200 INPUT

Read only

0 Likes
658

check the simple program demo_dynpro_subscreens

<u><b>Reward if uesful</b></u>

Regards,

Sudheer