I still don’t understand why TRM using only customer subledger for posings.

And even it written in “SAP Treasury and Risk Management” book by SAP-press

It is not very usefull for the processes in treasury to separate the two subledger

some Customers who implement TRM demand posting to Vendors subledger when they need!

Ok, it’s not a problem.

All you need:

  1. Connect Vendor and customer master datas to Business partner (Business Partner creation from Vendor master data for Transaction Manager)
  2. Posting Specification for Customer (usually it is: Dt Gl account, Cr Customer; + Payment flag set)
  3. ABAP skills and badi TPM_ACCIF_TRAC

Within badi TPM_ACCIF_TRAC there is method ACCIT_EXIT “Changes the Entire Structure”, and within the method there are structures CH_ACCIT_D (debit position) and CH_ACCIT_C (credit position).

According to posting specification Gl account is situated in CH_ACCIT_D, customer – CH_ACCIT_C.

We need to make posting: Dt Gl account, Cr Vendor.

For that inside the method we do the changes to the following fields in structures:

     CH_ACCIT_C-BLART = KZ /*you can use other doc type*/

                         BSCHL = 31

                         KOART = K

                           LIFNR = Vendor /*you can read vendor id from Business partner*/

                         KUNNR = ‘ ‘ /*make empty*/

             NOMINAL_AMT = add minus sign to amount

                         HKONT = reconciliaton account of the vendor /*you can read reconc. account id number from vendor master data*/

     CH_ACCIT_D-BLART = KZ


DATA: kont TYPE akont, " Reconciliation account.
         vend TYPE lifnr, " Vendor.
         kontrh TYPE tb_kunnr_new. "BP from transaction.
   " To read some data which is not available in
   " im_data structure.
   FIELD-SYMBOLS <fs_vtbfha> TYPE vtbfha.
   ASSIGN ('(RFTBBB00)VTBFHA') TO <fs_vtbfha>.
   " Check if we need to do postings to vendor
   " You can use CHARACTERISTICS field on Administ. tab.
   " or checkbox on custom tab, or ...
   IF <fs_vtbfha>-merkm = 'VENDOR'.
     " Here we search GUID from BUT000, then Vendor from CVI_VEND_LINK with GUID.
     kontrh = <fs_vtbfha>-kontrh.
     SELECT SINGLE p~vendor
       INTO vend
       FROM but000 AS c
             INNER JOIN cvi_vend_link AS p ON c~partner_guid = p~partner_guid
               WHERE c~partner = kontrh.
     " Here we look for reconciliation account.
     SELECT SINGLE akont
       FROM lfb1
       INTO kont
       WHERE lifnr = vend.
     " Fields to change
     " CH_ACCIT_C structure
     ch_accit_c-nominal_amt = ( -1 ) * ch_accit_c-nominal_amt. " Add minus sign to nominal amount.
     ch_accit_c-blart = 'KZ'. "you can use other doc type*/
     ch_accit_c-bschl = '31'.
     ch_accit_c-koart = 'K'.
     ch_accit_c-lifnr = vend. " Vendor /*you can read vendor id from Business partner*/
     ch_accit_c-kunnr = ' '. "/*make empty*/
     ch_accit_c-hkont = kont ."reconciliaton account of the vendor /*you can read reconc. account id number from vendor master data*/
     " CH_ACCIT_D structure
     ch_accit_d-blart = 'KZ'.
ENDIF.
   ENDIF

Scenario

We have the following conditions (only screenshot)

/wp-content/uploads/2014/07/deal_519037.jpg

We need to have parameter to triger posting to vendor subledger.

I usually use Characteristics field. You can add search help to enter VENDOR parameter. You can even rename the field.

Or you can use checkbox on custome tab.

Everything is up to you.

vendor triger.jpg

In order to use F110 transaction – automatic payment program – and make payment to vendor, you have to enter proper payment details

For incoming payment you have to enter only House bank and Account ID.

payment det.jpg

For outgoing payemnt parameter are different

/wp-content/uploads/2014/07/payment_519062.jpg

The whole posting scheme is:

Incoming payment

Transaction Postings (credit) Comments Postings (debit) Comments
TBB1 Cr 66 Account symbol 1 Dt 51.9 Сlearing account
Bank statement Cr 51.9 Сlearing account Dt 51 Money

Nominal interest

