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

update Z Table using Z program

Former Member
0 Likes
2,385

Can anyone send sample program to update z table using Zprogam.

i have data from excel sheet and and selection screen.

answers will be rewarded.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
925

data: ztable_t type ztable.

Upload your excel table into abap pgm using cl_gui_frontendservices=>gui_upload into table itab.

loop at itab.

Move-corresponding itab to wa_ztable.

append wa_ztable to ztable_t.

endloop.

insert ztable from ztable_t .

4 REPLIES 4
Read only

Former Member
0 Likes
926

data: ztable_t type ztable.

Upload your excel table into abap pgm using cl_gui_frontendservices=>gui_upload into table itab.

loop at itab.

Move-corresponding itab to wa_ztable.

append wa_ztable to ztable_t.

endloop.

insert ztable from ztable_t .

Read only

Former Member
0 Likes
925

hi!

refer this,

UPDATE <Ztable name> SET <field to update>

WHERE condition.

Read only

Former Member
0 Likes
925

Abhishek,

please try to search solution of your problem before throwing the thread,

i tried to search with update Z Table using Z program and got 1955 results.

please close this thread after giving mark.

Amit.

Read only

Former Member
0 Likes
925

hi....

first upload the data from yur excel file into an internal table using ws_upload function.

CALL FUNCTION 'WS_UPLOAD'

EXPORTING

filename = p_file

filetype = 'DAT'

TABLES

data_tab = itab_final.

loop at itab_final.

MOVE-CORRESPONDING itab_final TO ztable.

endloop.

modify ztable.

clear ztable.