SAP Function WPOCC_CHECK_CHANGEABLE_PO - Check Purchase Orders to Be Changed

Parameter Reference Length Optional Text
CHANGING_HEADER WPOCP_CHANGE_HEADER 190 Header Data to Be Changed
CHANGING_ITEMS WPOCP_CHANGE_ITEM 134 Item Data to Be Changed
E_ERROR_MESSAGES WPOCP_ERROR_MESSAGE 243 Error Messages
I_EKKO EKKO 765 X Purchasing Document Header
I_EKPO EKPO 1560 X Purchasing Document Item

Exception Text
ERROR_IN_APPLICATION Error in Application

Functionality
This function module checks the changeability of purchase order data atheader and item level.
Every purchase order contained in the Changing_Header or Changing_Itemstables is checked to see whether it has been released and whether anyfollow-on documents (order history) exist. If it has already beenreleased or if an order history already exists, you get an Error_Status'W'. An Error_Status at header level is transferred to any items thatexist.
The setting of the delivery completed indicator (EKPO-ELIKZ) is checkedat item level. If an error occurs during the check, the error is shownby the Error_Status 'E'.
If an Error_Status has been set, it is logged in the E_ERROR_MESSAGESerror table.

Notes
IMPORTANT: The internal table,CHANGING_HEADER, must be sorted bydocument number. There must be no multiple entries of document numbersin the table.
The same is true for the CHANGING_ITEMS table. This table, however,must be sorted by document number, document items and schedule lines.Multiple entries are not permitted.
If the optional tables I_EKKO and I_EKPO exist, they must also besorted correctly.

Further information
To check header data (release, order history) the function module callsthe related function module WPOCC_CHECK_CHANGEABLE_PO_HEAD.