on 2019 Jun 12 11:00 PM
Hi gurus,
I am currently trying to write an AMDP BADI and for this I need to pass the selection to my BADI and put it in my method. For this I have written the following code in CUSTOM LOGIC. After I manipulate the data in method, I am hoping to put it back into my cube through ct_data. In my method call, I need to replace 'BS121' with the value coming from the input form for the Account dimension. It can be a variable and I do not know how to pick it up. Once I pick it up, I have to put it in my method ZAMDP_PET, perform some calculations in HANA and get the result back. How do I achieve this?
Specifications:
Model Standard default "Planning" model that we get with BPC- None of the dimensions/members have been changed.
Version: BPC10.1
BW 7.5
ANALYSIS for Office version 2.7
HANA 2.0
method IF_UJ_CUSTOM_LOGIC~EXECUTE.
TYPES: BEGIN OF All_data,
Account(32) TYPE c,
AUDITTRAIL(32) TYPE c,
CATEGORY(32) TYPE c,
ENTITY(32) TYPE c,
INTERCO(32) TYPE c,
PRODUCT(32) TYPE c,
RPTCURRENCY(32) TYPE c,
TIME(32) TYPE c,
signdata TYPE /B28/FCUBE-/b28/s_sdata,
END OF all_data.
DATA: AD_DATA TYPE STANDARD TABLE OF ALL_DATA,
TM_DATA TYPE STANDARD TABLE OF ALL_DATA.
CALL METHOD LC_DATA->ZAMDP_PET
EXPORTING
IV_ACCOUNT = 'BS121' "BS121' needs to be picked up from the selection in the input form
IMPORTING
AD_DATA = AD_DATA.
CT_DATA = AD_DATA. "data put back into the cube
ENDMETHOD.
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Just look on the sample of custom logic badi in BPC help: https://help.sap.com/viewer/a2049170bfeb4178ace32222842c3ec1/10.1/en-US/f04254a006574fed9a65f3661a07...
*START_BADI DECD
QUERY = ON
WRITE = ON
YEAR = 1
PERCENTAGE = 10
*END_BADI
and inside badi:
READ TABLE it_param WITH KEY hashkey = 'YEAR' INTO ls_param.
IF sy-subrc NE 0.
l_log = 'You have not specified the parameter ''YEAR'' which is required.'.
cl_ujk_logger=>log( i_object = l_log ).
RAISE EXCEPTION TYPE cx_uj_custom_logic.
EXIT.
ENDIF.
l_year = ls_param-hashvalue.
...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
tulkas
Yes, like in your comment!
Inside badi:
READ TABLE it_param WITH KEY hashkey = 'ACCOUNT' INTO ls_param.
...
Please accept the correct answer.
User | Count |
---|---|
11 | |
10 | |
2 | |
2 | |
1 | |
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.