Symptom
Notes 121361 and 119865 describe the procedure recommended by SAP to post the payroll results from an SAP HR System as of Release 4.0 into a non-SAP accounting system.
It is still unclear what settings must be made in the HR System for the local checks.
Reason and Prerequisites
During the posting of the payroll results, the system reads data from accounting and carries out checks in accounting.Finally, the HR document is posted in accounting.If the accounting system is a non-SAP system, many of these activities cannot be carried out in the accounting system.The following text describes for each BAPI / function module how to proceed for the posting into a non-SAP accounting system concerning this module if the non-SAP system does not provide a corresponding interface to retrieve or validate the data.
For each module called by remote call, this note also specifies the method which is used to determine the target system from the distribution model.
Solution
Important note
The connection of non-SAP systems is always individual because the scope of functions, the interface and the extensibility of the external system interface depends on the respective external product.The scope of functions used in the SAP System is also relevant.
For the above reasons, SAP cannot guarantee that your requirements are fully met if you follow the following information.
Therefore, the information should only be considered a proposal or an initial help for a solution.Additional support by SAP can only be obtained via Remote Consulting (refer to Note 83020).
Reading posting period information
- CompanyCode.GetPeriod (only for special periods)
- BAPI_CCODE_GET_LASTDAY_FYEAR (only for special periods)
(destination of CompanyCode.GetPeriod)
- BAPI_CCODE_GET_FIRSTDAY_PERIOD (only for month-end accruals)
(destination of CompanyCode.GetPeriod)
The posting period information is only read for the functions of the special periods or for month-end accruals.
If these functions are not used, the modules are not used.
If the functions are used, the modules must be executed locally.In this case, the fiscal year variant must have been maintained for the company code in the HR System.
Account determination
- FI_ACC_DET_HR
- FI_ACC_DET_CROSS_COMPANY
(destination of AcctngEmplyeeExpnses.Check)
The account determination is always run.For the supply of non-SAP systems it should be executed locally.You can maintain the tables required for that without the accounts actually being created.Only the chart of accounts must exist as an entity and must be assigned to the company code.
Reading customer/vendor data
- HR 4.0 of - 4.5 and FI >= 4.0
OR
HR >= 4.6 and FI < 4.6
- Creditor.GetDetail (for text display only)
- Debitor.GetDetail (for text display only)
- Creditor.Find (to find personal vendors)
- Debtor.Find (to find of personal customers)
OR
HR >= 4.6 and FI >= 4.6
- Vendor.GetDetail (for text display only)
- Customer.GetDetail2 (for text display only)
- Vendor.Find (to find personal vendors)
- Customer.Find (to find personal customers)
Customer data and vendor data is only read if postings are actually made to customers or vendors. The BAPIs should be executed locally.
If postings are made to fixed customers or vendors, they do not necessarily have to be created in the HR System.However, it is useful to create them because in this case the customer/vendor texts can be displayed in the document display.
If postings are made to personal customers/vendors, these customers/vendors must have been created in such a way that you can find them by using the search term.
Reading account details
- GeneralLedgerAccount.GetDetail
The reading of account details is used to display account texts in the document display.If no accounts have been maintained, the system does not display any texts either.
In addition, the account details are read to read the tax code from the account.
If you do not want to maintain any accounts because you neither require the texts in the document display nor want to maintain tax codes for some accounts, you should deactivate the BAPI.
If you do not deactivate the BAPI, all accounts posted to from the HR System must exist in order to read the tax code.
Tax calculation
- CALCULATE_TAXES_GROSS (destination of AccntgEmplyeeExpenses.Check
[only for postings with run type PP])
A tax calculation is carried out if postings with tax codes exist.This can be the case because the postings to expense accounts of the travel expenses module are transferred via the payroll or because the tax code has been set up at the account (this procedure is not recommended).
If postings are made with tax codes, you must set up the tax data locally in the HR System in such a way that a tax calculation is possible.The most important point is to set the tax codes used.
Determination of segment text
- FI_GET_SGTXT (destination of CompanyCode.GetPeriod)
The determination of the segment text via table T053 can be carried out locally. If you require a segment text, you must maintain table T053.Depending on the variables that are used, additional Customizing may have to exist.
Determination of fixed cost assignment
- CostType.GetFixAccountList
The determination of the fixed cost assignment can be carried out locally.If you require a fixed cost assignment, you must maintain it in the HR System.For this purpose, the corresponding cost element and (if you want to enter cost centers) also the corresponding cost center must have been maintained.
Check of the CO account assignment
- AcctngServices.PreCheckPayrollAccountAssign
A check whether the specified CO account assignments can be posted to does not make any sense in this scenario.Therefore, you should deactivate it.
Displaying the accounting document
- BAPI_ACC_DOCUMENT_DISPLAY
If a posting is made to a non-SAP system, you can generally not access the display of the generated follow-on document.
If the BAPI is executed locally, a corresponding error message occurs.Therefore, the BAPI does not have to be deactivated.
Document validation (for normal postings and for reversal)
- AcctngEmplyeeExpnses.Check
- AcctngEmplyeeRcvbles.Check
- AcctngEmplyeePaybles.Check
A local validation whether the document can be posted does not seem to make any sense. The result would not correspond to reality.Therefore, you should deactivate this check completely.
This also deactivates the check for the reversal, thus it is always possible to reverse a document transferred for posting which could not be posted in the end.
The user is responsible to ensure that the reversal is actually only triggered for documents that can be reversed.The plausibility check of the reversal in the SAP Standard System does not apply due to the deactivation of the CHECK BAPIs.
If an HR posting document has been reversed, you can no longer undo this reversal.
Posting documents (transfer into non-SAP system)
- AcctngEmplyeeExpnses.Post
- AcctngEmplyeeRcvbles.Post
- AcctngEmplyeePaybles.Post
Depending on the type of supply of the non-SAP system, you can, for example, generate a file for the data download here (ALE file port) which is then imported into the non-SAP system.
As an alternative, you do not have to use this file but you can carry out a manual posting by using a printout of the HR document.
Local execution of an accounting BAPI
SAP recommends that you execute some BAPIs locally.An ALE method on which the destination depends is specified.A BAPI is executed locally if you do not specify the ALE method responsible for the destination in the ALE distribution model.
If an SAP accounting system or a non-SAP accounting system must be connected (depending on the cost center), the ALE methods must be included in the ALE distribution model.In this case, you must use the company code filter criterion to restrict their validity to the company codes where an SAP accounting system is connected.
If you use accounting BAPIs locally in the HR system it is advisable to import the current accounting Support Package (SAP_APPL) in the HR system.
Deactivation of a BAPI
Generally, you cannot deactivate BAPIs in the SAP Standard System.However, this may be useful for some BAPIs and function modules during the supply of non-SAP systems.Therefore, the following text describes how to deactivate these BAPIS and function modules by means of a modification.
Modifications to deactivate the calls of a BAPI
GeneralLedgerAccount.GetDetail
To deactivate BAPI GeneralLedgerAccount.GetDetail, implement the attached modification of function module HRPP_GL_ACC_GETDETAIL.
AcctngServices.PreCheckPayrollAccountAssign
To deactivate BAPI AcctngServices.PreCheckPayrollAccountAssign, implement the attached modification of function module HRPP_CODINGBLOCK_PRECHECK_HR.
AcctngEmplyeeExpnses.Check
To deactivate BAPI AcctngEmplyeeExpnses.Check, implement the attached modification of function module HRPP_ACC_EMPLOYEE_EXP_CHECK.
AcctngEmplyeeRcvbles.Check
To deactivate BAPI AcctngEmplyeeRcvbles.Check, implement the attached modification of function module HRPP_ACC_EMPLOYEE_REC_CHECK.
AcctngEmplyeePaybles.Check
To deactivate BAPI AcctngEmplyeePaybles.Check, implement the attached modification of function module HRPP_ACC_EMPLOYEE_PAY_CHECK.