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

delete data from internal table

Former Member
0 Likes
744

Hi Experts...

I have output like :

erdat matnr

12/2/2007 100000

13/2/2007 100000

14/11/2007 100001

14/6/2007 100001

but i want it like:

erdat matnr

13/2/2007 100000

14/6/2007 100001

data retriving from table direct..

and it is not working with max function.

plz help me..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
724

can you re-explain what exactly is the issue?

8 REPLIES 8
Read only

Former Member
0 Likes
725

can you re-explain what exactly is the issue?

Read only

Former Member
0 Likes
724

Sort table itab descending by matnr erdat.

Delete adjacent duplicates from Itab comparing matnr.

Lokesh

Edited by: Lokesh Aggarwal on Dec 20, 2007 10:39 AM

Read only

former_member188829
Active Contributor
0 Likes
724

Hi,

Sort itab By Matnr Erdat Descending.

Delete Adjacent Duplicates From itab Comparing Matnr.

Edited by: Vishnu Reddy on Dec 20, 2007 4:14 PM

Edited by: Vishnu Reddy on Dec 20, 2007 4:34 PM

Read only

Former Member
0 Likes
724

sorting internal table and using select upto 1 row and appending it to another itab

wil it not work?

Read only

Former Member
0 Likes
724

..

Read only

Former Member
0 Likes
724

SORT it_mara BY matnr erdat descending.

DELETE ADJACENT DUPLICATE from it_mara comparing matnr.

LOOP AT it_mara.

WRITE: / it_mara-matnr,

it_mara-ersda.

ENDLOOP.

Read only

Former Member
0 Likes
724

Hi,

You can do as below:


Sort itab by erdat matnr descending.

delete adjacent duplicates frommiab comparing erdat.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
724

Hi,

Use this

first sort the internal table by matnr..then delete the duplicates

like

SORT tablename by matnr DESCENDING

DELETE ADJACENT DUPLICATES FROM table name COMPARING matnr.

Regards,

Ari