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: 

Change the expected value in ME22n using BAPI_PO_CHANGE

Former Member
0 Kudos
354

I am trying to change the overall limit and Expected value in the Limits tab using BAPI_PO_CHANGE .

But I am not able to update the limits, I am able to update Netprice (Netpr) in item level .

<fs_excelitab> - It is the values from the excel, which has ebeln,ebelp,netpr, sumlimit, commitement.

*- PO Header data

v_purchaseorder = <fs_excelitab>-col001.

*- PO Item data

t_poitem-po_item = <fs_excelitab>-col002.

t_poitem-net_price = <fs_excelitab>-col003.

APPEND t_poitem.

*- PO Item data for Update

t_poitemx-po_item = <fs_excelitab>-col002.

t_poitemx-po_itemx = 'X'.

t_poitemx-net_price = 'X'.

APPEND t_poitemx.

*- PO Limits

t_polimits-pckg_no = '0001'.

t_polimits-limit = <fs_excelitab>-col004.

t_polimits-exp_value = <fs_excelitab>-col005.

APPEND t_polimits.

*-- Calling BAPI function module

CALL FUNCTION 'BAPI_PO_CHANGE'

EXPORTING

purchaseorder = v_purchaseorder

  • testrun = p_test

TABLES

return = t_return

poitem = t_poitem

poitemx = t_poitemx

polimits = t_polimits.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = space.

Thanks in advance

1 REPLY 1

mvoros
Active Contributor
0 Kudos
92

Hi,

unfortunately updating limits is not possible with this BAPI. Here is a quote from documentation for this BAPI.

Note

In method BAPI_PO_CHANGE, you can only create limits, you cannot change

them.

Cheers