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: 

As promised, here is the second installment of the general ledger posting feature delivered by SAP Profitability and Performance Management’s (PaPM) Remote Function Adapter function.  In the first part of this 2-part blog entry, we have seen how Finance General Ledger function type (RFA FI-GL) can post from PaPM to SAP ERP / SAP S/4 HANA.  This time, I will show you how to post multiple lines of data into one SAP document with the RFA Finance General Ledger Items function type (RFA FI-GL Items).


Let’s get to it:


As with the RFA FI-GL function type, you will need a Database Connection and RFC Destination.  To get a feel of the flexibility of PaPM, this time, let’s specify only a Database Connection at the environment level.  Since I am feeling adventurous today, we will just supply the RFC Destination in the input function.



 

Input Function


The data in the input function should contain the fields that need to be mapped to the components of the RFA FI-GL Items function.  The function requires at least a GL account, currency and amount for each line of data.  Since the RFA FI-GL Items uses the same BAPI as the standard SAP transaction for GL account posting, if a GL account requires assignment to a cost object (such as a cost center), then that needs to be provided as well in the input function.


The input function for the RFA FI-GL Items can be a model table/view or result of other PaPM functions such as allocation, calculation, join, derivation, etc. as long as it contains the necessary fields.  Lines in the input function will be posted into one SAP document based on the input function field defined as the grouping component in the rules tab.


In our example, we will use as input function the below model table with 18 lines of data.




 


RFA FI-GL configuration


Select Finance General Ledger Items as Remote Function Adapter Type.  Since we did not define an RFC destination at the environment level, the RFC destination will be empty.  As I have mentioned in the beginning, we will specify the RFC destination here in our input function.


Input Tab


The input tab should contain the main source of data to be posted to SAP, which is the input function.



  


Signature Tab


In the Action section of the Signature tab, add the document number field so that it can later be mapped to one of the Output fields.  This will allow for the automatically generated document numbers to be returned by SAP to PaPM in the RFA FI-GL Items function run results.



 


 Rules Tab


 The RFA FI-GL Items function has control, header and item components.


Under the control components, we have supplied the RFC Destination in the input function.  You do not need to map any field to this component if an RFC Destination exists at the environment level.


RFA FI-GL Items gives you the flexibility to choose from your input function the field that you want to use as grouping component.  In our example, we have defined the Document Header Text field as our grouping component.  This means that all lines in the input function that contain the same value in the Document Header Text field will be grouped together and posted to one SAP document provided that it passes the SAP FI side validation (such as valid GL accounts should be used, net amount per document should be zero, etc.).


Some header and item components are tagged as mandatory in the function’s configuration but this is only intended as a guide because the real validation is done on the FI side.


The basic rule to remember is if a field is mandatory when posting via any of the SAP transaction codes for document entry (such as FB50 - Enter GL Account Document or F-02 - General Posting), then a valid value for that field should be provided in the RFA FI-GL Items configuration.  Some fields are in themselves mandatory, such as posting date and company code in the header, and GL account and amount in the line items.  However, there are also some fields that may be mandatory depending on the characteristics or attributes of the data entered into some of the fields, such as Profit and Loss GL accounts that require assignment to a cost center.


In our example, all of the relevant header and line item components have been mapped to the appropriate fields in the input function, except for two header components that were intentionally hard-coded with values, to illustrate that the components can be either hard-coded or mapped to the fields from the input function.



 

Activate the RFA FI-GL function by clicking on the Activate button:



 

Run the RFA FI-GL by clicking on the Run button.  The results can be seen including the SAP document numbers automatically generated for the postings.  As expected, three SAP documents were posted, grouped by Document Header Text.



 

Don’t forget to check that the application log shows no errors:



 


Results:


The results can be verified in SAP using transaction code FBL3N – GL Account Line Item Display:



 

Double-click on one of the lines and click the header button in the next screen to see header information.



 

Alternatively, the postings can be verified by accessing table ACDOCA via SAP transaction code SE16:



 

Here is another example, where we will use Posting Date field as the grouping component:



 

From the data below, we can see that there are two posting dates, so we expect two documents to be posted.



 

Results are as expected, two documents posted, grouped by Posting Date:



 

 

Thanks for taking the time to read and I hope that this article will actually help you in using the RFA FI-GL Items function type to post your PaPM results to SAP ERP or S/4 HANA.


Because of increased interest in the RFA posting capabilities in the area of Finance, my next two topics will be Accounts Payable/Accounts Receivable and Posting to Different Ledger Groups.  After these two Finance topics, I will still post a blog entry for Sales & Distribution Documents Mass Upload, which I initially promised will be Part 3 of my blog series.


Please like, share and let me know what you think in the comments.


Until next time!


 

 

Supporting links:


Remote Function Adapter 


Database Connection


RFC Destination


3 Comments