09-16-2008 10:42 AM
Hello !
I try to make a post from a project to another project (Like MIGO), but I have a short problem by using this BAPI with the movementtype 311 Q.
After I run the report and made a post, i got a document number. (Subrc = 0)
When I get a short view into the document I will see that I have done a post from a project to the SAME project. :-?
I fill out the following fields :
MOVE gs_material-matnr TO gs_goodsmvt_item-material.(000000000100016779)
MOVE gs_material-werks TO gs_goodsmvt_item-plant.(2035)
MOVE gs_material-lgort TO gs_goodsmvt_item-stge_loc.(0100)
MOVE gs_material-move_type TO gs_goodsmvt_item-move_type.(311)
MOVE gs_material-sobkz TO gs_goodsmvt_item-spec_stock.(Q)
MOVE gs_material-entry_qnt TO gs_goodsmvt_item-entry_qnt.(15)
MOVE gs_material-network TO gs_goodsmvt_item-network.(empty)
MOVE gs_material-charg to gs_goodsmvt_item-batch.(empty)
MOVE gs_material-charg to gs_goodsmvt_item-move_batch.(empty)
MOVE gs_material-stck_type to gs_goodsmvt_item-stck_type.(empty)
MOVE sy-datum TO gs_goodsmvt_header-pstng_date.(16092008)
MOVE sy-datum TO gs_goodsmvt_header-doc_date.(16092008)
MOVE gs_material-move_stloc TO gs_goodsmvt_item-move_stloc.(0100)
MOVE '04' TO gs_goodsmvt_code-gm_code.(04)
MOVE gs_material-pspnr TO gs_goodsmvt_item-wbs_elem.(P229999910100000)
MOVE gs_material-move_pspnr TO gs_goodsmvt_item-val_wbs_elem. (P100000110100000)
MOVE gs_material-costcenter TO gs_goodsmvt_item-costcenter.(empty)
It would be fine if somebody can help me or give me a solution for this result.
Thanx
Michael
09-16-2008 10:47 AM
Hi M ,
what GM_Code u are using ? try to use Gm Code of Transfer Order ?.
regards
Prabhu
09-16-2008 10:55 AM
09-16-2008 11:12 AM
Hi Michael,
i dont see issues with ur code & GM_code , and one more thing are u passing any data for receiving plant ?
regards
Prabhu
09-16-2008 12:19 PM
Hi,
yes I pass the data for the plant, but I forget to write the next two lines here.
MOVE gs_material-matnr TO gs_goodsmvt_item-move_mat.
MOVE gs_material-werks TO gs_goodsmvt_item-move_plant.
Sorry for that.
The other thing want I saw was :
If I dont fill the field gs_goodsmvt_item-val_wbs_elem with an wbs-element, he will post the 311Q with the wbs from gs_goodsmvt_item-wbs_elem here.
But if I filled the field gs_goodsmvt_item-val_wbs_elem, the Bapi will ignore the field gs_goodsmvt_item-wbs_elem.
But for the movementype 311Q I need both wbs-elements (from wbs / to wbs).
Is it possible that anyone can give me the fields which I must fill for the movementtype 311 with specstock Q ??
Thnx
Michael
Edited by: Michael Gerken on Sep 16, 2008 1:20 PM
09-16-2008 1:26 PM
Hi,
i done it.
There is a feature in the MIGO that we can post a material from a storagelocation to another storagelocation and change the project(wbs-element) at the same time with the movementtype 311Q.
This is not possible in the old MB1B. Only in the MIGO.
That was the reason why I was a little bit confused.
No, I use the movementtype 415Q to move material from a project to another project.
Thanx for your help
Michael