Application Development and Automation 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: 
Read only

Issue with BAPI_GOODSMVT_CREATE

Former Member
0 Likes
1,977

Hi all.

We are creating Goods Receipt against a Production order using BAPI_GOODSMVT_CREATE. The Material Document and transfer order is also created.

the problem here is we are giving a storage bin to receive the goods ,but the goods are receiving into the default storage bin maintained in the material master for that particular material.the Goods Receipt Number is updating in the destination bin we are expecting the goods and the goods are receiving into the default storage bin.

How can we avoid this situation to receive the goods into our destination bin directly with both GR number and Goods Quantity?

We are passing the Bin and storage type STGE_TYPE ans STGE_BIN fields in BAPI.We tried with all the bin and storage types in the BAPI.But there is no use.

If anybody faced the same and solved ,Please provide some pointers.

Regards,

Kranti Yamparala.

6 REPLIES 6
Read only

Former Member
0 Likes
1,536

I myself resolved the issues and This is the Solution:

The Quantity will go to Dafault Bin directly for this movement type 101.After that U need to do BDC to Transfer this quantity to the destination bin specified as per the requirement.

Edited by: Kranti Yamparala on Oct 9, 2008 12:11 AM

Read only

0 Likes
1,536

Kranti,

Can you give me some kind of a direction on this?? I am running in to the same problem while trying to do the goods movement from WM - IM. I do the movement type 311 and everything as follows but it always picks it from default bin location instead of the one that mention.

data: begin of st_goodsmvt_header.

include structure bapi2017_gm_head_01.

data: end of st_goodsmvt_header.

data: begin of st_goodsmvt_code.

include structure bapi2017_gm_code.

data: end of st_goodsmvt_code.

data: begin of st_goodsmvt_headret.

include structure bapi2017_gm_head_ret.

data: end of st_goodsmvt_headret.

data: begin of it_goodsmvt_item occurs 100.

include structure BAPI2017_GM_ITEM_CREATE.

data: end of it_goodsmvt_item.

data: wmenge like iseg-menge,

errflag.

data:p_result type C.

st_goodsmvt_header-pstng_date = sy-datum.

st_goodsmvt_header-doc_date = sy-datum.

st_goodsmvt_code-gm_code = '04'. "

refresh: it_goodsmvt_item, it_311_return.

clear: it_goodsmvt_item, it_311_return,st_materialdocument,st_goodsmvt_headret.

it_goodsmvt_item-material = vl_matnr.

it_goodsmvt_item-plant = '1100'.

if vl_indicator eq '0'. "0 = full plate,1 = remnant

it_goodsmvt_item-stge_loc = '1107'. "1107 for full plates and DROp for Crops

it_goodsmvt_item-entry_qnt = '1'. " for one full plate

it_goodsmvt_item-ENTRY_UOM = 'EA'.

  • it_goodsmvt_item-STGE_TYPE = '015'."do not need for 1107 -->1108

  • it_goodsmvt_item-STGE_BIN = vl_bin. "do not need for 1107 -->1108

else."1 = remnant

it_goodsmvt_item-stge_loc = 'DROP'.

it_goodsmvt_item-entry_qnt = vl_plate_size. " for one full plate

it_goodsmvt_item-ENTRY_UOM = 'IN2'.

"important to enter following 2 fields for movement from DROP -->>1108 with specific bin location

it_goodsmvt_item-STGE_TYPE_ST = '016'. " needed this especially for goods movement from DROP to 1108 from a specific bin location

it_goodsmvt_item-STGE_BIN_ST = vl_bin. " needed this especially for goods movement from DROP to 1108 from a specific bin location

  • it_goodsmvt_item-STGE_TYPE_PC = '016'."Storage type for transfer posting

  • it_goodsmvt_item-STGE_BIN_PC = vl_bin."Storage BIN for transfer posting

endif.

it_goodsmvt_item-move_plant = '1100'. "Recieving/Issueing plant (do i need this???)

it_goodsmvt_item-move_stloc = '1108'. "Reciving storage location

it_goodsmvt_item-MVT_IND = ''. "blank for no reservation

it_goodsmvt_item-ENTRY_UOM_ISO = ''. " leave this blank (or) If needed at unit EA it will be PCE, at IN2 it will be INK. (Table T006)

it_goodsmvt_item-move_type = '311'.

append it_goodsmvt_item.

call function 'BAPI_GOODSMVT_CREATE'

EXPORTING

goodsmvt_header = st_goodsmvt_header

goodsmvt_code = st_goodsmvt_code

IMPORTING

goodsmvt_headret = st_goodsmvt_headret

materialdocument = st_materialdocument

TABLES

goodsmvt_item = it_goodsmvt_item

return = it_311_return.

Any feedback would be appreciated.

Thanks,

Krishna

Read only

0 Likes
1,536

Hello Krishna,

Did you find any solution concerning your problem?

I try to do a movement MM 911 filling the storage bin in BAPI_GOODSMVT_CREATE. A Transfer Request is created with movement WM 912 and when I create the Transfer Order using this TR, the storage bin used is the default storage bin.

Could you please give me your help?

Thank you in advance.

BR

Robin

Edited by: Robin ATTIA on Sep 7, 2011 4:56 PM

Read only

0 Likes
1,536

Hi Robin,

No solution as of yet. I am still working on it and let you know when i got this figured out.

Regards,

Krishna

Read only

0 Likes
1,187

Hello, Did you find the solution?

Read only

0 Likes
1,090

@ramchandra_30 

You were asking in a discussion which is almost 25 years old and nobody would respond to you.  Whatever issue you have, please create a new discussion, explaining what the issue is, what analysis you made to find out the root cause with the related screen shots, so that members will assist you