‎2008 Jun 17 7:41 AM
Hi friends,
i was checking bapi_po_change function module in se37. i tried to create new item for particular PO no.
but after execution it returns item 20 does n't exist.that means this function module is used to change the existing entry only not to create new entry ?
if any one knows about this function module or knows Note , please tell me .
regards,
diana.
‎2008 Jun 17 7:49 AM
Diana,
probably note 197958.
i think we cannot add line item with this FM.
and also please you can also see its FM documentation in se37.
Amit.
‎2008 Jun 17 8:23 AM
hi,
i saw the documentation . but they have given only about existing item. not given about creating new item in the existing po.
thank u for ur reply yaar.
regards,
diana.
‎2008 Jun 17 5:12 PM
Hi,
It is possible to add new items using BAPI_PO_CHANGE (i did it).
Your code might have some problem, but it is hard to say without the code
Regards
‎2008 Jun 26 7:22 AM
Hi Renaud Wanschoor ,
could u pls send me your code to change purchase order.. it may be useful..
to create new items, to edit existing items, to delete existing item i wanted to use bapi_po_change
..
regards,
diana.
‎2008 Jul 23 8:12 AM
Hello,
I also have a problem to create a new line in the existing PO using BAPI_PO_CHANGE. It seems that it should be possible to add a new item based on note 503910. Could someone post here or send me a code which worked in his/her case.
Thank you,
Peter Jancik
pjancikatgmail.com
‎2008 Jul 23 10:29 AM
Hi,
this probelm is solved . I have created new item also using BAPI_PO_CHANGE .
actually i am doing 3 functions using bapi_po_change.
1.delete item if quantity = 0 in calculation
2.change existing item's quantity
3. creating new item by passing new item values in item table , changing itemx table based on item table and schedule table,schedulex table..
item, plant , quantity all fields are mandatory fields,
ex:
my code for creating new item is:
perform addpo.
commit work and wait.
FORM addpo.
item-po_item = it_final-ebelp.
item-short_text = it_final-txz01.
item-material = it_final-matnr.
item-quantity = it_final-menge.
item-po_unit = it_final-meins.
item-net_price = it_final-netpr.
item-plant = it_final-werks.
item-stge_loc = it_final-lgort.
item-tax_code = it_final-mwskz.
item-info_rec = it_final-infnr.
item-info_upd = it_final-spinf.
item-plan_del = it_final-plifz.
APPEND item.
itemx-po_item = it_final-ebelp.
itemx-short_text = 'X'.
itemx-po_itemx = 'X'.
itemx-material = 'X'.
itemx-quantity = 'X'.
itemx-po_unit = 'X'.
itemx-net_price = 'X'.
itemx-plant = 'X'.
itemx-stge_loc = 'X'.
itemx-tax_code = 'X'.
itemx-info_rec = 'X'.
itemx-info_upd = 'X'.
itemx-plan_del = 'X'.
APPEND itemx.
poschedule-po_item = it_final-ebelp.
poschedule-sched_line = '0001'.
date = it_final-eindt.
year = date+0(4).
month = date+4(2).
dat = date+6(2).
CONCATENATE dat '.' month '.' year INTO podate.
poschedule-delivery_date = podate.
CLEAR podate.
poschedule-quantity = it_final-menge.
poschedule-po_date = it_final-bedat.
APPEND poschedule.
poschedulex-po_item = it_final-ebelp.
poschedulex-sched_line = '0001'.
poschedulex-po_itemx = 'X'.
poschedulex-sched_linex = 'X'.
poschedulex-delivery_date = 'X'.
poschedulex-quantity = 'X'.
poschedulex-po_date = 'X'.
APPEND poschedulex.
ENDFORM. " po_add
thanks and regards,
reward if useful.
diana.