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: 

saving data to ztable

Former Member
0 Kudos

i have 4 input fields in my module pool programing & ztable also but this table contains fields with no information if i click save button in my module pool programing the above 4-fields have to store in my database ztable ,

how come it possible to update if i click save button in ztable. plz explain me very urgent..

5 REPLIES 5

Former Member
0 Kudos

You need to write the code unde pAI EVENT

Module input.

case sy-ucomm.

when 'ENT1' . Assume that Enter button ok-code is ENT1

ztable-field1 = tablecontrol-field1.

ztable-field2 = tablecontrol-field2.

ztable-field3 = tablecontrol-field3.

ztable-field4 = tablecontrol-field4.

modify ztable .

endmodule.

Thanks

Seshu

Former Member
0 Kudos

Hi

You need to code in PAI as follows assuming you give 'SAVE' as function code for save button.

case sy-ucomm.

when 'SAVE'.

<TAKE VALUES IN A INTERNAL TABLE>

modify ztable from itab.

update ztable from itab.

endcase.

Hope this helps...

Regards

dinesh

sudhir_uppalapati
Participant
0 Kudos

jus write.

case sy-ucomm.

when save.

insert ztable.

endcase.

now the data you are entering in to input fields will be entered to ztable.

sudhir_uppalapati
Participant
0 Kudos

jus write.

case sy-ucomm.

when 'save'.

insert ztable.

endcase.

now the data you are entering in to input fields will be entered to ztable.

0 Kudos

Have a look at

as this gives a sample of how you might like to structure your code to update a Z table from screen fields, adding in extra data along the way.

Jonathan