06-18-2007 9:22 PM
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
06-18-2007 9:39 PM
Hi,
Why don't you use fm MB_CREATE_GOODS_MOVEMENT
Please check the documentation for BAPI_GOODSMVT_CREATE
aRs
06-18-2007 9:58 PM
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.