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

BAPI_PO_CHANGE

Former Member
0 Likes
665

Hi All,

I am working on an interface where I need to change the price of the PO's, and for this I will be getting an input file which will have the material no's and the price associated to those. I need to select PO's based on the following conditions:

document type = 'NB' and purchasing group = '111' and DCI = ' '.

and then once the PO is selected I need to update the price of the PO's for a specific material from the input file.

I know that I need to use BAPI_PO_CHANGE, but can you please tell me how to select the PO's based on the above criterion, I mean how will deal this situation in this BAPI.

Thanks

Rajeev....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
602

You need to firs textract POS from EKKO table for the entered conditions.

SELECT EBELN

INTO TABLE IT_EKKO

FROM EKKO

WHERE BSART = 'NB' AND

EKGRP = 111' AND

LOEKZ = SPACE.

I believe DCI in you question is Deletion indicator.

Once you have all PO Nos, select entries from EKPO table.

SELECT EBELN

EBELP

MATNR

NETPR

INTO TABLE IT_EKPO

FROM EKPO

FOR ALL ENTRIES IN IT_EKKO

WHERE EBELN = IT_EKKO-EBELN.

Hope this helps.

ashish

3 REPLIES 3
Read only

Former Member
0 Likes
602

Go to EKKO to get the POs satisfying the criteria you have. Then loop at the POs table and call BAPI_PO_GETDETAIL1. Once you have the PO details, identify the fields that you want to update, do the updates and call BAPI_PO_CHANGE.

Read only

Former Member
0 Likes
603

You need to firs textract POS from EKKO table for the entered conditions.

SELECT EBELN

INTO TABLE IT_EKKO

FROM EKKO

WHERE BSART = 'NB' AND

EKGRP = 111' AND

LOEKZ = SPACE.

I believe DCI in you question is Deletion indicator.

Once you have all PO Nos, select entries from EKPO table.

SELECT EBELN

EBELP

MATNR

NETPR

INTO TABLE IT_EKPO

FROM EKPO

FOR ALL ENTRIES IN IT_EKKO

WHERE EBELN = IT_EKKO-EBELN.

Hope this helps.

ashish

Read only

Former Member
0 Likes
602

Hi,

You can join table EKKO and EKPO to find the corresponding PO based on your above criteria.

EKKO-BSART (Document Type)

EKKO-EKGRP (Purchasing Group)

EKKO-AUTLF (Complete Delivery Indicator)

EKPO-MATNR (Material)

Regards,

Ferry Lianto