Skip to Content
0
Dec 14, 2013 at 04:19 PM

write_back_int duplicate records

39 Views

Hi,

I am using the below code in the BADI (UJ_CUSTOM_LOGIC) to move data from one application area(CAPEX) to another Application Area(Finace). My BPC Consultant is calling my BADI implementation from allocation.lgf file of CAPEX Application area. When ever we run allocation the records are transferred to Finance Application area (BPC Cube) from CAPEX(BPC Cube). Second time we do the same the same records are duplicated in the target application area, no duplicates are checked for even though I set i_duplicate to 'X'.

I tried to put I_CALC_DELTA to 'X'. But only the last record is inserted instead of all records.

For example lets say when no data exists in Finance cube and we run the BADI implementation for first time the result is shown below.

CAPEX CUBE

AA BB CC 10

AA BB CC 20

AA BB CC 30

Finance CUBE

<No Data>

After calling the BADI for first time, the finance cube contains

AA BB CC 10

AA BB CC 20

AA BB CC 30

When we again call the same BADI, the finance cube contains

AA BB CC 10

AA BB CC 20

AA BB CC 30

AA BB CC 10

AA BB CC 20

AA BB CC 30

when we call third time, the finance cube contains

AA BB CC 10

AA BB CC 20

AA BB CC 30

AA BB CC 10

AA BB CC 20

AA BB CC 30

AA BB CC 10

AA BB CC 20

AA BB CC 30

and so on....

if we set i_calc_delta to 'X' and i_duplicate to 'X'. we get the following result

CAPEX CUBE

AA BB CC 10

AA BB CC 99

AA BB CC 30

Finance CUBE

<No Data>

After calling the BADI for first time, the finance cube contains

AA BB CC 30

When we again call the same BADI, the finance cube contains

AA BB CC 30

the records (AA BB CC 10,AA BB CC 99) are ignored

The below is my code.

wa_work_status-module_id = ''.
wa_work_status-blockaction = 'IGNORE'.
wa_work_status-blockstatus = ''.

The below is the code I am calling <tmp_trg_data> is the table that contains records to be transferred.

gi_message is my return table for messages. I see no records returned.

CALL METHOD lo_wb_main_int->write_back_int
EXPORTING
is_work_status = wa_work_status
i_default_logic = ''
i_update_audit = ''
i_calc_delta = ''
i_duplicate = 'X'
i_mdata_check = ' '
i_sign_trans = ''
it_array = <tmp_trg_data> “This contains the data that has to be moved to FINANCE Cube

* i_measures_formula = gi_dimensions
IMPORTING
et_message = gi_message.


Thanks for the help.


-Suresh Dorai