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

Create contract with Purchase Requisition reference using BAPI

Former Member
0 Likes
1,288

Hi friends! I need some help here to create a contract with reference to some purshase requisition. I found BAPI_CONTRACT_CREATE to do this, but I have no idea how to do to create with reference to pruchase requisition.

Anyone can give me a sample code or an idea how I can do this?

Thanks in advance for any help.

4 REPLIES 4
Read only

luis_quispe
Explorer
0 Likes
843

Hi, try to fill PREQ_NO and PREQ_ITEM in table ITEM and ITEMX. this fields refer to PR.

regards

Lquispe

Read only

Former Member
0 Likes
843

Thanks friend. I filled Header, Headerx, item e itemx but I'm getting this error:

No instance of object type PurchasingContract has been created. External reference: # 1

Item category 9 not supported

I need fill something else?

Read only

0 Likes
843

Hi Fulvio,

Please check the sample code in the Documentation provided by the BAPI -BAPI_CONTRACT_CREATE, that should help you.

After the above function hope you had used BAPI_TRANSACTION_COMMIT

Read only

0 Likes
843

Thanks for answers friends! I made an contact with sap support and they answered to me that this BAPI don't support service items...here category 9 is service items, so I have to find another way.

Regards