Skip to Content
0
Former Member
Jan 09, 2006 at 02:43 PM

ALV do_sum and sub total not working

705 Views

Hi all,

I have the following code.Everything is working fine but

total(do_sum) and subtotal not working.

Please kindly check the code and tell me where went wrong.

DEFINE m_fieldcat.
    ls_fieldcat-fieldname   = &1.
    ls_fieldcat-ref_tabname = &2.
    ls_fieldcat-ref_fieldname = &3.
    ls_fieldcat-reptext_ddic = &4.
    ls_fieldcat-ddic_outputlen = &5.
    ls_fieldcat-do_sum     =  &6.
    append ls_fieldcat to lt_fieldcat.
  END-OF-DEFINITION.

  DEFINE m_sort.
    ls_sort-fieldname = &1.
    ls_sort-up        = &2.
    ls_sort-subtot    = &3.
    append ls_sort to lt_sort.
  END-OF-DEFINITION.

 CASE u_tabname.
    WHEN 'ETAB'.
* Build field catalog and sort table
      m_fieldcat 'DRCRK' '' '' 'Haben/Soll' '11' ''.
      m_fieldcat 'BRANCH' '' '' 'Branch' '8' ''.
      m_fieldcat 'PRCTR' '' '' 'Partner-PC/Gruppe' '25' ''.
      m_fieldcat 'MONAT' '' '' 'Period' '9' ''.
      m_fieldcat 'VALUE' '' '' 'In PrCtr-Hauswährung' '25' 'X'.
      m_sort 'DRCRK' 'X' 'X'.
      PERFORM ievents.

thanks and regards

Chandu.