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

problem with repeated quantity

Former Member
0 Likes
788

hi,

vendor materialno quantity receivedmaterial excess

(stpo-idnrk)

ROHV SUBFERT 150 SUBSCRAP 10

ROHV SUBFERT 150 SCRAP1 15

ROHV BATCHFINISH 200 SCRAP2 25

In the first two rows from the output,vendor-materialno-quantity are same except received material.

Excess is calculate with the difference between some other fields.In my thing I want 150 to come

only one time.If i clear that 150 while getting from selection,that excess calculation is not happening.

how to clear that 150.

loop at it_final.

write : / it_final-lifnr,it_final-matnr,it_final-menge,it_final-idnrk,it_final-excess.

endloop.

This is my internal table format.I am doing it in alv.

Regards,

Bathri..

6 REPLIES 6
Read only

Former Member
0 Likes
747

Hi Bathri,

You can use where cluase in your loop statement like

loop at itab where w_num = 150.

something like this or You can delete adjacent duplicates.

For that first SORT the table and use delete adjacent duplicates.

Much Regards,

Amuktha.

Read only

Former Member
0 Likes
747

Your question was bit confusing, you dont want to print 150 or you want to skip the second record.

If you want to skip the second records use at new quantity so that a unique record will come, if you dont want to print 150 again keep the write statement in at new in the loop which you are doing for the output.

Read only

0 Likes
747

Hi,

I dont want to skip.In the second 150 i need 0.000.

Read only

0 Likes
747

in my case can any one tell about (at new matnr) move quantity to display.else move '0' to quantity.

how to write.

Read only

Former Member
0 Likes
747

Dear,

first sort your internal table on the basis of first three fields as u mentioned.

then use

delete adjacent duplicates comparing lifnr matnr menge.

your problem will be solved

regards

vijay

Read only

Former Member
0 Likes
747

closed