cancel
Showing results for 
Search instead for 
Did you mean: 

How to setup intercompany loans in treasury module

anjireddy_appireddy
Contributor
0 Kudos

Hi Team,

Can you let me know the process of setting up intercompany loans in treasury module?

Thanks,

AR    

Accepted Solutions (1)

Accepted Solutions (1)

grigoriy_babitskiy
Active Contributor
0 Kudos

You can use mirror transactions to create financial transactions in one company code and automatically mirror it in another company code. This is useful if several companies within a corporation or subsidiaries of a company have their own company codes and conduct financial transactions with each other. Mirror transactions require that both companies be represented in the same client with separate company codes, and that both companies be entered as business partners in the company code of the other company.

You can mirror financial transactions only in a defined direction—that is, always starting from the same company code. When creating a financial transaction in this company code, another financial transaction is automatically created with opposite payment flows in the company code of the counterparty. There is no need to enter the financial transaction twice. Both transactions are linked via a reference of the type MIR (tr. TBR8). When displaying a financial transaction, you receive a message informing you that a mirror transaction exists for the transaction displayed.

Mirror transactions are available for the following financial instruments:

  • fixed-term deposit
  • deposit at notice
  • cash flow transaction
  • interest rate instrument
  • foreign exchange
  • foreign exchange swap

IMG -> Financial Supply Chain Management -> Treasury and Risk Management -> Transaction Manager -> General Settings -> Transaction Management -> Distribution of Mirror Transactions -> ...

  • Maintain Relevant Product Types and Transaction Types (tr. SM30 -> V_MIRROREX) - Enter the product type and transaction type relevant for mirroring in the company code of the parent company.
  • Map Product Types and Transaction Types (tr. SM30 -> V_MIRRORMAP)- define which product type and transaction type are to be mirrored from the company code of the parent company
  • Map Flow Types (tr. SM30 -> V_MIRRORMAPFLW) - You only need to maintain the table for mapping flow types for cash flow transactions. The flow types for other products are taken from the transaction type assignments.
  • Process Incoming Data (tr. SM30 -> V_MIRRORINFKT) - Enter the settings for processing incoming data in the company code of the subsidiary
  • Assign Company Code to Partner (tr. SM30 -> V_MIRRORPART) - assign the company code to the business partner

Read SPRO help - there you'll find examples.

Mirror Transactions - Trading - SAP Library

grigoriy_babitskiy
Active Contributor
0 Kudos

For intercompany accounting read this article:

anjireddy_appireddy
Contributor
0 Kudos

Thank you Grigoriy.

Would it possible for you to provide extra detailed steps to fulfill my requirement.

For ex: co.code-1000(Parent company) is getting loan 200,000 from Citi Bank. We have used product type-55A and posted this transaction with counter party- Citi Bank

Now I want to transfer 50,000 to subsidiary company(co.code-2000) and 20000 to another co.code-3000.

grigoriy_babitskiy
Active Contributor
0 Kudos

Now I want to transfer 50,000 to subsidiary company(co.code-2000) and 20000 to another co.code-3000.

Is this transfer a loan to your subsidaries?

If yes, create Mirror Interest rate instrument transaction. Cofigure paramters for mirror transaction and then create transaction itself. As soon as you create investment transaction in company code 1000, then the borrowing transaction will be created in company code 2000. Repea the same for company code 3000.

If not, it's just a payment from you to your subsidaries.

anjireddy_appireddy
Contributor
0 Kudos

Hi ,

I have done the necessary setup. But I am not getting expected output. I can see the error in SM58.

FM- FTR_MIR_BAPI_CREATE

Target system- None

Status text:

No account code was defined for company code (In fact i have defined account code)

BAPI process terminated

I don't see any inconsistency with program-RFTB_MIRROR_CUSTOMIZING_CHECK.

Am i  missing something?

grigoriy_babitskiy
Active Contributor
0 Kudos

Hello,

check this: IMG -> Financial Supply Chain Management -> Treasury and Risk Management -> Transaction Manager -> General Settings -> Accounting -> Organization -> Define Accounting Codes (tr. SM30 -> TRGC_TR_ACC_CODE)


have you defined accounting codes for all your company codes which you use in intercompany operations?

