Skip to Content
0
Former Member
Jun 06, 2008 at 07:15 AM

i want to change the amount in condition sheet using bapi_po_change

19 Views

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!!