2007 Aug 23 9:59 PM
Hi all,
i have the following code and i want to modify the record with the correct amount but when I use the move and append it appends another recod to the table instead of modifying. I triend using modify as well and it still adds in another record.
loop at T_QUANTITY_DATA3[] into LF_DATA3.
L_TABIX = SY-TABIX.
read table T_QUANTITY_DATA4[] into lf_data4 with key
vbeln = LF_DATA3-VBELN
posnr = LF_DATA3-POSNR.
T_QUANTITY_DATA5 = T_QUANTITY_DATA3.
move lf_data4-order_qty to lf_data5-order_qty.
append lf_data5 to T_QUANTITY_DATA5.
2007 Aug 23 10:12 PM
Your code is incomplete, I don't get what you wanna do.
You have the following internal tables:
T_QUANTITY_DATA3[]
T_QUANTITY_DATA4[]
T_QUANTITY_DATA5[]
Your source is T_QUANTITY_DATA3[]. For each record in this table, you read T_QUANTITY_DATA4[].
Next, what do you want to achieve?
regards
Message was edited by:
Alejandro Bindi
Hi all,
i have the following code and i want to modify the record with the correct amount but when I use the move and append it appends another recod to the table instead of modifying. I triend using modify as well and it still adds in another record.
loop at T_QUANTITY_DATA3[] into LF_DATA3.
L_TABIX = SY-TABIX.
read table T_QUANTITY_DATA4[] into lf_data4 with key
vbeln = LF_DATA3-VBELN
posnr = LF_DATA3-POSNR.
T_QUANTITY_DATA5 = T_QUANTITY_DATA3.
move lf_data4-order_qty to lf_data5-order_qty.
append lf_data5 to T_QUANTITY_DATA5.
2007 Aug 23 10:12 PM
Your code is incomplete, I don't get what you wanna do.
You have the following internal tables:
T_QUANTITY_DATA3[]
T_QUANTITY_DATA4[]
T_QUANTITY_DATA5[]
Your source is T_QUANTITY_DATA3[]. For each record in this table, you read T_QUANTITY_DATA4[].
Next, what do you want to achieve?
regards
Message was edited by:
Alejandro Bindi
2007 Aug 23 10:17 PM
I want to take the qty value in lf_data5-order_qty and modify the record in T_QUANTITY_DATA5 where vbeln and posnr are the same
2007 Aug 23 10:31 PM
Something like this?
loop at T_QUANTITY_DATA3[] into LF_DATA3.
L_TABIX = SY-TABIX.
read table T_QUANTITY_DATA4[] into lf_data4 with key
vbeln = LF_DATA3-VBELN
posnr = LF_DATA3-POSNR.
**Modifications begin
read table T_QUANTITY_DATA5[] into lf_data5 with key
vbeln = LF_DATA3-VBELN
posnr = LF_DATA3-POSNR.
lf_data5 = lf_data3.
* T_QUANTITY_DATA5 = T_QUANTITY_DATA3.
move lf_data4-order_qty to lf_data5-order_qty.
* append lf_data5 to T_QUANTITY_DATA5.
MODIFY TABLE T_QUANTITY_DATA5 FROM lf_data5.
**Modifications end
Regards
Please reward points if helpful
2007 Aug 23 10:19 PM
HI,
Please post the full code. Also, from whatever I could understand from your code, using MODIFY instead of APPEND will solve your problem.
Use
MODIFY T_QUANTITY_DATA5 FROM lf_data5.Reward points if the answer is helpful.
Regards,
Mukul
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |