Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Cann't move data between two internal table in Unicode program

Hello expert,

I import a program from old sap system to new system, but syntax error occurred --- ' L_T_S776[] = T_DATA_RECORDS[]. ',

it is said ' internal table L_T_S776 and T_DATA_RECORDS are not mutually convertible, in unicode program, two internal tables must have the same structure layout'.

The coding is:

DATA: L_T_S776 LIKE S776 OCCURS 0 WITH HEADER LINE.

DATA: L_T_S777 LIKE S777 OCCURS 0 WITH HEADER LINE.

FIELD-SYMBOLS: <F_S776> TYPE S776.

FIELD-SYMBOLS: <F_S777> TYPE S777.

IF NOT ZCL_USEREXIT=>IS_ACTIVE( PROJN = 11 EXITN = 34 ) IS INITIAL.

CASE I_RMCP2-SCTYP.

WHEN 'Z776'.

L_T_S776[] = T_DATA_RECORDS[].

LOOP AT L_T_S776 ASSIGNING <F_S776>.

<F_S776>-ZZCUSER = SY-UNAME.

<F_S776>-ZZCDATE = SY-DATUM.

<F_S776>-ZZCTIME = SY-TIMLO.

ENDLOOP.

T_DATA_RECORDS[] = L_T_S776[].

WHEN OTHERS.

ENDCASE.

-


internal table T_DATA_RECORDS is defined to like INDX.

this program is in function module EXIT_SAPMMCP6_011, it is a user_exit.

-


I also confuse the meaning of this part of coding, could anybody help me?

reward if got useful reply, thank you.

H.B

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question