SAP BLOG CO Secondary Posting to SAP ERP using PaPM’s Remote Function Adaptor

SAP Blog

Kayıtlı Üye
Katılım
22 Ara 2017
Mesajlar
1,925
Tepki puanı
7
Puanları
6
SAP Profitability & Performance Management (PaPM) is an amazing application to manage Cost Allocation needs of an organization. Its advanced and flexible business modelling capability provides amplified insights with multidimensional profit & cost analysis.

In one of my PaPM engagements in the early part of the current year, I came across some of the complex cost allocation use cases but never imagined that PaPM can simply the solution by building robust & flexible data modelling and at the same time provide sustainable solution to dynamic cost allocation needs. In the same engagement there was a need to post cost allocation results as Secondary Posting to give similar impact of KB15N (Manual Cost Allocation) to the books of accounts in SAP S/4HANA. Thus Remote Function Adaptor (abbreviated as RFA)Type “Finance General Ledger Items” was not considered as the right option and led to the solution of RFA type “External Function” and call custom function module built on “BAPI_ACC_MANUAL_ALLOC_POST” in SAP ERP system. Refer the blog – Exploring SAP Profitability and Performance Management’s Remote Function Adapter – External Function Type | SAP Blogs

But with the release of SP13 of PaPM 3.0 few months back, we now have an out of box capability to post Secondary Cost Element Posting back in SAP ERP systems (SAP S/4HANA for example) and avoid a custom function module.

In this blog I have attempted to explain how to setup a RFA type “Secondary Cost Element Posting” with an example of simple cost allocation based on Headcounts. The business need is to allocate a cost from cost pool (combination of certain Primary Expense GL Accounts & Cost Centers) of a specific Business Unit (abbreviated as BU) to Production Cost Center based on its head counts and subsequently consider this allocated cost for Production Activity Rate Calculation. Thus this cost allocation is like an absorption of cost originally booked to cost pool and which needs to be accounted with Secondary Cost Elements (Cost Element Type : 42 – Assessment) to ensure that Primary GL Account’s periodic balances are intact.

In this example, Cost Allocation is happening from specific sender cost center to specific set of receiver cost centers as shown in below picture. Thus allocation settings are maintained accordingly.

1-73.png




Let’s begin with Allocation function and then move to RFA setup for Secondary posting.

  • Cost Allocation Setup & Results

Allocation Type is set to ‘Allocation with Offset Records’ to ensure offset records are generated with opposite sign (+/-)

Rule Type is set to ‘Direct’ to ensure cost allocation from specific sender cost center to specific set of receiver cost centers

Both Sender & Receiver data are provided through a View function where they enriched with a common parameter i.e. ‘Allocation Cycle’ (UC01 for example) to allow direct allocation to happen.

2-34.png




Sender Cost is summarized by GL Account & Cost Center for each Allocation Cycle

3-31.png


Receiver / Allocation Driver Data is consolidated by Receiver Cost Centers and their head counts (Statistical Key Figure in this example) for each Allocation Cycle

4-29.png


Allocation function is performed for Cost allocation based on Head Count associated to each receiver cost center

5-25.png




  • Compiling data for Secondary Posting

Cost Allocation results are read in a View function and enriched with GL Account of Cost Element category 42. An identifier is assigned for each unique combination of record to consider each one as a separate record for subsequent RFA function

6-20.png




  • RFA Secondary Cost Element Posting Setup and Results

This section is dealt with RFA setup which is assigned with ‘Secondary Cost Element Posting’ as Remote Function Adaptor Type which uses standard BAPI ‘BAPI_ACC_MANUAL_ALLOC_POST’.

In this example , as postings are going to happen in same instance where both SAP PaPM & SAP ERP system reside thus RFC Destination not maintained.

Input Tab

Here Input function which is a source of allocated cost results with additional values required to post CO Secondary document is assigned. It should provide all field values which are to be mapped to the required components of the RFA Secondary Posting shown in Rules Tab. Like in this example, both Sender & Receiver Cost Centers and GL Account are few of the required fields which need to be mapped.

7-19.png




Signature Tab

Under ‘Signature’ Tab, assign standard field ‘BELNR – Document Number’ to capture the CO Document in PaPM which is generated from SAP ERP as an output of the RFA Secondary Posting run.

8-20.png




Rules tab

It has following fields, under component column which can be categorized as Header, item and Grouping Control. They are explained below:

  • Header components which are of Input type and marked mandatory, are to capture inputs for header section of the document.
  • Input components which are of Input type and marked mandatory, are to capture inputs for line item section of the document.
  • Grouping Control gives input to select the records which can be grouped together in a single document.
  • There is one header Component of output type which returns the CO Document generated in SAP ERP. It needs to be mapped to a field meant to this as output.

Against the relevant components, the column ‘Field’ is maintained, either with those fields which are part of Input Function or with the values using Formula option.



9-16.png


In this example, mostly all components values are derived from the input function, except few like Posting Date which is hardcoded using formula option. It is just to showcase the capability of formula where you can either hardcode the values or select variable field as input.

10-16.png




Details of the component & field mapping are mentioned in below table.

ComponentFieldBased on Input Function / Formula
co_areaControlling AreaInput Function
doc-hdr_txCustom Field (Identifier for each unique record)Input Function
doc_no (output)Document Number (BELNR assigned in Signature Tab)Formula
postgdate‘20201021’ (YYYYMMDD)Formula
trans_currTransaction CurrencyInput Function
usernameSY-UNAMEFormula
groupingCustom Field (Identifier for each unique record)Input Function
send_cctrSender CCInput Function
cost_elemPosting GL AccountsInput Function
value_tcurAmount in Transaction CurrencyInput Function
rec_cctrReceiver CCInput Function



Once the RFA function is activated, Secondary Posting is performed to account for Cost allocation results. CO Document is captured in mapped field ‘BELNR’ and can be seen on result screen.

11-13.png




In SAP ERP system, CO Secondary Posting can be verified using T.code KSB5 – Display Actual Cost Document and associated FI Posting also can be checked

12-15.png


Summary

I hope this blog would have given relevant inputs on how to use RFA with Secondary Cost Element Posting option and meet such similar business requirement by leveraging this out of box capability of PaPM.

Thanks for spending time on this blog. If you have any feedback, please leave a comment.



Here are some supporting links on this topic:

SAP Notes on RFA – Secondary Posting


3106191 – FS-PER-OP Rel 3.0 SP16 – Activation error for RFA type PR and RFA type SP

3014983 – FS-PER Rel 3.0 SP14 – New Remote Function Adapter Types: Purchase Order and Manual Cost Allocation with Secondary Cost Elements Posting

3084037 – FS-PER-OP Rel 3.0 SP15 – New structure “customer_fields” added for RFA Secondary Cost Element Posting



SAP PaPM User Guide (Rel 3.0 | SP15)

SAP Help Portal

Okumaya devam et...
 
Üst