04-05-2014 11:18 AM
Hi All,
I need to change ALV header data. In selection screen i have given some amount and the same amount i have passed to ALV header for user Review. That amount have to adjust for ALV output. In ALV output one editable field is there. If suppose there are 10 line items in ALV output and the input amount is 10000 then I have to adjust this amount for 5 line items. If suppose in first line item editable field i enter 2000 then in ALV header data the remaining amount have to 8000 only. Because that 2000 have to decrease for input amount. How should we do this?
Regards
Nageswar
04-05-2014 11:46 AM
hi,
do the code for your calculation
1. start-of-selection
PERFORM HEADING TABLES head USING 'HEADING'.
FORM HEADING TABLES P_HEAD TYPE SLIS_T_LISTHEADER
CHANGING TABLENAME.
CASE TABLENAME.
WHEN 'HEADING'.
data: amount type i. " here you do your calculation
amount = 100. "do calculation
P_HEAD-TYP = 'H'.
P_HEAD-INFO = amount. "pass the variable
APPEND P_HEAD.
FORM TOP-OF-PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = HEAD[]
I_LOGO = 'LOGO_M'
I_END_OF_LIST_GRID = 'X'
* I_ALV_FORM =
.
clear head[].
ENDFORM.
04-05-2014 11:46 AM
hi,
do the code for your calculation
1. start-of-selection
PERFORM HEADING TABLES head USING 'HEADING'.
FORM HEADING TABLES P_HEAD TYPE SLIS_T_LISTHEADER
CHANGING TABLENAME.
CASE TABLENAME.
WHEN 'HEADING'.
data: amount type i. " here you do your calculation
amount = 100. "do calculation
P_HEAD-TYP = 'H'.
P_HEAD-INFO = amount. "pass the variable
APPEND P_HEAD.
FORM TOP-OF-PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = HEAD[]
I_LOGO = 'LOGO_M'
I_END_OF_LIST_GRID = 'X'
* I_ALV_FORM =
.
clear head[].
ENDFORM.