Skip to Content
0
Former Member
Apr 05, 2008 at 03:34 AM

Migrate update rule for cube 0IMFA_1 from 3.x to 7.x

73 Views

Hi,

Does anyone have experience in migrating update rule for cube 0IMFA_1?

I'm having problem with the update rule routine. I tried to put the code in end routine which suggested by sap help after migrate to 7.x. Unfortunately i cant find some of the comm_structure info object in 7.x routine. In 3.x routine it is using return table and 3.x routine code is below. Those field eg: comm_structure-piobjsv, costelmnt, and amountpp are not in the 7.x end routine.

Could anyone suggest how should I continue it? My objective is to copy the code in 3.x to 7.x routine.

Thanks

CALL FUNCTION 'AIB3_EVALUATE_ODS_ASSIGN'

EXPORTING

I_WBS_ELEMT = COMM_STRUCTURE-wbs_elemt

I_METYPE = COMM_STRUCTURE-metype

I_VTYPE = COMM_STRUCTURE-vtype

I_VTDETAIL = COMM_STRUCTURE-vtdetail

I_VTSTAT = COMM_STRUCTURE-vtstat

I_DB_CR_IND = COMM_STRUCTURE-db_cr_ind

I_PIOBJSV = COMM_STRUCTURE-piobjsv

I_COSTELMNT = COMM_STRUCTURE-costelmnt

I_AMOUNTPP = COMM_STRUCTURE-amountpp

I_AMOUNT = COMM_STRUCTURE-amount

I_LOGSYST = SOURCE_SYSTEM

IMPORTING

ET_ASS_VALUES = lt_ass_values[]

E_SUBRC = RETURNCODE

TABLES

ET_MONITOR = MONITOR

.

check RETURNCODE is initial.

RESULT_TABLE = ICUBE_VALUES.

loop at lt_ass_values assigning <ls_ass_values>.

move-corresponding: <ls_ass_values> to RESULT_TABLE.

RESULT_TABLE-currency = COMM_STRUCTURE-currency. "CSS 00740524 2000 Ben

RESULT_TABLE-curtype = COMM_STRUCTURE-curtype.

check not RESULT_TABLE-amount is initial.

if s_flg_curr_con_act is initial.

*----


  • Take over values.

*----


append RESULT_TABLE.

else.

*----


  • Use currency conversion logic.

*----


move-corresponding:

RESULT_TABLE to ls_curr_conv.

refresh:

lt_curr_conv[].

append

ls_curr_conv to lt_curr_CONV.

*----


  • Execute currency conversion.

CALL FUNCTION 'AIB3_CURR_CONV'

EXPORTING

I_OBJECT = imbw1_con_object-pr

I_APPR_YEAR = RESULT_TABLE-appr_year

I_FISCVARNT = COMM_STRUCTURE-fiscvarnt

I_CO_AREA = COMM_STRUCTURE-co_area

  • I_FISCYEAR = comm_structure-fiscyear

I_FISCPER = COMM_STRUCTURE-fiscper

I_PROG_DEF_S = RESULT_TABLE-prog_def_s

  • I_PROG_POS = result_table-prog_pos

  • I_APPR_REQU = comm_structure-appr_requ

  • I_COORDER = comm_structure-coorder

I_WBS_ELEMT = COMM_STRUCTURE-wbs_elemt

  • I_ACTIVITY = comm_structure-activity

  • I_ACTY_ELEMT = comm_structure-acty_elemt

  • I_NETWORK = comm_structure-network

IMPORTING

E_FLG_CURR_CON_ACT = s_flg_curr_con_act

E_ABORT = ABORT

TABLES

CT_VALUES = lt_curr_conv

CT_MONITOR = MONITOR

CHANGING

CS_CUBEVALUES = RESULT_TABLE

.

IF ABORT <> 0.

  • ERROR: ==> Exit.

exit.

ENDIF.

*----


  • Take over converted values.

loop at lt_curr_conv into ls_curr_conv.

move-corresponding:

ls_curr_conv to RESULT_TABLE.

append RESULT_TABLE.

endloop.

endif.

endloop.