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)
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.
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)
>> 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.
>> 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)
>> 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.
>> The Standard Planning Function Type (0RSPL_FILE_UPLOAD_AO) is used.
>> Settings for Planning Functions (For CSV file upload the setting is necessary)
>> 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.)
>> The Planning Sequence crated as below.
>> Now we need to use the ‘RSPLFA_FILE_UPLOAD’ for your own BADI. (T-code : SE20)
>> 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)
>> Remember to include the planning function name ZFLAT_FILE_PF1 as filter in your enhancement implementation.
>> Now within your implementation class ZCL_ARUP_FLAT_FILE_DEMO you need to redefine the method TRANSFORM_DATA
>> If we see the implementation from se80. The method need to redefine.
>> Idea here to read the C_TH_FILE which is nothing but your source file.
>> 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.
>> It will stop at breakpoint and in debug screen we can find the no of record is 1.
>> We can also observe that the PVERS is blank. (Flat File Data)
>> Let’s create an entry with PVERS (one more record as source will be kept as per requirement).
>> Let’s check the value in C_TH_FILE .
>> We can see the Planning Sequence run success message.
This is a very good approach where developer has luxury to implement BADI and implement business logic without impacting performance.