‎2006 Jun 27 3:55 PM
HI Friends,
I have an internal table it_send and has many char and NUM fields....
It has Material no, Quantity, origin, Destination....
I have to send this internal table to an external system to get the Freight Rate, But i have to send only one line because external system cant read more than one line.
For multiple materials i have to sum quantities of all the materials and send it to the external system with the first material no in my IT_SEND.
I am having problems with it. Any advice will be of great help to me.
Shejal.
‎2006 Jun 27 4:00 PM
Hi Shejal,
It makes no sense to add quantities of different materials possibly having different units of measures.
YOu have to call whatever rfc function module multiple times within a loop to pass each record at a time, or make the other system capable of recieving a table data.
Regards,
Ravi
‎2006 Jun 27 3:58 PM
hi,
do this.
wa_temp.
loop at itab.
wa_temp-quantity = wa_temp-quantity + itab-quantity.
Endloop.
read table itab index 1.
wa_temp-material = itab-material.
send wa_temp.
‎2006 Jun 27 4:07 PM
‎2006 Jun 27 4:10 PM
Hi Shejal,
I don't understand what your exact requirement is but in that case, you can append the work area to the itab after refreshing the itab.
loop at itab.
wa-qty = itab-qty + wa_qty.
endloop.
refresh itab.
append wa to itab.
Regards,
Ravi
‎2006 Jun 27 4:00 PM
Hi Shejal,
It makes no sense to add quantities of different materials possibly having different units of measures.
YOu have to call whatever rfc function module multiple times within a loop to pass each record at a time, or make the other system capable of recieving a table data.
Regards,
Ravi
‎2006 Jun 27 4:06 PM
I am converting all the unit of measure to the same units. Hence want to add the fields.
Shejal.
‎2006 Jun 27 4:08 PM
if u want the total quatity u can refer above post.
But u r populating first material number with the quantity isnt conflicting. ( material and quantity)
<b>as per the ned do this
it_send2.
append wa_temp to it_send2.</b>
Message was edited by: Manoj Gupta
‎2006 Jun 27 4:11 PM
Yaa its conflicting i agree but the materials have almost the same properties hence have decided to send the first material NO and the sum of all the materials quantity.
Shejal.
‎2006 Jun 27 4:13 PM
hi,
Refer the post above ( which i have given )
i think this should solve ur problem.
‎2006 Jun 27 4:16 PM