Skip to Content

Sort

Hi,

-


Material

Posting Date

Vendor

Mat.Doc.No

Bal.Qty

-


ID0169164

07.08.2004

IC-KIT

412783

4.000

ID0169164

07.08.2004

IC-KIT

412784

8.000

ID0169164

16.08.2004

IC-KIT

413064

14.000

ID0169164

16.08.2004

IC-KIT

413065

34.000

ID0169164

19.08.2004

IC-KIT

413162

14.000

ID0169164

20.08.2004

IC-KIT

413171

24.000

ID0169164

20.08.2004

IC-KIT

413172

34.000

ID0169164

08.11.2004

IC-KIT

413761

80.000

ID0169167

16.08.2004

IC-KIT

413064

20.000

ID0169167

16.08.2004

IC-KIT

413065

60.000

ID0169167

19.08.2004

IC-KIT

413162

20.000

ID0169167

20.08.2004

IC-KIT

413171

40.000

ID0169167

20.08.2004

IC-KIT

413172

60.000

I want to sort the above one in such a way that when I delete the adjacent duplicates after sorting the internal table should contain only

ID0169164

08.11.2004

IC-KIT

413761

80.000

ID0169167

20.08.2004

IC-KIT

413172

60.000

ie.Material with the latest budat and mblnr and its corresponing bal quantity.

sort itab by matnr budat ascending.

delete adjacent duplicates from itab comparing lifnr matnr.

is not giving me the result.Can anyone here please let me where I am going wrong.

Thanks,

K.Kiran.

Edited by: Kiran K on Jan 21, 2008 5:39 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2008 at 04:42 AM

    Hi kiran,

    first sort the internal table as per

    sort itab by matnr ascending budat descending.

    then u delete the records as .

    delete adjacent duplicates from itab comparing matnr.

    regards,

    Santosh thorat

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2008 at 04:42 AM

    Hi Kiran,

    Check it.

    SORT it_itab BY matnr.

    DELETE ADJACENT DUPLICATES FROM it_itab COMPARING matnr

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.