*& Declarations.
DATA: lt_fieldcat TYPE slis_t_fieldcat_alv,
lw_fieldcat TYPE slis_fieldcat_alv.
*& ---- Displaying the ALV.
PERFORM f_field_catalog.
*PERFORM f_top.
PERFORM f_display_alv.
*& Performs
*&---------------------------------------------------------------------*
*& Form F_FIELD_CATALOG
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM f_field_catalog .
DATA : lv_pos TYPE i VALUE 1.
CLEAR : lw_fieldcat.
lw_fieldcat-col_pos = lv_pos.
lw_fieldcat-fieldname = 'IOBJ'.
lw_fieldcat-seltext_l = 'InfoObject'.
lw_fieldcat-key = 'X'.
* lw_fieldcat-outputlen = 15.
append lw_fieldcat to lt_fieldcat.
lv_pos = lv_pos + 1.
CLEAR : lw_fieldcat.
lw_fieldcat-col_pos = lv_pos.
lw_fieldcat-fieldname = 'USED_TYPE'.
lw_fieldcat-seltext_l = 'Used Type'.
* lw_fieldcat-outputlen = 20.
append lw_fieldcat to lt_fieldcat.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form F_DISPLAY_ALV
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM f_display_alv .
lw_flayout-colwidth_optimize = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = sy-repid
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* I_CALLBACK_TOP_OF_PAGE = 'TOP'
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
I_GRID_TITLE = 'This is Report Title'
* I_GRID_SETTINGS =
IS_LAYOUT = lw_flayout
IT_FIELDCAT = lt_fieldcat
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* I_HTML_HEIGHT_TOP = 0
* I_HTML_HEIGHT_END = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* IR_SALV_FULLSCREEN_ADAPTER =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = lt_output
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
No comments:
Post a Comment