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: 

Confirmation in BAPI_PO_CHANGE

Former Member
0 Kudos

Hi .

I am using BAPI_PO_CHANGE. I want to enter the Vendor Confirmation data in PO using this BAPI. But the PO is not updated

I am using code like this.......

data: po_no like BAPIMEPOHEADER-PO_NUMBER.

data: ret like BAPIRET2 occurs 0 with header line.

data: conf like BAPIEKES occurs 0 with header line.

data: poitm like BAPIMEPOITEM occurs 0 with header line.

data: poitmx like BAPIMEPOITEMx occurs 0 with header line.

po_no = '4600000026'.

poitm-po_item = '00010'.

poitm-ACKN_REQD = 'X'.

poitm-CONF_CTRL = '0001'.

append poitm.

poitmx-po_item = 'X'.

poitmx-ACKN_REQD = 'X'.

poitmx-CONF_CTRL = 'X'.

append poitmx.

conf-PO_ITEM = '00010'.

conf-CONF_TYPE = 'AB'.

conf-DELIV_DATE = '20080619'.

conf-QUANTITY = '10'.

append conf.

CALL FUNCTION 'BAPI_PO_CHANGE'

EXPORTING

PURCHASEORDER = '4600000026'

  • POHEADER =

  • POHEADERX =

  • POADDRVENDOR =

  • TESTRUN =

  • MEMORY_UNCOMPLETE =

  • MEMORY_COMPLETE =

  • POEXPIMPHEADER =

  • POEXPIMPHEADERX =

  • VERSIONS =

  • NO_MESSAGING =

  • NO_MESSAGE_REQ =

  • NO_AUTHORITY =

  • NO_PRICE_FROM_PO =

  • IMPORTING

  • EXPHEADER =

  • EXPPOEXPIMPHEADER =

TABLES

RETURN = ret

POITEM = poitm

POITEMX = poitmx

  • POADDRDELIVERY =

  • POSCHEDULE =

  • POSCHEDULEX =

  • POACCOUNT =

  • POACCOUNTPROFITSEGMENT =

  • POACCOUNTX =

  • POCONDHEADER =

  • POCONDHEADERX =

  • POCOND =

  • POCONDX =

  • POLIMITS =

  • POCONTRACTLIMITS =

  • POSERVICES =

  • POSRVACCESSVALUES =

  • POSERVICESTEXT =

  • EXTENSIONIN =

  • EXTENSIONOUT =

  • POEXPIMPITEM =

  • POEXPIMPITEMX =

  • POTEXTHEADER = text_tab

  • POTEXTITEM =

  • ALLVERSIONS =

  • POPARTNER =

  • POCOMPONENTS =

  • POCOMPONENTSX =

  • POSHIPPING =

  • POSHIPPINGX =

  • POSHIPPINGEXP =

  • POHISTORY =

  • POHISTORY_TOTALS =

POCONFIRMATION = conf

.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'.

  • IMPORTING

  • RETURN =

.

4 REPLIES 4

vinod_vemuru2
Active Contributor
0 Kudos

Hi,

Are u checking the return table of the BAPI before doing commit. Put a break point at the BAPI and execute ur code.I think u must be getting some errors in Returns table. Check and those errors and see whether it is updating properly or not. Get back in case of any issues.

Thanks,

Vinod.

Edited by: Vinod Kumar Vemuru on Jun 16, 2008 2:03 PM

0 Kudos

Vinod,

I checked the return table, there is no error message. It is showing the successful message.

0 Kudos

Hi,

Check below things(Change). If it still doesnot works then u may have to pass some more information.

For testing try changing the PO quantity and see whether it is working fine or not. If yes then definitely u have to pass some more info.

I think u have to pass Po header info also.

data: po_no like BAPIMEPOHEADER-PO_NUMBER.

data: ret like BAPIRET2 occurs 0 with header line.

data: conf like BAPIEKES occurs 0 with header line.

data: poitm like BAPIMEPOITEM occurs 0 with header line.

