MHS850MI Transaction AddDO

The purpose of the API MHS850MI transaction AddDO is to create a distribution order header and distribution order lines.

The following input data is required:

  • Order type
  • Warehouse and customer (the to warehouse)
  • For the order line creation, item and quantity
  • An order number can be provided in order to add a line to an existing order, or in order to control the order number. The order number is always fed back to the message line after the message execution.

When successive transactions are performed, the same order header may be used. In that case, the transaction AddDO only creates an order line to the previously created order. When running multiple MHS850MI transactions in sequence with AddDO, the DO lines are added to the same distribution order header. This only applies if the transactions have the same order number (RIDN), reference order number (RORN), transaction type (TRTP), and customer number (CUNO). This is called the aggregation key. If the API is disconnected between the two API calls, a new order header will be created for the next transaction.

A way to force the creation of a new distribution order header is to enter '?' in the field order number (RIDN) when running MHS850MI transaction AddDO. That will systematically create a new distribution order header and line for each AddDO execution. This is regardless of whether the transaction has the same aggregation key as the previous transaction.

In this example, a new distribution order header with multiple order lines is created.

  1. Run API MHS850MI transaction AddDO with RIDN = '?' and process flag = blank.
  2. Run API MHS850MI transaction AddWhsLine with the message number from the first transaction, qualifier 51CR, and order number = blank. That corresponds to the second order line. Repeat this for every subsequent order line.
  3. Execute the message number with API MHS850MI transaction PrcWhsTrans. This will result in one order header with several lines.

The holder field (HLDR) is available for transaction types 40 and 41. This is useful when using an RO to receive or issue returnable package items, the holder can be provided and the packaging ledger is updated. HLDR is validated based on the existing values in 'Item Owner. Open' (CRS685).

Accounting objects are available in MHS850MI AddDO and can be used for cost allocation in the bookings created in M3 BE. These accounting objects are available on the DO/RO line, and can be used to build the accounting string (as per set up in 'Accounting Rule. Set' (CRS395).)