Skip to Content
0

How to create confirmation in SRM for PO using FM "BBP_PD_CONF_CREATE"

Apr 14, 2017 at 08:14 AM

107

avatar image
Former Member

I have a requirement to create confirmation for PO in SRM by using FM "BBP_PD_CONF_CREATE".

I am first trying to get PO data by passing PO number to FM "BBP_PD_PO_GETDETAIL" and then using MOVE-CORRESPONDING to populate "BBP_PD_CONF_CREATE" structures.

I am getting lot of error and unable to create confirmation.

CALL FUNCTION 'BBP_PD_PO_GETDETAIL'
EXPORTING
i_object_id = po_number
IMPORTING
e_header = e_header
TABLES
e_item = e_item
e_account = e_account
e_partner = e_partner
e_confirm = e_confirm
e_longtext = e_longtext
e_sdln = e_sdln
e_limit = e_limit
e_orgdata = e_orgdata
e_tax = e_tax
e_pridoc = e_pridoc
e_hcf = e_hcf
e_icf = e_icf
e_tol = e_tol
e_messages = e_messages
e_actval = e_actval
e_actval_sdln = e_actval_sdln
e_acc_actval = e_acc_actval
e_version = e_version
e_header_rel = e_header_rel
e_itmlim_rel = e_itmlim_rel
e_status = e_status
e_history_arch = e_history_arch.

MOVE-CORRESPONDING e_header TO i_header.
lv_guid = i_header-guid.
MOVE-CORRESPONDING e_item TO i_item.
MOVE-CORRESPONDING e_account TO i_account.
MOVE-CORRESPONDING e_partner TO i_partner.
MOVE-CORRESPONDING e_orgdata to i_orgdata.
MOVE-CORRESPONDING e_longtext to i_longtext.
MOVE-CORRESPONDING e_tax to i_tax.
MOVE-CORRESPONDING e_pridoc to i_pridoc.

CALL FUNCTION 'BBP_PD_CONF_CREATE'
EXPORTING
i_ref_guid = lv_guid
* I_PARK =
I_SAVE = 'X'
* I_TESTRUN =
i_header = i_header
* I_SRC_GUID =
* IT_ATTACH =
* IV_MSG_SCENARIO =
* I_ITEM_SORTED_BY_HIERARCHY =
IMPORTING
e_header = ew_header
* ET_ATTACH =
TABLES
i_item = i_item
i_account = i_account
i_partner = i_partner
i_longtext = i_longtext
i_orgdata = i_orgdata
i_tax = i_tax
i_pridoc = i_pridoc
* e_item = le_item
* e_account = le_account
* e_partner = le_partner
* e_longtext = le_longtext
* e_orgdata = le_orgdata
e_messages = le_messages.
* i_tol = i_tol
* i_hcf = i_hcf
* i_icf = i_icf
* e_hcf = le_hcf
* e_icf = le_icf.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ivy Li
Jul 21, 2017 at 02:38 AM
0

Hi,

SRM is different from MM side. It is based on Webdynpro, so running FM directly could not generate the document successfully.
FM BBP_PD_CONF_CREATE is called by include LBBP_BD_APIF27 as below:

=========================

* Create Confirmation
 CALL FUNCTION 'BBP_PD_CONF_CREATE'
 EXPORTING
 i_testrun = iv_testrun
 i_header = is_header_c
 it_attach = it_attach_c
 i_item_sorted_by_hierarchy = c_on
 IMPORTING
 e_header = es_header_e
 et_attach = et_attach_e
 TABLES
 i_item = it_item_c
 i_account = it_account_c
 i_partner = it_partner_c
 i_longtext = it_longtext_c
 i_orgdata = it_orgdata_c
 i_tax = it_tax_c
 e_item = et_item_e
 e_account = et_account_e
 e_partner = et_partner_e
 e_longtext = et_longtext_e
 e_orgdata = et_orgdata_e
 e_messages = lt_messages.

=========================

I suggest you debug the standard creation of SRM confirmation to understand the logic, and then adjust it to create your own program to generate confirmation directly.

BR,

Ivy

Share
10 |10000 characters needed characters left characters exceeded