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 PASS THE VALUES TO NEXT SCREEN?

Former Member
0 Kudos

Hi Friends,

I am not getting the correct logic for my task.Problem is i am having one screen with Empid - it will be stored in a table. when i enter the EMPid and click enter it has to pass to the next screen (it passing to the next screen) but i have to display the records of that employee which is stored already in the table.

It is just like MM02 giving material number press enter we will get the material which has to be changed.

My screen No of EMPID is 100.

When i press enter it will be passong to 201 screen where all my fields has to be display.

My Coding part is like ...

PBO of 201

WHEN 'DISPLAY' OR SPACE.

SELECT * FROM ZFPL WHERE empid = empid .

PATMT = ZFPL-PATMT.

PACON = ZFPL-PACON.

ENDSELECT.

WITH EMPID it has to automatically display PATMT and PACON.

Please its very urgent..

4 REPLIES 4

Former Member
0 Kudos

hi,

in screen 201, r u displaying as I/O fields?

if yes...choose the option From Program, (where u must have declared PATMT, PATCON...)

select the two fields in the popup that u get, click Enter

drag those 2 fields onto ur I/O fields created....

u need to write the below in ur PAI ...user command module(100)

WHEN 'DISPLAY' OR SPACE.

n use....select single....as u r not writing into an internal table.

SELECT single * FROM ZFPL WHERE empid = empid .

PATMT = ZFPL-PATMT.

PACON = ZFPL-PACON.

Former Member
0 Kudos

Hi Venkat,

1. Make sure the internal table name in program and the table control name are same

2. Declare the Employee id is declared globally in the program

3, in PAI of 100 , write

When 'DISPLAY'

Call screen 201.

in PBO of 201

SELECT * FROM ZFPL WHERE empid = empid .

PATMT = ZFPL-PATMT.

PACON = ZFPL-PACON.

ENDSELECT.

Former Member
0 Kudos

If your data fields are defined in the Global area ( *_TOP), and both screens are in the same program, the data is available to both screens.

You can use the same names on both screens and it will share the data.

Former Member
0 Kudos

Hi,

data: ok_code like sy-ucomm.

case ok_code-----> in screen painter -


>elentary tab---> ok_code(assign the ok_code here)

when 'DISPLAY'.

ur SELECT querie.

when others.

endcase.

ok_code triggers the user-command values like ENTER.

Reward points if usefull.

Regards

Fareedas