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

Table update issue

former_member423024
Participant
0 Likes
659

Hi Gurus,

Given below is my code to update a table but it's not getting updated.

Kindlyreply me with a solution.

UPDATE ztmmmm_po_ifstg SET aufnr = ch_wa_po_one-aufnr

zprostat = ch_wa_po_one-zprostat

WHERE zifid = ch_wa_po_one-zifid

and ztimestamp = ch_wa_po_one-ztimestamp

AND zprocessno = ch_wa_po_one-zprocessno

AND zsequenceno = ch_wa_po_one-zsequenceno

AND zbundno = ch_wa_po_one-zbundno.

where ch_wa_po_one is an internal table.

thanks

Natasha SS.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
616

Hi,

In your update statement you have to use workarea instead of internal table

UPDATE ztmmmm_po_ifstg SET aufnr = ch_wa_po_one-aufnr

zprostat = ch_wa_po_one-zprostat

WHERE zifid = ch_wa_po_one-zifid

and ztimestamp = ch_wa_po_one-ztimestamp

AND zprocessno = ch_wa_po_one-zprocessno

AND zsequenceno = ch_wa_po_one-zsequenceno

AND zbundno = ch_wa_po_one-zbundno.

If your ch_wa_po_one is an internal table with header line and your looping into it it becomes the workarea.

Regards,

Subhashini

4 REPLIES 4
Read only

Former Member
0 Likes
616

If ch_wa_po_one is a internal table, is the header getting filled when you are using the UPDATE statement?

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
616

Does your "WHERE" clause meets the table entries or criteria ?

Read only

Former Member
0 Likes
616

Hi Natasa,

Please let me know your desk number. will check on the same.

Looks like strecture needs to pass to update statement instead of internal table work area.

Raman.

Cubical : 53

Edited by: Ramanji Reddy on Nov 26, 2009 1:20 PM

Read only

Former Member
0 Likes
617

Hi,

In your update statement you have to use workarea instead of internal table

UPDATE ztmmmm_po_ifstg SET aufnr = ch_wa_po_one-aufnr

zprostat = ch_wa_po_one-zprostat

WHERE zifid = ch_wa_po_one-zifid

and ztimestamp = ch_wa_po_one-ztimestamp

AND zprocessno = ch_wa_po_one-zprocessno

AND zsequenceno = ch_wa_po_one-zsequenceno

AND zbundno = ch_wa_po_one-zbundno.

If your ch_wa_po_one is an internal table with header line and your looping into it it becomes the workarea.

Regards,

Subhashini