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: 

i want to change the amount in condition sheet using bapi_po_change

Former Member
0 Kudos

hi experts:

i want to use the bapi_po_change to change the amount in condition sheet in me23n.

the parameter i set is below:

DATA:

lt_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE, "返回内容

lt_poheader like bapimepoheader,

lt_poheaderx like bapimepoheaderx,

ls_pocondheader like BAPIMEPOCONDHEADER occurs 0 with header line,

ls_pocondheaderx like BAPIMEPOCONDHEADERX occurs 0 with header line,

ls_pocond like BAPIMEPOCOND occurs 0 with header line,

ls_pocondx like BAPIMEPOCONDX occurs 0 with header line,

lt_POITEM LIKE BAPIMEPOITEM OCCURS 0 WITH HEADER LINE,"

lt_POITEMx LIKE BAPIMEPOITEMx OCCURS 0 WITH HEADER LINE,

l_flag(1),

g_text(50) TYPE c.

CLEAR: l_flag.

lt_POITEM-po_item = '00020'.

lt_poitem-NET_PRICE = '15.10'.

APPEND lt_POITEM.

CLEAR lt_POITEM.

lt_POITEMx-po_item = '00020'.

lt_POITEMx-po_itemx = 'X'.

lt_POITEMx-NET_PRICE = 'X'.

APPEND lt_POITEMx.

CLEAR lt_POITEMx.

ls_pocond-condition_no = '0000006887'.

ls_pocond-itm_number = '000001'.

append ls_pocond.

ls_pocondx-condition_no = '0000006887'.

ls_pocondx-itm_number = '000001'.

append ls_pocondx.

CALL FUNCTION 'BAPI_PO_CHANGE'

EXPORTING

purchaseorder = '4500000002'

TABLES

return = lt_return

POITEM = lt_POITEM

POITEMx = lt_POITEMx

POCOND = ls_pocond

POCONDX = ls_pocondx.

but it doesn't work ,it goes to change the net price, how should i set the parameter? hunger for ur advice!!

1 ACCEPTED SOLUTION

former_member182371
Active Contributor
0 Kudos

Hi,

are you using BAPI_TRANSACTION_COMMIT or a COMMIT WORK after the bapi call?

Have a look at the code of fm ME_CCP_TPO_PRICE_CHANGE maybe that can help.

Best regards

Edited by: pablo casamayor on Jun 6, 2008 10:15 AM

1 REPLY 1

former_member182371
Active Contributor
0 Kudos

Hi,

are you using BAPI_TRANSACTION_COMMIT or a COMMIT WORK after the bapi call?

Have a look at the code of fm ME_CCP_TPO_PRICE_CHANGE maybe that can help.

Best regards

Edited by: pablo casamayor on Jun 6, 2008 10:15 AM