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

field not getting updated

Former Member
0 Likes
533

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.

4 REPLIES 4
Read only

Former Member
0 Likes
511

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.

Read only

sachin_mathapati
Contributor
0 Likes
511

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.

Read only

Former Member
0 Likes
511

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.

Read only

Former Member
0 Likes
511

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