Friday, 8 January 2021

Customization of Flat File Upload Planning Function via enhancement spot RSPLFA_FILE_UPLOAD without using CR – Helpful for performance optimization.

Customization of Flat File Upload Planning Function via enhancement spot RSPLFA_FILE_UPLOAD without using CR  will be helpful for below mention two cases:

◉ Options for Customization  (Insert / Modify / Delete) for Flat File Upload Planning Function

◉ Options to populate Data without CR/DS in Planning Approach

CR/DS will be used to derive the logic, the performance will improve.

The below mention step describes how the functionality can be achieved. (BW on HANA 7.5 is used)

Business Scenario:

The Flat File Upload Planning Function in SAP IP / BPC Embedded is very common requirement for any client. It is obvious that business user will not provide all the information in flat file. Naturally consultant will derive the information in Characteristic Relationship. There is no issue if someone derive the necessary information via CR. The challenge comes under picture when performance is impacted heavily because of the developed CR. The CR is called every record during other planning operation which is not at all require other than flat file upload planning function call.

SAP has provided an enhancement spot (RSPLFA_FILE_UPLOAD) which can be called during flat file upload planning function. The derivation of data which is not provided in flat file source can be derived in BADI instead of CR. The necessary logic is not a part of CR so performance improvement can be improved a lot.

Solution:

This document describes how the above-mentioned functionality can be achieved.  Assumption is that the basic planning objects are created already. The Planning Cube, Multiprovider / Composite Provider and Aggregation Level is already created.

>> The Structure of the Aggregation Level (All 4 Time characteristics, Version, GL, Group, Business, Article and Key Fig + Unit)

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> In this example, the VERSION will be derived from BLANK to some value in BADI. The Flat File Structure would be (GROUP, BUSINESS, ARTICLE, GL and the Key Fig value). That means the rest of the aggregation info-objects has be filed via BADI or Planning Function Filter.

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> In Planning Filter, the time related all characteristics value provided and info-provided where the value will post has mentioned. (In this example , The data will be posted for January;21 period)

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> The VERSION filed will be derived via BADI. In this example, the source data will be kept that means the flat file data will be kept as it is and one more record with VERSION value will be generated.

The Flat Upload from AO is used as planning function type to create a Planning Function ZFLAT_FILE_PF1.

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> The Standard Planning Function Type (0RSPL_FILE_UPLOAD_AO) is used.

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> Settings for Planning Functions (For CSV file upload the setting is necessary)

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> Settings for Planning Function (We need to provide the below information to make system understand which are those fields will be provided by the Planning Filter.)

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> The Planning Sequence crated as below.

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> Now we need to use the ‘RSPLFA_FILE_UPLOAD’ for your own BADI. (T-code : SE20)

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> Create your own enhancement in this example (ZARUP_EN_FLAT_BADI_DEMO) and create your own BADI implementation (ZARUP_IM_FLAT_FILE_DEMO) using BADI definition (BADI_RSPLFA_FILE_UPLOAD)

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> Remember to include the planning function name ZFLAT_FILE_PF1 as filter in your enhancement implementation.

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> Now within your implementation class ZCL_ARUP_FLAT_FILE_DEMO you need to redefine the method TRANSFORM_DATA

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> If we see the implementation from se80. The method need to redefine.

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> Idea here to read the C_TH_FILE which is nothing but your source file.

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> In below part I will show how we can read the record and insert one more record with blank PVERS and other one with some value for PVERS. (As per example)

Note: For any instance we can read, insert, modify and delete the C_TH_FILE.

>> Let’s run the planning function from back-end. The CSV file is kept in Local Desktop and press open. Before the Run of Planning Sequence , you need to put a break point in your implemented method.

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> It will stop at breakpoint and in debug screen we can find the no of record is 1.

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> We can also observe that the PVERS is blank. (Flat File Data)

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> Let’s create an entry with PVERS (one more record as source will be kept as per requirement).

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> Let’s check the value in C_TH_FILE .

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

>> We can see the Planning Sequence run success message.

SAP Business Planning and Consolidation, version for SAP BW/4HANA, BW (SAP Business Warehouse), SAP BW/4HANA, SAP HANA Exam Prep

No comments:

Post a Comment