2009 May 15 6:24 PM
Hi,
i am using BAPI_PO_CHANGE for for PO change, in this the quantity field is adding the old value with the new value, but it should be replaced with new one,
any other parameters are required for this, i am passing the quantity in POITEM table and POSCHEDULE tables.
any other parameter is there to indicate the quantity should be replaced?
Thanks & Regards
Ram
2009 May 15 6:27 PM
Hi Ram,
see the sample code to update ...
* Clear the net price & Inv Rcpt indicator
wa_poitem-po_item = w_item.
wa_poitem-net_price = w_netpr. "here we are going to mention the Net price..
wa_poitem-ir_ind = ' '.
APPEND wa_poitem TO t_poitem.
wa_poitemx-po_item = w_item.
wa_poitemx-po_itemx = 'X'.
wa_poitemx-net_price = 'X'. "Keep X as to update..
wa_poitemx-ir_ind = 'X'.
APPEND wa_poitemx TO t_poitemx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = w_exppurchaseorder
TABLES
return = t_return
poitem = t_poitem
poitemx = t_poitemx.
Regards,
Prabhudas
Hi,
i am using BAPI_PO_CHANGE for for PO change, in this the quantity field is adding the old value with the new value, but it should be replaced with new one,
any other parameters are required for this, i am passing the quantity in POITEM table and POSCHEDULE tables.
any other parameter is there to indicate the quantity should be replaced?
Thanks & Regards
Ram
2009 May 15 6:27 PM
Hi Ram,
see the sample code to update ...
* Clear the net price & Inv Rcpt indicator
wa_poitem-po_item = w_item.
wa_poitem-net_price = w_netpr. "here we are going to mention the Net price..
wa_poitem-ir_ind = ' '.
APPEND wa_poitem TO t_poitem.
wa_poitemx-po_item = w_item.
wa_poitemx-po_itemx = 'X'.
wa_poitemx-net_price = 'X'. "Keep X as to update..
wa_poitemx-ir_ind = 'X'.
APPEND wa_poitemx TO t_poitemx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = w_exppurchaseorder
TABLES
return = t_return
poitem = t_poitem
poitemx = t_poitemx.
Regards,
Prabhudas
2009 May 15 7:01 PM
hey,
here the net_price is becomming ZERO and the quantity field is again adding with new valu,
but i want to replace the old values with the new values,
preeviously the price field was updating successfully.
2009 May 15 7:21 PM
Hi,
Try adding the field PO_PRICE = '2' to the PO_ITEM and check the corresponding field in PO_ITEMX.
...
w_poitem-po_price = '2'
APPEND w_poitem to PO_ITEM.
...
w_poitemx-po_price = 'X'
APPEND w_poitemx to PO_ITEMX.Hope it helps.
Regards,
Gilberto Li
2009 May 15 8:39 PM
po_price field is not available in ITEM table,
i don't think that the picing related fields effects the quantity updation.
does it works?
Regards
Ram
2009 May 15 9:31 PM
Sorry,
I miss read the issue. I read your replay that the net_price was being replaced by zero and I thought you were having some trouble with the net price also.
What are you using as a reference for the quantities?
Are you using the Purchase Requisition only, or you're using a Quotation also?
Regards,
Gilberto Li
2009 May 15 10:42 PM
actually i am passing the values as below
in HEADER level
W_POHEADER-PO_NUMBER,
W_POHEADER-CREAT_DATE,
W_POHEADER-PUR_GROUP,
W_POHEADER-DOC_TYPE,
W_POHEADER-PURCH_ORG
W_POHEADER-CURRENCY
in ITEM level
W_POITEM-MATERIAL
W_POITEM-NET_PRICE
W_POITEM-QUANTITY
W_POITEM-PLANT
W_POITEM-DELETE_IND
W_POITEM-PO_ITEM
W_POITEM-STGE_LOC
W_POITEM-SEASON
W_POITEM-SEASON_YR
in schedule level
W_POSCHEDULE-QUANTITY
W_POSCHEDULE-PO_ITEM
W_POSCHEDULE-DELIVERY_DATE
and corresponding update indicator POHEADERX, POITEMX, POSCHEDULEX
only these tables i am passing to BAPI
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
PURCHASEORDER = V_EBELN
POHEADER = W_POHEADER
POHEADERX = W_POHEADERX
IMPORTING
EXPHEADER =
TABLES
RETURN = T_RETURN
POITEM = T_POITEM
POITEMX = T_POITEMX
POSCHEDULE = T_POSCHEDULE
POSCHEDULEX = T_POSCHEDULEX
please suggest any thing need to be passed
Thanks&Regards
Ram
2009 May 15 10:49 PM
2009 May 15 11:59 PM
hi
I tried with different combinatios,
here i haven't passed the Schedule_line in W_SCHEDULE table
now the delivery date and Quantity fields are updating,
but net_price is not updating,
if i run same BAPI for second time with same values,
its working.
please help me
regards
Ram
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |