SAP Reports / Programs | Sales and Distribution | Foreign Trade | Basic Functions(SD-FT-PRO) SAP SD

RMPREF30 SAP ABAP INCLUDE - Preference Determination: Print Routines and Update Preference Data







RMPREF30 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 RMPREF30 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 RMPREF30. "Basic submit
SUBMIT RMPREF30 AND RETURN. "Return to original report after report execution complete
SUBMIT RMPREF30 VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Title: Preference Determination: Print Routines and Update Preference Data


INCLUDES used within this REPORT RMPREF30

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:

CS_BOM_EXPL_MAT_V2 CALL FUNCTION 'CS_BOM_EXPL_MAT_V2' EXPORTING capid = pm_capid datuv = pm_datuv fbstp = pm_fbstp "keine Fremdbeschafften mbwls = 'X' mdmps = pm_mdmps "später Auflösen mehrs = pm_mehrs salww = 'X' "HW0390747 mtnrv = pm_mtnrv stlal = pm_stlal stlan = pm_stlan werks = pm_werks sanfr = pm_sanfr "fertigungsrelevant sanka = pm_sanka "kalkulationsrelevant rndkz = pm_rndkz "Rundungsregel IMPORTING topmat = cstmat TABLES stb = stb matcat = matcat EXCEPTIONS alt_not_found = 04 call_invalid = 08 material_not_found = 12 missing_authorization = 16 no_bom_found = 20 no_plant_data = 24 no_suitable_bom_found = 28.

PREFERENCE_COSTING CALL FUNCTION 'PREFERENCE_COSTING' EXPORTING p_werks = pm_werks p_update = space ***** p_mdmps = pm_mdmps "Später Auflösen p_alpauf = pm_apauf p_pwlen = pm_pwlen topmat = cstmat p_prozen = p_prozen IMPORTING w_marc = w_marc kz_no_matstamm_update = kz_no_matstamm_update kz_no_condition_insert = kz_no_condition_insert kp_prozen = kp_prozen TABLES stb = p_stb matcat = matcat t_matwerte = t_matwerte data_log = data_log error_log = error_log k_tab = komptab int_mape = int_mape regeltab = int_pref EXCEPTIONS hs_opcode_failure = 01 no_plant = 02 no_stawn = 03 no_rule_defined = 04 no_procedure_defined = 05 failure_read_tab = 06 failure_read_marc = 07 failure_mod_tab = 08 failure_komponente = 09.

PREFERENCE_PRICE_UPDATE CALL FUNCTION 'PREFERENCE_PRICE_UPDATE' IN UPDATE TASK EXPORTING xprefe = prefe_marc xmarc = w_marc TABLES xmape = int_mape.

ENQUEUE_EMMARCE CALL FUNCTION 'ENQUEUE_EMMARCE' EXPORTING matnr = w_marc-matnr werks = w_marc-werks EXCEPTIONS foreign_lock = 2 system_failure = 3.

RV_CONDITION_COPY CALL FUNCTION 'RV_CONDITION_COPY' EXPORTING application = con_v condition_table = con_t074 "Konditionstabelle condition_type = con_pref "Konditionsart date_from = sy-datlo "Von jetzt an date_to = con_ultimo "Bis Ultimo enqueue = 'X' "Sperren ist besser i_komk = komk i_komp = komp key_fields = komg "Schlüssel maintain_mode = 'A' "Lieber A als B no_authority_check = 'X' "X wie nix keep_old_records = ' ' OVERLAP_CONFIRMED = 'X' IMPORTING e_komk = komk e_komp = komp new_record = i_new_record TABLES copy_records = w_komv EXCEPTIONS enqueue_on_record = 01 invalid_application = 02 invalid_condition_number = 03 invalid_condition_type = 04 no_authority_ekorg = 05 no_authority_kschl = 06 no_authority_vkorg = 07 no_selection = 08 table_not_valid = 09.

RV_CONDITION_SAVE CALL FUNCTION 'RV_CONDITION_SAVE'.

