Skip to Content
author's profile photo Former Member
Former Member

currency-wise subtotal in normal interactive reporting

i have two tables vbap, vbak. in the report i have to print vbeln, netwr from vbap table & waerk from vbak table.

now for every change in the currency a subtotal will be printed.

e.g. suppose i have 15 rows in the list. there are 6 dem(currency), 5 usd (currency), 4 euro (currency).

the summation of 6 dem's will be printed, 5 usd's will be printed, 4 euro's will be printed. how this can be achieved?


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2009 at 06:30 PM

    if you are directly relating the field definition as their data elements then vbeln would be char10, netwr is a curency and waerk is currency key(char type).


    create you final table as:

    types: begin of gty_final,
                 vbeln type vbak-vbeln,
                 netwr type vbap-netwr,
                 waerk type vbak-waerk,
               end of gty_final. 
    loop at gt_vbap into gs_vbap.
      clear : gs_vbak.
      read table gt_vbak into gs_vbak with key vbeln = gs_vbap-vbeln.
      if sy-subrc = 0.
         gs_final-vbeln = gs_vbap-vbeln.
         gs_final-netwr = gs_vbap-netwr.
         gs_final-waerk = gs_vbak-waerk.
         COLLECT gs_final into gt_final.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 07, 2009 at 02:39 PM

    Define like this.

      fieldcatalog-fieldname   = 'NETWR'.
      fieldcatalog-seltext_l   = 'TRANSACTION CURRRENCY'.
      fieldcatalog-cfieldname   = 'WAERS'.  --> this willl give you currencywise subtotal
      fieldcatalog-do_sum   = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      thanks gautham,

      but i want to achieve it through interactive reporting not ALV. again thank you for your answer.

      i know it will be achieved through control statements in internal table but fail to achieve that.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.