Skip to end of metadata
Go to start of metadata

Purpose

The purpose of this page is to explain:

  • how is actual value shown in the SRM PO related document screen
  • how the Actual value updated in the transaction bbp_pd

Overview

In this document you will find the relevant coding parts and notes.

How is actual value shown in the SRM PO related document screen?

Whenever the PO is opened the BBP_PD_PO_GETDETAIL will call backend dynamically to get the backend actual value data.
BBP_PD_PO_GETDETAIL

*****************************************\*
* direct procurement
* actual values are required, then read the actual values in the
* backend system.
* Header relation: document from the backend does not have any guid.

IF l_header-object_type EQ c_po.
* check direct procurement/ extended PO.
LOOP AT l_item WHERE subtype = c_subtype_i_dp OR
subtype(1) = c_subtype_i_extd.
lv_dp_po = c_on.
EXIT.
ENDLOOP.

* dp: complete po with be data
IF NOT lv_dp_po IS INITIAL.
* only if backend data should be read
IF NOT i_read_be_data IS INITIAL.
* only if data comming from the backend are wanted
IF ls_tab_requested-actval_tab = c_on OR
ls_tab_requested-acc_actval_tab = c_on OR
ls_tab_requested-header_rel_tab = c_on OR
ls_tab_requested-item_tab = c_on.

LOOP AT l_item.
MOVE-CORRESPONDING l_item TO l_item_po_d.
APPEND l_item_po_d.
ENDLOOP.

CALL FUNCTION 'BBP_DP_BE_PO_HISTORY_READ'
EXPORTING
i_object_id = l_header-object_id
i_log_system = l_header-be_log_system
TABLES
i_item = l_item_po_d
e_item = lt_item_be
e_actval = lt_actval_be
e_header_rel = lt_header_rel_be
e_limit = e_limit.
IF NOT lt_item_be [] IS INITIAL.
IF i_with_itemdata = c_on OR

ENDLOOP.
ENDIF.
IF ls_tab_requested-actval_tab = c_on.
e_actval[] = lt_actval_be[].
ENDIF.
IF ls_tab_requested-acc_actval_tab = c_on.
e_acc_actval[] = lt_acc_actval_be[].
ENDIF.
IF ls_tab_requested-header_rel_tab = c_on.
LOOP AT lt_header_rel_be.
MOVE-CORRESPONDING lt_header_rel_be TO e_header_rel.
e_header_rel-objid_a = lt_header_rel_be-be_obj_a.
e_header_rel-docdate_a = lt_header_rel_be-be_doc_date_a.
e_header_rel-objid_b = lt_header_rel_be-be_obj_b.
e_header_rel-docdate_b = lt_header_rel_be-be_doc_date_b.
APPEND e_header_rel.
ENDLOOP.

ENDIF.
ENDIF.
*******************************************************************

How the Actual value updated in the transaction bbp_pd?

Please see the details in the PO Actual Value, Final Entry and Final Invoice Flag Update Wiki page.

Related Content

Related Documents

PO Actual Value, Final Entry and Final Invoice Flag Update

Related SAP Notes/KBAs

SAP KBA: 1934728 - Incorrect SRM PO Follow on Document Statistic Actual Value and Flags