Skip to Content
0
Former Member
Jan 04, 2012 at 11:19 AM

Data Movement from source to target cube using write_back_int

34 Views

Hello,

I need to move data from one application to the other and below is the situation.

1. Source application has dimension WEEK which is not present in target application. WEEK dimension has property MONTH having values as depicted below.

WEEK:

*ID*                       *MONTH*
WEEK.WK1                   2011.JUL
WEEK.WK2                   2011.JUL        
WEEK.WK3                   2011.JUL
WEEK.WK4                   2011.JUL
WEEK.WK5                   2011.AUG

2. The target application has dimension TIME. Using WEEK member ID of source cube need to retreive the MONTH and map the same to the TIME dimension of target cube.

3. There are other dimensions in target application which are not there in source and need to default them.

4. User has to do the selection of WEEK for which data movement needs to be done, it need to be done through DM, the weeks selected would be used to scope the data from source application.

Attempt/Approach tried:

1. DESTINATION_APP() is not useful here, since we need to do the data mapping as mentioned above, and there are few more complex data mappings and volume of data making me to not use DESTINATION_APP.

2. Created a BADI, which is getting called in LGF file. The LGF file sets the scope and gets the application name to which we need to move the data.

3. In BADI created a structure similar to the target application and populated the TIME property(of target) through MONTH property member values(of source) using the ID of WEEK.

4. Now while using the write_back_int as mentioned below, how to pass the created target structure in order to move the data.

The below code snippet has CT_DATA, which was referred from one of the documentation, since CT_DATA has source application structure and need to pass the target application structure created to it_array.

Could you please help in achieving this data movement?

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 = 'X'
i_duplicate = 'X'
i_mdata_check = ' '
i_sign_trans = ''
it_array = *CT_DATA**
 i_measures_formula = gi_dimensions
IMPORTING
et_message = gi_message .