Skip to Content
0
Former Member
Mar 05, 2009 at 03:45 AM

Unable to change NETPR while PO creation using BAPI_PO_CREATE1

77 Views

Hi Experts,

Can someone tell me what are the parameters that are to be passed to the BAPI_PO_CREATE1

to update NETPR field at item level.

I am trying to update the 'PBXX' cond type but failed.

Following is sample piece of code of my code for items.

t_po_items-po_item = lv_itmno.

t_po_items-material = wa_outdisp-matnr.

t_po_items-plant = p_werks.

t_po_items-quantity = wa_outdisp-menge.

t_po_items-po_unit = wa_outdisp-meins.

t_po_items-net_price = wa_outdisp-netpr.

APPEND t_po_items.

CLEAR t_po_items.

t_po_itemsx-po_item = lv_itmno.

t_po_itemsx-po_itemx = 'X'.

t_po_itemsx-material = 'X'.

t_po_itemsx-plant = 'X'.

t_po_itemsx-quantity = 'X'.

t_po_itemsx-net_price = 'X'.

t_po_itemsx-price_unit = 'X'.

t_po_itemsx-calctype = 'X'.

APPEND t_po_itemsx.

CLEAR : t_po_itemsx.

t_po_itmcon-ITM_NUMBER = lv_itmno.

t_po_itmcon-COND_ST_NO = '1' .

t_po_itmcon-cond_COUNT = '2'.

t_po_itmcon-COND_TYPE = 'PBXX' .

t_po_itmconx-condorigin = 'A'.

t_po_itmcon-cond_value = wa_outdisp-netpr.

t_po_itmconx-condclass = 'B'.

t_po_itmcon-CURRENCY = 'USD'.

t_po_itmcon-COND_UNIT = wa_outdisp-meins.

t_po_itmcon-CHANGE_ID = 'U'.

APPEND t_po_itmcon.

t_po_itmconx-ITM_NUMBER = lv_itmno.

t_po_itmconx-COND_ST_NO = lv_cnt .

t_po_itmconx-cond_COUNT = 'X'.

t_po_itmconx-condorigin = 'A'.

t_po_itmconx-COND_TYPE = 'X' .

t_po_itmconx-condclass = 'x'.

t_po_itmconx-cond_value = 'X'.

t_po_itmconx-CURRENCY = 'X'.

t_po_itmconx-COND_UNIT = 'X'.

t_po_itmconx-CHANGE_ID = 'X'.

APPEND t_po_itmconx.

CLEAR : t_po_itmconx, wa_outdisp.

endloop.

  • PO header

CALL FUNCTION 'BAPI_PO_CREATE1'

EXPORTING

poheader = l_po_header

poheaderx = l_po_headerx

NO_PRICE_FROM_PO = 'X'

IMPORTING

exppurchaseorder = l_purchaseorder

TABLES

return = t_return

poitem = t_po_items

poitemx = t_po_itemsx

pocond = t_po_itmcon

pocondx = t_po_itmconx.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

Can some help me.

Thanks

Dan