Former Member
0 Kudos

Hi,

To use the mirror transaction function, you have to maintain the following
Customizing activities:

  1. Maintain the initial tables and mapping tables. To do this, choose Corporate Finance Management
-> Transaction Manager -> General Settings -> Transaction Management
-> Distribution of Mirror Transactions.

By maintaining the
relevant product types and transaction types, you determine for which product
type/transaction type and with which partner you can create a mirror
transaction, in addition to the company code in which you can create it.

Always enter '01' for the
activity, '20' for the activity category for forex transactions, and '10' for
money market transactions.

  1. Maintain the mapping table for the product
    types/transaction types entered above. As you do this, assign the direction of
    the sending company code as outgoing, and incoming as the direction of the
    receiving company code.

                              


 

Example:


 

 

0001


 

 


 

 

51A


 

 


 

 

100


 

 


 

 

FIXED-TERM DEP.


 

 


 

 

Outgoing


 

 


 

 

Mirror image


 

 

ABCD


 

 


 

 

51A


 

 


 

 

200


 

 


 

 

FIXED-TERM DEP.


 

 


 

 

Incoming


 

 


 

 

Mirror image


 

This example shows a fixed-term deposit investment (51A, 100) in company code
0001, the sending company code, as a mirror transaction with receiving company
code ABCD, product type 51A and transaction type 200, in other words, a
fixed-term deposit borrowing.

  1. You only have to maintain
    the activity to map flow types for cash flow transactions. In the case of other
    products, the system takes the flow types from the transaction type
    assignments.
  2. Maintain the table for
    processing incoming data. You do this from the view of the receiving company
    code with the product types/transaction types already mirrored. The activities
    and the activity categories have already been entered (see previous
    activities). The system only supports the mirror function. The counterparty is
    the business partner assigned to the sending company code.
  3. You assign the company
    code and the business partner in the last maintenance table.

    

Once
you have maintained the Customizing tables, you have to check whether BAdI
FTR_TR_MIRROR_DEALS is active.

anjireddy_appireddy
Contributor
0 Kudos

Hi Geigoriy,

Yes. I have defined accounting codes for my both company codes.

anjireddy_appireddy
Contributor
0 Kudos

Hi Chandan,

The BAdI FTR_TR_MIRROR_DEALS is active and but still could not able to see results.

grigoriy_babitskiy
Active Contributor
0 Kudos

Status text:

No account code was defined for company code

Dear AR,

Does this status have message number?

Like this:

Can you post screenshot of status here?

anjireddy_appireddy
Contributor
0 Kudos

Hi,


Scenario: co.code-1052 is loaning amount to co.code-1054(borrower).    


Created BP “CCI-1054” in co.code 1052 and maintained trading partner as 1054.


Created BP “CCI-1052” in co.code 1054 and maintained trading partner as 1052.


The configuration is below.

  1. Maintain Relevant Product Types and Transaction Types

SPRO-Financial Supply Chain Management-Treasury and Risk Management-Transaction Manager-General Settings-Transaction Management-
Distribution of Mirror Transactions-Maintain Relevant Product Types and Transaction Types

2. Map Product Types and Transaction Types

SPRO- Financial Supply Chain Management- Treasury and Risk Management-  Transaction Manager- GeneralSettings-  Transaction Management-  Distribution of Mirror Transactions-  Map Product Types and Transaction Types

3. Process Incoming Data

SPRO- Financial Supply Chain Management- Treasury and Risk Management-  Transaction Manager- General Settings-  Transaction Management-Distribution of Mirror Transactions-  Process Incoming Data

4. Assign Company Code to Partner

SPRO- Financial Supply Chain Management- Treasury and Risk Management-  Transaction Manager- General Settings-  Transaction Management- Distribution of Mirror Transactions-  Assign Company Code to Partner

  The product type configuration is below

I have somehow managed to remove inconsistancies but system did not give any error or warning for mirror transaction and worked as like a regular transaction without mirror postings. Hence i reset my configuration attached  these configuration and error screen shots

Hope this help you to understand the issue.

grigoriy_babitskiy
Active Contributor
0 Kudos

This error comes from these selects

in both case there is constant  g_con_mirrortype_fxint which have value '05'.

