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: 

Hi everyone

Former Member
0 Kudos

Hi everyone,

Does any one have an idea how to add material quantity to inventory.

lETS SAY IF I ADD A QUANTITY OF 20 THEN IT WILL BE STORED IN MARD-LABST.

ANY ADIVICE WOULD BE GREATLY APPRECIATED.

Thanks in advance.

suchitra

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You can add inventory using transaction MB11. You will need to use movement type 971.

Regards

Rich Heilman

15 REPLIES 15

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You can add inventory using transaction MB11. You will need to use movement type 971.

Regards

Rich Heilman

0 Kudos

If you want to do this programmatically, you would use BAPI_GOODSMVT_CREATE

Regards,

Rich Heilman

0 Kudos

Here is a sample program to help you along.



report zrich_0001.


* Structures for BAPI
data: gm_header  type bapi2017_gm_head_01.
data: gm_code    type bapi2017_gm_code.
data: gm_headret type bapi2017_gm_head_ret.
data: gm_item    type table of
                 bapi2017_gm_item_create with header line.
data: gm_return  type bapiret2 occurs 0 with header line.
data: gm_retmtd  type bapi2017_gm_head_ret-mat_doc.

clear: gm_return, gm_retmtd. refresh gm_return.

* Setup BAPI header data.
gm_header-pstng_date = sy-datum.
gm_header-doc_date   = sy-datum.
gm_code-gm_code      = '06'.                                " MB11

* Write 971 movement to table
clear gm_item.
move '971'                 to gm_item-move_type     .
move '000000000040000100'  to gm_item-material.
move '1'     to gm_item-entry_qnt.
move 'EA'    to gm_item-entry_uom.
move '0004'  to gm_item-plant.
move '4999'  to gm_item-stge_loc.
move '0901'   to gm_item-move_reas.


append gm_item.

* Call goods movement BAPI
call function 'BAPI_GOODSMVT_CREATE'
     exporting
          goodsmvt_header  = gm_header
          goodsmvt_code    = gm_code
     importing
          goodsmvt_headret = gm_headret
          materialdocument = gm_retmtd
     tables
          goodsmvt_item    = gm_item
          return           = gm_return.

if not gm_retmtd is initial.
  commit work and wait.
  call function 'DEQUEUE_ALL'.
else.
  commit work and wait.
  call function 'DEQUEUE_ALL'.
endif.

write:/ gm_retmtd.

loop at gm_return.
  write:/ gm_return.
endloop.

Regards,

Rich Heilman

0 Kudos

Please, do me a favor, and put more descriptive subject lines for your posts. Please?

Regards,

Rich Heilman

0 Kudos

Thanks Rich for your time.

I don't want program . I am generating a PO order and while doing that it say the inventory doesn't have enough stock.

When i tried using MB11 I AM GETTING THE FOLLOWING ERROR

Account determination for entry MMC1 GBB MMC ZOB 3075 not possible

pLEASE LET ME KNOW IF IAM MISSING ANYTHING

I THINK IAM MISSING SOMETHING

THANKS IN ADVANCE

0 Kudos

The flow is you create a PO for the material. It should allow you to create a PO for the material even if the stock is low. That is really the point of creating the PO, right? Once you have the PO created, you can do a receipt against that PO using transaction MIGO, enter the purchase order number and the movement type 101, then hit enter. Enter the receipt quantity and check the "Item Ok" checkbox, then you can save it. That's it.

If you continue to get the account determiniation error, then the required configuration may not be done or correct. Check with your MM functional lead.

Regards,

Rich Heilman

0 Kudos

Hi Rich,

Iam sorry iam getting this message when iam trying to issue goods using mb1a.

Deficit of SL Unrestricted-use 5 EA : 0003010951 340B 340B

0003010951 is the material no

I think i am getting this because there is not enough stock in inventory and i would like to know the way to add the inventory.

Hope iam clear .Any suggestion would be of great help as iam at this point.

Thanks in advance

0 Kudos

Ok, now we are back where we started, you need to do a 971 movement type, which allows you to add inventory. Use MB11 and use movement type 971 to add inventory. Then you will be able to do a goods issue for the correct qty. Understand?

Regards,

Rich Heilman

0 Kudos

That is true, there is inventory shortage. Now in MB1A, what are you passing? Are you creating with reference to something or without reference?

0 Kudos

Do a MB1C with movement 501 to create inventory and then you can do your MB1A.

0 Kudos

Hi Srinivas i did the same way as you mentioned .

I got the following error in the beginning and i am getting the same error.

Account determination for entry MMC1 GBB MMC ZOB 3075 not possible

Hope i am clear

waiting for your reply

0 Kudos

Hi Rich,

I got the following error.

Movement type 971 not supported (please check your entry)

when i tried your way way of adding inventory.

Thanks in advance

Suchitra

0 Kudos

Then there is something missing in the config. You need to check with the functional consultant to see what it is.

Basically any material movement that you do has to have an accouting entry and in config they will set up what accounts need to be updated for what movement type etc. In this case, that is missing. Do these values mean anything to you?

0 Kudos

I think so any how thanks for your time srinivas

0 Kudos

If you want to do it, go to SPRO transaction and follow the path below.


Implementation Guide for R/3 Customizing (IMG)
-->Materials Management
   -->Valuation and Account Assignment
      -->Account Determination

If you read all the node documentations there, you will know what is missing.