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 - Movement type 309

Former Member
0 Kudos

I am using this BAPI to do a 309 movement.

I get the error message M7 E021

Deficit of SL Unrestricted-use .

I do not get the error message for the same data when i use MB1b.

The problem exists in program LMBMVFV0

The online tcode assigns a value using this code....

ASSIGN (t156f-felds) TO <m>.

But when the BAPi executes there is no value here. It is 0. This causes the error.

I cannot find an OSS note.

Canybody have any experience mapping a move 309 using this BAPI

7 REPLIES 7

former_member188685
Active Contributor
0 Kudos

check the Table MCHB

For material/Plant/StorageLocation/Batch combination go to the table MCHB and see what is the value of CLABS . you can post the quantity what ever there in CLABS. if you post more than that you get that error. now in your case it is zero . so it is not possible to post.

Former Member
0 Kudos

solved on my own. was calling bapi incorrectly

Former Member
0 Kudos

solved on my own. was calling bapi incorrectly

0 Kudos

how did you solve this problem?

0 Kudos

Updating the thread as it appears in google search and has no solution.


Came across same issue when posting goods movement 309 on same material/batch twice. Problem is with function module that fetches data from MCHB table. If called two or more times it will pass data from local internal table instead of reading from database.

MB_PREFETCH_MATERIAL calls MATERIAL_PRE_READ_MBEF to read data from MCHB. Function module MATERIAL_PRE_READ_MBEF maintains buffer for MCHB. Unless calling program specifically request data from database, it (MATERIAL_PRE_READ_MBEF) tries to full-fill from internal table. Within function module MB_PREFETCH_MATERIAL there is a bit of logic which tells fm MATERIAL_PRE_READ_MBEF to use buffer if late exclusive block is activated (field TCURM-MBEQU transaction OMJI). 

Note 194070 resolves the issue.

0 Kudos

Hi Pawan,

Need your help in similar regards, i was using the same BAPI in my program for posting 201 mvt and it is giving me error of stock defecit whereas stock exists in the system tables MARD,MCHB etc etc.

Can you let me know any way to correct the same , as you have mentioned some buffer can we not clear or re run the program or any way to deal with the problem

As i need to post 201 mvt

0 Kudos

Its been while.

Have tried note 194070?