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

CALL SUBSCREEN

spandana_babu
Participant
0 Likes
701

HI EXPERTS,

i am new to subscreen concepts.

i am having normal screen 200 and sub screen 300, wn i am calling subscreen 300 using push button, i am gettin syntax error

as

<b>Program SAPMZANA_MOD_C

"." or "ID ... FIELD ..." expected after "SUBSCREEN".</b>

can somebody give me a entire sample program. regarding calling subscreens..

regards& thanks

Anand

3 REPLIES 3
Read only

Former Member
0 Likes
560

CALL SUBSCREEN subscreen

[ INCLUDING program screen_number ].

You use this command to call the flow logic of a subscreen. You can also define the subscreen in another module pool. You can transfer the module pool name and the screen program number either as constants or dynamically in a data field. You only require the INCLUDING addition at the PBO event.

Regards

Read only

Former Member
0 Likes
560

Hi ,

Sample code

Selection screens as subscreens on screens.

REPORT demo_sel_screen_as_subscreen.

SELECTION-SCREEN BEGIN OF SCREEN 1100 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-010.

PARAMETERS: p1(10) TYPE c,

p2(10) TYPE c,

p3(10) TYPE c.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN END OF SCREEN 1100.

SELECTION-SCREEN BEGIN OF SCREEN 1200 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-020.

PARAMETERS: q1(10) TYPE c OBLIGATORY,

q2(10) TYPE c OBLIGATORY,

q3(10) TYPE c OBLIGATORY.

SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN END OF SCREEN 1200.

DATA: ok_code TYPE sy-ucomm,

save_ok TYPE sy-ucomm.

DATA: number(4) TYPE n VALUE '1100'.

START-OF-SELECTION.

CALL SCREEN 100.

MODULE status_0100 OUTPUT.

SET PF-STATUS 'SCREEN_100'.

ENDMODULE.

MODULE cancel INPUT.

LEAVE PROGRAM.

ENDMODULE.

MODULE user_command_0100 INPUT.

save_ok = ok_code.

CLEAR ok_code.

CASE save_ok.

WHEN 'BUTTON1'.

number = 1100.

WHEN 'BUTTON2'.

number = 1200.

ENDCASE.

ENDMODULE.

AT SELECTION-SCREEN.

MESSAGE s888(sabapdocu) WITH text-030 sy-dynnr.

This defines two selection screens – 1100 and 1200 – as subscreens.

Regards

Read only

Former Member
0 Likes
560

goto your call subscreen statement, mark it (both words) and press F1, in the help there are examples as well.