Skip to Content
0
Former Member
Sep 21, 2011 at 07:24 AM

Syntax error with offset

467 Views

Hi All,

I have the below logic in ECC 6

FORM ysd_sd09_124_clean_up_zzcmw.

DATA: lv_a0 TYPE i VALUE 160.

DATA: lv_trans(2).

FIELD-SYMBOLS: <lf> TYPE c.

ASSIGN lv_a0 TO <lf> CASTING TYPE c.

lv_trans(1) = <lf>+3(1).

TRANSLATE vbkd-zzcmw USING lv_trans.

ZZCMW is a custom field(customer master warranty field).

When I am trying to create a sales order this user exit will trigger and giving dump for the code TRANSLATE vbkd-zzcmw USING lv_trans.

Category ABAP Programming Error

Runtime Errors DATA_OFFSET_TOO_LARGE

Except. CX_SY_RANGE_OUT_OF_BOUNDS

ABAP Program SAPMV45A

Application Component SD-SLS

Date and Time 21.09.2011 10:09:33

Short text

Invalid subfield access: Offset too large

What happened?

Error in the ABAP Application Program

The current ABAP program "SAPMV45A" had to be terminated because it has

come across a statement that unfortunately cannot be executed.

Since the caller of the procedure could not have anticipated that the

exception would occur, the current program is terminated.

The reason for the exception is:

In the running program "SAPMV45A", the field "<LF>" of the type

"C" and length 2 was to be accessed with the offset 3.

However, subfield accesses with an offset specification that is not

smaller than the field length are not permitted.

But same is wokring in 4.7. I tried to change the declarations but it did not work out. Can you please tell me what would be the difference in both versions?

Regards,

Jyothi CH.