07-28-2005 1:40 PM
Hi,
i have a scenario like this.In alv when we total columns i want to get some text like 'TWH' followed by the totals.
for ex.
5
10
15
twh 30
is that possible that to populate our own text in alv grid.iam using CLASSIC ALV not classes one.If yes kindly send me the code how to do it.
thanks in advance
kiran
07-28-2005 1:48 PM
Hi kiran,
It is possible.
If you are using 'REUSE_ALV_LIST_DISPLAY',
then before calling it use
data : lv_layout TYPE slis_layout_alv,
LV_LAYOUT-TOTALS_TEXT = 'twl'.
and pass lv_layout in the export parameter of the function - IS_LAYOUT.
just see the code below for better understanding
LV_LAYOUT-TOTALS_TEXT = TEXT-TTL.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT = LV_LAYOUT
IT_FIELDCAT = LV_FIELDCAT[]
IT_SORT = LV_SORT[]
I_DEFAULT = 'X'
I_SAVE = 'A'
TABLES
T_OUTTAB = IT_OUTTAB
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.
Regards,
Pradhiba
07-28-2005 2:01 PM
Hi Pradhibha,
I have want text 'total' below that TWH also.
i.e
I have
TWH 30
TOTAL
i want my out put to be in this manner.coule you tell me for this.
thanks in advace
07-28-2005 2:07 PM
Actually this twh which we pass thru layout will come in the first column as column heading and the total wil be displayed in the column which u r summing up. like,,
material value
a 5
b 10
c 15
-
twh 30
-
am not sure of two headings...
regards
Pradhiba