RV_CONDITION_RESET CALL FUNCTION 'RV_CONDITION_RESET'.

GET_PRINT_PARAMETERS call function 'GET_PRINT_PARAMETERS' EXPORTING line_count = sy-linct line_size = sy-linsz mode = 'CURRENT' no_dialog = 'X' IMPORTING out_archive_parameters = g_archparams out_parameters = g_printparams valid = kz_valid EXCEPTIONS archive_info_not_found = 1 invalid_print_params = 2 invalid_archive_params = 3 others = 4.

GET_PRINT_PARAMETERS CALL FUNCTION 'GET_PRINT_PARAMETERS' EXPORTING DATA_SET = con_error_log_name(6) IMMEDIATELY = ' ' in_archive_parameters = g_archparams in_parameters = g_printparams LINE_COUNT = sy-linct LINE_SIZE = sy-linsz LIST_TEXT = con_error_log_name MODE = 'CURRENT' NEW_LIST_ID = kz_error_new NO_DIALOG = 'X' IMPORTING OUT_ARCHIVE_PARAMETERS = archparams OUT_PARAMETERS = printparams VALID = kz_valid EXCEPTIONS ARCHIVE_INFO_NOT_FOUND = 1 INVALID_PRINT_PARAMS = 2 INVALID_ARCHIVE_PARAMS = 3 OTHERS = 4.

GET_PRINT_PARAMETERS call function 'GET_PRINT_PARAMETERS' EXPORTING line_count = sy-linct line_size = sy-linsz mode = 'CURRENT' no_dialog = 'X' IMPORTING out_archive_parameters = g_archparams out_parameters = g_printparams valid = kz_valid EXCEPTIONS archive_info_not_found = 1 invalid_print_params = 2 invalid_archive_params = 3 others = 4.

GET_PRINT_PARAMETERS CALL FUNCTION 'GET_PRINT_PARAMETERS' EXPORTING DATA_SET = con_custom_log_name(6) IMMEDIATELY = ' ' in_archive_parameters = g_archparams in_parameters = g_printparams LINE_COUNT = sy-linct LINE_SIZE = sy-linsz LIST_TEXT = con_custom_log_name MODE = 'CURRENT' NEW_LIST_ID = kz_custom_new NO_DIALOG = 'X' IMPORTING OUT_ARCHIVE_PARAMETERS = archparams OUT_PARAMETERS = printparams VALID = kz_valid EXCEPTIONS ARCHIVE_INFO_NOT_FOUND = 1 INVALID_PRINT_PARAMS = 2 INVALID_ARCHIVE_PARAMS = 3 OTHERS = 4.

GET_PRINT_PARAMETERS call function 'GET_PRINT_PARAMETERS' EXPORTING line_count = sy-linct line_size = sy-linsz mode = 'CURRENT' no_dialog = 'X' IMPORTING out_archive_parameters = g_archparams out_parameters = g_printparams valid = kz_valid EXCEPTIONS archive_info_not_found = 1 invalid_print_params = 2 invalid_archive_params = 3 others = 4.

GET_PRINT_PARAMETERS CALL FUNCTION 'GET_PRINT_PARAMETERS' EXPORTING DATA_SET = con_data_log_name(6) IMMEDIATELY = ' ' in_archive_parameters = g_archparams in_parameters = g_printparams LINE_COUNT = sy-linct LINE_SIZE = sy-linsz LIST_TEXT = con_data_log_name MODE = 'CURRENT' NEW_LIST_ID = kz_data_new NO_DIALOG = 'X' IMPORTING OUT_ARCHIVE_PARAMETERS = archparams OUT_PARAMETERS = printparams VALID = kz_valid EXCEPTIONS ARCHIVE_INFO_NOT_FOUND = 1 INVALID_PRINT_PARAMS = 2 INVALID_ARCHIVE_PARAMS = 3 OTHERS = 4.

