Functionality You can use this function module to change data relating to a productionorder. In addition to changing certain header data of the order, you candelete, change, or add the following assigned objects: sequences,operations, production resources/tools. The individual object changes are made in the following order: Header data> (parameter IS_HEADER) Change Sequences> (parameter IT_SEQUENCE) Delete Create Change Operations or suboperations> (parameter IT_OPERATION) Delete Create Change Assignment of production resources/tools> (parameter IT_PRT) Delete Create Change Furthermore, you can set or reset user statuses for the order header andfor individual operations:
- User status order header> (parameter IT_HDR_USER_STATUS )
The user status is set immediately after the changing of the headerdata.
- User status operations> (parameter IT_OPR_USER_STATUS)
The user status is set immediately after the creation/changing of anoperation.Example For an existing order, you wish to add a further parallel sequence 5with three operations. A material is assigned to the first operation asa production resource/tool. As minimum scope, the transfer parametersIT_SEQUENCE, IT_OPERATION, and IT_PRT must include values of thefollowing 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 processingand the document tables of status management are initialized. For thisreason, a COMMIT WORK should be set off prior to invocation of thisfunction module if other BAPIs have already been invoked or there arealready entries in the document tables of order processing and in thedocument 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. Ifthe parameter IV_COMMIT> has been set, a Commit Work is set off inthe process. If the Commit Work is placed outside the function module(Parameter IV_COMMIT > initial), it should take place directlybecause data consistency is otherwise lost in the event of furtherprocessing of document tables. Error handling> If an error occurs, processing is immediately terminated and thecorresponding message returned in the parameter ES_RETURN>. Evenif some objects have been changed correctly, these changes are notadopted. In the event of an error, the document tables of orderprocessing and status management are initialized. If no error occurs, the parameter ES_RETURN> is returned withinitial 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/deleteoperations for an existing sequence but the sequence itself is not to bechanged, 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 populatethe parameter IT_SEQUENCE. The dependent operations and and productionresource/tool assignments to be deleted are deleted at the same time andmay not be additionally included in the parameter IT_OPERATION andIT_PRT.Description The parameter passes on information and message texts relating to errorsthat have occurred. Default If no error occurs, the parameter is returned with initial values. Description You can use this parameter to change the header of the production order. Notes
|