cancel
Showing results for 
Search instead for 
Did you mean: 

Creation Confirmation from XI (BAPI_CONFEC_CREATE)

Former Member
0 Kudos

Hello

Does anybody have experience in this BAPI?

I got an exception during RFC call

<i>

The system could not determine the "Ordering Party"

</i>

What does it mean? Which required parameters do I need to specify?

I call BAPI with the following parameters:

HEADER is:

PROCESS_TYPE = "CONF"

CURRENCY

LANGU_ISO

DESCRIPTION

ITEM is:

PRODUCT_ID

CATEGORY_ID

DESCRIPTION

PO_NUMBER

PO_ITEM_NUMBER

PRICE

PRICE_UNIT

QUANTITY

PO_NUMBER, PO_ITEM_NUMBER, PRODUCT_ID, CATEGORY_ID exists in SRM

Is there documentation about BAPI_CONFEC, BAPI_INVOICEEC, BAPI_POEC*?

Message was edited by: Sergey A

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Here is the documentation.

FU BAPI_CONFEC_CREATE

____________________________________________________

Short Text

Create Confirmation

Functionality

You can create confirmations for goods or services using this method.

Note that this method is only for local purchase order handling. This is why you cannot use it to create confirmations with reference to purchase orders in the backend system.

Transfer

You transfer the header and item data of the confirmation, the business partner, organizational data, account assignment, long texts, and attachments.

Required fields are:

Transaction type

Purchase order number

Purchase order item

The system copies data that is not explicitly transferred to the confirmation from the purchase order (for example, account assignment).

Returned data

The detail data of the created confirmation is returned.

Messages

Messages are returned in parameter Return

Documents can be saved with errors. Note the following message categories:

E

These messages are output as a result of erroneous or missing data (for example, missing vendor) and usually mean that the purchase order requires postprocessing.

A

These messages refer to serious errors that prevent the document from being saved.

Pointing of header data, item data, and set tables

All the BAPI tables have to be supplied with pointers identifying them as either header or item data.

The following fields are used for pointing (these are of type character with a length of 32 and entry area 0-9 and A-F. SAP recommends that you use only numerical values.):

BUSINESSPROCESS

Technical key of the transaction on header level.

ITEM_GUID

Technical key of the item.

PARENT / PARENT_GUID (in each case one of these fields identifies the item).

Field of the item that is used as pointer and that refers to the hierarchy level above.

With structures consisting of header and item data, the field refers to the header level. See the explanations for the header/item data structure below.

In the case of multi-level hierarchies, the field refers to the next highest hierarchy level.

PARENT_GUID

Field of set table that points to the header or item according to whether header or item data exists. Set tables are available for:

Partners

Organizational data

Taxes

Account assignments

Limits

Status

Long texts

Attachments

Note:

The fields PARENT and PARENT_GUID have the same meaning at item level. PARENT_GUID can be either in a set table or in an item table. If part of an item table, the field points to the higher-level hierarchy level. If part of a set table, the field points to the header or item data.

Make sure that the applications of SAP Enterprise Buyer do not always use all set tables.

Header/item data structure

The following display illustrates the connectivity. We have used the example of a purchase order to demonstrate pointing. Note that the other purchasing documents use the same logic even when other data (such as account assignment data) also has pointers.

(PO) Header

123456

|__________ G_L_ACCT 400000

|

|__________ITEM 10

|

|__________ G_L_ACCT 400001

-


Header data

BUSINESSPROCESS OBJECT_ID OBJECT_TYPE ...

1 123456 BUS2201 ...----


Item data

ITEM_GUID PARENT OBJECT_TYPE NUMBER_INT ...

2 1 BUS2201001 10 ...

Explanation:

Value 1 in field PARENT of item data table refers to

value 1 in field BUSINESSPROCESS in the header data.

-


Account assignment data

GUID PARENT_GUID G_L_ACCT ...

5 1 400000 ...

8 2 400001 ...

Explanation:

Value 1 in field PARENT_GUID of the set table for account assignment refers to

value 1 in field BUSINESSPROCESS in the header data.

Value 2 in field PARENT_GUID of set table for account assignment refers to

value 2 in field ITEM_GUID in the item data.

Parameters

I_CONF_HEADER

I_CONF_HEADER_CUST

I_INP_TYPE

I_TESTRUN

E_CONF_HEADER

E_CONF_HEADER_CUST

I_CONF_ITEMS

I_CONF_ITEMS_CUST

I_CONF_ACCASS

I_CONF_ACCASS_CUST

I_CONF_PARTNER

I_CONF_TAXES

I_CONF_TEXT

I_CONF_ATTACH

I_CONF_ORGDATA

E_CONF_ITEMS

E_CONF_ITEMS_CUST

E_CONF_ACCASS

E_CONF_ACCASS_CUST

E_CONF_PARTNER

E_CONF_TAXES

E_CONF_ORGDATA

E_CONF_TEXT

E_CONF_STATUS

E_CONF_ATTACH

RETURN

Exceptions

Function Group

BBP_BUS2203

Thanks

Murali

Former Member
0 Kudos

Hi Sergey,

You should debug this BAPI call in SE37.

Ordering party should be retrieved from the PO.

Look at following call stack for ordering party:

BAPI_CONFEC_CREATE

BBP_BAPI_CONF_CREATE_IN

BBP_API_CONF_CRT

FORM conf_crt_complete

