05-05-2006 7:08 AM
hello..
i want to do this..
1. search db based on stud id (stud_id) inputted by the user on sreen 1.
2. display related info of student on input/output fields on screen 2 from 2 db db linked thru stud id.
db: stud_info, stud_grade
thanks..
05-05-2006 7:13 AM
Hi,
1. Use a select query to check whether the id entered by the user exists in the db or not.
eg. select stud_id
into l_stud_id
from stud_info
where stud_id = p_stud_id.
if sy-subrc eq 0.
select *
into table i_stud
from stud_grade
where stud_id = l_stud_id.
endif.
then loop at i_stud & use write statement to display the data.
Best regards,
Prashant
05-05-2006 7:59 AM
hi, thanks..
im done on that part. question is how to carry over the record on scren 2 using the data entered by the user on screen 1?
also how would i be able to display these data on the fields itself.. thanks a lot.
05-05-2006 7:14 AM
Hello Lana,
U need to desing two screen, first screen will take input from the user and the second screen wil display details from both the DB. The first screen PBO you can set the GUI and in PAI you will process the input from the User. You will handle all the actions and validation with error message in the PAI of screen 1. After user has entered a valid record u will read the data from both the DB and populate the fields of the second screen. then call the second screen. Here also PBO will set the GUI and other options and PAI will handle the user action.
05-05-2006 7:16 AM
hi lana,
u can easily do it.
check the below code.
TABLES: TAB1,TAB2.
PARAMETERS P1 LIKE TAB1-SNO.
START-OF-SELECTION.
SELECT SINGLE * FROM TAB2 WHERE SNO EQ P1.
CALL SCREEN 100.
**Define input fields on screen 100 based on TAB2
Cheers,
Abdul