ALV working

 https://www.youtube.com/watch?v=HMp5y5R0bNs&list=PL6hZo0-ANOSVpD_dAq-7kjWnfbDKIjmlV&index=22


*&---------------------------------------------------------------------*
*& Report ZJH_MATERIAL_ALV_REPORT
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zjh_material_alv_report.

TABLESsflights.

TYPESBEGIN OF st_mara,
         carrid   TYPE s_carrid,
         carrname TYPE s_carrname,
         connid   TYPE conn_id,
       END OF st_mara.

DATAit_mara TYPE STANDARD TABLE OF st_mara,
      w_mara  TYPE st_mara,

      it_fcat TYPE slis_t_fieldcat_alv,
      w_fcat  TYPE slis_fieldcat_alv.

SELECT-OPTIONSs_carrid FOR sflights-carrid.

w_fcat-col_pos '1'.
w_fcat-fieldname 'carrid'.
w_fcat-seltext_m 'carrid'.
APPEND w_fcat TO it_fcat.

w_fcat-col_pos '2'.
w_fcat-fieldname 'carrname'.
w_fcat-seltext_m 'carrname'.
APPEND w_fcat TO it_fcat.

w_fcat-col_pos '3'.
w_fcat-fieldname 'conn_id'.
w_fcat-seltext_m 'conn_id'.
APPEND w_fcat TO it_fcat.

SELECT  carrid
        carrname
        connid FROM sflights
  INTO TABLE it_mara
  WHERE carrid IN s_carrid.

  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
 EXPORTING
*     I_INTERFACE_CHECK                 = ' '
*     I_BYPASSING_BUFFER                = ' '
*     I_BUFFER_ACTIVE                   = ' '
*     I_CALLBACK_PROGRAM                = ' '
*     I_CALLBACK_PF_STATUS_SET          = ' '
*     I_CALLBACK_USER_COMMAND           = ' '
*     I_CALLBACK_TOP_OF_PAGE            = ' '
*     I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
*     I_CALLBACK_HTML_END_OF_LIST       = ' '
*     I_STRUCTURE_NAME                  =
*     I_BACKGROUND_ID                   = ' '
*     I_GRID_TITLE                      =
*     I_GRID_SETTINGS                   =
*     IS_LAYOUT                         =
     IT_FIELDCAT                       =  it_fcat
*     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                          it_mara
*   EXCEPTIONS
*     PROGRAM_ERROR                     = 1
*     OTHERS                            = 2
            .
  IF sy-subrc <> 0.
* Implement suitable error handling here
  ENDIF.

Comments

  1. https://www.youtube.com/watch?v=gU7hfKmz58Y 2-30 simple

    ReplyDelete

Post a Comment

Popular posts from this blog

sap abap import from excell to table (transparent table)

sap abap Import from excell to internal table that works 100%