Quantcast
Channel: SCN: Message List - ABAP Connectivity
Viewing all articles
Browse latest Browse all 3125

Net amount in financial document

$
0
0


Hello,

 

in Russia it is not allowed to post in FI on same document as credit and debit.

So when you have an SD invoice including price and discount the system creates two lines in accounting doc, one as debit and one as credit.

I found here a solution which says that I can enter a new condition type which includes the net amount and assign the account key. All the other related condition types should be statistical. But this is not working for us. There are problems with printing and also in profitability analysis.

 

So my idea is to use exit EXIT_SAPLV60B_008. Here I can aggregate the lines in ACCIT.

I used following coding:

 

 

data: ls_accit type accit,
         ls_acccr  type acccr.
IF cvbrk-vkorg = '4801' or cvbrk-vkorg = '4802'. "Russia
  clear: ls_accit, ls_acccr.
  loop at xaccit where hkont = '0000500000'. "Account for sales
    if ls_accit is initial.
      ls_accit = xaccit.
      read table xacccr into ls_acccr with key posnr = ls_accit-posnr.
   else.
      loop at xacccr where posnr = xaccit-posnr.
        ls_acccr-wrbtr = ls_acccr-wrbtr + xacccr-wrbtr.
        delete xacccr.
     endloop.
     delete xaccit.
  endif.
endloop.
if not xacccr is INITIAL.
    loop at xacccr where posnr = ls_acccr-posnr.
       modify xacccr from ls_acccr.
    endloop.
  endif.

endif.

 

 

First tests was successful. Do you think this can work? Is anybody else using this exit for the same issue? What is your coding?

 

Or has someone a different solution.

 

Thanks

Andreas Hoger


Viewing all articles
Browse latest Browse all 3125

Trending Articles



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