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

Hierarchy report

Former Member
0 Likes
532

Hi,

in Hierarchy ALV, is there any option to display the repeated data only one time?

Example:- as of now i am displaying material numbers, if the material number repeated more than one time, i want to display that material number only one time.

pls let me know is there any option for this.

thanks,

Sreeram.

Hi,

in Hierarchy ALV, is there any option to display the repeated data only one time?

Example:- as of now i am displaying material numbers, if the material number repeated more than one time, i want to display that material number only one time.

pls let me know is there any option for this.

thanks,

Sreeram.

5 REPLIES 5
Read only

dani_mn
Active Contributor
0 Likes
507

HI,

you can also do this

DELETE ADJACENT DUPLICATES FROM itab COMPARING matnr.

Regards,

Read only

Former Member
0 Likes
507

YES IT IS POSSIBLE

CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_CALLBACK_PROGRAM =

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

  • IS_LAYOUT =

  • IT_FIELDCAT =

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

  • IT_EVENTS =

  • IT_EVENT_EXIT =

I_TABNAME_HEADER =

I_TABNAME_ITEM =

  • I_STRUCTURE_NAME_HEADER =

  • I_STRUCTURE_NAME_ITEM =

IS_KEYINFO =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB_HEADER =

T_OUTTAB_ITEM =

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL

ENDFORM.

HERE YOU HAVE TO PASS T_OUTTABHEADER = <HEADER INTERNAL TABLE>

AND T_OUTTAB_ ITEM = THE ITEM TABLE.

Read only

Former Member
0 Likes
507

in your out itab delete dublicate records

DELETE ADJACENT DUPLICATES FROM itab comparing matnr.

or

DELETE ADJACENT DUPLICATES FROM itab comparing all fields.

Read only

former_member69765
Contributor
0 Likes
507

The ALV will display all that is there in your internal table.

I suppose in your case in your internal table is having multiple entries.

You must either delete adjacent duplicates or you can sort/group by material no.

Note if you sort or group by Material no or for that matter any field... the no of rows in ALV are same however repeated fields are shown only once...

Hope this was helpful...

Plz mark all the helpful answers.

Read only

Former Member
0 Likes
507

Hi Prasad,

ALV Hierarchial or simple just displays the data in the form as u pass it. The point I am trying to make here is that if you need to display material no:s only once in the display, then keep them only once in the internal table being passed to the FM.

Hope this answers your question.

Regards,

Chetan.

P: Reward points if this is helpful.