Site Search

Sunday, January 16, 2011

ALV FAQ's

ALV Tutorials

ALV Tips

ALV Categories:

  1. ALV Tutorials
  2. ALV Tips
  3. ALV FAQ's

Saturday, January 15, 2011

Totals/Subtotals Display with Currency/Quantity Unit in ALV

Pass the QFIELDNAME for quantity fields, CFIELDNAME for currency fields in fieldcatlog.

Go through the following link for fieldcat of quantity and currency fields. 
http://help.sap.com/saphelp_46c/helpdata/pt/ff/4649b1f17411d2b486006094192fe3/content.htm

Example:

check the below code:

CLEAR WA_FIELDCAT.
WA_FIELDCAT_ALV-FIELDNAME = 'MEINS'. "internal table unit field
WA_FIELDCAT_ALV-SELTEXT_L = 'UoM'.
APPEND WA_FIELDCAT_ALV TO IT_FIELDCAT_ALV.


CLEAR WA_FIELDCAT.
WA_FIELDCAT_ALV-FIELDNAME = 'MENGE'.
WA_FIELDCAT_ALV-SELTEXT_L = 'Quantity'.
WA_FIELDCAT_ALV-QFIELDNAME = 'MEINS'. "pass your intenal table unit field  as quantity unit
APPEND WA_FIELDCAT_ALV TO IT_FIELDCAT_ALV.

Output: