Financial Management Blogs by SAP
Get financial management insights from blog posts by SAP experts. Find and share tips on how to increase efficiency, reduce risk, and optimize working capital.
cancel
Showing results for 
Search instead for 
Did you mean: 
2,316
It’s time to present the next Remote Function Adapters (RFA) delivered by SAP Profitability and Performance Management (PaPM), namely the RFA Finance Accounts Payable (RFA FI-AP) and RFA Finance Accounts Receivable (RFA FI-AR).

These RFAs, along with other functions provided by PaPM, such as allocations, calculations, joins, can facilitate various business processes of calculating values and immediately booking them as for instance Accounts Payable and Receivable.

The RFAs not only allow for postings within one company code but also enables cross-company postings, what might be interesting for entities with some affiliated company codes. In that case, as in SAP standard, the system posts a separate document with its own document number in each of the company codes. And let's not forget that even postings between different SAP systems can be performed!

In this blogpost I am going to show you some basic information, how to use the RFA FI-AP and RFA FI-AR and also some small useful tips and tricks.

Configuration of RFA Finance Accounts Payable and RFA Finance Account Receivable

Database Connection and RFC Destination

As already mentioned in the previous blog posts written by my colleague and myself, the necessary condition would be to establish the RFC connection between SAP system(s) and PaPM. The RFC stands for Remote Function Call and is a standard SAP interface used to communicate between SAP systems. The connection needs to be set by SAP Basis guys, as it is considered as critical (SAP transaction SM59).

Once the necessary RFC set up has been configured, we need to define the destination system on PaPM side. In the On-Premise system we can do it at the environment level, in the Advanced tab. However, the creation of AP or AR might be addressed to different SAP Systems / Clients (RFC destinations). In that case, the RFC destination should be provided in the RFA function’s rules, either by mapping the component to the relevant field in the input function or hardcoded. The entry in the rule overwrites the entry in the environment.

In the Cloud you can set up the RFC connection either in the input table or it can be hardcoded directly in the RFA rule. There is no possibility currently to set up the connection on the level of the environment.

RFA FI-AP / FI-AR Configuration

Here is how to get started with the set up. In case of Accounts Payable and Accounts Receivable, you have a several possibilities delivered by PaPM.

Aside from the single RFA Finance Accounts Payable, corresponding to SAP FB60, which is the transaction used to post vendor invoices with no logistic background behind and RFA Finance Accounts Receivable, corresponding to FB70, used to post customer invoices, you can also choose the combined RFA Finance Accounts Payable/Receivable. As in SAP standard, the document type and the posting keys will be derived automatically by posting. The sign of the amount will determine the debit or credit side of the posting as well as the transaction type: Invoice or Credit Memo.

Input Tab / Input Function

The input function for the RFA FI-AP and RFA FI-AR might be a model table/view or result of any other function such as allocation, calculation, join, derivation, transfer structure. The data in the input function should contain the fields that will be mapped to the components of the RFA function.

Please see an example input function, where we store all fields necessary to create the AP / AR document:

If you intend to calculate some values like dynamically derived posting date or tax amount, you need to calculate it in the input function. In the RFA rules, you can use only the standard functions provided in the formula, data from the input function or hardcoded values. It is not possible to define own syntax directly in the formula box within the RFA rules.

Fields Mapping - the minimum necessary to be able to book the document

When you start populating or mapping the fields, the components marked as mandatory will turn green when populated and orange when not populated.

Rules tab for Accounts Payable:


Rules tab for Accounts Receivable:


Function Execution

You can execute the posting in test run mode (header-doc_status = 2) or in actual mode (header-doc_status = empty).

In test run mode, standard SAP validations will be performed upon execution, but no documents will be posted in SAP.

In actual mode, standard SAP validations will be performed upon execution, and when the provided inputs pass the validations, relevant documents will be posted in SAP.


One way to use the test / actual indicator, would be to set is as a parameter in the Process Template.


The parameter can then be used later on in the processing as a basis to populate the input function of the RFA, such as below:


In case the validation has been passed successfully, the document numbers created in the SAP system are sent back to the specific output field in PaPM to make reconciliation between PaPM and SAP possible. So please do not forget to define one output field for the SAP FI document number. To do this, you need to put one field in the action tab and assign it in the rules to component header-obj_key. In the example the technical field name is aligned with the standard SAP field name.



Result of the posting

The SAP FI document number written back to PaPM can be used in standard SAP transactions / reports to check the postings.

Cross-Company Code / Cross-system Postings

In some cases it is not possible to use standard SAP for cross-company postings or it is required to post cross SAP Clients or systems but you would like to keep the reference number as in the classic Sap cross-company posting. Such requirement can also be covered by the PaPM RFAs.
Let me present possible solution for such a business case:

The input function is in our case a Model Table. Company Code 0001 is going to invoice Company Code 1000. As the process will be initialised by Accounts Receivable, it is expected to keep the system number, company code number and created FI document number in field ‘Reference’ in the created document for Accounts Payable.

Please have a look at the modeling flow below:


This is our input model table. The field Partner Company Code will be used as Look Up predicate to derive the created FI document number.


Firstly the AR will be posted, then in the Join, the already created document will be caught and written back in the input for AP in a new field together with RFC destination and invoicing company code.


Of course, just one function will be executed. In our example it will be RFA ‘Post AP Entries Blog’. This function will trigger all other activities in that chain. So in the result we see the AP document which has been created and the reference to the AR document.


Let’s check the results in SAP via transaction FB03 Display Document:



Classic Cross-Company Posting

Cross-company postings are also possible, where the system posts a separate document with its own document number in each of the company codes. Intercompany postings (also called cross company code transactions) occur in the system when a single transaction is posted to one or more company codes (this must occur on separate line items). For these postings, an intercompany clearing (payable/receivable) account must be maintained in SAP (SAP standard configuration -> transaction OBYA).

If the configuration on SAP side has been set up properly, you can start to define the input function and the RFA function. The most important fields are of course the company code in the document header and the company code in the document line item.



After successful execution, based on the SAP document number written back to PaPM you can check the documents posted via SAP transaction FBU3 (Display Cross-Company Code Transaction).



Thanks for taking the time to read my blog entry and I hope it helps you post not only vendor and customer invoices but also cross-company and cross-system entries using the RFA Finance Accounts Payable / Accounts Receivable.
Please like, share and let me know what you think in the comments.
Until next time!