SAP Reports / Programs

GHO_MASS_ALLOCATION_RULES SAP ABAP Report - Mass Creation of Allocation Rules







GHO_MASS_ALLOCATION_RULES is a standard Executable ABAP Report 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 GHO_MASS_ALLOCATION_RULES into the relevant SAP transactions such as SE38 or SE80


Transaction Code(s):

Below is a list of transaction codes which are relevant to this SAP report

MARCR - Process mass alllocation rules


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


Text pool values


Selection Text: ALLO_BAS = Allocation Basis
Selection Text: CON_GRP = Conversion Group
Selection Text: FRM_DAT = Valid From Date
Selection Text: FRM_DATE = Valid From Date
Selection Text: FROM_TIM = Valid from Time
Selection Text: GHO_FREQ = Frequency
Selection Text: GHO_MAT = Material
Selection Text: GHO_MED = Medium
Selection Text: GHO_MEDI = Medium
Selection Text: NETOBJ_R = Network Object Rules
Selection Text: NO_TESTS = No. of Test
Selection Text: PNET_R = Production Network
Selection Text: PROD_NET = Production Network
Selection Text: PRO_NET = Production Network
Selection Text: PRO_NETR = Production Network
Selection Text: P_TEST_N = Test Run
Selection Text: P_TEST_O = Test Run
Selection Text: P_TEST_U = Test Run
Selection Text: TH_CALC = Theoretical Calculation Method
Selection Text: TO_DATE = Valid to Date
Selection Text: TO_TIME = Valid To Time
Selection Text: UOM_GRP = UoM Group
Selection Text: UOM_R = UoM Rules
Title: Mass Creation of Allocation Rules
Text Symbol: 072 = Enter the correct UOM
Text Symbol: 071 = Enter a valid material
Text Symbol: 070 = Create Node Rules
Text Symbol: 069 = Enter all network items
Text Symbol: 068 = Report For Production Network Rules
Text Symbol: 067 = Node Rules can be created
Text Symbol: 066 = Enter valid TCM
Text Symbol: 065 = Enter valid allocation basis
Text Symbol: 064 = Enter Valid From Date
Text Symbol: 001 = Enter a valid medium
Text Symbol: 002 = Header values already exist
Text Symbol: 003 = Production Network
Text Symbol: 004 = Select Rules
Text Symbol: 005 = Production Network





Text Symbol: 006 = Valid from time
Text Symbol: 007 = Serial No.
Text Symbol: 008 = Valid To Date
Text Symbol: 009 = No. of Test
Text Symbol: 010 = Enter Production Network
Text Symbol: 011 = Enter network header details
Text Symbol: 012 = Enter network items by pressing Enter
Text Symbol: 019 = Medium
Text Symbol: 021 = Network Rules has been created Successfully
Text Symbol: 024 = UOM Rules have been created Successfully
Text Symbol: 027 = Report For UOM Rules
Text Symbol: 030 = Node Rules created successfully
Text Symbol: 032 = Report For Network Object Rules
Text Symbol: 037 = Click on 'ENTER ITEMS' button to enter item details
Text Symbol: 038 = Enter UOM items
Text Symbol: 039 = Medium is not maintained for the production network
Text Symbol: 044 = NETWORK OBJECT
Text Symbol: 051 = Quantity type
Text Symbol: 053 = Enter a valid frequency
Text Symbol: 054 = Network Rules can be created Successfully
Text Symbol: 055 = To date is before end date
Text Symbol: 057 = Select a row
Text Symbol: 058 = Network Object Type
Text Symbol: 059 = Network Object
Text Symbol: 060 = Dimension
Text Symbol: 061 = Quantity type not maintained for production network
Text Symbol: 062 = Production network does not exist
Text Symbol: 063 = Enter Valid To Date


INCLUDES used within this REPORT GHO_MASS_ALLOCATION_RULES

INCLUDE GHO_MASS_ALLOCATION_RULES_TOP . " GLOBAL DATA
INCLUDE GHO_MASS_ALLOCATION_RULES_F01 . " FORM-ROUTINES


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:

CONVERSION_EXIT_TPLNR_INPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_INPUT' EXPORTING input = gho_prod_net-high IMPORTING output = lv_nodeid.

