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: 

Regarding subscreen

Former Member
0 Kudos

i created a subscreen having 20 fileds. But its truncated and shows only 10 filed son the screen when i assigned to Material master.

Let me know how many fields v can placed on the sub screen ?

is this error arises coz of more fields or any other let me know?

its urgent.

1 REPLY 1

Former Member
0 Kudos

Following is the procedure to include the subscreen in your screen.

To use a subscreen, you must:

Define the subscreen area(s) on a screen

Define suitable subscreen screens

Include the subscreen screen in the subscreen area.

Defining Subscreen Areas

You define subscreen areas using the Screen Painter in the layout of the screen on which you want to embed a subscreen. Each subscreen area on a screen has a unique name, and a position, length, and height. Subscreen areas may not overlap either with each other or with other screen elements. You can also specify whether a subscreen area can be resized vertically or horizontally when the user resizes the window. If the area supports resizing, you can specify a minimum size for it. If the resizing attributes are selected, the PAI event is triggered whenever the user resizes the main screen.

Defining Subscreen Screens

You can create subscreen screens either in the same program or a different program. To create a subscreen screen, enter the screen type Subscreen in the screen attributes. The statically-defined next screen must be the number of the subscreen itself. Choose a size for the screen, making sure that it fits within the subscreen area into which you want to place it. If the subscreen screen is too big for the subscreen area, only the top left-hand corner of it will be displayed.

You create the layout, element list, and flow logic of a subscreen screen in the same way as a normal screen. Subscreens may also include other subscreens. However, the following restrictions apply:

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

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 (see example).

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.

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.

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.

Including Subscreen Screens

You include a subscreen screen using the CALL SUBSCREEN statement in the flow logic of the main screen.

To include a subscreen screen in the subscreen area of the main screen and call its PBO flow logic, use the following statement in the PBO event of the main screen:

Check the below program. This is SAP Standard example

REPORT demo_dynpro_subscreens.

DATA: ok_code TYPE sy-ucomm,

save_ok TYPE sy-ucomm.

DATA: number1(4) TYPE n VALUE '0110',

number2(4) TYPE n VALUE '0130',

field(10) TYPE c, field1(10) TYPE c, field2(10) TYPE c.

CALL SCREEN 100.

MODULE status_100 OUTPUT.

SET PF-STATUS 'SCREEN_100'.

ENDMODULE.

MODULE fill_0110 OUTPUT.

field = 'Eingabe 1'(001).

ENDMODULE.

MODULE fill_0120 OUTPUT.

field = field1.

ENDMODULE.

MODULE fill_0130 OUTPUT.

field = 'Eingabe 2'(002).

ENDMODULE.

MODULE fill_0140 OUTPUT.

field = field2.

ENDMODULE.

MODULE cancel INPUT.

LEAVE PROGRAM.

ENDMODULE.

MODULE save_ok INPUT.

save_ok = ok_code.

CLEAR ok_code.

ENDMODULE.

MODULE user_command_0110 INPUT.

IF save_ok = 'OK1'.

number1 = '0120'.

field1 = field.

CLEAR field.

ENDIF.

ENDMODULE.

MODULE user_command_0130 INPUT.

IF save_ok = 'OK2'.

number2 = '0140'.

field2 = field.

CLEAR field.

ENDIF.

ENDMODULE.

MODULE user_command_100 INPUT.

CASE save_ok.

WHEN 'SUB1'.

number1 = '0110'.

WHEN 'SUB2'.

number1 = '0120'.

CLEAR field1.

WHEN 'SUB3'.

number2 = '0130'.

WHEN 'SUB4'.

number2 = '0140'.

CLEAR field2.

ENDCASE.

ENDMODULE.

**********************************************

Check if u have added all 20 fields in subscreen......and also see if the size is enough to accomodate lla the fields....!!!

regards

vasu