on 2018 Oct 06 9:03 AM
Hi team,
My requirement is to copy the actual data to plan data using BADI. I can use Logic script also but my client wants that to be implemented in BADI as they are flexible with ABAP.
I have a model ( zsales_001 ) and it has the following dimension :
1. Account
2. Category
3. Entity
4. Product
5. Time
6. Z_Keyfigure( it has ZKF1 and ZKF2 ).
I have attached the sample source data.
The data is flowing from IC1(BW) to BPC Model.
Now my requirement is to copy the actual data of 2015.01 to plan category of 2015.02 by incrementing the value of ZKEY1 and ZKEY2 to 10%.
I have attached the sample target data

I have written BADI, but while debugging the BADI is not getting executed. Please advise.
method IF_UJ_CUSTOM_LOGIC~EXECUTE.
TYPES : BEGIN OF TY_ZSALES_BPC2_1 ,
ZACCOUNT TYPE STRING ,
ZCATEGORY TYPE STRING ,
ZENTITY TYPE STRING ,
ZPRODUCT TYPE STRING ,
ZTIME TYPE /BI0/OICALMONTH ,
ZZ_KEYFIG TYPE STRING ,
END OF TY_ZSALES_BPC2_1.
DATA : IS_ZSALES_BPC2_1 TYPE TY_ZSALES_BPC2_1 ,
IS_TEMP TYPE TY_ZSALES_BPC2_1 ,
IS_TEMP_2 TYPE TY_ZSALES_BPC2_1 ,
IT_TEMP TYPE STANDARD TABLE OF TY_ZSALES_BPC2_1,
IT_TEMP_2 TYPE STANDARD TABLE OF TY_ZSALES_BPC2_1,
IT_ZSALES_BPC2_1 TYPE STANDARD TABLE OF TY_ZSALES_BPC2_1.
IF CT_DATA IS NOT INITIAL.
IT_TEMP[] = CT_DATA[].
LOOP AT IT_TEMP INTO IS_TEMP.
IS_TEMP_2 = IS_TEMP.
IS_TEMP_2-ZCATEGORY = 'Plan'.
APPEND IS_TEMP_2 TO IT_TEMP_2.
ENDLOOP.
SORT IT_TEMP_2 BY ZACCOUNT ZCATEGORY ZENTITY ZPRODUCT ZTIME.
DELETE ADJACENT DUPLICATES FROM IT_TEMP_2.
CT_DATA[] = IT_TEMP_2[].
ENDIF.
endmethod.
below is the piece of logic script code :
*XDIM_MEMBERSET TIME = 2015.01
*XDIM_MEMBERSET CATEGORY = ACTUAL
*XDIM_MEMBERSET ACCOUNT = PL010
*START_BADI ZUJ_CUSTOM_LOGIC_FILT_001
*END_BADI.
Regards,
Praveen.
Request clarification before answering.
First - to my mind it's absolutely strange to perform copy using badi (no extra flexibility!) Standard copy package (or script logic) will do this job without issues!
If you want to train yourself in writing badi - please read:
The only thing you don't need in this description - you don't need to create a custom chain to run script logic, use standard.
To debug badi execution insert endless loop in the beginning of the badi code and use SM50 to debug.
P.S. Very simple example of custom logic badi is provided in BPC Help:
Look on the script to run it:
*START_BADI DECD
QUERY = ON //To get data into ct_data
WRITE = ON //to write results of ct_data
YEAR = 1
PERCENTAGE = 10
*END_BADI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 6 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.