‎2006 Dec 21 1:24 PM
Can any body halp me ..
i am using alv in my report i want to calc. subtotals for a field based on date field...i am using reuse_alv_list_display.
but i am not getting sub-totals... and also the <b>sigma</b> icon is also i am not getting....
‎2006 Dec 21 1:26 PM
Hello,
U need to pass the Sort table to the FM.
REFRESH IT_SORT.
CLEAR: G_S_SORT,G_S_SORT.
G_S_SORT-SPOS = 1.
G_S_SORT-FIELDNAME = 'FIELD'.
G_S_SORT-UP = 'X'.
G_S_SORT-DOWN = ' '.
<b> G_S_SORT-SUBTOT = 'X'.</b> G_S_SORT-EXPA = ' '.
APPEND G_S_SORT TO IT_SORT.
If useful reward.
Vasanth
‎2006 Dec 21 1:29 PM
i did that one... still the sub totals are not comming and also sigma is not comming in output.....
‎2006 Dec 21 1:29 PM
hi first u need to use sort to get subtotals, award points if found helpful
DATA: WA_SORT TYPE SLIS_SORTINFO_ALV, "SORT work area
IT_SORT TYPE SLIS_T_SORTINFO_ALV, "SORT ITAB
PERFORM SORT_LIST.
FORM SORT_LIST.
WA_SORT-FIELDNAME = 'VBELN'.
WA_SORT-TABNAME = 'IT_VBAK'.
WA_SORT-SPOS = 1.
WA_SORT-UP = 'X'.
WA_SORT-SUBTOT = 'X'.
APPEND WA_SORT TO IT_SORT.
CLEAR WA_SORT.
WA_SORT-FIELDNAME = 'NETWR'.
WA_SORT-TABNAME = 'IT_VBAK'.
WA_SORT-UP = 'X'.
WA_SORT-SPOS = 2.
WA_SORT-SUBTOT = 'X'.
APPEND WA_SORT TO IT_SORT.
CLEAR WA_SORT.
ENDFORM. "SORT_LIST
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IT_FIELDCAT = IT_FIELDCAT
IS_LAYOUT = LAYOUT
IT_SORT = IT_SORT
I_CALLBACK_PF_STATUS_SET = 'STATUS'
IT_EXCLUDING = I_FCODE_EXTAB
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IT_EVENTS = IT_EVENTS[]
‎2006 Dec 21 1:34 PM
i did it still... the report which i am modyfing is std report..RIIMR020 i have copied it in Z report and i am modyfing....