Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8372

Re: In report program,how to fetch cost center for a GL account

$
0
0

Obviously, there is no direct mapping for cost center and GL account BUT

If you will use for BAPI_ACC_DOCUMENT_POST, you dont need the mapping anymore.

Refer to this code below:

 

Data:

         lit_accgl     TYPE bapiacgl09_tab WITH HEADER LINE

          lit_t030k     TYPE STANDARD TABLE OF t030K.

   

*--> Filling Accounts G/L

       lit_accgl-itemno_acc = 0000000002.

       lit_accgl-gl_account 0011990210.

       lit_accgl-comp_code  = vbrk-bukrs.

       lit_accgl-bus_area   = Vbrp-gsber.

       lit_accgl-fisc_year  vbrk-gjahr.

       lit_accgl-customer   = vbrk-kunag.

       lit_accgl-tax_code   = konv-mwsk1.

       lit_accgl-profit_ctr vbrp-prctr.

       APPEND lit_accgl.


*-->Filling Accounts tax

*-->Determine G/L account for the tax line

       CALL FUNCTION 'FI_TAX_GET_TAX_ACC_BY_KSCHL'

         EXPORTING

           i_bukrs           vbrk-bukrs

           i_mwskz           = konv-mwsk1

*         I_TXJCD           =

*         I_PRSDT           =

*         I_KSCHL           =

*         I_XDEEP           =

         TABLES

           t_t030k           = lit_t030k

 

CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'

     (Add Exporting/Importing parameters)

TABLES

             accountgl         = lit_accgl


Viewing all articles
Browse latest Browse all 8372

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>