cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert company code in posting (BAPI calls) ?

former_member189496
Active Participant
0 Kudos

Hello,

I have the following scenario :

HR system with company code 1234

TM system with company code 1234

FI system with company code 9876

It is all the same company in reality.

TM is receiving employee data from HR thru ALE --> OK - No company code conversion needed

TM is receiving cost centres and WBS from FI thru ALE --> OK, I can do the company code conversion using the conversion rules on iDocs

TM should post to FI the expenses on vendor account thru ALE.

I know how to convert the company code thru ALE conversion rules but it is only for iDocs, not for BAPI calls.

When you create the posting in TM, it starts the BAPI CREDITOR_FIND in the FI system thru an RFC call. But there the conversion rule does not apply and so I have the wrong company code in my call function. Same when you check the posting, it's another BAPI call.

How do you manage this ???

Do you use "Cross system company codes" ? I have checked but I don't think I understood how it works

Do you use user exit TRIP_POST_FI to change "on the fly" the company code ?

Or another solution ?

This is strange that we can do the conversion for the idocs but not for the BAPI calls

Thanks in advance for your help.

Best regards,

Christophe.

Accepted Solutions (1)

Accepted Solutions (1)

former_member189496
Active Participant
0 Kudos

Hello,

Nobody to help me please ?

Thanks in advance.

Regards,

Christophe

former_member189496
Active Participant
0 Kudos

Hi,

I finally found a way by doing some enhancement in standard Function module (SE37) :

For Vendor account check I did an enhancement in HRCA_FIND_VENDOR_FOR_PERSNO.
I'm replacing company code "on the fly" before the BAPI is called

For Posting check, I did an enhancement in HRCA_ACC_EMPLOYEE_PAY_CHECK and HRCA_ACC_EMPLOYEE_EXP_CHECK.

Again I'm replacing company code "on the fly" before the BAPIs are called.

And I have the conversion rule for the iDoc part (for the posting itself).

Regards,

Christophe.

Answers (0)