Skip to Content
0
Former Member
May 03, 2010 at 10:14 AM

Problem with summing up the currency fields

33 Views

The below is my code through which I cannot display hthe sum at the end for all the below fields please advice on the soln. Also srched in SDN the answers are bit ambigious/also tried.

gw_fieldcat-fieldname  = 'WTGXXX'.
  gw_fieldcat-datatype   = 'CURR'.
*  gw_fieldcat-cfieldname = 'WAERS'.
  gw_fieldcat-tabname    = 'gt_output'.
  gw_fieldcat-seltext_l  = 'Material(Transaction currency)'.
  gw_fieldcat-no_zero    = 'X'.
  gw_fieldcat-do_sum     = 'X'.
  APPEND gw_fieldcat TO gt_fieldcat.
  CLEAR gw_fieldcat.

  gw_fieldcat-fieldname  = 'WOGXXX'.
  gw_fieldcat-datatype   = 'CURR'.
*  gw_fieldcat-cfieldname = 'WAERS'.
  gw_fieldcat-tabname    = 'gt_output'.
  gw_fieldcat-seltext_l  = 'Material(Object currency)'.
  gw_fieldcat-no_zero    = 'X'.
  gw_fieldcat-do_sum     = 'X'.
  APPEND gw_fieldcat TO gt_fieldcat.
  CLEAR gw_fieldcat.

  gw_fieldcat-fieldname  = 'WKGXXX'.
  gw_fieldcat-datatype   = 'CURR'.
*  gw_fieldcat-cfieldname = 'WAERS'.
  gw_fieldcat-tabname    = 'gt_output'.
  gw_fieldcat-seltext_l  = 'Material(Controlling area currency)'.
  gw_fieldcat-no_zero    = 'X'.
  gw_fieldcat-do_sum     = 'X'.
  APPEND gw_fieldcat TO gt_fieldcat.
  CLEAR gw_fieldcat.

  gw_fieldcat-fieldname  = 'WTGXXX1'.
  gw_fieldcat-datatype   = 'CURR'.
*  gw_fieldcat-cfieldname = 'WAERS'.
  gw_fieldcat-tabname    = 'gt_output'.
  gw_fieldcat-seltext_l  = 'Labour(Transaction currency)'.
  gw_fieldcat-no_zero    = 'X'.
  gw_fieldcat-do_sum     = 'X'.
  APPEND gw_fieldcat TO gt_fieldcat.
  CLEAR gw_fieldcat.

  gw_fieldcat-fieldname  = 'WOGXXX1'.
  gw_fieldcat-datatype   = 'CURR'.
*  gw_fieldcat-cfieldname = 'WAERS'.
  gw_fieldcat-tabname    = 'gt_output'.
  gw_fieldcat-seltext_l  = 'Labour(Object currency)'.
  gw_fieldcat-no_zero    = 'X'.
  gw_fieldcat-do_sum     = 'X'.
  APPEND gw_fieldcat TO gt_fieldcat.
  CLEAR gw_fieldcat.

  gw_fieldcat-fieldname  = 'WKGXXX1'.
  gw_fieldcat-datatype   = 'CURR'.
*  gw_fieldcat-cfieldname = 'WAERS'.
  gw_fieldcat-tabname    = 'gt_output'.
  gw_fieldcat-seltext_l  = 'Labour(Controlling area currency)'.
  gw_fieldcat-no_zero    = 'X'.
  gw_fieldcat-do_sum     = 'X'.
  APPEND gw_fieldcat TO gt_fieldcat.
  CLEAR gw_fieldcat.

  gw_fieldcat-fieldname  = 'TOTAL1'.
  gw_fieldcat-datatype   = 'CURR'.
*  gw_fieldcat-cfieldname = 'WAERS'.
  gw_fieldcat-tabname    = 'gt_output'.
  gw_fieldcat-seltext_l  = 'Total(Transaction currency)'.
  gw_fieldcat-no_zero    = 'X'.
  gw_fieldcat-do_sum     = 'X'.
  APPEND gw_fieldcat TO gt_fieldcat.
  CLEAR gw_fieldcat.

  gw_fieldcat-fieldname  = 'TOTAL2'.
  gw_fieldcat-datatype   = 'CURR'.
*  gw_fieldcat-cfieldname = 'WAERS'.
  gw_fieldcat-tabname    = 'gt_output'.
  gw_fieldcat-seltext_l  = 'Total(Object currency) '.
  gw_fieldcat-no_zero    = 'X'.
  gw_fieldcat-do_sum     = 'X'.
  APPEND gw_fieldcat TO gt_fieldcat.
  CLEAR gw_fieldcat.

  gw_fieldcat-fieldname  = 'TOTAL3'.
  gw_fieldcat-datatype   = 'CURR'.
*  gw_fieldcat-cfieldname = 'WAERS'.
  gw_fieldcat-tabname    = 'gt_output'.
  gw_fieldcat-seltext_l  = 'Total(Controlling area currency)'.
  gw_fieldcat-no_zero    = 'X'.
  gw_fieldcat-do_sum     = 'X'.
  APPEND gw_fieldcat TO gt_fieldcat.
  CLEAR gw_fieldcat.

thanks in advance.