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: 

Purchase Order BAPI's

Former Member
0 Kudos

Dear All,

Could you please let me know the BAPI that can be used to check whether the Purchase order has been created for a particular material or not.

Also to get the all the PO's that are created with the corresponding material details.

Please the list of input fields that needs to be provided for these BAPI's

Regards,

Nithiyanandam

12 REPLIES 12

Former Member
0 Kudos

CHk the BAPI.

BAPI_PO_CREATE1.

Also chk this thread for sample code.

0 Kudos

Hi Mahalakshmi,

Thanks for your reposnse. But my query is not to create a new PO, but to check the PO number for a particular material and its corresponding details

Regards,

Nithiyanandam

0 Kudos

Hi,

Write a select query on table EKPO to list all the purchase order created for a material.

I think there is no BAPI for this requirement.

With Regards,

Dwaraka.S

0 Kudos

Hi Nithiyanandam,

I think u can use one of the below mentioned BAPI:

BAPI_PO_GETDETAIL(Display Purchase Order Details)

BAPI_PO_GETITEMS(List Purchase Order Items)

Regards,

Pooja

0 Kudos

Hi,

I can use this BAPI's only if know the purchase order number, But I am trying to retrieve the PO number by providing the Material Number. Let me know if you have any BAPI for this.

Regards,

Nithiyanandam

0 Kudos

Hi

As mentioned by Pooja Nayak use BAPI_PO_GETITEMS(List Purchase Order Items).

This lists all the PO details from EKPO for the entered material number.

Execute the FM, this doesnot require any PO number. Works fine when only materail number is given as input.

But i feel this FM do extra bit of checks and if u go htru the logic the code which picks the PO details is SELECT QUERY on EKPO.

With Regards,

Dwaraka.S

0 Kudos

Hi,

I did execute this BAPI but this doesn't provide the details of the PO number when executed.

This BAPI when executed it just returns the number of PO's created for the material and not the PO number.

Please let me know how to get the PO number, if it is possible using this FM

Regards,

Nithiyanandam

0 Kudos

Hi Nithyanadam,

When FM BAPI_PO_GETITEMS is executed with only the material number the table parameter PO_ITEMS gets filled with the PO details like PO number, Item Number etc....

You loop on this table parameter PO_ITEMS to get the list of PO numbers....

This Fm working fine in my system when only material number is input.

Check it.

With Regards,

Dwaraka.S

0 Kudos

Hi,

Could you please make it clear, Because I dont have much knowledge in ABAP. I executed this BAPI through the Tcode SE37, by providing the Material number details in Import parameter. When executed, the return parameter provided the total count of the PO numbers for the material( as 500 etc for ex) and I am not getting any details in the PO_ITEMS tables.

Let me know what else chould I provide.

Thanks & Regards,

Nithiyanandam

0 Kudos

Hi Dwaraka,

Any inputs...

Regards,

Nithiyanandam

0 Kudos

Hi All,

Please provide some inputs...

Regards,

Nithiyanandam

Former Member
0 Kudos

BAPI_PO_GETDETAIL

BAPI_PO_GETITEMS