on 2024 May 21 12:41 PM
Hi Masters,
I want to transfer the internal table in the code to the function table using move-corresponding, but this is not allowed.I made many tryings. Where am I making a mistake?
Scenario 1 :
Scenario 2 :
Thanks
Request clarification before answering.
You are using the obsolete TABLES word in the function module to declare ET_RESULT, so ET_RESULT alone is considered as being the obsolete header line (error prone).
Instead, use:
MOVE-CORRESPONDING gt_temp TO et_result[].
But prefer using ABAP Objects instead of function module, or prefer using EXPORTING over TABLES.
Reference documentation:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Sandra_Rossi.
Since using the TABLE tab in the function module is an old method, we had to use [ ].
What are the ABAP objects you mentioned as the new method? Inside the function "DATA ITAB TYPE TABLE OF XXX." Are you talking about? Because when I use this method I don't have to use "[ ]".
When you said "...or prefer using EXPORTING over TABLES.", did you mean to mention the EXPORT tab in the function module you wanted to talk about?
If you using an Internal table to copy pls use like this.
It will automatically copy all the entries form one table to another.
table1[] = table2[]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
12 | |
9 | |
8 | |
7 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.