Child pages
  • PO Status Schema and Debug PO Status Update during Transfer Process
Skip to end of metadata
Go to start of metadata

Purpose

  • To understand the logic of PO status determination in different scenario.

Overview

  • You will understand the logic of PO status determination in different scenario and how to debug when there is an incorrect status during Transfer  Process

 

PO Status Schema

Status chart of the SRM documents as of SRM 4.jpg

Debug  PO Status Update during Transfer  Process

Function module SPOOL_DPO_TRANSFER_DO

Function module SPOOL_DPO_WRITE_BAPI_IMPORTS
 

Update status
 

           ls_new_status-stat  = c_s_trans_exec.
           ls_new_status-inact = c_on.
          APPEND ls_new_status TO lt_new_status.

          READ TABLE lt_crm_status WITH KEY stat  = c_s_trans_err_ex
                                      inact = c_off.
          IF sy-subrc = 0.
          ls_new_status-stat  = c_s_trans_err_ex.
          ls_new_status-inact = c_on.
          APPEND ls_new_status TO lt_new_status.
          ENDIF.

Set backend reference fields

         lv_object_id = i_header-object_id.
         lv_object_type = c_b_po.
         lv_log_system = i_logical_system.

        CALL FUNCTION 'BBP_PD_PO_SET_BE_REF'
               EXPORTING
        i_guid           = i_header-guid
        i_be_object_id   = lv_object_id
        i_be_object_type = lv_object_type
        i_be_log_system  = lv_log_system
        i_be_pur_org     = i_header-be_pur_org
        i_be_pur_group   = i_header-be_pur_group
      TABLES
        e_messages       = lt_messages.