CONVERSION_EXIT_TPLNR_INPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_INPUT' EXPORTING input = gho_prod_net-low IMPORTING output = lv_nodid.

GET_DOMAIN_VALUES CALL FUNCTION 'GET_DOMAIN_VALUES' EXPORTING domname = 'GHO_ALLOC_BASIS' TABLES values_tab = lt_values EXCEPTIONS no_values_found = 1 OTHERS = 2.

GET_DOMAIN_VALUES





CALL FUNCTION 'GET_DOMAIN_VALUES' EXPORTING domname = 'GHO_ALLOC_TCM' TABLES values_tab = lt_values EXCEPTIONS no_values_found = 1 OTHERS = 2.

ENQUEUE_EGHO_ALL_NW_RULE CALL FUNCTION 'ENQUEUE_EGHO_ALL_NW_RULE' EXPORTING mode_gho_nwrule_h = 'E' client = sy-mandt nw_rule_id = ls_network_header_detail-gho_network_rule_id _scope = '2' _wait = ' ' _collect = ' ' EXCEPTIONS foreign_lock = 1 system_failure = 2 OTHERS = 3.

DEQUEUE_EGHO_ALL_NW_RULE CALL FUNCTION 'DEQUEUE_EGHO_ALL_NW_RULE' EXPORTING mode_gho_nwrule_h = 'E' client = sy-mandt nw_rule_id = ls_network_header_detail-gho_network_rule_id x_nw_rule_id = ' ' _scope = '3' _synchron = ' ' _collect = ' '.

CONVERSION_EXIT_TPLNR_OUTPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_OUTPUT' EXPORTING input = ls_net-tplnr IMPORTING output = ls_log-prod_net.

CONVERSION_EXIT_TPLNR_OUTPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_OUTPUT' EXPORTING input = ls_net-tplnr IMPORTING output = ls_log-prod_net.

BALW_BAPIRETURN_GET2 CALL FUNCTION 'BALW_BAPIRETURN_GET2' EXPORTING type = ls_message-msgty cl = ls_message-msgid number = ls_message-msgno IMPORTING return = ls_message_ret.

CONVERSION_EXIT_TPLNR_OUTPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_OUTPUT' EXPORTING input = ls_net-tplnr IMPORTING output = ls_log-prod_net.

CONVERSION_EXIT_TPLNR_INPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_INPUT' EXPORTING input = gho_prod_net-high IMPORTING output = lv_nodeid.

CONVERSION_EXIT_TPLNR_INPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_INPUT' EXPORTING input = gho_prod_net-low IMPORTING output = lv_nodid.

BALW_BAPIRETURN_GET2 CALL FUNCTION 'BALW_BAPIRETURN_GET2' EXPORTING type = ls_message-msgty cl = ls_message-msgid number = ls_message-msgno * IMPORTING return = ls_message_ret.

CONVERSION_EXIT_TPLNR_OUTPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_OUTPUT' EXPORTING input = ls_net-tplnr IMPORTING output = ls_uom_log-prod_net.

ENQUEUE_EGHO_NW_UOM_RULE CALL FUNCTION 'ENQUEUE_EGHO_NW_UOM_RULE' EXPORTING mode_gho_uom_rule_h = 'E' client = sy-mandt uom_rule_id = ls_uom_h-uom_rule_id x_uom_rule_id = ' ' _scope = '2' _wait = ' ' _collect = ' ' EXCEPTIONS foreign_lock = 1 system_failure = 2 OTHERS = 3.

DEQUEUE_EGHO_NW_UOM_RULE CALL FUNCTION 'DEQUEUE_EGHO_NW_UOM_RULE' EXPORTING mode_gho_uom_rule_h = 'E' client = sy-mandt uom_rule_id = ls_uom_h-uom_rule_id x_uom_rule_id = ' ' _scope = '3' _synchron = ' ' _collect = ' '.

CONVERSION_EXIT_TPLNR_OUTPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_OUTPUT' EXPORTING input = ls_net-tplnr IMPORTING output = ls_uom_log-prod_net.

