SAP Reports / Programs | Controlling | Product Cost Controlling | Product Cost by Period(CO-PC-OBJ-PER) SAP CO

MKOSAF11 SAP ABAP INCLUDE - Form-routines







MKOSAF11 is a standard ABAP INCLUDE available within your SAP system (depending on your version and release level). Below is the basic information available for this SAP report including which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC. Also check out the submitted Comments related to this SAP report or see any standard documentation available.

If you would like to execute this report or see the full code listing simply enter MKOSAF11 into the relevant SAP transactions such as SE38 or SE80


ABAP code to call this SAP report using the submit statement

This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.






SUBMIT MKOSAF11. "Basic submit
SUBMIT MKOSAF11 AND RETURN. "Return to original report after report execution complete
SUBMIT MKOSAF11 VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


INCLUDES used within this REPORT MKOSAF11

No INCLUDES are used within this REPORT code!


TABLES used within REPORT and the associated SELECT statement:





No SAP DATABASE tables are accessed within this REPORT code!


Function Modules used within report and the associated call statement:

FB0C_LIMIT_PROCESS call function 'FB0C_LIMIT_PROCESS' EXPORTING ID_TCODE = sy-tcode ID_NO_DIALOG = space IMPORTING ED_SUBRC = ld_subrc.

STATUS_TEXT_EDIT CALL FUNCTION 'STATUS_TEXT_EDIT' EXPORTING flg_user_stat = on objnr = coas-objnr spras = sy-langu IMPORTING anw_stat_existing = varc1 e_stsma = par_stsma "Statusschema line = mkauf-sysst "Systemstatus user_line = mkauf-anwst "Anwenderstatus EXCEPTIONS object_not_found = 1.

STATUS_TEXT_EDIT CALL FUNCTION 'STATUS_TEXT_EDIT' EXPORTING flg_user_stat = on objnr = coas-objnr spras = sy-langu IMPORTING anw_stat_existing = varc1 e_stsma = par_stsma "Statusschema line = mkauf-sysst "Systemstatus user_line = mkauf-anwst "Anwenderstatus EXCEPTIONS object_not_found = 1.

KK_F_PKOSA_FILL CALL FUNCTION 'KK_F_PKOSA_FILL' EXPORTING pkosanr_imp = pkosa_aufnr IMPORTING pkosa_exp = pkosa.

KAUF_ORDER_READ CALL FUNCTION 'KAUF_ORDER_READ' EXPORTING i_aufnr = pkosa-aufnr i_autyp_erl = pkosa-autyp * I_COAS = ' ' i_enqueued = 'X' IMPORTING e_afko = afko e_afpo = afpo e_coas = coas e_kauf = kauf.

MARA_SINGLE_READ * call function 'MARA_SINGLE_READ' * exporting * KZRFB = ' ' * MAXTZ = 0 * matnr = pkosa-matnr * SPERRMODUS = ' ' * STD_SPERRMODUS = ' ' * importing * wmara = gs_mara * exceptions * lock_on_material = 1 * lock_system_error = 2 * wrong_call = 3 * not_found = 4 * others = 5.

K_READ_T001 CALL FUNCTION 'K_READ_T001' EXPORTING i_bukrs = p_bukrs IMPORTING e_t001 = wa_t001.

READ_TGSB CALL FUNCTION 'READ_TGSB' EXPORTING i_gsber = p_gsber EXCEPTIONS not_found = 1 OTHERS = 2.

K_DATE_TO_PERIOD_CONVERT CALL FUNCTION 'K_DATE_TO_PERIOD_CONVERT' EXPORTING i_date = sy-datlo i_kokrs = w_coas-kokrs IMPORTING e_gjahr = tka00-gjahr EXCEPTIONS OTHERS = 1.

K_KOKRS_READ CALL FUNCTION 'K_KOKRS_READ' EXPORTING gjahr = tka00-gjahr kokrs = w_coas-kokrs IMPORTING e_tka00 = tka00 EXCEPTIONS OTHERS = 1.

KE_PROFIT_CENTER_CHECK CALL FUNCTION 'KE_PROFIT_CENTER_CHECK' EXPORTING bukrs = w_coas-bukrs datum = sy-datlo prctr = w_prctr test_kokrs = w_coas-kokrs read_text = space IMPORTING return_code = subrc EXCEPTIONS OTHERS = 1.

