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

Former Member
0 Likes
352

Hi guys,

i want to call subscreen in another screen, in that subscreen i want to call another screen and one table control screen... plz can any one send me the logic... of this Development....

2 REPLIES 2
Read only

Former Member
0 Likes
327

Hi,

I think its not possible to call a screen in a sub-screen. In a sub-screen you can call another sub-screen only..

Regards,

sudha

Read only

Former Member
0 Likes
327

hi,

u can't call a normal screen from subscreen but u can call anothe rsubscreen and place table control in it.

ex: in this i am using normal screen 100 and in that i am calling subscreen which contain table control.

In screen 100 i took vendor number,name and land1from copy repository.i took three buttons display,sales exit.ehen i click display it will display vendor information.when i click sales it will call 200 subscreen.and to 300 for tem details

flow logic of 100:

process before output.

module status_0100.

process after input.

module user_command_0100.

flow logic for 200.(table control logic)

process before output.

loop at itab1 with control tc2.

module status_0200.

endloop.

process after input.

module user_command_0200.

loop at itab1.

endloop.

this the program.

report zhm_multtc .

tables : kna1, vbak, vbap.

data: begin of itab occurs 0,

kunnr like kna1-kunnr,

land1 like kna1-land1,

name1 like kna1-name1,

end of itab.

data: begin of itab1 occurs 0,

kunnr like vbak-kunnr,

vbeln like vbak-vbeln,

erdat like vbak-erdat,

netwr like vbak-netwr,

end of itab1.

data: begin of itab2 occurs 0,

vbeln like vbap-vbeln,

posnr like vbap-posnr,

matnr like vbap-matnr,

end of itab2.

data: fnam(10), fval(10) type n.

controls tc2 type tableview using screen '200'.

&----


*& Module USER_COMMAND_0100 INPUT

&----


module user_command_0100 input.

case sy-ucomm.

when 'DISPLAY'.

refresh itab.

select kunnr land1 name1 from kna1 into itab where kunnr = kna1-kunnr.

append itab.

endselect.

<b> when 'SALES'.

refresh itab1.

select kunnr vbeln erdat netwr from vbak into itab1 where kunnr = kna1-kunnr.

append itab1.

endselect.

call screen 200.

</b> when 'EXIT'.

leave program.

endcase.

endmodule. " USER_COMMAND_0100 INPUT

&----


*& Module STATUS_0100 OUTPUT

&----


  • text

----


module status_0100 output.

  • SET PF-STATUS 'xxxxxxxx'.

  • SET TITLEBAR 'xxx'.

move-corresponding itab to kna1.

endmodule. " STATUS_0100 OUTPUT

&----


*& Module USER_COMMAND_0200 INPUT

&----


  • text

----


module user_command_0200 input.

case sy-ucomm.

when 'BACK'.

leave to screen '100'.

when 'ITEM'.

refresh itab2.

get cursor field fnam value fval.

select vbeln posnr matnr from vbap into itab2 where vbeln = vbak-vbeln.

append itab2.

endselect.

call screen '200'.

when 'EXIT'.

leave program.

endcase.

endmodule. " USER_COMMAND_0200 INPUT

&----


*& Module STATUS_0200 OUTPUT

&----


  • text

----


module status_0200 output.

  • SET PF-STATUS 'xxxxxxxx'.

  • SET TITLEBAR 'xxx'.

move-corresponding itab1 to vbak.

endmodule. " STATUS_0200 OUTPUT

&----


*& Module USER_COMMAND_0300 INPUT

&----


  • text

----


module user_command_0300 input.

case sy-ucomm.

when 'BACK'.

leave to screen '200'.

when 'EXIT'.

leave program.

endcase.

endmodule. " USER_COMMAND_0300 INPUT

&----


*& Module STATUS_0300 OUTPUT

&----


module status_0300 output.

  • SET PF-STATUS 'xxxxxxxx'.

  • SET TITLEBAR 'xxx'.

move-corresponding itab2 to vbap.

vbak-vbeln = fval.

endmodule. " STATUS_0300 OUTPUT