‎2008 Jun 18 11:35 AM
hi all,
I create a field on screen(from dictionary) named zvtrans-zsdate. and the value entered in this screen field should be update to zvtrans table.
but in the PAI of the screen if I write like this it is not working
PROCESS AFTER INPUT.
MODULE finalise.
MODULE finalise INPUT.
IF sy-dynnr = '0200'..
IF ok_code = 'SAVE'.
PERFORM refresh_screen_200.
PERFORM save_screen_200.
endif.
FORM save_screen_200
zvtrans-zsdate = zvtrans-zsdate.
MODIFY zvtrans.
endform.
‎2008 Jun 18 11:37 AM
delete refresh_screen subrotine from that place.
by the by what is the code in that subrotine if ur clearing screen fields then delete it.
‎2008 Jun 18 11:49 AM
Hi Uday,
If you specify the name of the database table directly, the program must contain a corresponding TABLES statement. If the name of the database table is not determined until runtime, you need to use the addition ... FROM wa.
PROCESS AFTER INPUT.
MODULE finalise.
MODULE finalise INPUT.
IF sy-dynnr = '0200'..
IF ok_code = 'SAVE'.
PERFORM refresh_screen_200.
PERFORM save_screen_200.
endif.
FORM save_screen_200.
Tables : zvtrans .
Zvtrans-pkey = wf_pkey. "Also u should update ZVTRANS work area with PK values to modify the current line
zvtrans-zsdate = zvtrans-zsdate.
MODIFY zvtrans.
endform.
‎2008 Jun 18 1:52 PM
hi,
check before using the modify statement the keyfields are there in your work area.
And also the subroutine refresh_screen_200 is called before
PERFORM save_screen_200.
just check it.
‎2008 Jun 19 6:35 AM
Hi,
Try this code
in flow logic : pbo
loop at itab into <tn> with -
(table contol)
endloop.
pai
loop at itab.
module update
endloop.
in pai : case sy-ucom.
when ' ....'.
update<tn> from table <itabname>.
end case.
<tn>=table name.
Regards
Krishna