Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add new field to report S_ALR_87009895

0 Kudos

Dear Expert,

   I would like to add "GL Account" field to "output tax total" report (t-code S_ALR_87009895), i using BADI "IF_EX_FI_TAX_BADI_014",but when i choose this field on layout screen,SAP show shotdump , please see attached file (dump.txt)

   please advise.

Regards.

Pornchai.

My code is below.

method IF_EX_FI_TAX_BADI_014~MODIFY_FIELDCAT.
* Change Teem : CH01
* Change By : Pornchai P.
* Change Date : 2013.09.28
* Change Description :  Add field G/L for t-code "S_ALR_87009895" , summary

*    HAN1Output tax: Line items
*    HAN2Output tax: Totals list
*    HAN3Input tax: Line items
*    HAN4Input tax: Totals list
*    HAN5Tax difference: Line items
*    HAN6Balance per company code
*    HAN7Cross-company code balance


   data ls_field_cate TYPE LINE OF SLIS_T_FIELDCAT_ALV.

    IF i_handle = 'HAN2'.

     READ TABLE ch_tab_fieldcat into ls_field_cate WITH KEY fieldname = 'HKONT'.
     if sy-subrc ne 0.
       ls_field_cate-fieldname = 'HKONT'.
       ls_field_cate-REF_TABNAME = 'BSEG'.
       ls_field_cate-no_out = 'X'.

       append ls_field_cate to ch_tab_fieldcat.
     endif.


   ENDIF.
endmethod.

1 ACCEPTED SOLUTION

0 Kudos

more step

4 REPLIES 4

0 Kudos

more step

0 Kudos

Hi,

Your BADI name is FI_TAX_BADI_014

interface name is IF_EX_FI_TAX_BADI_014

then method name & now try like this.

http://scn.sap.com/thread/1021699

Thanks

Gourav.

0 Kudos

Hi

The problem is you add the field in catlog table but not in the internal table for output

The structure of output table is defined in dictionary: RFUMS_TAX_GT_ALV, so you should append you new field here, but you can also use the user field:

USER_FIELD_1

USER_FIELD_2

USER_FIELD_3

USER_FIELD_4

USER_FIELD_A

USER_FIELD_B

and change their description for ALV in the badi you're using

The vallue can be inserted by badi FI_TAX_BADI_012 and/or  FI_TAX_BADI_016

Max

0 Kudos

Hi Max,

i got it,but SUM table not have USER FIELD# ,i'll reuse exist field for this requirement.

thank a lot

Pornchai.