فیلد کاتالوگ در ABAP

از پاپیروس
پرش به ناوبریپرش به جستجو
    data: lc_glay type lvc_s_glay.
    call function 'REUSE_ALV_FIELDCATALOG_MERGE'
      exporting
        i_program_name         = sy-repid
        i_internal_tabname     = 'AN_Strucure'
        i_inclname             = 'NameOFInclude' "containe structure definition
      changing
        ct_fieldcat            = gt_fieldcat
      exceptions
        inconsistent_interface = 1
        program_error          = 2
        others                 = 3.


    loop at gt_fieldcat into gs_fcat.
      if gs_fcat-fieldname = 'BLOB1' or gs_fcat-fieldname = 'BLOB2'.
        gs_fcat-no_out = 'X'.
        modify gt_fieldcat from gs_fcat index sy-tabix
       transporting no_out.
      endif.
      if gs_fcat-fieldname = 'BLOB3'.
        gs_fcat-seltext_s = 'Shrt Dsc'.
        gs_fcat-seltext_m = 'Medium Desc'.
        gs_fcat-seltext_l = 'Long Desciption?'.
        gs_fcat-checkbox  = 'X'.
        gs_fcat-edit      = 'X'.
        modify gt_fieldcat from gs_fcat index sy-tabix
        transporting seltext_s seltext_m seltext_l checkbox edit.
      endif.
    endloop.