REUSE_ALV_HIERSEQ_LIST_DISPLAY * CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' * EXPORTING * I_CALLBACK_PROGRAM = con_rep_pref02 * I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS' * I_CALLBACK_USER_COMMAND = 'USER_COMMAND' * IS_LAYOUT = GS_LAYOUT * it_events = gs_events * IT_FIELDCAT = INT_TAB_FIELDCAT * I_SAVE = GV_SAVE * IS_VARIANT = GS_DISVARIANT * I_TABNAME_HEADER = con_itab_ko ** I_TABNAME_ITEM = con_itab_po * IS_KEYINFO = GS_KEYINFO * TABLES * T_OUTTAB_HEADER = gT_ALV_KO * T_OUTTAB_ITEM = gT_ALV_PO.

UNIT_CONVERSION CALL FUNCTION 'UNIT_CONVERSION' EXPORTING matnr = f3_matnr meinh = f3_ame meins = f3_bme mgame = f3_ameng mglme = f3_bmeng IMPORTING o_mgame = f3_ameng o_mglme = f3_bmeng EXCEPTIONS conversion_not_found = 1 different_dimension = 2 division_by_zero = 3 overflow = 4 t006d_entry_missing = 5 t006_entry_missing = 6 OTHERS = 7.

MESSAGE_PREPARE CALL FUNCTION 'MESSAGE_PREPARE' EXPORTING LANGUAGE = sy-langu MSG_ID = save_msg-msgid MSG_NO = t100_msgno MSG_VAR1 = save_msg-msgv1 MSG_VAR2 = save_msg-msgv2 MSG_VAR3 = save_msg-msgv3 MSG_VAR4 = save_msg-msgv4 IMPORTING MSG_TEXT = lv_text EXCEPTIONS FUNCTION_NOT_COMPLETED = 1 MESSAGE_NOT_FOUND = 2 OTHERS = 3.

PREFERENCE_COSTING_BG CALL FUNCTION 'PREFERENCE_COSTING_BG' EXPORTING p_werks = pm_werks p_update = space ***** p_mdmps = pm_mdmps "Später Auflösen p_alpauf = pm_apauf p_pwlen = pm_pwlen topmat = cstmat p_prozen = p_prozen IMPORTING w_marc = w_marc kz_no_matstamm_update = kz_no_matstamm_update kz_no_condition_insert = kz_no_condition_insert kp_prozen = kp_prozen TABLES stb = p_stb matcat = matcat t_matwerte = t_matwerte data_log = data_log error_log = error_log k_tab = komptab int_mape = int_mape bg_werte = bg_werte bg_kond = bg_kond regeltab = int_pref EXCEPTIONS hs_opcode_failure = 01 no_plant = 02 no_stawn = 03 no_rule_defined = 04 no_procedure_defined = 05 failure_read_tab = 06 failure_read_marc = 07 failure_mod_tab = 08 failure_komponente = 09.

MATERIAL_READ CALL FUNCTION 'MATERIAL_READ' EXPORTING schluessel = mtcom IMPORTING matdaten = w_marc return = mtcor TABLES seqmat01 = tdummy EXCEPTIONS account_not_found = 01 batch_not_found = 02 forecast_not_found = 03 lock_on_account = 04 lock_on_material = 05 lock_on_plant = 06 lock_on_sales = 07 lock_on_sloc = 08 lock_system_error = 09 material_not_found = 10 plant_not_found = 11 sales_not_found = 12 sloc_not_found = 13 slocnumber_not_found = 14 sloctype_not_found = 15 text_not_found = 16 unit_not_found = 17.

PREFERENCE_PROTOCOL_UPDATE





CALL FUNCTION 'PREFERENCE_PROTOCOL_UPDATE' IN UPDATE TASK TABLES xmmpref_pro_01 = xmmpref_pro_01 xmmpref_pro_01_b = xmmpref_pro_01_b xmmpref_pro_02 = xmmpref_pro_02 xmmpref_pro_03 = xmmpref_pro_03.



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 RMPREF30 or its description.