Technical Articles
BAdIs in Concur Integration Component (CTE)
SAP Concur is the travel and expense solution from SAP. SAP has been working to integrate it with SAP ECC. It has introduced native integration with Concur from Ehp 7. Earlier the integration was based on file transfer.
As part of this native integration SAP has provided BAdIs to customize replication and financial posting. If your company wants expenses to post to certain project types only or certain cost centers then these BAdIs are helpful.
I did not find any documentation on these BAdIs even in the system. So I am listing out the BAdIs here.
BAdIs for Replication
- BADI_CTE_FIN_COBJ_DATA_CHANGE – Change Cost Object Data
- Method ADAPT_DATA – This method can be used to restrict cost objects like cost centers, WBS etc.
- BADI_CTE_FIN_COBJ_FILL_LEVEL – Customer-Specific Hierarchy Level for Concur list
- GET_LEVEL_DATA – Fill data of custom defined level
BAdIs for Financial Posting
- BADI_CTE_FIN_POST_DOC_CHANGES – Minor Field Changes
This is the most commonly used BAdI for posting expenses
- CHANGE_SGTXT_FOR_CASH_ADVANCES
- CHANGE_POSTING_DATE_CASH_ADV
- CHANGE_POSTING_DATE
- CHANGE_SGTXT – Change the text of the posted document
- CHANGE_VENDOR – If mapping from employee to vendor has to be changed
- CHANGE_TAXCODE – Required for countries which have VAT to support non-domestic expenses
- CHANGE_TAX_JURISDICTION_CODE
- BADI_CTE_FIN_POST_ADJUST_DOC – Change Posting Data
This BAdI allows changing of many more fields compare to the previous one. Use this only if the previous BAdI doesn’t meet your requirements. If you implement this and then need SAP support, SAP may ask you to deactivate this before checking the issue.
- ADJUST_AD_POSTING_DOCUMENT – Adjust FI Posting Document of Cash Advances
- ADJUST_POSTING_DOCUMENT – Adjust FI Posting Document of Expense Report
- SPLIT_POSTING_DOCUMENT – Split FI Posting Document
- BADI_CTE_FIN_HANDLE_ATTACHMENT – Change Settings for Attachment Handling
- RESTRICT_ATTACHMENTS – Filter Attachments
- FI_DOC_ASSIGNMENT – Assign Attachments to FI Documents
- BADI_CTE_FIN_POST_DATA_CHANGE – Enhance Incoming Posting Data from Concur
- MAP_REPORT_ADDITIONAL_DATA – Additional fields in report header
- MAP_ENTRY_ADDITIONAL_DATA – Additional fields at line item level
- MAP_ALLOCATION_ADDITIONAL_DATA – Additional fields for allocation
- BADI_CTE_FIN_POST_ROUNDING – Adjust Amount Fields According to Decimal Places of Deviating Currency
- ADJUST_CASH_ADVANCE_AMOUNTS – Adjust amount fields of FI Posting Document of Cash Advances
- ADJUST_EXPENSE_REPORT_AMOUNTS – Adjust amount fields of FI Posting Document of ExpenseReport
- BADI_CTE_FIN_POST_USE_CASES – Customer-Specific Report Entry
- DETERMINE_USE_CASE – Determine FIN Posting Use Case
- PROCESS_USE_CASE – Process FIN Posting Use Case
The available BAdIs can be seen in transaction CTE_SETUP.
Concur sends posting data to SAP in Json format. The parameters of the BAdIs have nested tables reflecting the Json ordered list.
Overall the BAdIs are comprehensive and provides multiple options to adjust expense posting. We were able to find suitable methods for all our use cases.
BADI_CTE_FIN_POST_DOC_CHANGES is the most commonly used BAdI for this purpose.
Great article! Do you have any sample code for BADI_CTE_FIN_HANDLE_ATTACHMENT?
Thank you,
Lisa Shoemaker
No, I haven't yet used it.
Typically IS_DOCUMENT_DATA has necessary information.
It has structure Employee and entries as can be seen in JSON file.
Hello,
I need to implement BADI BADI_CTE_FIN_COBJ_FILL_LEVEL to allow concur to do GL posting with Profit center. I am new to Concur integration. Can you please provide further information on how to implement/use this BADI along with any setup that is required before implementing.
Is the list hierarchy for profit center created in Concur?
We had a requirement to post to service orders and the version of our SAP_CTE didn't allow it. We wrote our own program to generate and send the file via SFTP to Concur. Concur team create the list structure on their end. We didn't use this badi.
Hi, I need to send the profit center to Concur too as an extra level. Did you ever get this to work, and if so how?
Hello,
Does anyone know if these BADIS are availables on HANA Cloud? At least the financial BADIS for posting.
Thanks!!
It seems not all of them are 🙁
Does anyone have an example of how the document splitting is suppose to be used in method SPLIT_POSTING_DOCUMENT ?
There is an example of this that I used in the CONCUR documentation, which I eventually got from CONCUR. There is the same example posted on the scribd website (https://www.scribd.com/document/414150671/How-to-Split-Posting), but you have to join to get it.
CONCUR document name:
SAP Integration with Concur Solutions
How to split posting of an expense report.
Hello, could you solve the split? did you get the document?
Hi, does anyone successfully changed the COST_OBJECT_NAME using BADI_CTE_FIN_COBJ_DATA_CHANGE? I need to change the name/description of Cost Center before exporting in Concur. I was able to populate the field with new value, but it's not appearing in Communication Monitor.
BADI_CTE_FIN_POST_ADJUST_DOC-SPLIT_POSTING_DOCUMENT.
Hello, to count in different currencies they ask me that when I enter a fi document with several intems in different currencies they settle as separate documents, they told me that with this split method it can be done, is there any implementation example?
Tank!
Have you handled witholding taxes when posting expenses invoices?
From what I reckon it should be program manually and not considered by Concur ICS from the Vendor witholding tax codes view on a Company Code Level. Am I right?
Hi Juan Carlos,
Did you work out a solution for handling witholding taxes?
We tried via Enhacement on the AC_DOCUMENT_CREATE (on T_ACCHD-AWTYP EQ 'CTE') by reading the Witholding taxes from the Vendor Company Level and assigning them to table table T_ACCWT.
For the expenses document was doing the calculation OK but unfortunately we separate into another document the account payable reconciliation (between vendor and employee payables) and we needed to change the amount based on the expense document final amount but we do not really have it until the document has been posted (another run/Call to this FM).
Right now we're gonna smoke test without this scenario.
Hope it helps.
Regards,
Which BADI should we use for changing/overwriting the header text during or after the Document posted from Concur. Which method and parameters help here.
Have you tried CHANGE_SGTXT method of BADI_CTE_FIN_POST_DOC_CHANGES?
What's the business reason for this requirement?
Only 50 expense reports are being fetched from SAP Concur to CTE_SETUP, we have to allow more from SAP Concur to FICO in a single job. Can anybody help on this topic.
Hi Md Shafi I recommend that you ask your question in the Q&A forum instead of replying to a blog post. With that, you will reach a broader range of experts in SAP Community.
Regards, Svea
SAP Community Global Moderator
Svea Becker: I have done that already, no one has responded!
Employee id with report id is getting concatenated and updated in both item and header text.
Remove id and display name in header.
With CHANGE_SGTXT method of BADI_CTE_FIN_POST_DOC_CHANGES, i'm able to change the item text but not header text. Is there any way to change the header text?
Hi Dhanu Djrao,
could you please share the CHANGE_SGTXT code.
Thanks
Christoph
Hi Christoph,
Sorry for the late reply.
I have not used this method, as it was not fulfilling my requirement.
But i think you may be facing issue with reading the Json and updating data. My below code may be helpful.Attached.
Code
How did you get to a screen that will let you edit the method?
I need to edit method ADJUST_POSTING_DOCUMENT of BADI_CTE_FIN_POST_ADJUST_DOC.
I tried using SE18. I can see the method name, but can't figure out how to edit it.
I tried using SE24 on object IF_BADI_CTE_FIN_POST_ADJ_DOC. Again I can see the method name, but can't get to a screen that will let me write the ABAP code.
Thanks,
Michelle
We can use BADI_CTE_FIN_POST_ADJUST_DOC~ADJUST_POSTING_DOCUMENT,
structure CT_ACCHD-BKTXT to change the header text. But the actual employee details
from Json, i cannot see in IS_DOCUMENT_DATA structure, not sure how to map them?
Hi experts,
Which BADI could be used to store long text constituted with information from Concur, in posting document ?
Hi Anuradha Majumdar,
in a current project we have around 2,0 Million WBS-Elements which we wouldn't like to transfer to concur.
The customer is able to distinguish out of the WBS-Elements naming convention which WBS-Elements should be transferred to Concur.
BADI_CTE_FIN_COBJ_DATA_CHANGE – Change Cost Object Data
Method ADAPT_DATA – This method can be used to restrict cost objects like cost centers, WBS etc.
EXCLUDE_FROM_EXPORT_IND exclude a cost object from the export
Do you have some additional information how the these two BADI's have to be maintained that only a specific range of WBS-Elements are considered in the data transfer to Concur?
Many thanks for your help and insights.
Regards,
Karl
Yes, ADAPT_DATA can be used for this. We have checked PRPS details within this method and then excluded certain WBSes by setting EXCLUDE_FROM_EXPORT_IND to X. We used level (PRPS-STUFE) and some other fields to exclude WBSes. You can also use POSID/PSPNR to exclude WBSes.
Hi Anuradha Majumdar,,
how much effort is it - 2 to 5 days - to define the options within the BADIs outlined from you?
Do you have a documentation which can be shared to activate these BADI's correctly?
Regards,
karl
Very nice blog.
I have a query: Is it possible to add additional Journal line items using any of the above BADIs?
Can any of these BAdI be used so that the project budget availablity control issues an error message whenever the expense account posting in ECC (which has a WBS element as cost object receiver) exceeds the remaining available budget of the project?
nice post, thank you for sharing this valuable information.
Hi all, we are configuring the expense splitting part, which should include a write-up for each expense and the breakeven of the dependent supplier with the service providers; we are having trouble with the Concour guideline code => Sap, has anyone implemented this part and could you kindly share it? Particularly in the points where the supplier or the account must be fixed, we are probably making something wrong but logically it seems correct. Thanks to anyone who can give info. Giuseppe
Hi All,
is it possible to exclude some expense types of Concur from the FI posting? Is there a BADI who can influence that?
Thank you!
Hi Marcel...
I don't know if it works for you but, you can create different groups from Concur and set which group you want to have integration with ERP and which group not. It is a way to have a kind of "solution" for your question - without a BADI implementation neeeded.
Best Regards
Neto