SAP Function WPOCP_SAVE_CHANGED_PO_DATA - Saves Changed PO Items

Parameter Reference Type Length Default Optional Text
I_CHECK_DATA_ONLY I I 4 0 X Checkbox
I_DO_COMMIT XFELD C 1 ' ' X Checkbox
I_ITEMS_PER_PROCESS I I 4 1000 X

Parameter Reference Length Optional Text
CHANGING_HEADERS WPOCP_CHANGE_HEADER 190 Change PO Header Data
CHANGING_ITEMS WPOCP_CHANGE_ITEM 134 Change PO Item Data
E_ERROR_MESSAGES WPOCP_ERROR_MESSAGE 243 Error Message
I_EKKO EKKO 765 X Purchasing Document Header
I_EKPO EKPO 1560 X Purchasing Document Item

Exception Text
ERROR_IN_APPLICATION Error in Application
ERROR_IN_DATA Eror in Data (Validation Function)

Functionality
This function module changes purchase order data.
Header data and item data can be changed.
Items with errors are highlighted in the "error_status" field of thecall structure; an error message will also be copied to the"e_error_messages" table.

Notes
Discription of the import fields:

  • I_DO_COMMIT: either external caller, or the function module is
  • performing a COMMIT. Default setting is external caller.
    • I_CHECK_DATA_ONLY: Checks data.

    • 0: normal process (default setting).
      1: only calls check module; no further processing.
      2: calls check module and the order BAPI (test mode); no posting; aCOMMIT is not executed after a split (even if i_do_commit is set).
      • I_ITEMS_PER_PROCESS: Split and posting of the current items according
      • to the number set; default setting is 1000.
        • CHANGING_HEADERS: Table with the header information to be changed.

        • CHANGING_ITEMS: Table with the item information to be changed.

        • I_EKPO: Table of current header information; optional.

        • I_EKKO: Table of current item information; optional.

        • Description of the export tables:
          • CHANGING_HEADERS: "ERROR_STATUS" field set in the case of an error.

          • CHANGING_ITEMS: "ERROR_STATUS" field set in the case of an error.

          • E_ERROR_MESSAGES: Table of error messages.

          • The changes are always made to each purchase order.
            Only the fields, for which the X_Field is set in the structure, arechanged.

            Further information
            The BAPI "BAPI_PO_CHANGE" is used to change data.
            This function module is RFC enabled.