Application Development 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: 

Bapi or FM needed to read contract (vendor) data in 4.7 version

Former Member
0 Kudos
457

Hello Folks,

I am working in 4.7 version ... I checked in se37 but couldn't find suitable bapi for reading the contract data(vendor contract).In ecc 6.0 we do have bapi_contract_getdetail bapi for reading the contract data.. I couldn't find any bapi or FM to read the contract data in 4.7 version.. Can anyone help me in reading the contract data either from BAPI or FM?

Regards,

Raj

6 REPLIES 6

Former Member
0 Kudos
314

You may try BAPI_PO_CREATE (CREATE1) by passing PO_HEADER-DOC_CAT = 'K'. Normally 'F' is passed for DOC_CAT to create a PO, in case of Vendor Contract DOC_CAT will be 'K'.

0 Kudos
314

Hi,

My requirement is to create a PO with reference of a contract.. for this i need contract data.. I didn't get any proper bapi to read the data.

I am not sure if in BAPI_PO_CREATE we can use the contract number as refernce and create the contract.

Can anyone tell me whether we can create PO using the above bapi by referencing Contract number.??

Regards,

Raj

0 Kudos
314

Sorry I misread your earlier post.

As for referring the PO to a contract you can use PO_HEADER-AGREEMENT field in BAPI_PO_CREATE1

0 Kudos
314

Excellent work vishnu..appreciated... Thanks for ur input... we need to give few other things like matnr, werks, quantity,doc type, item number,purchasing org,purchasing group to the BAPI "BAPI_PO_CREATE1" along with the agreement item and agreement number..

Regards,

Raj

0 Kudos
314

Hi Kumar,

Could you please provide the complete or sample code what all fields you populated for creating the Contract PO using reference.

0 Kudos
314

Hi,

      Please check PO_ITEM LIKE BAPIMEPOITEM (Item Data)   " tables

       "

This table contains the item data for an purchase order (e.g. material, order quantity, net price, plant)."

POHEADER LIKE BAPIMEPOHEADER  " import parameter

This table contains the header data of  purchase order (e.g. purchasing organization, vendor, currency, terms of payment).

Regard's

Smruti