显示特性值的描述方法之一

在ALV中显示是  因为是后加入的字段  在标题需要显示特性值的描述  
 
  define def_add_field.

    clear ls_fieldcat.

    call function 'CONVERSION_EXIT_ATINN_INPUT'
      exporting
        input  = &1
      importing
        output = l_atinn.

    select single atbez into ls_fieldcat-seltext_l
      from cabnt
      where atinn = l_atinn
        and spras = sy-langu.
    if sy-subrc ne 0.
      select single atbez into ls_fieldcat-seltext_l
       from cabnt
       where atinn = l_atinn
         and spras = 'E'.
    endif.

    ls_fieldcat-fieldname   = &2.
    ls_fieldcat-seltext_m   = ls_fieldcat-seltext_l.
    ls_fieldcat-no_out      = ''.
    ls_fieldcat-seltext_s   = ls_fieldcat-seltext_l.
    ls_fieldcat-outputlen = strlen( ls_fieldcat-seltext_l ).
    append ls_fieldcat to t_fc.
  end-of-definition.
constants: c_n_central_mgt_dept(30) value 'N_CENTRAL_MGT_DEPT',
           c_n_material_importancy(30) value 'N_TECH_CONTROL'.
  def_add_field c_n_central_mgt_dept 'CEN_DEPT'.
  def_add_field c_n_material_importancy 'MAT_TECH'.
 

你可能感兴趣的:(C++,c,C#)