data: poitmx like BAPIMEPOITEMx occurs 0 with header line.

po_no = '4600000026'.

Clear poitm.

Refresh poitm.

poitm-po_item = '00010'.

poitm-ACKN_REQD = 'X'.

poitm-CONF_CTRL = '0001'.

append poitm.

Clear poitm.

poitmx-po_item = 'X'.

poitmx-ACKN_REQD = 'X'.

poitmx-CONF_CTRL = 'X'.

append poitmx.

Clear conf.

Refresh conf[].

conf-PO_ITEM = '00010'.

conf-CONF_TYPE = 'AB'.

conf-DELIV_DATE = '20080619'.

conf-QUANTITY = '10'.

append conf.

CALL FUNCTION 'BAPI_PO_CHANGE'

EXPORTING

PURCHASEORDER = '4600000026'

POHEADER =

POHEADERX =

POADDRVENDOR =

TESTRUN =

MEMORY_UNCOMPLETE =

MEMORY_COMPLETE =

POEXPIMPHEADER =

POEXPIMPHEADERX =

VERSIONS =

NO_MESSAGING =

NO_MESSAGE_REQ =

NO_AUTHORITY =

NO_PRICE_FROM_PO =

IMPORTING

EXPHEADER =

EXPPOEXPIMPHEADER =

TABLES

RETURN = ret

POITEM = poitm[]

POITEMX = poitmx

POADDRDELIVERY =

POSCHEDULE =

POSCHEDULEX =

POACCOUNT =

POACCOUNTPROFITSEGMENT =

POACCOUNTX =

POCONDHEADER =

POCONDHEADERX =

POCOND =

POCONDX =

POLIMITS =

POCONTRACTLIMITS =

POSERVICES =

POSRVACCESSVALUES =

POSERVICESTEXT =

EXTENSIONIN =

EXTENSIONOUT =

POEXPIMPITEM =

POEXPIMPITEMX =

POTEXTHEADER = text_tab

POTEXTITEM =

ALLVERSIONS =

POPARTNER =

POCOMPONENTS =

POCOMPONENTSX =

POSHIPPING =

POSHIPPINGX =

POSHIPPINGEXP =

POHISTORY =

POHISTORY_TOTALS =

POCONFIRMATION = conf

.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'.

IMPORTING

RETURN =

.

Thanks,

Vinod.

Former Member
0 Kudos

Hello to all,

that is just for documentation. SAP answerd the problem in OSS-304243 but this message is not accessable if you don't have powerful OSS-Users.

This SAP-note might be interesting: 197958

****************************************************************************************************************************

OSS-Message 652796 8.8.2011

BAPI_PO_CHANGE

We can not process confirmations by using the parameter poconfirmation.

The Baps reports always S 06 022 - no data changed.

In the SDN there are some hints telling that the BAPI_PO_CHANGE does notsupport processing of confirmations. More detailled infos should be in

the OSS-Message 0000304243 but this message is not accessable for us.

Can you confirm that the BAPI_PO_CHANGE does not support adding

confirmations? We debugged the BAPI and there is no code for updating

confirmations found.

Best regards

Bernhard Lascy

****************************************************************************************************************************

09.08.2011 - 10:43:07 CET - Antwort von SAP

Dear Bernhard,

I regret to inform you that the functionality you request is not

implemented in the R/3 standard system.

Unfortunately it is not possible to change/load confirmations with the

function module BAPI_PO_CREATE/BAPI_PO_CHANGE. Table POCONFIRMATION in

BAPI interface is relevant for Display/List Vendor Confirmation in BAPI,not for update/insert Vendor confirmation in PO.

Furthermore, we recommends that you use Idocs for automatically

entering confirmations. The Message type to use is ORDRSP.

You may read more about this topic in the online documentation.

Please see also following attached note for your reference.

456127 FAQ: Electronic Data Interchange (EDI) in purchasing

Best regards,

Pavel Olysar

Support Consultant

Global Support - Logistics