1、FMBB预算下达控制直接创建实施代码: DATA: l_diff_years TYPE fmmaact-perc_time_hor, l_s_lines TYPE fmku_s_badi_line, l_s_fmci TYPE fmci, l_active_process_entry TYPE xflag, l_active_process_return TYPE xflag, l_active_process_suppl TYPE xflag, l_active_process_tra
2、ns TYPE xflag, l_active_process_carryover TYPE xflag, l_s_address TYPE fmku_s_dimpart, l_t_address TYPE fmku_t_dimpart, l_t_fmbdt TYPE fmbd_t_t, l_s_fmbdt TYPE fmbdt, l_perc_time_hor TYPE fmmaact-perc_time_hor, l_budget_option TYPE fmmaact-
3、ma_bud_option. DATA: l_s_msg TYPE bubas_s_msg. DATA: l_nd TYPE gjahr.*** Read the budcat and fm area LOOP AT i_t_lines INTO l_s_lines FROM 1 TO 1. ENDLOOP. l_nd = l_s_lines-FISCYEAR.*** Read multi-annual customizing CALL FUNCTION 'FMMA_CHECK_ACTIVATION' EXPORTING i_fm_area
4、 = i_s_header-fm_area i_budcat = l_s_lines-budcat IMPORTING e_perc_time_hor = l_perc_time_hor e_budget_option = l_budget_option EXCEPTIONS not_active = 1 OTHERS = 2. IF sy-subrc <> 0 . l_perc_time_hor = 0. ENDIF.* Do the check o
5、nly if perc time hor gt 0 IF l_perc_time_hor GT 0.*** Active the budget processes depending on the customizing option IF l_budget_option EQ 'O'. l_active_process_entry = 'X'. l_active_process_return = ' '. l_active_process_suppl = ' '. l_active_process_trans = ' '.
6、 l_active_process_carryover = ' '. ENDIF. IF l_budget_option EQ 'C'. l_active_process_entry = 'X'. l_active_process_return = 'X'. l_active_process_suppl = 'X'. l_active_process_trans = 'X'. l_active_process_carryover = 'X'. ENDIF.*** Take in consider
7、ation only the lines containing the*** year of cash effectivity LOOP AT i_t_lines INTO l_s_lines WHERE ceffyear IS NOT INITIAL.*** Do the check only if ceffyaer is greater than fiscyear IF l_s_lines-ceffyear GT l_nd. CLEAR l_s_fmc