CONVERSION_EXIT_TPLNR_OUTPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_OUTPUT' EXPORTING input = ls_net-tplnr IMPORTING output = ls_uom_log-prod_net.

BALW_BAPIRETURN_GET2 CALL FUNCTION 'BALW_BAPIRETURN_GET2' EXPORTING type = ls_message-msgty cl = ls_message-msgid number = ls_message-msgno * IMPORTING return = ls_message_ret.

CONVERSION_EXIT_TPLNR_OUTPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_OUTPUT' EXPORTING input = ls_net-tplnr IMPORTING output = ls_uom_log-prod_net.

CONVERSION_EXIT_TPLNR_INPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_INPUT' EXPORTING input = gho_prod_net-high IMPORTING output = lv_nodeid EXCEPTIONS OTHERS = 1.

CONVERSION_EXIT_TPLNR_INPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_INPUT' EXPORTING input = gho_prod_net-low IMPORTING output = lv_nodid EXCEPTIONS OTHERS = 1.

F4IF_INT_TABLE_VALUE_REQUEST CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING retfield = 'GHO_PN_MEDIUM' value_org = 'S' TABLES value_tab = gt_med[] return_tab = gt_ret[] EXCEPTIONS parameter_error = 1 no_values_found = 2 OTHERS = 3.




CONVERSION_EXIT_TPLNR_INPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_INPUT' EXPORTING input = gho_prod_net-high IMPORTING output = lv_nodeid EXCEPTIONS OTHERS = 1.

CONVERSION_EXIT_TPLNR_INPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_INPUT' EXPORTING input = gho_prod_net-low IMPORTING output = lv_nodid EXCEPTIONS OTHERS = 1.

F4IF_INT_TABLE_VALUE_REQUEST CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING retfield = 'GHO_PN_MEDIUM' value_org = 'S' TABLES value_tab = gt_med[] return_tab = gt_ret[] EXCEPTIONS parameter_error = 1 no_values_found = 2 OTHERS = 3.

F4IF_INT_TABLE_VALUE_REQUEST CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING retfield = 'ALLOCATION_MAT' value_org = 'S' TABLES value_tab = gt_data[] return_tab = gt_ret[] EXCEPTIONS parameter_error = 1 no_values_found = 2 OTHERS = 3.

CONVERSION_EXIT_TPLNR_INPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_INPUT' EXPORTING input = gho_prod_net-high IMPORTING output = lv_nodeid EXCEPTIONS OTHERS = 1.

CONVERSION_EXIT_TPLNR_INPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_INPUT' EXPORTING input = gho_prod_net-low IMPORTING output = lv_nodid EXCEPTIONS OTHERS = 1.

F4IF_INT_TABLE_VALUE_REQUEST CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING retfield = 'GHO_PN_FREQ' value_org = 'S' TABLES value_tab = gt_freq[] return_tab = gt_ret[] EXCEPTIONS parameter_error = 1 no_values_found = 2 OTHERS = 3.

CONVERSION_EXIT_TPLNR_INPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_INPUT' EXPORTING input = gho_prod_net-high IMPORTING output = lv_nodeid EXCEPTIONS OTHERS = 1.

CONVERSION_EXIT_TPLNR_INPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_INPUT' EXPORTING input = gho_prod_net-low IMPORTING output = lv_nodid EXCEPTIONS OTHERS = 1.

RS_SET_SELSCREEN_STATUS CALL FUNCTION 'RS_SET_SELSCREEN_STATUS' EXPORTING p_status = sy-pfkey TABLES p_exclude = gt_ucomm.

CONVERSION_EXIT_TPLNR_INPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_INPUT' EXPORTING input = gho_prod_net-high IMPORTING output = lv_nodeid EXCEPTIONS OTHERS = 1.

CONVERSION_EXIT_TPLNR_INPUT CALL FUNCTION 'CONVERSION_EXIT_TPLNR_INPUT' EXPORTING input = gho_prod_net-low IMPORTING output = lv_nodid EXCEPTIONS OTHERS = 1.

RS_SET_SELSCREEN_STATUS CALL FUNCTION 'RS_SET_SELSCREEN_STATUS' EXPORTING p_status = sy-pfkey TABLES p_exclude = gt_ucomm.



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