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

Syntax error after upgrade

Former Member
0 Likes
1,114

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
768

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.

2 REPLIES 2
Read only

Former Member
0 Likes
769

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.

Read only

0 Likes
768

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 .........