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

linking the screens in module pool program

Former Member
0 Likes
2,110

hi i am raja here and i was creating a simple transaction .... when you are entering customer number on the first screen and on the next screen data is displayed for that customer number and the data is "city" and the "name".. and i am using the table "scustom" and i am unable to link the screens could any one help me in resolving this issue or send me some code. and i used the leave to screen option but could not get the out put its not going to the next screen

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,285

Use CALL SCREEN 200 (second one - display data) in the PAI of SCREEN 100 (first one - input customer) when leaving 200 in PAI (BACK) use LEAVE TO SCREEN 0.

Regards

5 REPLIES 5
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,286

Use CALL SCREEN 200 (second one - display data) in the PAI of SCREEN 100 (first one - input customer) when leaving 200 in PAI (BACK) use LEAVE TO SCREEN 0.

Regards

Read only

0 Likes
1,285

but i am unable to display the values also in the second screen its giving blank output.. and i wanted the data for the custoemr number which i entered...

Read only

0 Likes
1,285

hi,

in second screen u created a database field or ur own if ita a database table field then

while designing only -> click on goto -> select from data dictionary -> give table name -> select required fields of given databse table field -> dra g and drop on screen -> save n activate.

in flow logic:

in pbo event.

code like this:

tables: itab.

select single fld1, fld2 from zstudent where condition. for ex where stud = 12.

endselect.

if helpful reward some points.

with regards,

Suresh Aluri.

Read only

0 Likes
1,285

hi suresh thank you for providing the answer but i am still unable to go from first screen to second screen when i click on the display button in the first screen.. after entering the custoemr number... and i am sending the program and flow logic plz revert to this with the changes so tht i can excute it and hte porgram and flow logic is as follows...

e code which i wrote is as follows

&----


*

*& Module pool ZSAPMTFBA *

*& *

&----


*& *

*& *

&----


PROGRAM ZSAPMTFBA .

TABLES : scustom.

DATA : OKCODE(4).

MODULE INPUT1 INPUT.

CASE OKCODE.

WHEN 'DISPLAY'.

select name,city from scustom where id = scustom-id.

endselect.

SET SCREEN 200.

LEAVE SCREEN.

ENDCASE.

ENDMODULE.

MODULE USER_COMMAND_0200 INPUT.

CASE OKCODE.

WHEN 'BACK'.

LEAVE TO SCREEN 100.

ENDCASE.

ENDMODULE. "USER_COMMAND_0200 INPUT

*

*module check.

  • select single * from scustom where id = scustom-id.

  • if sy-subrc ne 0.

  • message E001(wrongnumber).

*

  • endif.

and flow logic for screen 100 is

PROCESS BEFORE OUTPUT.

  • MODULE STATUS_0100.

*

PROCESS AFTER INPUT.

field scustom-id module check.

MODULE INPUT.

and for screen 200 is

PROCESS BEFORE OUTPUT.

PROCESS AFTER INPUT.

module USER_COMMAND_0200.

Read only

Former Member
0 Likes
1,285

HI,

use SET SCREEN 'SCRNO' OR CALL SCREEN 'SCRNO'.

set screen: used when we want to go to next screen after executing current screen.

call screen: navigates to the next screen executes it and comes back to current screen and process it before it had left. and also call screen is used for calling sub screens also.

Leave screen: used to go out of current screen.

in ur case.

in PAI event of 1st screen

write like this

CALL SCREEN '200' // 200 IS NEXT SCREEN

OR

SET SCREEN '200'.

if helpful reward some points.

with regards,

Suresh Aluri.