BBP_DOCUMENT_COMPLETE

FORM create_header_with_ref

FORM fill_default_values_header

FORM create_partner_with_ref

                        • check ordering party ************************************

  • -> Check if the incoming ordering party matches the ordering party of the referenced document

  • -> Make sure that there is an ordering in a multi company and a marketset scenario

  • -> Make sure that the incoming ordering party is not saved to the DB in all other scenarios

BAPI_CONFEC_CREATE has got a "light" documentation available via SE37.

Rgds

Christophe

Former Member
0 Kudos

Thank you for answer.

>* -> Check if the incoming ordering party matches the >ordering party of the referenced document

I don't know what is the Ordering Party. Is it a partner(PARTNERS table in BAPI)?

I don't pass partners. I think BAPI will get all parther from PO by PO_NUMBER. Am I correct?

I have created PO in SRM. Passed po number is correct.

Do I need to pass PO_ITEM_GUID ? Will BAPI find items by PO_ITEM_NUMBER?

Unfortunatelly I am not an ABAP developer. Debug is not usefull for me

Message was edited by: Sergey A

Former Member
0 Kudos

Sergey,

PO number is not enough, you have to pass item numbers as well (NUMBER and not GUID I guess), otherwise the system won't be able to assign GR items to PO items (this let the system complete GR item data with PO item data, and process checks like tolerance).

Ordering party in only used in few scenarios (like Marketset) and is just checked, so you should not have to take care about it.

PO can be generated by aggregating few SC, so the system must navigate to the SC to retrieve partners.

Debugging is the best and most straighfull method...

Rgds

Christophe

Former Member
0 Kudos

Christophe Denysiak

I pass PO_ITEM_NUMBER too.

Do you suggest to perform BAPI_COMMIT even if BAPI doesn't find the 'Orderring party'?

By which parameters do BAPI find the 'Ordering Party' ? Is it a PARTNERS table?

Former Member
0 Kudos

Hi Sergey,

Ordering Party should be determined from the PO. You don't have to pass it in the BAPI interface.

In this case, this should be the purchasing company.

The data is not complete, so you should not commit the call.

Rgds

Christophe

Former Member
0 Kudos

Christophe Denysiak

In debug mode I got an error in BBP_API_CONF_CRT

CLEANUP exception in class CX_BBP_BD_VALUE_MAPPING_ERROR

Stack trace is

BBP_API_CONF_CRT -> conf_crt_to_ext_mapv ->

BBP_GET_PURCHASING_PARTY ->

<b>

IF iv_ordering_party_required = gc_yes.

RAISE EXCEPTION TYPE cx_bbp_bd_value_mapping_error</b>

Could you help me where is the problem? Is it possible to set that the Ordering party is not required?

Former Member
0 Kudos

Sergey,

I debugged it for you:

The ordering party is retrieved from the reference doc: the local SRM PO.

Function BBP_GET_PURCHASING_PARTY is used with PO GUID to retrieve this Ordering Party.

- it first looks at Ordering Party defined as PO partner (this is only the case of Marketset or multi-company scenario)

- otherwise, it determines it from the requestor (function 0013): Get company for this party => this is the ordering party. FM BBP_OM_DETERMINE_COMPANY is used to retrieve the company from the user.

- Then company address is read with BUPA_ADDRESSES_READ and ADDR_GET_COMPLETE_ALL_TYPES.

- Finally append this new partner (function 0038)

IF THE REFERENCE ORDERING PARTY CAN NOT BE DETERMINED, YOU GET THIS ERROR ABOUT ORDERING PARTY (from class CX_BBP_BD_VALUE_MAPPING_ERROR --> text CX_NO_ORDERING_PARTY The system could not determine the "Ordering Party").

The reference (PO) ordering party is then compared with the inbound partners (you don't send any so nothing to check).

In a marketset or multi company scenario or in SUS,

fill the ordering party, otherwise delete it --> in our case, we now get rid of this ordering party.

*******************************************************

So... I think that something is wrong on your PO. The requestor may not be linked to a company in the org structure.

What is your SRM release ?

What is your scenario ?

Note that this BAPI is only for local purchase order handling. This is why you cannot use it to create confirmations with reference to purchase orders in the backend system.

Rgds

Christophe

PS: Please reward points for helpfull answers

Former Member
0 Kudos

We have SRM 4.0 an we have to create confirmation and invoice from third party system.

I am invoking BAPI from RFC Adapter through XI by special user that not belongs to company in organization structure.

Why it didn't find the Ordering Party <b>defined as PO partner</b>?

Message was edited by: Sergey A

Message was edited by: Sergey A

Former Member
0 Kudos

Sergey,

We don't care about the RFC user calling the BAPI, but the user that created the SC that created the PO. It must be in SRM org structure.

You can find it in transaction BBP_PD, BUS2201 + PO ID.

You can debug the function to get the purchasing party from the PO GUID.

Are you in classic or extended classic or standalone scenario ?

Christophe

Former Member
0 Kudos

We have extended classic mixed with standalone.

The user crated SC and PO is in org structure. I see him in PPOSA_BBP transaction.

Former Member
0 Kudos

Ahah...

Execute BBP_GET_PURCHASING_PARTY in SE37 with your PO GUID to check if the system can determine the ordering/purchasing party.

This BAPI is designed for standalone PO, but not for extended POs.... so the result is not guaranteed.

Rgds

Christophe