I have the below logic in ECC 6
DATA: lv_a0 TYPE i VALUE 160.
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
ABAP Program SAPMV45A
Application Component SD-SLS
Date and Time 21.09.2011 10:09:33
Invalid subfield access: Offset too large
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?