E9.2 How to sum Quantity of same invoice number? , help me

Talal_612

Member
Hello Everyone , im new here ,
i want someone to help me in this case ,
i want to sum the quantity of the invoice that have the same Document Number (F4211.DOC) and 2nd item number (F4211.LITM) and display it in one invoice and with the total quantity of it,
this is my code, and when i run it , goes infinity loop when he enter the while after first one ,
While BC Document (Voucher, Invoice, etc.) (F4211)(DOC) is equal to PC Document (Voucher, Invoice, etc.) (F4211) (DOC) And BC 2nd Item Number (F4211)(LITM) is equal to PC 2nd Item Number (F4211) (LITM)
RV Quantity ShippedTOT = [RV Quantity ShippedTOT]+[PC Quantity Shipped (F4211) (SOQS)]
PC Quantity Shipped (F4211) (SOQS) = [BC Quantity Shipped (F4211)(SOQS)]+[PC Quantity Shipped (F4211) (SOQS)]
RV Quantity ShippedTOT = PC Quantity Shipped (F4211) (SOQS)
End While
RV Quantity ShippedTOT = "0"
 
lol, you got nothing to kick you out of the loop once you are in the loop the PC and BC values don't change. :)
 
What object and event are you writing this in? a UBE or an APPL?

As Scott says, there is nothig in your code to get a new BC DOC or LITM, so they will always stay the same, so always stay in the loop

You need to either rely on the objects engine to 'fetch' a new record, so in an APPL it would Grid Record is Fetched, or in an UBE it would be your DO section after you've setup filters etc.

So what are you reading over and what object are you trying to do this in?
 
Back
Top