2006 Nov 20 11:14 AM
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.
2006 Nov 20 11:17 AM
HI,
you can also do this
DELETE ADJACENT DUPLICATES FROM itab COMPARING matnr.
Regards,
2006 Nov 20 11:18 AM
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.
2006 Nov 20 11:18 AM
in your out itab delete dublicate records
DELETE ADJACENT DUPLICATES FROM itab comparing matnr.
or
DELETE ADJACENT DUPLICATES FROM itab comparing all fields.
2006 Nov 20 11:19 AM
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.
2006 Nov 20 11:19 AM
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.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |