*&---------------------------------------------------------------------*
*& Report ZSAN_ALV
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZSAN_ALV.
TYPE-POOLS:SLIS.
TABLES:ZSAN_EMP_DETAILS.
DATA:SAN_ITABLE TYPE ZSAN_EMP_DETAILS OCCURS 0 WITH HEADER LINE.
* ALV specific data objects
DATA : g_f_repid LIKE sy-repid.
DATA : g_t_fieldcat TYPE slis_t_fieldcat_alv.
DATA : g_r_fieldcat TYPE slis_fieldcat_alv.
DATA : g_t_events TYPE slis_t_event.
DATA : g_r_events TYPE slis_alv_event.
DATA : g_r_layout TYPE slis_layout_alv.
DATA : g_f_callback_user_command TYPE slis_formname.
DATA : g_f_callback_pf_status_set TYPE slis_formname.
DATA : g_r_x_variant LIKE disvariant.
DATA : g_r_variant LIKE disvariant.
DATA : g_f_exit(1) TYPE c.
DATA : g_f_save(1) TYPE c.
SELECT-OPTIONS:S_INP FOR ZSAN_EMP_DETAILS-EMP_NO.
START-OF-SELECTION.
PERFORM GETDATA.
PERFORM DISPLAYDATA.
FORM GETDATA.
SELECT * INTO TABLE SAN_ITABLE FROM ZSAN_EMP_DETAILS WHERE EMP_NO IN S_INP.
ENDFORM.
FORM DISPLAYDATA.
g_f_repid = sy-repid.
* Attributes for layout
g_r_layout-zebra = 'X'.
* g_r_layout-min_linesize = 119.
g_r_layout-colwidth_optimize = 'X'.
g_r_layout-f2code = '&ETA'.
g_r_layout-detail_initial_lines = 'X'.
g_r_layout-get_selinfos = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_f_repid
i_structure_name = 'ZSAN_EMP_DETAILS'
* is_layout = g_r_layout
TABLES
t_outtab = SAN_ITABLE
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM.
*& Report ZSAN_ALV
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZSAN_ALV.
TYPE-POOLS:SLIS.
TABLES:ZSAN_EMP_DETAILS.
DATA:SAN_ITABLE TYPE ZSAN_EMP_DETAILS OCCURS 0 WITH HEADER LINE.
* ALV specific data objects
DATA : g_f_repid LIKE sy-repid.
DATA : g_t_fieldcat TYPE slis_t_fieldcat_alv.
DATA : g_r_fieldcat TYPE slis_fieldcat_alv.
DATA : g_t_events TYPE slis_t_event.
DATA : g_r_events TYPE slis_alv_event.
DATA : g_r_layout TYPE slis_layout_alv.
DATA : g_f_callback_user_command TYPE slis_formname.
DATA : g_f_callback_pf_status_set TYPE slis_formname.
DATA : g_r_x_variant LIKE disvariant.
DATA : g_r_variant LIKE disvariant.
DATA : g_f_exit(1) TYPE c.
DATA : g_f_save(1) TYPE c.
SELECT-OPTIONS:S_INP FOR ZSAN_EMP_DETAILS-EMP_NO.
START-OF-SELECTION.
PERFORM GETDATA.
PERFORM DISPLAYDATA.
FORM GETDATA.
SELECT * INTO TABLE SAN_ITABLE FROM ZSAN_EMP_DETAILS WHERE EMP_NO IN S_INP.
ENDFORM.
FORM DISPLAYDATA.
g_f_repid = sy-repid.
* Attributes for layout
g_r_layout-zebra = 'X'.
* g_r_layout-min_linesize = 119.
g_r_layout-colwidth_optimize = 'X'.
g_r_layout-f2code = '&ETA'.
g_r_layout-detail_initial_lines = 'X'.
g_r_layout-get_selinfos = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_f_repid
i_structure_name = 'ZSAN_EMP_DETAILS'
* is_layout = g_r_layout
TABLES
t_outtab = SAN_ITABLE
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM.
0 comments:
Post a Comment