so i suggest to create 2 more lines in "Map Product Types and Transaction Types" and change the last paramter to "05 Mirror (Int. FX: Decentralized Entry, Centralized Admin.)"

anjireddy_appireddy
Contributor
0 Kudos

Thank you so much for your efforts.

Unfortunately No luck Grigoriy

anjireddy_appireddy
Contributor
0 Kudos

Hi Grigoriy,

I could able to resolve incosistencies by maintaining below setup under Map Product Types and Transaction Types

1052      55I      100     - Outgoing      01 Mirror Image

1052      55I      200     + Incoming      01 Mirror Image

1054      55I      200     + Incoming      01 Mirror Image

I have verified inconsistencies using the program-RFTB_MIRROR_CUSTOMIZING_CHECK and    Mirror: No Customizing errors have occured.

However system could not create mirror transaction and did not get any error/warning messages.

Am i still missing something?

grigoriy_babitskiy
Active Contributor
0 Kudos

I also faced the same situation.

How to find inconsistancy in your configuration.

In Function Module FTR_MIR_BAPI_CREATE  enter enchancement point and enter this code:


DATA: lv_flag.

   IF sy-uname = 'GABABITSKII'. "<--- don't forget to enter your own user name.

     WHILE lv_flag IS INITIAL.

       IF lv_flag IS NOT INITIAL.

         EXIT.

       ENDIF.

     ENDWHILE.

   ENDIF.

This will lead to infinit loop in background task - so you can enter it and debug it.

Start creating transaction. As soon as you save transaction - go to tr. SM50 -> Administration -> Programm -> Debugging

You will find your self in custom code. Enter some value into lv_flag variable to exit the infinit loop.

Try to go to CALL FUNCTION 'BAPI_FTR_IRATE_DEALCREATE' (in your case, in all other cases BAPI_FTR_*_DEALCREATE FMs)

Run it and in RETURN variable you'll find all errors.

From my examples you can see that FTR_GUI-141 message is the root of the problem.

The main thing is that you have to try to create transaction with subsidary company code manually in order to check if all parameters can be determined automatic. Otherwise there will be errors.

Former Member
0 Kudos

Hi AR,

To my knowledge, you don't need the customizing "Map Flow Types", because it is only necessary for Product Category 540.

Check TBRL  with reference MIR

Also,Check

Note 1501969 - MIR BAPI: missing Tables parameters in BAPI

grigoriy_babitskiy
Active Contributor
0 Kudos

did you managed to figure out the root of the problem with mirror transactions?

anjireddy_appireddy
Contributor
0 Kudos

Hi Grigoriy,

No luck. Thinking that there might be a software component issues,but not sure. I believe there will not be much configuration involved apart from the above set up.

Analysis is in progress.In debugging mode system was looking for val. Class and maintained val class and BAPI was successful without generating mirror transactions

grigoriy_babitskiy
Active Contributor
0 Kudos

Try to check all RETURN tables for all FM during debug, especially for BAPI_FTR_IRATE_DEALCREATE.

FM BAPI_FTR_IRATE_DEALCREATE will collect all errors from inside itself.

anjireddy_appireddy
Contributor
0 Kudos

Hi Grigoriy,

We were able to figure out the root-cause and fixed.

By changing the business parter, issue has been resolved.

4. Assign Company Code to Partner

SPRO- Financial Supply Chain Management- Treasury and Risk Management-  Transaction Manager- General Settings-  Transaction Management- Distribution of Mirror Transactions-  Assign Company Code to Partner

Co.Code          Business Partner

1052                    CCI-1052 ( BP created under co.code-1054)

1054                    CCI-1054( BP created under co.code-1052)

Thanks,

former_member734131
Discoverer
0 Kudos

Hi dear Grigoriy Babitskiy

I have a quick question that your amazing expertise may help.

I have a case scenario where we want to use intercompany facilities with a contract limit.

basically we need to create a contract facility which afterwards will have several drawdowns .

my questions: is it possible to mirror the entire transaction?

today we create a facility type contract, the the drawdown in the end are loans linked to it by the administration tab.

I can easily mirror the drawdown, but on the mirror company does not automatically link to a facility contract with limit.

do you think this is possible?

thank you a lot in advance for your help.

cheers

Answers (0)