Skip to Content
0
Former Member
Apr 11, 2009 at 10:21 AM

Internal Table Logic Needed

22 Views

Hi all,

I have a requirement regarding data processing in a internal table,

internal table consists of filelds Vendor,Material and Scheduling Dates and Total Qty.

Here i need to fill the field Total Quantity, individual addition of quanties of that material for a particular vendor .

Let us consider intitially my internal table consists of data like this with these fields.

Vendor , Material , qty(individual), Total qty , Schedule dates

v1 , m1 , 10

v1 , m1 , 10

v1 , m1 , 20

v1 , m2 , 5

v1 , m2 , 10

v2 , m2 , 20

v2 , m2 , 15

v2 , m3 , 20

v2 , m3 , 10

Initiall the total qty field is empty i need to fill tht field for the last item for a particular material Like M1

for vendor v1 and total qty of m2 for vendor v1, total qty of m1 for v2, total qty of m2 for v2 and so on.

Requied output should be like this.

Vendor , Material , qty(individual) Total qty Schedule dates

v1 , m1 , 10 , 0

v1 , m1 , 10 , 0

v1 , m1 , 20 , 40(101020)

v1 , m2 , 5 , 0

v1 , m2 , 10 , 15(5+10)

v2 , m2 , 20 , 0

v2 , m2 , 15 , 35(20+15)

v2 , m3 , 20 , 0

v2 , m3 , 10 , 30(20+10)

Here i made one thing , i calculated the total qty of material for particular vendor.

Like

Vendor Material Total Qty

v1 , m1 , 40

v1 , m2 , 15

v2 , m2 , 35

v2 , m3 , 30

Finally i need the logic by using Control Events(At New , At End of ) to adjust that total qty of a material for a particular vendor by Modifying the internal table.

i hope my problem is clear , pls let me know if any clarifications needed. and

code for the same .

Thannks in advance,

Niranjan.