I am working on one of our HR system which have integration with SAP, I am using SAP Connector for Microsoft .NET 3.0 and it's working fine for getting basic employee data using BAPI_EMPLOYEE_GETDATA function module.
I wants to know is there any function module in SAP to get employee transport and accommodation allowances.
As far as I know there is no single allowance value for employee in SAP HR. They can be set per diem, per expense type, per country destination, etc.
The most simple and obviuos setting that came to my mind is Define Maximum Rates and Default Values for Expense Types, which is stored in
V_T706B2customizing viewHere you can configure defaults, errors and warnings for expense receipts. Here is the excerpt from help:
Key piece here is individual receipts, you gotta understand that travel expenses in SAP are settled per trip per destination per receipt. So it may be dozens of receipts in the single trip.
The botton line: the total allowance value per employee (per day/month/year) that you want, may not be available out of the box in SAP ERP and is coded/customized by each client. I saw multiple ways to implement it, but none of them are standard so I will not give them here. In case you are not sure which allowance type do you need, it's better to ask your customer directly about it.
The snippet how to fetch the above
Maximum Rates and Default Values for Expense Typesis based on standard module RFC_READ_TABLE for querying SAP tabular data.Here we fetch
T706B2table but I want to highlight it is not equivalent toV_T706B2view, ideally you must create a database view wrapper forV_T706B2view and fetch it, however this may not be feasible on your system due to security policy.The query is context-dependent and here you must know many parameters like travel provision plan
MOREI, expense typeSPKZLand maybe others. They should be provided by your business analyst, I give this snippet only as a reference (!), it may not be suited for your particular case.It is an ABAP snippet, to wrap it for SAP .Net Connector check this answer.