ALV报表去掉小数

DEFINE fill.
  afield-col_pos = l_pos.
  afield-fieldname = &1.
  afield-seltext_l = &2.
  afield-no_zero   = &3.
  afield-key       = &4.
  afield-edit      = &5.

 IF afield-fieldname = 'LFIMG'.
    afield-DECIMALS_O = '0'.         "去掉小数点后边0
  ENDIF.

  append afield to fieldcat.
  clear afield.
  l_pos = l_pos + 1.
END-OF-DEFINITION.
  wa_fieldcat-fieldname = 'BDMNG'.
  wa_fieldcat-scrtext_m =   '需求量'.
  wa_fieldcat-no_zero = 'X'.
  wa_fieldcat-qfieldname = 'MEINS'.
  wa_fieldcat-inttype = 'X'.
  wa_fieldcat-col_pos     = 13.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR  wa_fieldcat.

你可能感兴趣的:(ALV报表去掉小数)