Professional Documents
Culture Documents
How To Split Posting
How To Split Posting
How To Split Posting
Solution Proposal
TABLE OF CONTENTS
ABOUT THIS DOCUMENT ............................................................................................................................... 3
GENERAL INFORMATION ............................................................................................................................... 3
IMPLICATIONS FOR THE EXPENSE REPORT POSTINGS .......................................................................... 4
IMPLEMENTATION .......................................................................................................................................... 5
Concur enhancements .................................................................................................................................... 5
Prerequisites .................................................................................................................................................... 6
Required BAdIs ................................................................................................................................................ 6
BAdI implementation examples ..................................................................................................................... 7
Example for BADI_CTE_FIN_POST_DATA_CHANGE .................................................................................. 7
Example for BADI_CTE_FIN_POST_DOC_CHANGES ................................................................................. 7
Example for BADI_CTE_FIN_POST_ADJUST_DOC ..................................................................................... 8
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors.
National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SA P or its affiliated companies shall not be liable
for errors or omissions with respect to the materials. The only warranties for S AP or SAP affiliate company products and services are those that are set forth in the express warranty statements
accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any relate d presentation, or to develop or release any functionality
mentioned therein. This document, or any related presentation, and SAP S E’s or its affiliated companies’ strategy and possible future developments, products, and/or platform directions and function ality are
all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation
to deliver any material, code, or functionality. All forward -looking statements are subject to various risks and uncertainties that could cause actual results to differ mat erially from expectations. Readers are
cautioned not to place undue reliance on these forward -looking statements, and they should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trade marks of SAP SE (or an SAP affiliate company) in Germany and other
countries. All other product and service names mentioned are the trademarks of their respective companies. See http://www.sap.com/corporate-en/legal/copyright/index.epx for additional trademark
information and notices.
ABOUT THIS DOCUMENT
This document is designed to show a potential option how the required information can be handled
in expense reports coming from Concur using SAP Integration with Concur solution.
This is no final solution and the coding shown in this document is just an example and may require
customer specific adjustments.
SAP is not responsible for any errors and will not deliver any support or corrections.
GENERAL INFORMATION
• based on the payment scenario e.g. an own document for cash or cach expenses and another one for
company billed company paid (CBCP)
• based on technical reasons e.g. if more than 999 posting lines need to be created for an expense
report (p-card scenarios)
• based on legal reasons, based on Spanish/Italien VAT Handling
Here we use the example of Spanish VAT Handling. You can find some information in this document, but be
aware that this is not the official up-to-date document.
folleto_informativo_SII
_en_gb.pdf
Based on legal requirements, it might be necessary to report additional information for every incoming
invoice. The following information may be required for every single document:
• Issue date
• Taxable amount
• VAT Rate
3
IMPLICATIONS FOR THE EXPENSE REPORT POSTINGS
Expense reports are normally a collection of multiple invoices and documents, e.g. hotel and flight invoices,
taxi receipts…
The reporting of the above-mentioned information must be done on document level and because some of
the information are derived from the vendor posting it is required to split the document per expense report
entry and to add vendor line items for the corresponding suppliers.
Example: An expense report includes a hotel invoice (120 EUR incl. 20 EUR VAT) and a taxi receipt
(20 EUR incl. 4 EUR VAT).
DEBIT CREDIT
DEBIT CREDIT
DEBIT CREDIT
Additional posting to ensure that the employee is paid and not the hotel and taxi vendor:
DEBIT CREDIT
Only with such a split it is possible to read some information from the offsetting vendor item. Because it is
not possible to create vendor accounts in SAP for all potential vendors which could be used in an expense
report (all hotels, all taxi companies, all restaurants…) the usage of one-time vendor accounts (CPDs) is
recommended.
And to ensure that the postings to the vendor accounts are not paid by accident a payment block should be
set.
4
IMPLEMENTATION
Concur and SAP are very flexible. This means customers can configure flexible how the required information
are captured in Concur by using different custom fields. Additionally, on SAP ERP side the tax reporting can
be configured differently as well. For that reason, it is not possible to deliver a final version which fits out of
the box for all customers.
Concur enhancements
In Concur it is necessary to add additional fields for the required information. Currently it is only possible to
add them on expense entry level.
5
Prerequisites
To modify the postings as shown above it is required to implement the most actual support package for the
native integration:
- Minimum for SAP ECC customers: SP05
- Minimum for S/4HANA customers: SP02
Required BAdIs
Additionally, it is required to implement BAdIs to split the posting into several documents as shown above. All
required BAdIs can be accessed from the transaction CTE_SETUP Financial Posting BAdI
Implementations.
The following BAdIs need an implementation:
6
BAdI implementation examples
As already mentioned the following coding examples are just to give an idea how such an
implementation can look like. It is in the customer’s responsibility to enhance and adjust the code to
the individual needs.
In this example, several additional custom fields are used to transfer the vendor information from Concur to
SAP. Please adjust this coding to the fields used in your landscape!
In case of the field Custom8 we transferred the document date. For that reason the data has to be formatted
into the SAP specific data format.
METHOD if_badi_cte_fin_post_dt_change~map_entry_additional_data.
ls_add_data-name = 'ENTRY_CUSTOM1_CODE'.
ls_add_data-value = is_entry_data-entry_custom1_code.
APPEND ls_add_data TO et_entry_additional_data.
ls_add_data-name = 'ENTRY_CUSTOM2_CODE'.
ls_add_data-value = is_entry_data-entry_custom2_code.
APPEND ls_add_data TO et_entry_additional_data.
ls_add_data-name = 'ENTRY_CUSTOM3_CODE'.
ls_add_data-value = is_entry_data-entry_custom3_code.
APPEND ls_add_data TO et_entry_additional_data.
ls_add_data-name = 'ENTRY_CUSTOM4_CODE'.
ls_add_data-value = is_entry_data-entry_custom4_code.
APPEND ls_add_data TO et_entry_additional_data.
ls_add_data-name = 'ENTRY_CUSTOM5_CODE'.
ls_add_data-value = is_entry_data-entry_custom5_code.
APPEND ls_add_data TO et_entry_additional_data.
ls_add_data-name = 'ENTRY_CUSTOM8_CODE'.
IF NOT is_entry_data-entry_custom8_code IS INITIAL.
CONCATENATE is_entry_data-entry_custom8_code(4)
is_entry_data-entry_custom8_code+5(2)
is_entry_data-entry_custom8_code+8(2)
INTO ls_add_data-value.
ENDIF.
APPEND ls_add_data TO et_entry_additional_data.
ls_add_data-name = 'ENTRY_CUSTOM9_CODE'.
ls_add_data-value = is_entry_data-entry_custom9_code.
APPEND ls_add_data TO et_entry_additional_data.
ls_add_data-name = 'ENTRY_CUSTOM16_CODE'.
ls_add_data-value = is_entry_data-entry_custom16_code.
APPEND ls_add_data TO et_entry_additional_data.
ENDMETHOD.
7
To ensure that the employee vendor items are not condensed before the last BAdI is called it is necessary to
set a unique text for every item. Check the item type to ensure that the text is only updated for Vendor line
items. In this example the report key and the report entry ID is used.
METHOD if_badi_cte_fin_post_doc_chang~change_sgtxt.
IF iv_item_type = 'EVD'.
CONCATENATE is_document_data-report_key
is_entry_data-entry_id
INTO cv_sgtxt
SEPARATED BY '-'.
ENDIF.
ENDMETHOD.
Method if_badi_cte_fin_post_adj_doc~split_posting_document
All coding section highlighted in yellow must be adjusted to your requirements. Please ensure that you
activated the comment option in Word to get more details.
• At the beginning of this implementation a check for the company code or country should be added to
ensure that this split is not executed for non-Spanish company codes.
• Whenever in this coding a custom field (e.g. 'ENTRY_CUSTOM9_CODE') is read, this coding must be
adjusted to ensure that the correct field is taken.
• In addition, some values are hardcoded and need to be adjusted. This includes for example clearing
accounts and the account number for the CPD vendor account.
METHOD if_badi_cte_fin_post_adj_doc~split_posting_document.
8
******************************************************************
** Implement a check to ensure that this coding is only processed
** for Spanish expense reports
****************************************************************** Commented [ZH1]: Please add a check to ensure that only
Spanish expense reports are processed with the following coding.
ENDIF.
9
OR <ls_accit_old>-hkont = '0000176880'. Commented [ZH5]: Here we move the items which are relevant
IF <ls_clearing> IS NOT ASSIGNED. for the clearing posting. This includes in addition to the original
APPEND INITIAL LINE TO lt_new_split ASSIGNING <ls_clearing>. employee vendor clearing accounts e.g. for company paid expenses.
APPEND ls_header TO <ls_clearing>-acd_header. Enhance this coding to check for your clearing accounts.
ENDIF.
ls_accit = <ls_accit_old>.
ls_accit-posnr = lines( <ls_clearing>-acd_item ) + 1.
* Reset the SGTXT to the report name
CONCATENATE '*'
is_document_data-report_name
INTO ls_accit-sgtxt.
ls_accit = <ls_accit_old>.
ls_accit-posnr = lines( <ls_clearing>-acd_item ) + 1.
*Now create a posting to the same CPD account in the new posting with negative a
mounts
IF ls_accit-bschl = '31'.
ls_accit-bschl = '21'.
ls_accit-shkzg = 'S'.
ELSEIF ls_accit-bschl = '21'.
ls_accit-bschl = '31'.
ls_accit-shkzg = 'H'.
ENDIF.
me->get_entry_data(
EXPORTING
iv_entry_id = ls_entry_rel-entry_id
is_document_data = is_document_data
IMPORTING
ev_name1 = <ls_cpd_data>-name1
ev_ort01 = <ls_cpd_data>-ort01
ev_land1 = <ls_cpd_data>-land1
ev_stcd1 = <ls_cpd_data>-stcd1
ev_stceg = ls_accit-stceg ).
ls_cpd_new = <ls_cpd_data>.
ls_cpd_new-posnr = ls_accit-posnr.
10
APPEND ls_accit TO <ls_clearing>-acd_item.
APPEND ls_cpd_new TO <ls_clearing>-acd_fi.
ENDIF.
ENDLOOP.
11
ls_accit-posnr = lines( <ls_clearing>-acd_item ) + 1.
APPEND ls_accit TO <ls_clearing>-acd_item.
ENDLOOP. Commented [ZH8]: In case cash advances are not relevant for
ENDLOOP. your implementation then this part can be removed. Otherwise the
cash advance items will be added to the clearing posting
** Now condense the employee vendor lines in the clearing posting
me->condense_employee_vendor(
CHANGING
cs_clearing_posting = <ls_clearing> ).
REFRESH ct_acc_documents.
APPEND LINES OF lt_new_split TO ct_acc_documents.
ENDMETHOD.
Method condense_employee_vendor
This method is called at the end of the method if_badi_cte_fin_post_adj_doc~split_posting_document. This
method should condense the employee vendor postings again into one line.
METHOD condense_employee_vendor.
** This condensing does NOT support multiple vendor account e.g. for IBCP credit
cards
12
DELETE cs_clearing_posting-acd_curr INDEX sy-tabix.
DELETE cs_clearing_posting-acd_item INDEX lv_index.
DELETE cs_clearing_posting-acd_fi WHERE awtyp = ls_vendor_it-awtyp
AND awref = ls_vendor_it-awref
AND aworg = ls_vendor_it-aworg
AND posnr = ls_vendor_it-posnr.
ENDIF.
ENDIF.
ENDLOOP.
ENDMETHOD.
Method get_entry_data
This method should fill the required one time vendor information, like the name, address and tax IDs. It is
called in the method if_badi_cte_fin_post_adj_doc~split_posting_document.
METHOD get_entry_data.
13
IF sy-subrc = 0.
ev_stcd1 = ls_add-value.
ENDIF.
READ TABLE ls_entry-
additional_data INTO ls_add WITH KEY name = 'ENTRY_CUSTOM16_CODE'. Commented [ZH14]: Replace these custom fields by the one
which are used in your implementation
IF sy-subrc = 0.
ev_stceg = ls_add-value.
ENDIF.
ENDIF.
ENDMETHOD
14