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

Help alv

Former Member
0 Likes
512

this is my question.

i have this print

CID POSITION

- 01 010

01 010

01 010

01 020

01 020

02 020

02 020

02 020

in this moment my print:

CID POSITION

01 010

020

02

gw_fieldcat-tabname = 'GT_DETTAGLIO'.

gw_fieldcat-fieldname = 'CID'.

gw_fieldcat-seltext_l = 'Cid'.

APPEND gw_fieldcat TO gt_fieldcat.

CLEAR gw_fieldcat.

lw_sort-fieldname = 'CEDOLA'.

APPEND lw_sort TO lt_sort.

CLEAR lw_sort.

gw_fieldcat-tabname = 'GT_DETTAGLIO'.

gw_fieldcat-fieldname = 'POSITION'.

gw_fieldcat-seltext_l = 'Position.

APPEND gw_fieldcat TO gt_fieldcat.

CLEAR gw_fieldcat.

lw_sort-fieldname = 'POS'.

APPEND lw_sort TO lt_sort.

CLEAR lw_sort.

I want that when I make the sort, it must sort to me therefore

CID POSITION

01 010

01 020

02 020

___________

this is possible ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
489

After loop write this line your problem will solved

DELETE ADJACENT DUPLICATES FROM GT_DETTAGLIO COMPARING all fields.

3 REPLIES 3
Read only

Former Member
0 Likes
490

After loop write this line your problem will solved

DELETE ADJACENT DUPLICATES FROM GT_DETTAGLIO COMPARING all fields.

Read only

Former Member
0 Likes
489

Hi,

apply this two line in your code just after the internal table is getting populated. you will get the appropriate result.

DELETE ADJACENT DUPLICATES FROM itab COMPARING cid position.

sort itab by cid position.

itab is your internal table name.

reward some point.

Bye,

Anomitro

Read only

Former Member
0 Likes
489

thanks..