on 05-17-2006 6:32 AM
Hi,
I have my all data in xvbap internal table.
i want to move 2 fields MATNR and quantity into second internal table,
without any loop.
how i will do that?
Hi Shefali,
You cant move the some of the fields from one table to another table, if the tables identical also itab1[] = itab2[] will not work for your scenario as it will move all the fields. You have to loop the first table and append the required data into to second table.
Regards,
Arun.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well the MOVE-CORRESPONDING will work only in case the itab has a header line, moreover only one record (contained by header line) will be moved.
And if the internal tables are identical with respect to fields , itab1[] = itab2[] is handy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use the below statement.
MOVE-CORRESPONDING xbap-matnr TO itab-matnr.
MOVE-CORRESPONDING xbap-quantity TO itab-quantity.
Hope it helps.
Regards,
Maheswaran.B
Message was edited by: Maheswaran B
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi shefali,
1. IF we follow some discipline, than
this can be done in one simple statement.
2. itab[] = xvbap[]
3. but the condition is :
a) the field name and field sequence (from left to right) should be same
b) if xvbap contains field A,B,C,D,E,F
and itab contains A,B
then this will work fantastic.
regards,
amit m.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.