Transaction Postings (credit) Comments Postings (debit) Comments
TBB1 Cr Vendor Usually alternative reconc. account Dt 91 Expenses
F110 Cr 51.9 Сlearing account Dt Vendor
Bank statement Cr 51 Money Dt 51.9 Сlearing account

Final repayment

Transaction Postings (credit) Comments Postings (debit) Comments
TBB1 Ct Vendor Standard reconc. account Dt 66 Account symbol 1
F110 Ct 51.9 Сlearing account Dt Vendor
Bank statement Ct 51 Money Dt 51.9 Сlearing account

Configuration.

We need to adjust postings scheme to the postings above.

Final repayment:

As we use Vendor subledger don’t forget to set check mark to payment

/wp-content/uploads/2014/07/mm1200__519053.jpg

Pay attention to Debit and Credit entries and adjust posting keys respectively

/wp-content/uploads/2014/07/11100_519057.jpg

Nominal interest

/wp-content/uploads/2014/07/mm1120__519054.jpg

/wp-content/uploads/2014/07/14500_519056.jpg

Postings scheme for incoming payment is quite easy. You can do it yourself.

Postings

Hint: don’t pay attention to Vendor reconciliation account in posting log – everything will be allright with posting.

I don’t know why it appers, i will try to check it and correct the article.

/wp-content/uploads/2014/07/tbb1_post_519064.jpg

/wp-content/uploads/2014/07/fi_post_519074.jpg

/wp-content/uploads/2014/07/fi_post_2_519075.jpg

As you can see payment to vendor is done!

To report this post you need to login first.

38 Comments

