‎2007 Sep 21 11:35 AM
hi,
when using FM 'REUSE_ALV_HIERSEQ_LIST_DISPLAY ',
parameter IT_SORT should contain fields on which sorting has to be done....Right??
Actually , my question is ...my output intarnal table contains 21 fileds.
but the field specified in IT_SORT..is not present in the output intarnal table .
I am getting runtime error because fo this?
Can you plz tell me weather the field specified in the IT_SORT.. should be in output internal table or not?
waiting for oyur replies.
regards
Vaja
‎2007 Sep 21 11:49 AM
Hi,
The fields specified in the it_sort should be present in your final internal table as well.
And apart from that for Hierarchial display you need to have both internal table one for header and one for details.
Thanks,
Sriram Ponna.
‎2007 Sep 21 12:02 PM
hi sriram,
thanks for your answer.
Can you plz look at the FM '
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = ALV_V-REPORT
I_CALLBACK_USER_COMMAND = 'AT_USER_COMMAND'
IS_LAYOUT = LS_LAYOUT
IT_FIELDCAT = LT_FIELDCAT[]
IT_SORT = LT_SORTINFO[]
I_SAVE = 'A'
IS_VARIANT = ALV_V
I_TABNAME_HEADER = C_HEAD
I_TABNAME_ITEM = C_DETAIL
IT_EVENTS = GT_EVENTS
IS_KEYINFO = LS_KEYINFO
TABLES
T_OUTTAB_HEADER = C_CUST
T_OUTTAB_ITEM = T_CUST.
ENDIF.'
header and item tables.
data is passed form one int table to another.
C_CUST[] = T_CUST[].
T_OUTTAB_HEADER = C_CUST
T_OUTTAB_ITEM = T_CUST.
and regarding sorting logic..
SORT
LT_SORTINFO-SPOS = '02'.
LT_SORTINFO-FIELDNAME = 'BBASIS'.
LT_SORTINFO-TABNAME = C_DETAIL.
LT_SORTINFO-DOWN = 'X'.
APPEND LT_SORTINFO.
field name 'BBASIS' is not present in the final table.
i have checked all fields in the ITEM table T_CUST.
and HEADER table is declared as
DATA: C_CUST LIKE T_CUST OCCURS 0 WITH HEADER LINE.
Can you plz seggest me this is correct?
regards
vaja
‎2007 Sep 21 11:54 AM
‎2007 Sep 21 11:58 AM
HI,
Yes, the field specified in these it_sort
it_layout
it_eventcat etc. should be present in the final internal table.
Regards,
PRitha.
Reward if useful