‎2011 Nov 30 2:02 PM
Hello all,
We just upgraded to EH5, we have a custom program and in that program we have used the below statement that's resulting into the syntax error, although we don't get any syntax error in the non upgraded system:
UPDATE EDID4 SET SDATA = I_EDI_DD-SDATA.
and the syntax error that I am getting is : In the LRAW- or LCHR field SDATA you can only write a prepend length field.
I was just wondering if anyone of you have faced the similar issue.
‎2011 Nov 30 2:35 PM
You need to update the field DTINT2 with the actual lenght of the the field I_EDI_DD-SDATA.
Try this:
Data: lv_dtint2 type EDI_DTINT2.
lv_dtin2 = strlen( I_EDI_DD-SDATA ).
UPDATE EDID4 SET DTINT2 = lv_dtint2
SDATA = I_EDI_DD-SDATA.
‎2011 Nov 30 2:35 PM
You need to update the field DTINT2 with the actual lenght of the the field I_EDI_DD-SDATA.
Try this:
Data: lv_dtint2 type EDI_DTINT2.
lv_dtin2 = strlen( I_EDI_DD-SDATA ).
UPDATE EDID4 SET DTINT2 = lv_dtint2
SDATA = I_EDI_DD-SDATA.
‎2015 Sep 02 9:08 PM
You should avoid updating SAP standard table but anytime you want to update any database table;
make sure to add WHERE Clause otherwise you are updating the whole database table.
UPDATE ZEDID4 SET DTINT2 = lv_dtint2
SDATA = I_EDI_DD-SDATA WHERE .........