cancel
Showing results for 
Search instead for 
Did you mean: 

'BAPI_POEC_CREATE' function doesn't work with extended classic scenario

Former Member
0 Kudos

Hi everybody.

Antecedents:

We are working in an extended classic scenario.

When we create a Purchase Order via ITS in SRM, the system works ok, the PO is replicated in the ERP system.

But when we execute “BAPI_POEC_CREATE” function module in order to create a PO in SRM, no message are available in the application monitor, but the PO is not replicated in the ERP system.

Both exampled were created with exactly same data (partners, items, categories, accounts, …)

Moreover when we modify the second PO created via ITS, the systems doesn’t show any error message, we can order our PO again without error, but the PO isn’t replicate in the ERP system.

1. We executed “BAPI_POEC_GETDETAIL” function module, and there is only a difference between POs, E_PO_STATUS table.

PO created by transaction has 8 entries:

I1009 X

I1015 X

I1021

I1038

I1039 X

I1043

I1080 X

I1180

And PO created by BAPI has 5 entries:

I1015 X

I1021

I1038

I1043

I1180

2. We run “BBP_PD” transaction, and there is only a difference.

PO created by transaction mode shows:

- Message: W BBP_PD 830 Default values have been taken from Vendor PRUEBA10/purchasing organization Área Global Compras (org. compras)

And PO created by BAPI

- Message: No Messages

Could anyone help me with the problem?

Thanks in advance.

Raúl.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

All,

In our project we've converted Purchase Orders in our SRM system (Extended Classic Mode) and have sent those to R/3. We've only used the BAPI: BAPI_POEC_CREATE. I dont believe there is any need to use any BADIs unless you want to change any additional data in the interface to R/3.

The Key is to ensure that the Backend fields are mapped in the Purchase Order. For example:

BE_LOG_SYSTEM

BE_OBJECT_TYPE

BE_OBJECT_ID

BE_REFOBJ_TYPE

BE_REFOBJ

BE_REFOBJ_ITEM

BE_PUR_GROUP

BE_PUR_ORG

Regards,

Sachin

Former Member
0 Kudos

Hi Sethi,

I don't find these fields in the BAPI, can you/somebody please help me understand where to maintain these fields?

BE_LOG_SYSTEM

BE_OBJECT_TYPE

BE_OBJECT_ID

BE_REFOBJ_TYPE

BE_REFOBJ

BE_REFOBJ_ITEM

BE_PUR_GROUP

BE_PUR_ORG

thanks,

Venky

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi there,

If you have an SRM PO you can transfer it over to the backend using Function Module BBP_PD_PO_TRANSFER_EXEC.

You will need to PO GUID.

If you want to check for any backend errors, run this FM in debug mode.

Set breakpoint at Meta_dpo_transfer,

F5 into function CALL FUNCTION call_function

go all the way down to

CALL FUNCTION 'BBP_PO_INBOUND' DESTINATION lv_destination

F6 over this and double click on lt_bapi_return[] which will have the backend errors/warnings from the backend.

Hope this helps,

Regards,

Matthew

yeushengteo
Advisor
Advisor
0 Kudos

Hi,

For ECS PO, we are using plug-in function module BBP_PO_INBOUND in the backend system to create/change the PO. So please use this instead.

And if you want to call the FM from SRM for the transfer of the data to backend system, you can call the FM B46B_DPO_TRANSFER instead which eventually will also call the above FM in backend system.

Regards.

Former Member
0 Kudos

Hi Raúl,

Have you defined the corresponding SRM 'Transaction Type' and ECC 'Document Type' for the purchase order?

You then have to specify the type within the header structure

bapi_po_header_c-process_type

I have previously used the function module to create SRM POs and they did replicate into the backend system. I agree with you on the differences on status messages, but the created orders were tested end to end (change, confirmation, invoiced) and did not show any other errors.

I did not have to modify any BADI for this.

Hope this helps!

Cheers,

Foh

Former Member
0 Kudos

Hi

What about the BADI ? Read its documentation before making any changes.

BBP_ECS_PO_OUT_BADI		ECS: PO Transfer to Logistics Backend

Hope this will help.

Please reward suitable points.

Regards

- Atul

Former Member
0 Kudos

Hi Christophe/Raul,

We are trying to do the same thing here i.e. post purchase orders in ECC from SRM and I tried using the BADI but the BE fields mentioned cannot be changed in the BADI - they are not in the export structures. Have you got this to work?

Regards,

Tony

Former Member
0 Kudos

Hi Raúl,

this is exact, BAPI_POEC_CREATE is designed to create local PO.

If you want to replicate it to R/3, then you have to change it to an ECS PO.

In BADI BBP_DOC_CHANGE_BADI, called at the real beginning of BBP_PD_PO_CREATE, you will have to change some data to enable the ECS scenario:

- change header subtype to EP

- change header log system to SRM (keep FI LS as is)

- determine a backend purch group & org

- complete BE fields (be_object_id, be_object_type, don't change be_log_system because it will be determined during the transfer, be_pur_org and be_pur_group will also be determined during the transfer)

- ... and maybe other R/3 relevant fields

Compare both PO one by one, and adapt the gaps.

Rgds

Christophe

PS: please reward points for helpfull answers