Ansicht
Dokumentation

CO_SE_PRODORD_CHANGE - Change Production Order: Header, Sequences, Operations, Prod. Res./Tools

CO_SE_PRODORD_CHANGE - Change Production Order: Header, Sequences, Operations, Prod. Res./Tools

Vendor Master (General Section)   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

You can use this function module to change data relating to a production order. In addition to changing certain header data of the order, you can delete, change, or add the following assigned objects: sequences, operations, production resources/tools.

The individual object changes are made in the following order:

  1. Header data (parameter IS_HEADER)
  • Change

  1. Sequences (parameter IT_SEQUENCE)
  • Delete

  • Create

  • Change

  1. Operations or suboperations (parameter IT_OPERATION)
  • Delete

  • Create

  • Change

  1. Assignment of production resources/tools (parameter IT_PRT)
  • Delete

  • Create

  • Change

Furthermore, you can set or reset user statuses for the order header and for individual operations:

  • User status order header (parameter IT_HDR_USER_STATUS )
The user status is set immediately after the changing of the header data.
  • User status operations (parameter IT_OPR_USER_STATUS)
The user status is set immediately after the creation/changing of an operation.

Example

For an existing order, you wish to add a further parallel sequence 5 with three operations. A material is assigned to the first operation as a production resource/tool. As minimum scope, the transfer parameters IT_SEQUENCE, IT_OPERATION, and IT_PRT must include values of the following type in this case:

SEQUENCE RETURN_OPER
5 0020

SEQUENCE OPERATION CONTROL_KEY
5 0010 PP01
5 0020 PP01
5 0030 PP01

SEQUENCE OPERATION PRT_CATEGORY MATERIAL
5 0010 M TEST_PRT

Notes

Authorization checks

  • Authorization object C_AFKO_AWK with
  • Order type

  • Plant

  • Authorization object C_AFKO_AWA with
  • Activity 02 (Change),

  • Order category 10 (production order)

  • Order type

  • Plant

Initialization of document tables

At the start of the processing, the document tables of order processing and the document tables of status management are initialized. For this reason, a COMMIT WORK should be set off prior to invocation of this function module if other BAPIs have already been invoked or there are already entries in the document tables of order processing and in the document tables of status management as a result of other actions.

Update control

If no error occurs, update is triggered at the end of the processing. If the parameter IV_COMMIT has been set, a Commit Work is set off in the process. If the Commit Work is placed outside the function module (Parameter IV_COMMIT initial), it should take place directly because data consistency is otherwise lost in the event of further processing of document tables.

Error handling

If an error occurs, processing is immediately terminated and the corresponding message returned in the parameter ES_RETURN. Even if some objects have been changed correctly, these changes are not adopted. In the event of an error, the document tables of order processing and status management are initialized.

If no error occurs, the parameter ES_RETURN is returned with initial values.

Coaction of parameters

  • You only need to populate parameters for those objects that are actually to be changed. If, for example, you wish to create/change/delete operations for an existing sequence but the sequence itself is not to be changed, populate the parameter IT_OPERATION only.
  • When deleting objects, take care that their dependent objects are likewise deleted or (depending on the status) a deletion flag is set. If, for example you wish to delete a sequence, you should only populate the parameter IT_SEQUENCE. The dependent operations and and production resource/tool assignments to be deleted are deleted at the same time and may not be additionally included in the parameter IT_OPERATION and IT_PRT.

Further information





Parameters

ES_RETURN
IS_HEADER
IT_HDR_USER_STATUS
IT_OPERATION
IT_OPR_USER_STATUS
IT_PRT
IT_SEQUENCE
IV_COMMIT
IV_ORDER_NUMBER

Exceptions

Function Group

CO_SE

Addresses (Business Address Services)   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 7414 Date: 20240605 Time: 071454     sap01-206 ( 96 ms )