Sum of a field in SAP ALV Report

 In sap ALV report some times we need to sum column value. We can easily doing this job just define <field catalog>-do_sum = 'X' and must define <field catalog>-fieldname = 'QUAN' / 'CUR'.

example given below:

   

  W_FIELDCAT-FIELDNAME 'Deviation'.
  W_FIELDCAT-DO_SUM 'X'.
  W_FIELDCAT-DATATYPE 'QUAN'.
  W_FIELDCAT-SELTEXT_L 'Deviation %'.
  W_FIELDCAT-TABNAME 'TY_TABLE'.

  APPEND W_FIELDCAT TO FIELDCAT.

Comments

Popular posts from this blog

New commodity code create in SAP S/4 Hana

INITCAP- First letter of the word Capital in SAP ABAP

BAPI to Change STO PO/ PO Delivery date in SAP