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: 

Calling Sub screen

Former Member
0 Kudos

Hi all,

Iam getting a problem in calling a sub screen.

Iam getting error as below:

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

Please go through this code and suggest me

&----


*& Module pool Y_MP_SUB_03

*&

&----


*&

*&

&----


PROGRAM Y_MP_SUB_03.

tables : kna1.

data : begin of itab occurs 0,

name1 like kna1-name1,

land1 like kna1-land1,

end of itab.

CALL SCREEN 100.

&----


*& Module USER_COMMAND_0100 INPUT

&----


  • text

----


module STATUS_0100 output.

  • SET PF-STATUS 'xxxxxxxx'.

  • SET TITLEBAR 'TT'.

CALL SUBSCREEN SUB 'Y_MP_SUB_03' '110' .

endmodule. " STATUS_0100 OUTPUT

module USER_COMMAND_0100 input.

case sy-ucomm.

when 'DISP'.

SELECT NAME1 LAND1 FROM KNA1 INTO ITAB WHERE

KUNNR = KNA1-KUNNR.

APPEND ITAB.

ENDSELECT.

WHEN 'EXIT'.

LEAVE PROGRAM.

ENDCASE.

endmodule. " USER_COMMAND_0100 INPUT

&----


*& Module STATUS_0100 OUTPUT

&----


  • text

----


10 REPLIES 10

paruchuri_nagesh
Active Contributor
0 Kudos

hi

change code like this

call subscreen subarea including 'modulepoolprgname' 'screenno'.

reward if u find useful

regards

Nagesh.Paruchuri

Former Member
0 Kudos

syntax is

CALL SUBSCREEN <Subscreen area> INCLUDING '<program name>' 'SCreen number'.

INCLUDING key word is missing in code.....

Regards

Vasu

0 Kudos

Thanks for your quick reply

even after adding INCLUDING iam gettng same error

0 Kudos

hi

you should call subscreenn not inside of pbo

just call it outside

like this

PROCESS BEFORE OUTPUT.

MODULE STATUS_100.

CALL SUBSCREEN: AREA1 INCLUDING SY-REPID NUMBER1,

AREA2 INCLUDING SY-REPID NUMBER2.

PROCESS AFTER INPUT.

MODULE CANCEL AT EXIT-COMMAND.

MODULE SAVE_OK.

CALL SUBSCREEN: AREA1,

AREA2.

MODULE USER_COMMAND_100.

reward for useful answers

regards

Nagesh.Paruchuri

0 Kudos

Hi Ranjith...

The mistake is this statement must be in the FLOW LOGIC

in PBO:

<b>CALL SUBSCREEN SUB including <program> <SubscreenNo> .</b>

in PAI:

CALL SUBSCREEN SUB .

But you are giving it in module pool.

put it in FLOW LOGIC .. it will work

reward if Helpful.

Former Member
0 Kudos

Hello,

Try this

<b>CALL CUSTOMER-SUBSCREEN b INCLUDING SAPLX... dynp.</b>

Displays and processes the subscreen screen 'dynnr' from program 'prog' in the defined area 'b' of the main screen.

On the screen, you can define areas into which you place dynamic subscreens at runtime. Each area in the screen must have a unique name, which may be up to 10 characters long. In the flow logic, you address an area in the PBO ( PROCESS BEFORE OUTPUT ) event using the following statement:

<b>CALL SUBSCREEN b INCLUDING prog dynnr.</b>

> <b>CALL CUSTOMER-SUBSCREEN b INCLUDING 'SAPLX...' dynnr.</b>

This call is only effective if you have activated the screen in Transaction CMOD as part of an enhancement. Unlike in the CALL SUBSCREEN statement, you must specify the program name as a literal, and it must begin with SAPLX.

Reward if helpful,

Regards,

LIJO

Former Member
0 Kudos

Hi,

try to delete the '' like this:

CALL SUBSCREEN SUB 'Y_MP_SUB_03' 110 .

regs

Former Member
0 Kudos

HI,

u shouldn't use that in module.u have to call that in flow logic.

PROGRAM ZBHTSTRIP.

DATA:OKCODE LIKE SY-UCOMM.

DATA: N1 TYPE I, N2 TYPE I, R1 TYPE I, R2 TYPE I.

DATA SCRNO(4) TYPE N VALUE 2001.

CONTROLS TABS TYPE TABSTRIP.

MODULE USER_COMMAND_1001 INPUT.

CASE OKCODE.

WHEN 'ADD'.

R1 = N1 + N2.

SCRNO = 2001.

TABS-ACTIVETAB = OKCODE.

WHEN 'MUL'.

R2 = N1 * N2.

SCRNO = 2002.

TABS-ACTIVETAB = OKCODE.

WHEN 'BACK'.

SET SCREEN 0.

WHEN 'CLEA'.

CLEAR: N1,N2.

ENDCASE.

ENDMODULE. " USER_COMMAND_1001 INPUT

FORM ON_CTMENU_FORM1 USING MENU1 TYPE REF TO CL_CTMENU.

CALL METHOD MENU1->LOAD_GUI_STATUS

EXPORTING

PROGRAM = 'ZBHTSTRIP'

STATUS = 'MENU1'

MENU = MENU1.

CALL METHOD MENU1->ADD_FUNCTION

EXPORTING

FCODE = 'EXIT'

TEXT = 'EXIT'.

ENDFORM.

MODULE STATUS_1001 OUTPUT.

  • SET PF-STATUS 'xxxxxxxx'.

SET TITLEBAR 'TIT1001'.

ENDMODULE. " STATUS_1001 OUTPUT

FLOW LOGIC:

PROCESS BEFORE OUTPUT.

MODULE STATUS_1001.

<b>CALL SUBSCREEN SUBA INCLUDING 'ZBHTSTRIP' SCRNO.</b>

*

PROCESS AFTER INPUT.

MODULE USER_COMMAND_1001.

  • CALL SUBSCREEN SUBA.

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_2001.

*

PROCESS AFTER INPUT.

  • MODULE USER_COMMAND_2001.

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_2002.

*

PROCESS AFTER INPUT.

  • MODULE USER_COMMAND_2002.

rgds,

bharat.

Former Member
0 Kudos

Try this

CALL SUBSCREEN <Subscreen area> INCLUDING '<program name>' 0100'.

or

CALL SUBSCREEN <Subscreen area> INCLUDING '<program name> 100.

or

data : v_screen like sy-dynnr.

v_screen = '0100'.

CALL SUBSCREEN <Subscreen area> INCLUDING '<program name> v_screen.

Regards

Vasu

0 Kudos

Hi,

I tried this code but same error.

data : v_screen like sy-dynnr.

v_screen = '0110'.

CALL SUBSCREEN SUB including sy-repid v_screen .

please suggest me