Related to UPDATE Statement in ABAP
I have a issue when making use of UPDATE statement in my ABAP Program.
Actual statement is as below:
<b> UPDATE zexport_class SET zzgaufw = v_zzgaufw WHERE zzexgen = v_zzexgen AND zzitem = i_data-posnr.</b>
The actual issue over here is statement is correct but in WHERE condition <b>ZZITEM</b> is of type <b>CHAR(4)</b> where as <b>i_data-posnr</b> refers to <b>VBEX-POSNR</b> which is of type <b>NUMC(6)</b> how can i match them.
as both are diffrent.
The on-site guy had created table[ZEXPORT_CLASS] table in that way. but as for standard POSNR in VX22 it should be VBEX-POSNR - NUMC(6) only.
What can be the solution out here!
Thanks in advance.
Thanks & Regards,
The best solution is to increase the field size in the table.
Otherwise POSNR data usually has leading 0's. So, CONDENSE POSNR or TRUNCATE all the 0's and use the rest of the data. however, you need to make sure that you will still have 4 characters from POSRNR.
I would still suggest you to change the table field to 6 Char's.
note : Please close the thread if this solves the issue