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

Which BAPI can i use to list POs ?

yann_bouillut
Active Contributor
0 Likes
1,683

Hi,

Bapi_po_get_list require release group and release code as input parameter.

I would like to avoid this as these parameters are not maintained in my ECC60 system.

Which BAPI can i use to list POs ?

Kind regards,

Yann

Message was edited by:

Yann Bouillut

Hi,

Bapi_po_get_list require release group and release code as input parameter.

I would like to avoid this as these parameters are not maintained in my ECC60 system.

Which BAPI can i use to list POs ?

Kind regards,

Yann

Message was edited by:

Yann Bouillut

8 REPLIES 8
Read only

Former Member
0 Likes
1,451

Hi Yann,

use BAPI_PO_GETITEMSREL

It's mentionend in the Docu of Bapi_po_get_list.

Regards, Dieter

Read only

0 Likes
1,451

Hi Dieter,

Thanks for your answer.

Meanwhile i changed the description of my problem...thus your answer is not anymore relevant i guess.

Could you please have a look on it ?

Kind regards,

Yann

Read only

0 Likes
1,451

BAPI_PO_GET_LIST

Read only

Former Member
0 Likes
1,451

Hi Yann,

you can use BAPI_PO_GETITEMS.

If you need others, look with tcode BAPI to Purchase order.

Regards, Dieter

Read only

0 Likes
1,451

Hi Dieter,

Yes i knew the bapi transaction but was not able to find the correct bapi for PO munber list.

I did not try to test the BAPI_PO_GETITEMS as i did believe that it was only for PO items ... well i was wrong

Thanks for your valuable help.

Kind regards,

Yann

Read only

0 Likes
1,451

Hi Yann,

here a short example for using the BAPI:

REPORT ZGRO_TEST1.

*

PARAMETERS: P_MATNR LIKE MARA-MATNR.

*

DATA: HEADERS TYPE STANDARD TABLE OF BAPIEKKOL WITH HEADER LINE.

DATA: ITEMS TYPE STANDARD TABLE OF BAPIEKPOC WITH HEADER LINE.

DATA: RETURN TYPE STANDARD TABLE OF BAPIRETURN WITH HEADER LINE.

*

CALL FUNCTION 'BAPI_PO_GETITEMS'

EXPORTING

MATERIAL = P_MATNR

WITH_PO_HEADERS = 'X'

TABLES

PO_HEADERS = HEADERS

PO_ITEMS = ITEMS

RETURN = RETURN.

*

loop at headers.

write: / headers-PO_NUMBER.

loop at ITEMS where PO_NUMBER = HEADERS-PO_NUMBER.

write: / '#', ITEMS-PO_NUMBER, ITEMS-PO_ITEM.

endloop.

endloop.

I have used material for selection. You can use a lot more. Look at the FM.

regards, Dieter

Read only

Former Member
0 Likes
1,451

u need to use method

<b>GetItemsForRelease</b>

of the business object PurchaseOrder

Read only

Former Member
0 Likes
1,451

You can use BAPI_PO_GETITEMS

All its import params are optional and you need to provide atleast one of them to make this function module work.