2006 Oct 19 10:29 AM
Hi
Is it possible to write normal reporting after alv list in same page?
I displayed a list using ALV.
Below i want to Only totals of that ALV list..
and i want to add some more to that totals??is is possible to do in ALV?/
Example:
EEPF VPF CLA REC OTHER DED Prof Tax LWF TDS Other Deduction 1 Gross Ded
11097.00 0.00 6300.00 489.00 400.00 3.00 22317.00 0.00 40606.00
NET PAY 0 180592.00
The above fields are totals from list and below i want to add to that fields(other decuction1,lwf,netpay)
Other Deduction 1 0.00
LWF 3.00
Net Pay 180592.00
Salary Payable in Doc.No.xxxxxxxx 180595.00
if not possible in alv,how to get display that alv totals in normal format and i can do calculation.
Thanks in advance..
2006 Oct 19 10:35 AM
HI,
YOu can go for something like a Block list.
See the report BALVBT01.
or use end-of-list event.
se exapmle:
http://www.sap-img.com/abap/sample-programs-on-alv-grid.htm
Regards,
Ravi
Message was edited by: Ravi Kanth Talagana
Message was edited by: Ravi Kanth Talagana
Hi
Is it possible to write normal reporting after alv list in same page?
I displayed a list using ALV.
Below i want to Only totals of that ALV list..
and i want to add some more to that totals??is is possible to do in ALV?/
Example:
EEPF VPF CLA REC OTHER DED Prof Tax LWF TDS Other Deduction 1 Gross Ded
11097.00 0.00 6300.00 489.00 400.00 3.00 22317.00 0.00 40606.00
NET PAY 0 180592.00
The above fields are totals from list and below i want to add to that fields(other decuction1,lwf,netpay)
Other Deduction 1 0.00
LWF 3.00
Net Pay 180592.00
Salary Payable in Doc.No.xxxxxxxx 180595.00
if not possible in alv,how to get display that alv totals in normal format and i can do calculation.
Thanks in advance..
2006 Oct 19 10:32 AM
You can do this in the END-OF-LIST or END-OF-PAGE event of the ALV.Just fill the IT_EVENTS table with the above event and write your code in the "END-OF-LIST" subroutine.
2006 Oct 19 10:35 AM
2006 Oct 19 10:42 AM
i giveing some brief idea of for creating end of list.......ok
FORM list_events.
DATA :
g_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE',
g_end_of_list TYPE slis_formname VALUE 'END_OF_LIST'.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = g_events.
READ TABLE g_events WITH KEY name = slis_ev_top_of_page
INTO l_event.
IF sy-subrc = 0.
MOVE g_top_of_page TO l_event-form.
APPEND l_event TO g_events.
ENDIF.
READ TABLE g_events WITH KEY name = slis_ev_end_of_list
INTO l_event.
IF sy-subrc = 0.
MOVE g_end_of_list TO l_event-form.
APPEND l_event TO g_events.
ENDIF.
ENDFORM. " list_events
-
in this form u can write as u wish/requirement
FORM fill_footer.
DATA: ls_line TYPE slis_listheader.
DATA: l_date(10) TYPE c.
DATA: l_time(10) TYPE c.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-key = text-005.
ls_line-info = sy-uname.
APPEND ls_line TO g_list_end_of_page.
WRITE sy-datum TO l_date DD/MM/YYYY.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-key = text-006.
ls_line-info = l_date.
APPEND ls_line TO g_list_end_of_page.
WRITE sy-uzeit TO l_time hh/mm/ss.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-key = text-006.
ls_line-info = sy-uzeit.
APPEND ls_line TO g_list_end_of_page.
ENDFORM. " fill_footer
-
FORM end_of_list.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = g_list_end_of_page
i_end_of_list_grid = g_list_end_of_page.
ENDFORM.
-
u need to pass events internal tabletable...ok
-
FORM display_data_alvgrid.
g_repid = sy-repid.
g_layout-COLWIDTH_OPTIMIZE = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
i_callback_pf_status_set = ' '
IS_LAYOUT = g_layout
it_fieldcat = ist_fcat[]
i_default = 'X'
i_save = 'A'
it_events = g_events[]
it_sort = ist_sort[]
TABLES
t_outtab = it_final
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.
ENDFORM. " display_data_alvgrid
Regards,
Ramesh.
2006 Oct 19 10:34 AM
2006 Oct 19 10:35 AM
HI,
YOu can go for something like a Block list.
See the report BALVBT01.
or use end-of-list event.
se exapmle:
http://www.sap-img.com/abap/sample-programs-on-alv-grid.htm
Regards,
Ravi
Message was edited by: Ravi Kanth Talagana
Message was edited by: Ravi Kanth Talagana
2006 Oct 19 10:39 AM
I already done Block list...
i want to display only totals in second list based on list1 totals.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |