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: 

Problem with BAPI_GOODSMVT_CREATE

Former Member
0 Kudos

Hi everyone,

I want to use the BAPI_GOODSMVT_CREATE instead of doing a batch input at MB1B transaction. (Movement type = 541).

Below, a part of the code:

  • Header for bapi

perform f_monta_itens_header changing i_header.

  • Itens for bapi.

perform f_monta_itens_saida tables i_itens.

call function 'BAPI_GOODSMVT_CREATE'

exporting

goodsmvt_header = i_header

goodsmvt_code = '04' " MB1B

importing

materialdocument = l_doc_material

matdocumentyear = l_ano_doc

tables

goodsmvt_item = i_itens

return = i_return.

I almost sure the parameters for BAPI were filled correctly, but I think it's missing something, because at i_return, I have the following message.

"Enter an alternative base"

Executing MB1B I can see exactly what is that, but I don't know what could be the correspondent at the BAPI. At the MB1B the parameter is MSEG-J_1BEXBASE.

Can anyone help me in this subject?

Thanks in advance,

Raphael

2 REPLIES 2

former_member194669
Active Contributor
0 Kudos

Hi,

Why don't you use fm MB_CREATE_GOODS_MOVEMENT

Please check the documentation for BAPI_GOODSMVT_CREATE

aRs

Former Member
0 Kudos

I don't think it is possible to use the BAPI if you have to fill that field. Take a look at MB_CREATE_GOODS_MOVEMENT as suggested by aRs as that field is available to you in the tables parameter IMSEG.