Page tree
Skip to end of metadata
Go to start of metadata


Via the Stock Overview transaction MMBE you see that you have stock in a Batch (batch4):  

However, when you try to post a goods issue for it you get the error message: "Batch TEST-BATCH 1000 0001 BATCH4 does not exist" (Message no. M7042).


The batch has been created in lowercase letters. Most probably it was created by a program in which the batch name was specified in lower case letters, for example, in a program calling the BAPI BAPI_GOODSMVT_CREATE in which the batch was transferred as ls_goodsmvt_item-batch = 'batch4'.

This never happens if the batch is created with an on-line posting:

If you check in the transaction SE11 the domain CHARG you can see that the flag for 'lowercase' is not set. This means that the batch entered will always be converted to uppercase when this batch is entered on a screen.      

If we try now to move this batch stock in an on-line transaction, the system will convert the manually entered batch 'batch4' (lowercase) into 'BATCH4' (uppercase). It will then search in the database tables for 'BATCH4' and will find nothing for it, since the data is updated for a different batch: 'batch4':

In order to be able to remove this stock, you can proceed as follows:

  • In SE37 prepare in the Test Data Directory of the BAPI BAPI_GOODSMVT_CREATE a goods issue for the data you need to move.
    Here there are two decisive settings:
  1. Flag the Uppercase/Lowercase indicator that you will see on the top:
  2. Specify all data for the posting in capital letters except for the batch, that has to be specified in lower case letters:
  • In SE37 run a sequence of BAPIs to update the results into the database.

Follow the menu path Function Module → Test → Test Sequences.



The system will go to the BAPI BAPI_GOODSMVT_CREATE. Select from the Test Data Directory the case created before. Execute the BAPI.

Go back with the green arrow (F3). The system will go to the BAPI BAPI_TRANSACTION_COMMIT. Execute it. Go back with the green arrow. You can cancel the pop-up window that asks for a name for the test sequence.

Check now the stock of the batch 'batch4': It should have changed according to the posting.

Related notes / content:

1589593 - Cannot post a goods movement for a batch in lowercase.

1 Comment

  1. Hi Esther,

    great description. It worked for me too, with some adjustments however.
    You specified here that the movement type is 201. This movement didn't work at all in our case - the BAPI asked for many additional fields and then still didn't work. The original error in our case was caused by movement type 309, triggered in an external system and posted into SAP. Hence the appropriate approach was to use reversal of the 309. 310 works in this case, however I you need to define the entry in BAPI accordingly.

    In the field GOODSMVT_CODE we selected the 04, which impacts then the fields to be filled in in the GOODSMVT_ITEM. I made sure too, that the fields in the GOODSMVT_HEADER were correctly filled in, based on the information visible in material document which caused the issue. In our case for the movement 310 we needed to specify material, plant (to which the stock will be booked into), storage location (to which to stock will be booked into), batch (into which the booked batch will be transferred), movement type, quantity, unit of measure, withdrawn mark capital letter "X", then plant (from which the stock will be booked off), storage location (from which to stock will be booked off), batch (from which the stock will be booked off), profit center (which was used in the original booking with mvt type 309). I marked the field TESTRUN with an X so I could see it works. Only once I saw it did, I executed the sequence of BAPI as accordingly, getting back with green arrow as you described.