Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_GOODSMVT_CREATE with 311Q

Former Member
0 Kudos

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

5 REPLIES 5

Former Member
0 Kudos

Hi M ,

what GM_Code u are using ? try to use Gm Code of Transfer Order ?.

regards

Prabhu

0 Kudos

Hi,

I use the gm_code '04', but It will not work

Michael

0 Kudos

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

0 Kudos

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

0 Kudos

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