03-17-2007 5:00 PM
hello friends,
i need little help,
i have a screen which has two input values,gscreen_exdiv and gscreen_door# as input.
how do i update a ztable in the database, with these fields along with system userid, system date.
can any one please give a step by step approach, presently the development was done till PAI,
when i double click on PAI it takes me to few modules already built. now i have to
write a module that does this job. can any one plz give details of sample code.
03-17-2007 5:34 PM
You should implement your code into the USER_COMMAND module in the PAI. You should have some kind of button on your screen which is mapped to a function code, when the user presses this button, you need to check for the functon code in this module and do the logic to update your database.
Case ok_code.
when 'BACK'.
set screen 0.
leave screen.
when 'BUTTON1'.
clear ok_code.
data: xztab type ztable.
xztab-exdiv = gscreen-exdiv.
xztab-door# = gscreen-door#.
xztab-uname = sy-uname.
xztab-datum = sy-datum.
modify ztab from xztab.
endcase.
Regards,.
Rich Heilman
03-17-2007 5:34 PM
You should implement your code into the USER_COMMAND module in the PAI. You should have some kind of button on your screen which is mapped to a function code, when the user presses this button, you need to check for the functon code in this module and do the logic to update your database.
Case ok_code.
when 'BACK'.
set screen 0.
leave screen.
when 'BUTTON1'.
clear ok_code.
data: xztab type ztable.
xztab-exdiv = gscreen-exdiv.
xztab-door# = gscreen-door#.
xztab-uname = sy-uname.
xztab-datum = sy-datum.
modify ztab from xztab.
endcase.
Regards,.
Rich Heilman
03-17-2007 6:16 PM
thanks rich,
great help.
i will try that and come back to you.
thanks again for your reply.
03-17-2007 5:55 PM
Hi kutumba rao,
You can use your own modules also just write the module name...
eg. module mod1.
now double click on mod1 ..
then choose main progaram and then enter.
now here you can write your own code as your logic says...
for system date you can use sy-datum . you can use other system variables as per your requirement..
in that module you can write like..
case sy-ucomm.
when 'PUSH'. " Function code for the Push Button you had given...
call transaction 'se11'.
when 'EXIT'.
leave program.
-
-
encase.
Hope this will help you..
Regards.
ilesh Nandaniya