K_COSPA_READ_MULTI CALL FUNCTION 'K_COSPA_READ_MULTI' EXPORTING modus = 1 TABLES t_cosel = it_cosel t_cospa = it_cospa EXCEPTIONS OTHERS = 0.

K_COSSA_READ_MULTI CALL FUNCTION 'K_COSSA_READ_MULTI' EXPORTING modus = 1 TABLES t_cosel = it_cosel t_cossa = it_cossa EXCEPTIONS OTHERS = 0.

MARA_SINGLE_READ CALL FUNCTION 'MARA_SINGLE_READ' EXPORTING * KZRFB = ' ' * MAXTZ = 0 matnr = p_matnr * SPERRMODUS = ' ' * STD_SPERRMODUS = ' ' IMPORTING wmara = wa_mara.

CO_RM_COMPANYCODE_FIND CALL FUNCTION 'CO_RM_COMPANYCODE_FIND' EXPORTING werks = p_werks IMPORTING str001w = l_t001w EXCEPTIONS no_entry = 1 OTHERS = 2.

MBEW_SINGLE_READ CALL FUNCTION 'MBEW_SINGLE_READ' EXPORTING matnr = p_matnr bwkey = l_t001w-bwkey bwtar = ' ' IMPORTING wmbew = l_mbew EXCEPTIONS lock_on_mbew = 1 lock_system_error = 2 wrong_call = 3 not_found = 4 OTHERS = 5.

CKML_MGV_PROCESSES_READ CALL FUNCTION 'CKML_MGV_PROCESSES_READ' EXPORTING iv_werks = pkosa-werks iv_matnr = pkosa-matnr iv_pkosa_status = l_pkosa_status IMPORTING et_process_tbl = gt_process EXCEPTIONS multiple_pkosa_found = 1 rule_not_found = 2 OTHERS = 3.

CKML_MGV_RULE_READ CALL FUNCTION 'CKML_MGV_RULE_READ' EXPORTING i_material = pkosa-matnr i_werks = pkosa-werks i_ptyp = ckmv3_co_ptyp-b_fertigung i_application = 'P' "PKOSA anlegen CHANGING rf_rules = ls_rule_line EXCEPTIONS rule_not_found = 1 internal_error = 2 action_cancelled = 3 scheme_not_found = 4 OTHERS = 0.

CKML_MGV_PLANT_DATA_UPDATE





call function 'CKML_MGV_PLANT_DATA_UPDATE' exporting i_werks = pkosa-werks i_application = 'P'.

MARA_SINGLE_READ CALL FUNCTION 'MARA_SINGLE_READ' "P45K058297 EXPORTING "P45K058297 matnr = pkosa-matnr "P45K058297 IMPORTING "P45K058297 wmara = ls_mara. "P45K058297

MARC_SINGLE_READ CALL FUNCTION 'MARC_SINGLE_READ' "P45K065821 EXPORTING "P45K065821 matnr = pkosa-matnr "P45K065821 werks = pkosa-werks "P45K065821 IMPORTING "P45K065821 wmarc = ls_marc. "P45K065821

REUSE_ALV_POPUP_TO_SELECT CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT' EXPORTING i_title = text-004 i_selection = charx i_zebra = charx * i_tabname = 'LT_PROCESS' i_tabname = 'LT_POPUP' it_fieldcat = lt_field_tab IMPORTING es_selfield = l_selfield e_exit = p_exit_flag TABLES t_outtab = lt_popup * t_outtab = gt_process EXCEPTIONS program_error = 1 OTHERS = 2.

CS_ALT_SELECT_MAT CALL FUNCTION 'CS_ALT_SELECT_MAT' EXPORTING datuv = l_datuv matnr = p_matnr stlal = p_stlal stlan = p_stlan werks = p_werks TABLES mastb_wa = t_mastb stkob_wa = t_stkob stzub_wa = t_stzub EXCEPTIONS alt_not_found = 1 bom_not_active = 2 bom_not_found = 3 call_invalid = 4 no_alt_found = 5 no_bom_found = 6 OTHERS = 7.

