Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Calculations

Former Member
0 Likes
545

Hi Guys,

I was trapped into a little bit confusion correlated to my task. Data was populated to my internal table with field’s delivery, customer number, postal code, weight, volume. Now I sorted that internal table based on the customer and postal code. Now I need to perform the following points:

• Read through the list and select deliveries having same ship to party and address.

• Calculate weight and volume of the selected deliveries in the above step.

If I am correct I need to compare the customer and address for the current record with previous one. Please help me out in this query and your help will be will be greatly appreciated. Looking for your kind co-operation.

Regards,

Ravi.

Hi Guys,

I was trapped into a little bit confusion correlated to my task. Data was populated to my internal table with field’s delivery, customer number, postal code, weight, volume. Now I sorted that internal table based on the customer and postal code. Now I need to perform the following points:

• Read through the list and select deliveries having same ship to party and address.

• Calculate weight and volume of the selected deliveries in the above step.

If I am correct I need to compare the customer and address for the current record with previous one. Please help me out in this query and your help will be will be greatly appreciated. Looking for your kind co-operation.

Regards,

Ravi.

2 REPLIES 2
Read only

Former Member
0 Likes
482

you all the records in Itab sorted by customer and postal code. so all the records with same customer and postal code will be coming next to each other....

move first records customer and postal code to a work area 2...

loop itab to work area 1.

if customer and postal code in WA1 and wa2 is equal.

calc tot_weight and tot_volume.

else

print the tot_weight and tot_volume.

assign customer and postal code of current record in wa1 to wa2.

reset tot_weight and tot_volume to 0.

endif.

endloop.

print the tot_weight and tot_volume. - last set.

Read only

0 Likes
482

Hi Damodaran,

Thanks for the immediate response. Infact i was tried and now i got that. I build a new logic which is littlebit parllel to your solution. Thanks for our suggestion.

Regards,

ravi.