2009 Sep 10 12:42 PM
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
2009 Sep 11 6:58 AM
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