You must be Logged on to comment or reply to a post.

  1. Santiago Robayo

    Hi Grigoriy,  is me again can you please explain in detail how in LIFNR can I read the vendor from BP?

    How can I add the minus sign to the amount?

    How I can read the reconciliation account from the vendor??

    Many THANKS in advance!!

    Santiago

    (0) 
    1. Grigoriy Babitskiy Post author

      Hello, Sangiago,

      DATA: kont TYPE akont, ” Reconciliation account.

               vend TYPE lifnr, ” Vendor.

               kontrh TYPE tb_kunnr_new. “BP from transaction.

         FIELD-SYMBOLS <fs_vtbfha> TYPE vtbfha.

         ” You can use IM_DATA-TAB_BP, but there you’ll find nested structure

         ASSIGN (‘(RFTBBB00)VTBFHA’) TO <fs_vtbfha>.

         kontrh = <fs_vtbfha>kontrh. “BP from transaction.

         ” Add minus sign to nominal amount.

         ch_accit_cnominal_amt = ( 1 ) * ch_accit_cnominal_amt.

         ” Here we seacht GUID from BUT000, then Vendor from CVI_VEND_LINK with GUID.

         SELECT SINGLE p~vendor

           INTO vend

           FROM but000 AS c

                 INNER JOIN cvi_vend_link AS p ON c~partner_guid = p~partner_guid

                   WHERE c~partner = kontrh.

         ” Here we look for reconciliation account.

         SELECT SINGLE akont

           FROM lfb1

           INTO kont

           WHERE lifnr = vend.

      (0) 
      1. Santiago Robayo

        Thanks a lot Grigoriy! thats in the ABAP-BADI side, but in configuration and functional part how would it work? Know I can configure with a 01 – 31 (Vendor)? or it would appear a new field (user exit) on TBB1?

        Thanks A LOT!

        The fact here with my customer is that the have intercompany loans so they have created the subsidiaries as Clients and Vendors so they are requesting to post in both subledgers accordingly.

        Best Regards

        Santiago

        (0) 
        1. Grigoriy Babitskiy Post author

          1. I use field “Characteristics” on Administr. tab to triger postings to customers or to vendors.

          /wp-content/uploads/2014/08/vendor_517389.jpg

          You can attach search help to this field in order to enter data, or you can enter data manually.

          Or you can create checkbox on custom tab. It’s up to you.

          We need this to triger our code in BADI – to change postings or not.

          2. We need to think about postings schemes. Where Vendors must appear in postings – use Account Symbol “2” and proper posting key.

          Generally that’s all.

          There is no any new fields on TBB1 selection screen.

          If i have a spare time – i will update my article with more screenshots and descriptions about configuration and examples.

          (0) 
          1. Santiago Robayo

            Hi Grigori, sorry for being such a pain… but really Im trying but isn´t working for me. I linked the BP to the Vendor through FLBPC2 and the BP role FLVN01. We activated the BADI through the field Characteristics in additional fields. The configuration is as follows:

            Crt 21 with Acct Symbol 2

            Dbt 50 with Acct Symbol 3.2

            And what ir really posting is:

            Crt 21 to Customer 1700005 (BP)

            Dbt 31 to a Recon Account

            With Error No account Especified in Item 000000002

            PLEASE HELP!!

            Thanks again!!

            (0) 
      2. Chan Bernard

        Hi,Grigoriy Babitskiy

        In TRM security model,When i first buy stock(01A) 100 UNIT,later ,l Sell Stock 150 Unit,i have only 100 unit  on my hand, how to achieve that? Thank you !

        Best Wish!

        Bernard

        (0) 
  2. Joao Ferreira

    Hi Grigoriy Babitskiy! Very good article!

    Quick question though: I think it would be easier, processwise, to have a 3rd radio button added to the control data in the outgoing payment parameter, right? That way it is explicit for the end user that he/she will post to a vendor account, not a customer account.

    I don’t have very good ABAP skills, so I ask: the changes in the code you did there, do they replace the posting from the customer subledger to the vendor subledger? Or you could do anyway postings to the customer subledger the standard way, provided the account determination is set up accordingly?

    Thanks!

    (0) 
    1. Grigoriy Babitskiy Post author

      Hello Joao Ferreira. Thank you for your feedback!

      Quick question though: I think it would be easier, processwise, to have a 3rd radio button added to the control data in the outgoing payment parameter, right? That way it is explicit for the end user that he/she will post to a vendor account, not a customer account.

      You are absolutely right! But this is quite diffficult as there is no any user exit which allow us to define any radio button.

      But we can use one possibility to redefine the existing field  – “Pmt Meth.Suppl.”

      /wp-content/uploads/2015/06/003_734521.jpg

      Check tr. SM30 -> V_T042. If checkmark is not set, then we can use this field.

      /wp-content/uploads/2015/06/004_734523.jpg

      1. tr. SM30 -> V_T042F

      /wp-content/uploads/2015/06/005_734525.jpg

      2. FTR_CREATE / FTR_EDIT -> “Payment details” tab: field “Pmt Meth. Suppl.” – Customer.

      /wp-content/uploads/2015/06/009_734543.jpg

      Then you have to analyze tables VTBFHAPO or VTBZV and correct the code in article.

      But once again – think thoroughly about field “Payment method supplement” – if it is resonable to redefine it.

      (0) 
    2. Grigoriy Babitskiy Post author

      I don’t have very good ABAP skills, so I ask: the changes in the code you did there, do they replace the posting from the customer subledger to the vendor subledger? Or you could do anyway postings to the customer subledger the standard way, provided the account determination is set up accordingly?

      The system by default prepare TRM to make posting to customer subledger. In user exit, i do replacement customer account with vendor account depending on condition (field Characteristic. If field is emtpy – no replacement, posting to customer. If field is filed with “VENDOR” – do replacement and post to vendor) and some other posting paramters in order to make payment to vendor subledger.

      In my case the posting specification is set up to do posting to customer. But for my case it is okey just to replace customer account with vendor and some other posting parameters. Your case might be different. You have to analyze it and adjust my code for your requirement.

      (0) 
  3. prasad raju

    Hi Grigoriy,

    I’m just checked your article, I have same like similar requirement.please help me.

    Requirement:Project Loan(55A)

    1. Vendor A/C          Dr  xxxxx (100% directly released by Bank on submission documents by client)

         To Loan A/C              Cr  xxxxx  (100% from loan account to be released by Bank)


    Accounting (tbb1)should generate as below instead of bank a/c, Vendor ac should be debited.


    Capture.PNG

         

    (0) 
        1. prasad raju

          Hi Grigoriy,

          As you mentioned in the blog below BADI has mentioned changes for posting

          Dr GL Acct and Cr Vendor Acct.

          Please suggest what are the changes required for posting Dr Vendor Acct and Cr GL Acct.

          Please request to need your help in this matter.

          Capture.PNG

          (0) 
          1. prasad raju

            Hi Grigoriy,

            As you mentioned in the blog below BADI has mentioned changes for posting

            Dr GL Acct and Cr Vendor Acct.

            Please suggest what are the changes required for posting Dr Vendor Acct and Cr GL Acct.

            Please request to need your help in this matter.

            Capture.PNG

            Now even we have similar requirement like while postingTBB1 but (Dr Vendor Acct and Cr GL acct). ABAPER is trying by referencing your article but we are facing issues in fetching below tables and fields.Please can you suggest and share the steps in detailed.


            As per the below  please maintain data for CVI_VEND_LINK.

            BUKRS : 1110

            RFHA  : 31

            Pass KONTRHvalue of table ‘VTBFHA’ in ‘PARTNER’ field of table ‘BUT000 ‘.

            From ‘BUT000’ table get the ‘PARTNER_GUID.

            For this PARTNER_GUID you need to maintain data in ‘CVI_VEND_LINK ’ table.



            Thanks,

            Prasad

            (0) 
              1. Grigoriy Babitskiy Post author

                Hello,

                You need:

                1. Posting specification: Dt Customer, Cr Gl account

                2. Changing parameters in code:

                CH_ACCIT_D-BLART = KZ /*you can use other doc type*/

                                         BSCHL = 31

                                         KOART = K

                                           LIFNR = Vendor /*you can read vendor id from Business partner*/

                                         KUNNR = ‘ ‘ /*make empty*/

                             NOMINAL_AMT = add minus sign to amount

                                         HKONT = reconciliaton account of the vendor /*you can read reconc. account id number from vendor master data*/

                     CH_ACCIT_C-BLART = KZ

                we are facing issues in fetching below tables and fields

                I don’t understand what is the trouble?

                I wrote you what you need to chagne. The other parameters do not change.

                (0) 
                1. prasad raju

                  Thank you so much for your reply Grigoriy 🙂

                  We Will follow the coding as you suggested and confirm you the status.

                  For Functional side changes as you mentioned in the article remains the same for posting specification and in payment details tab or using payment request with/without do we need to do additional config please suggest. Your advice is so much valuable.

                  Thanks,

                  Prasad

                  (0) 
                  1. prasad raju

                    Hi Grigoriy,

                    After changing the coding. we tried to run tbb1 below postings are reflecting and could see posting key 31 but error message as below. please advice the changes.

                    Capture.PNG

                    Capture1.PNG

                    (0) 
                    1. prasad raju

                      Hi Grigoriy,

                      As per the article i have made the changes in accounting and while posting TBB1 error msg as debit/credit indicator is inconsistent. please request you to check the below settings and advice the necessary changes.

                      /wp-content/uploads/2016/05/1_959571.png

                      /wp-content/uploads/2016/05/2_959572.png

                      /wp-content/uploads/2016/05/3_959573.png

                      /wp-content/uploads/2016/05/4_959574.png

                      /wp-content/uploads/2016/05/5_959575.png

                      /wp-content/uploads/2016/05/6_959576.png

                      /wp-content/uploads/2016/05/7_959577.png

                      /wp-content/uploads/2016/05/8_959578.png

                      (0) 
                          1. prasad raju

                            Thanks Griogoriy. Please can you also share the sample screen shots of acct symbols,Posting specs and update types to posting spec config as per my requirement.I will fallow the same.

                            (0) 
                              1. prasad raju

                                Hi Grigoriy,

                                As you suggested we have posted TBB1 postings to vendor doc are generated.

                                Posting key 21 is credit memo can we change it to any other vendor related key and further status and concerns i will update you please help me to fulfill the requirement.

                                Capture.PNG

                                Capture1.PNG

                                (0) 
                                1. prasad raju

                                  Dear Grigoriy,

                                  As suggested in the article maintained posting specifications (if its wrong please correct me) may be thats why entries not coming correctly.

                                  Capture3.PNG

                                  After try to post in TBB1 below entries are generated and vendor got debited.

                                  Capture4.PNG

                                  Capture1.PNG

                                  Above entry is fine. But while paying interest and repayment system considering the same posting key(21) and involving vendor acct.but in our case shouldn’t happen like this.Capture.PNG

                                  Capture2.PNG

                                  should be as below entries.

                                  Interest payment

                                  Interest a/c Dr

                                  Bank A/C   Cr

                                  Loan repayment

                                  Loan a/c Dr

                                  Bank a/c Cr

                                  Please help me to achieve above entries.

                                  (0) 
                                  1. prasad raju

                                    Dear Grigoriy,

                                    Please respond to the above concerns.I tried all the options not getting any solutions.

                                    your response is so valuable as we want to convey to the client that we can able to achieve the above entries or not.

                                    (0) 

Leave a Reply