CP_DB_MAPL_READ CALL FUNCTION 'CP_DB_MAPL_READ' "P9CK008535 EXPORTING "P9CK008535 datub = sy-datlo "P9CK008535 datuv = sy-datlo "P9CK008535 matnr = p_matnr "P9CK008535 plnal = p_plnal "P9CK008535 plnty = p_plnty "P9CK008535 werks = p_werks "P9CK008535 TABLES "P9CK008535 matpl = lt_matpl "P9CK008535 EXCEPTIONS "P9CK008535 OTHERS = 1. "P9CK008535

CKML_ORD_CONN_LOEKZ_SET CALL FUNCTION 'CKML_ORD_CONN_LOEKZ_SET' EXPORTING i_aufnr = pkosa-aufnr i_loekz = p_value EXCEPTIONS order_not_found = 1 wrong_input_data = 2 OTHERS = 3.

CKML_MGV_PROCESS_READ CALL FUNCTION 'CKML_MGV_PROCESS_READ' EXPORTING i_kalnr = p_procnr IMPORTING e_process = gs_process EXCEPTIONS not_found = 1 OTHERS = 2.

CKML_MGV_PROCESSES_READ CALL FUNCTION 'CKML_MGV_PROCESSES_READ' EXPORTING iv_werks = pkosa-werks iv_matnr = pkosa-matnr iv_nfelder = l_nfelder iv_pkosa_status = 'P' IMPORTING et_process_tbl = lt_process EXCEPTIONS rule_not_found = 1 wrong_characteristics = 2.

CKML_MGV_PROCESSES_READ CALL FUNCTION 'CKML_MGV_PROCESSES_READ' EXPORTING iv_werks = pkosa-werks iv_matnr = pkosa-matnr iv_nfelder = l_nfelder iv_pkosa_status = 'N' IMPORTING et_process_tbl = lt_process.

KK_F_OBJECTS_FIND_TO_PKOSA CALL FUNCTION 'KK_F_OBJECTS_FIND_TO_PKOSA' EXPORTING i_aufnr = pkosa-aufnr TABLES e_safk = lt_safk e_vkks0 = lt_vkks0 e_mkal = lt_mkal EXCEPTIONS none_found = 1 OTHERS = 2.

REUSE_ALV_POPUP_TO_SELECT * call function 'REUSE_ALV_POPUP_TO_SELECT' * exporting * i_title = text-014 * i_selection = charx * i_zebra = charx * i_tabname = 'LT_OBJECTS' * it_fieldcat = lt_field_tab * importing * es_selfield = l_selfield * e_exit = l_exit_flag * tables * t_outtab = lt_objects.

REUSE_ALV_EVENTS_GET CALL FUNCTION 'REUSE_ALV_EVENTS_GET' EXPORTING i_list_type = 0 IMPORTING et_events = gt_events[].

REUSE_ALV_GRID_DISPLAY_LVC CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC' EXPORTING i_callback_program = g_repid i_save = 'X' is_variant = l_disvariant is_layout_lvc = ls_layout it_fieldcat_lvc = lt_field_tab it_events = gt_events i_screen_start_column = 5 i_screen_start_line = 5 i_screen_end_column = 60 i_screen_end_line = end_line IMPORTING * E_EXIT_CAUSED_BY_CALLER = es_exit_caused_by_user = exit TABLES t_outtab = lt_objects.

CM_FV_PROD_VERS_SINGLE_SHOW CALL FUNCTION 'CM_FV_PROD_VERS_SINGLE_SHOW' EXPORTING i_ext_key = ls_mkal_key EXCEPTIONS OTHERS = 1.

RM_CHECK_REM_FOR_PKOSA CALL FUNCTION 'RM_CHECK_REM_FOR_PKOSA' EXPORTING p_pkosa = pkosa IMPORTING rsh_exist = l_rsh_exist backlog_exist = l_backlog_exist EXCEPTIONS missing_data = 1 OTHERS = 2.

KK_F_OBJECTS_FIND_TO_PKOSA CALL FUNCTION 'KK_F_OBJECTS_FIND_TO_PKOSA' EXPORTING i_aufnr = pkosa-aufnr i_no_rep = charx " keine Serienaufträge i_loekz = charx "note844499 TABLES e_vkks0 = lt_vkks0 EXCEPTIONS not_found = 1 OTHERS = 2.

