‎2013 Feb 04 2:58 PM
Hi Experts,
I have created one report hierarchical ALV. My header table contains records like below:
and item table contains records like below:
and pass these two tables into FM REUSE_ALV_HIERSEQ_LIST_DISPLAY. Here one material ( 18461317 ) is two times but its BENUM and LQNUM are different.
But in output, for this MATNR two extra rows generated based on charg. I doubt this happen inside the FM.
Output is like below:
The strike-through records are unwanted. These two generated after execution of the ALV FM.
What is the reason behind this?
Thanks in advance,
Regards,
Arindam Samanta.
‎2013 Feb 04 3:07 PM
‎2013 Feb 04 3:07 PM
‎2013 Feb 04 4:01 PM
Hi Raymond,
You have given exact solution. I changed code as you suggested. It's working fine.
Thanks & Regards,
Arindam Samanta.
‎2013 Feb 04 4:02 PM
hi,
g_key TYPE slis_keyinfo_alv.
g_key-header01 = 'matnr'.
G_KEY-ITEM01 = 'matnr
g_layout-expand_FIELDNAME = 'FOLD'.
GS_FIELDCAT-FIELDNAME = 'MATNR'.
GS_FIELDCAT-TABNAME = 'ITAB_H'. [ INTERNAL TABLE FOR HEADER]
GS_FIELDCAT-row_pos = '1'.
GS_FIELDCAT-REPTEXT_DDIC = 'MATERIAL NO'.
APPEND GS_FIELDCAT TO GT_FIELDCAT.
'.
CREATE antother fieldcatalog for item.
pass internal table gor item.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
I_CALLBACK_PROGRAM = SY-REPID
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
IS_LAYOUT = G_LAYOUT
IT_FIELDCAT = GT_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 = 'A'
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
I_TABNAME_HEADER = 'ITAB_H'
I_TABNAME_ITEM = 'ITAB_L'
* I_STRUCTURE_NAME_HEADER =
* I_STRUCTURE_NAME_ITEM =
IS_KEYINFO = G_KEY
* IS_PRINT =
* IS_REPREP_ID =
* I_BYPASSING_BUFFER = 'X'
* I_BUFFER_ACTIVE = ''
* IR_SALV_HIERSEQ_ADAPTER =
* IT_EXCEPT_QINFO =
* I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB_HEADER = ITAB_H[]
T_OUTTAB_ITEM = ITAB_L[]
* 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.
thanks
Sabyasachi