Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Need BAPI for PO create with respect to contract

Former Member
0 Likes
1,999

Hi All,

I have requirement to create a PO with respect to contract . I was unable to find the right BAPI for same. Please let me know if there any BAPI or FM available for the same.

Thanks & Regards,

Praveen.

1 ACCEPTED SOLUTION
Read only

gaursri
Active Contributor
0 Likes
1,125

Hi GB,

BAPI PO CREATE1 is the BAPI to create purchase order.

Have a best day ahead.

Hi All,

I have requirement to create a PO with respect to contract . I was unable to find the right BAPI for same. Please let me know if there any BAPI or FM available for the same.

Thanks & Regards,

Praveen.

4 REPLIES 4
Read only

gaursri
Active Contributor
0 Likes
1,126

Hi GB,

BAPI PO CREATE1 is the BAPI to create purchase order.

Have a best day ahead.

Read only

Former Member
0 Likes
1,125

Hi All.

I was able to create PO with respect to contract using the bapi 'BAPI_PO_CREATE1'.

CALL FUNCTION 'BAPI_PO_CREATE1'

EXPORTING

poheader = x_poheader

poheaderx = x_poheaderx

IMPORTING

EXPPURCHASEORDER = v_purchaseorder

TABLES

return = i_return

poitem = i_poitem

poitemx = i_poitemx

poschedule = i_poschedule

poschedulex = i_poschedulex

poaccount = i_poaccount

Thanks for your answers.

Regards,

Praveen

Read only

0 Likes
1,125

Hi Praveen,

I know it's been a while since you've solved your issue, but I'm hoping you have a good memory!  I also am trying to use BAPI_PO_CREATE1 to create a PO with reference to a contract document.  To make sure you and I are talking about the same thing when I mention 'Contract document', I am referring to the contract document field in the PO header that shows on the "Contract Data" tab.  I want to create the PO with a contract document specified, so that the contract details will show on the PO PDF instead of the standard terms and conditions.

I am currently passing all of the structures you have listed above, plus a few additional ones.  None of these appear to have a field(s) to pass the contract document number.  Where did you specify the contract document number?

Thanks for the help!

Read only

0 Likes
1,125

It looks as if I'll have to use the EXTENSIONIN structure.  One of the BAPI table extensions, BAPI_TE_MEPOHEADER, already has a field added for contract document DOKNR.  I am assuming a previous developer extended this structure to add the field.

Thanks for the consideration.