Sunday, September 9, 2012

ALV total and sub total






  - To enable total and sub total in ALV Grid of the fieldcatalog should be in numerical format.

eg:


     valamt TYPE DECIMALS 2,"18.Value Amount
        amtpst TYPE DECIMALS 2,"19.Amt Posted
        sapostamt TYPE DECIMALS 5, "20.Amt Posted in SAP
  END OF ty_report.


  ta_fieldcatalog-fieldname 'AMTPST'.
  ta_fieldcatalog-seltext_l 'Amt Posted'.
  append ta_fieldcatalog to ta_fieldcatalog.
  clear ta_fieldcatalog.

  ta_fieldcatalog-fieldname 'SAPOSTAMT'.
  ta_fieldcatalog-seltext_l 'Amt Posted in SAP'.
  append ta_fieldcatalog to ta_fieldcatalog.
  clear ta_fieldcatalog. 

 

No comments:

Post a Comment