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

how to call a sub screen at user command?

Former Member
0 Likes
2,641

hi all,

i want to call subscreen on my main screen at user command ...how to do that?

Deepak

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,778

use..

PBO.

Call subscreen <SUBSCREEN NAME> Including sy-repid(PROGRAM NAME) G_DYNNR(SCREEN NUMBER'.

PAI

module user_command.

Call subscreen <subscreen name>

Module user_command.

case sy-ucomm.

when 'BUT1'.

g_dynnr = 200.

when 'BUT2'.

g_dynnr = 300.

Endcase.

end module

santhosh

9 REPLIES 9
Read only

Former Member
0 Likes
1,778

hi

first define a screen as subscreen while creating a screen

then

case sy-ucomm.

when '<funcitoncode>'.

call subscreen <scrno>.

endcase.

Read only

Former Member
0 Likes
1,779

use..

PBO.

Call subscreen <SUBSCREEN NAME> Including sy-repid(PROGRAM NAME) G_DYNNR(SCREEN NUMBER'.

PAI

module user_command.

Call subscreen <subscreen name>

Module user_command.

case sy-ucomm.

when 'BUT1'.

g_dynnr = 200.

when 'BUT2'.

g_dynnr = 300.

Endcase.

end module

santhosh

Read only

Former Member
0 Likes
1,778

Hi Deepak,

You just need to write in PAI module...

Module USER_COMMAND INPUT.

CASE SY-UCOMM.

WHEN 'XYZ'.

CALL SUBSCREEN sub_area.

ENDCASE.

endmodule.

this is regarding module pool program.

on Selections screen of report this is not possible.

<b>Reward points if helpful,</b>

Regards,

Tejas

Read only

0 Likes
1,778

hi,

if i am doing this its giving me error : - "," or "ID ... FIELD ..." expected after "SUBSCREEN".

deepak

Read only

0 Likes
1,778

That is because of that u have not created a subscreen in the normal screen.

e.g Screen 100 is ur normal screen.

In the layout of this screen u ll find a subscreen button and just place it and u have to name it.This will become the ID for the subscreen. U have to pass this ID while calling the screen.

CALL SUBSCREEN ID( name of ur subscreen without single quotes) INCLUDING sy-repid sy-dynnr.

Thanks & Regards

Santhosh

Read only

0 Likes
1,778

hi

i have created sub screen area .sub screen statement is not working in any module ...but its working in flow logic windows..i want to call subscreen on user command ..for that i have to write call statement in some module as if & case statement are not supported in flow logic windows....how to do it

Deepak

Read only

former_member632991
Active Contributor
0 Likes
1,778

Hi,

just call that screen

CALL SUBSCREEN SUB1.

Regards,

Sonika

Read only

Former Member
0 Likes
1,778

hi,

try like this

case -sy-ucomm.

case '1'.

<b>CALL SUB-SCREEN <scrren no > STARTING AT <x pos> <y pos> ENDING AT <x pos> <y pos>.</b>

........

reward if helpful

ravi

Read only

Former Member
0 Likes
1,778

<b>Check the code written below....</b>

REPORT Z8CKG_TABSTRIP_SELSCREEN.

selection-screen begin of tabbed block tabb1 for 4 lines.

selection-screen tab (15) text-006 user-command ucomm1

default screen 101.

selection-screen tab (15) text-007 user-command ucomm2

default screen 102.

selection-screen tab (17) text-008 user-command ucomm3

default screen 103.

selection-screen end of block tabb1.

selection-screen begin of screen 101 as subscreen.

parameter: p_field1 type i.

selection-screen end of screen 101.

selection-screen begin of screen 102 as subscreen.

parameter: p_field2 type i.

selection-screen end of screen 102.

selection-screen begin of screen 103 as subscreen.

parameter: p_field3 type i.

selection-screen end of screen 103.

<b>Reward points if it solves ur query</b>

Thanks

Chinmay