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: 

how to call a sub screen at user command?

deepak_kumar11
Participant
0 Kudos

hi all,

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

Deepak

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

Former Member
0 Kudos

hi

first define a screen as subscreen while creating a screen

then

case sy-ucomm.

when '<funcitoncode>'.

call subscreen <scrno>.

endcase.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

hi,

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

deepak

0 Kudos

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

0 Kudos

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

former_member632991
Active Contributor
0 Kudos

Hi,

just call that screen

CALL SUBSCREEN SUB1.

Regards,

Sonika

Former Member
0 Kudos

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

Former Member
0 Kudos

<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