cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_PO_CREATE1 Functionality

Former Member
0 Kudos

Hi Experts,

I am using the BAPI_PO_CREATE1, to create Service Purchase Orders from an external system. In other words an external system calls this BAPI to create Service POs.

These POs must be created in reference both to a Purchase Requisition and to an Agreement, and boths have their Service Lines created. The thing is that commonly, the POs must be created for some of the Lines of the Purchase Requesition, and for other lines which are contained in the Agreement but not in the PR.

For Example: Agreement contains Service Lines A, B, C, D. PR contains A, B, C. And the PO should be created with A and D.

My question are:

1 - What should I expect from the BAPI? If I create an Item with reference of a PR and Agreement, should the Service Lines of them, replicated autoamtically? Or do I have to insert them also in the BAPI? This is to know if I have to state directly the Service Lines I need in the BAPI, or I leave the lines in blank, and then erase what I do not need.

2 - Do I have to refer the agreement, if it is already referred in the PR?

Any help will be great!!

Thanks in advace,

LUCAS

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

HI,

You can create PO by referencing to any document number. The line items you want to mention have to be mentioned in the Line item structure of BAPI along with the reference document.

Maintain teh following data in POITEM :

for referencing PR, maintain PR number in PREQ_NO and the line item number to PREQ_ITEM.

for referencing contract, maintain contract number in REF_DOC and the line item number to REF_ITEM.

Also please pass the Document type of the PO in header.

All other data will get copied.

Regards

Former Member
0 Kudos

So I can assume that If I reference a PR, I should not complete any account data or services, as it will be copied from de PR.

What about if I need to delete a Service Line that was automatically added with the PR? Is it possible to do it also through this BAPI? Or how can I delete these lines?

Thanks in advance,

Best Regards,