STATUS_CHECK CALL FUNCTION 'STATUS_CHECK' EXPORTING objnr = lt_vkks0-objnr status = stk_loekz EXCEPTIONS status_not_active = 1 OTHERS = 2.

KAUF_ORDER_ACTIVITY CALL FUNCTION 'KAUF_ORDER_ACTIVITY' EXPORTING i_coas = coas i_kauf = kauf i_vrgng = vrgng_loeschvermerk_setzen i_check = 'X' i_dialog = 'X' IMPORTING e_coas = coas e_kauf = kauf EXCEPTIONS OTHERS = 0.

CKML_PKOSA_TO_PROCESS_READ CALL FUNCTION 'CKML_PKOSA_TO_PROCESS_READ' TABLES rt_process_pkosa = lt_pkosa EXCEPTIONS multiple_pkosa_found = 1 OTHERS = 2.




KAUF_ORDER_ACTIVITY CALL FUNCTION 'KAUF_ORDER_ACTIVITY' EXPORTING i_coas = coas i_kauf = kauf i_vrgng = vrgng_loeschvermerk_loeschen i_check = 'X' i_dialog = 'X' IMPORTING e_coas = coas e_kauf = kauf EXCEPTIONS OTHERS = 0.

POPUP_TO_CONFIRM_STEP CALL FUNCTION 'POPUP_TO_CONFIRM_STEP' EXPORTING textline1 = text-017 textline2 = text-018 titel = text-016 IMPORTING answer = l_answer.

KK_F_PKOSA_FILL CALL FUNCTION 'KK_F_PKOSA_FILL' "P45K056413 EXPORTING "P45K056413 pkosanr_imp = pkosa_aufnr "P45K056413 IMPORTING "P45K056413 pkosa_exp = pkosa. "P45K056413

KAUF_ORDER_READ CALL FUNCTION 'KAUF_ORDER_READ' "P45K056413 EXPORTING "P45K056413 i_aufnr = pkosa-aufnr "P45K056413 i_autyp_erl = pkosa-autyp "P45K056413 * I_COAS = ' ' "P45K056413 i_enqueued = 'X' "P45K056413 IMPORTING "P45K056413 e_afko = afko "P45K056413 e_afpo = afpo "P45K056413 e_coas = coas "P45K056413 e_kauf = kauf "P45K056413 EXCEPTIONS "P45K056413 no_authority = 1. "P45K056413

MKAL_SINGLE_READ CALL FUNCTION 'MKAL_SINGLE_READ' "P45K058297 EXPORTING "P45K058297 matnr = p_pkosa-matnr "P45K058297 werks = p_pkosa-werks "P45K058297 verid = p_procparam-verid "P45K058297 IMPORTING "P45K058297 wmkal = ls_mkal "P45K058297 EXCEPTIONS "P45K058297 OTHERS = 3. "P45K058297

CM_FV_MKAL_CONSISTENCY_CHECK * call function 'CM_FV_MKAL_CONSISTENCY_CHECK' "P45K058297 * exporting "P45K058297 * mkal_imp = ls_mkal "P45K058297 * object_imp = space "P45K058297 * importing "P45K058297 * cons_error = l_cons_error "P45K058297 * cons_warning = l_cons_warning "P45K058297 * tables "P45K058297 * result_tab = lt_result_tab "P45K058297 * exceptions "P45K058297 * plko_err = 1 "P45K058297 * stko_err = 2 "P45K058297 * others = 3. "P45K058297

CO_TA_T399X_READ CALL FUNCTION 'CO_TA_T399X_READ' "P45K063815 EXPORTING "P45K063815 auart = p_auart "P45K063815 werks = p_werks "P45K063815 IMPORTING "P45K063815 struct = ls_t399x "P45K063815 EXCEPTIONS "P45K063815 no_entry = 1 "P45K063815 OTHERS = 2. "P45K063815

KK_F_T437S_READ CALL FUNCTION 'KK_F_T437S_READ' "P45K073064 EXPORTING "P45K073064 imp_mat = p_matnr "P45K073064 imp_wrk = p_werks "P45K073064 IMPORTING "P45K073064 exp_t437s = ls_t437s. "P45K073064



Contribute (Add Comments)

Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.

The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.

This will then be available for everyone to easily find by simply searching on the report name MKOSAF11 or its description.