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

Calling Function BAPI_PO_CHANGE

Former Member
0 Likes
1,842

Hello all,

I want to use function BAPI_PO_CHANGE for changing confirmation data - Table EKES,

I tried, but I dont know Why it doesnt work.

Thanks,

Naama

7 REPLIES 7
Read only

Former Member
0 Likes
1,193

Naama,

use BAPI_TRANSACTION_COMMIT after calling BAPI_PO_CHANGE

Amit.

Read only

0 Likes
1,193

yes,

I tried it threw the "Test Sequences" in SE37

Read only

Subhankar
Active Contributor
0 Likes
1,193

Hi,

please check the field for which u change in table 'AAA' in table 'AAAX'

  • Mark the schedule change toolbar.

l_wa_poschedulex-po_item = wa_eket-ebelp. "Purch Doc.No.

l_wa_poschedulex-sched_line = wa_eket-etenr. "Purc.Doc.Item

l_wa_poschedulex-delivery_date = c_check. "Value:'X'

l_wa_poschedulex-quantity = c_check. "Value:'X'

l_wa_poschedulex-stat_date = c_check. "Value:'X'

APPEND l_wa_poschedulex TO l_i_poschedulex.

CLEAR l_wa_poschedulex.

  • This function module changes the schedule line for the Order.

CALL FUNCTION 'BAPI_PO_CHANGE'

EXPORTING

purchaseorder = wa_eket-ebeln "Purch Doc.No.

TABLES

return = i_return "Return Message

poschedule = l_i_poschedule "PO Schedule Change

poschedulex = l_i_poschedulex. "Schedule Lines

  • Check if the BAPI returns error message or not.

  • IF Bapi doesn't return error message

READ TABLE i_return INTO l_wa_return WITH KEY type = c_error.

IF sy-subrc <> 0.

  • Commit the transaction

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = 'X'

IMPORTING

return = l_i_return.

endif.

Read only

Former Member
0 Likes
1,193

But I don't need to change the Schedule data,

I need to change the confirmation data - there is a table in the function interface - POCONFIRMATION,

But no POCONFIRMATIONX table.

Read only

Former Member
0 Likes
1,193

Hi Naama,

You cannot change/update confirmation (EKES) with BAPI_PO_CHANGE. you can do this via FM: ME_CONFIRMATION_UPDATE.

Please note that: ME_CONFIRMATION_UPDATE does not register the PO item changes.

So, you will have to use a custom wrapper and call ME_CONFIRMATION_UPDATE first and then pass the data to BAPI_PO_CHANGE to maintain consistency.

Read only

Former Member
0 Likes
1,193

CALL FUNCTION 'ME_CONFIRMATION_UPDATE'
EXPORTING
i_ebeln = ekko-ebeln
TABLES
xekes = xekes
yekes = yekes.

"yekes contains the EKES table in DB

"xekes contains the changed values for EKES table

Read only

Former Member
0 Likes
1,193

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