‎2007 Feb 08 4:36 PM
Hi,
I try to use BAPI_GOODSMVT_CREATE for goods movement of type 201.
When I had to send COSTCENTER parameter with the BAPI, Iit started to give errors such like "Cost center xxxx/yyyy does not exist on dd.mm.yyyy." but I'm sure that cost center exists in this period. Probabily error is something else. So I think I have to send some other parameters to BAPI but I'm not sure which one. Here I my parameters :
gmhead-pstng_date = sy-datum.
gmhead-doc_date = sy-datum.
gmhead-pr_uname = sy-uname.
gmhead-ref_doc_no = DOC_ID.
gmcode-gm_code = GM_CODE.
itab-mvt_ind = ''.
itab-plant = '0001'.
itab-material = PART_NO.
itab-entry_qnt = AMOUNT.
itab-entry_uom = ''.
itab-move_type = MOVE_TYPE.
itab-stge_loc = STORAGE.
itab-move_stloc = STORAGE_MOVE.
itab-batch = BATCH.
itab-spec_stock = SPEC_STOCK.
itab-vendor = CONS.
itab-costcenter = COSTCENTER.
So do you have any idea what can be the error? Before I sent costcenter to the BAPI, everything was correct.
Thanks...
‎2007 Feb 08 5:00 PM
hi Cenk,
You would require to have <b>leading zeroes for the cost center</b> before you call the BAPI.
for example, if your KOSTL = '95320', then it has to be formatted to the
form '0000095320' with length 10. you can use the overlay statement or you can prefix with zeros based on the current length.
Hope this helps,
Sajan Joseph.
‎2007 Feb 08 4:57 PM
HI,
Welcome to SDN...
check this... it might be useful for u..
http://sap4.com/wiki/index.php?title=BAPI_GOODSMVT_CREATE&printable=yes
Regards
SAB
‎2007 Feb 08 5:00 PM
hi Cenk,
You would require to have <b>leading zeroes for the cost center</b> before you call the BAPI.
for example, if your KOSTL = '95320', then it has to be formatted to the
form '0000095320' with length 10. you can use the overlay statement or you can prefix with zeros based on the current length.
Hope this helps,
Sajan Joseph.
‎2007 Feb 09 6:24 AM
‎2007 May 23 12:36 PM
‎2007 Feb 09 9:15 AM
Unfortunately I have another problem now.
When the SPEC_STOCK is "K", I give the vendor to the BAPI. But this time I get error
"Account XXXXXXXXXX requires an assignment to a CO object"
And again it is possible to make goods movement by MB1A transaction. And also it was possible to run BAPI before I give COSTCENTER parameter with special stock "K". So I think it has to be given a default value for some parameter. But I have no idea which one..
Thanks...