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 instead of MB0A

Former Member
0 Kudos

Hello All,

We are trying to use BAPI_GOODSMVT_CREATE function module for creation of Goods Movement. We would like to know if performs in the same way as that of MB0A transaction?

In MB0A transaction, there is a field for JIT Call Numbers. But the import parameters of the function BAPI_GOODSMVT_CREATE does not contain this parameter. It seems that when JIT call number is specified in MB0A transaction, it updates the tables with the Kanban status and Kanban Qnty. Since there is no such field in the function module, will it update the tables, in the same fashion as that of MB0A?

Please help us, saying if we are on the right path using the function module. If not, is there any other function module which we can use.

We would appreciate your early response.

Regards,

Juwin & Team.

3 REPLIES 3

Former Member
0 Kudos

Hi

12 months on and I too am asking this question - is there a method/BAPI call for a JIT Goods receipt which updates the Kanban status and quantity??

Alan

Former Member
0 Kudos

HI,

in table

GOODSMVT_ITEM

fill

DELIV_NUMB

DELIV_ITEM

with data from outbound delivery document

and

PO_NUMB

PO_ITEM

with data from de corresponding purchase order

Former Member
0 Kudos

data: ls_header  like BAPI2017_GM_HEAD_01,
      lt_item    like standard table of BAPI2017_GM_ITEM_CREATE with header line,
      lt_itemcwm like standard table of /CWM/BAPI2017_GM_ITEM_CREATE with header line,
      lt_return  like standard table of BAPIRET2 with header line,
      l_matdoc   like BAPI2017_GM_HEAD_RET-MAT_DOC.


*header
ls_header-PSTNG_DATE = '20081007'.
ls_header-DOC_DATE   = '20081007'.
ls_header-REF_DOC_NO = '0080000141'.

*item
lt_item-MATERIAL   = '000000000003100051'.
lt_item-PLANT      = '5100'.
lt_item-STGE_LOC   = '5102'.
lt_item-BATCH      = ''.
lt_item-MOVE_TYPE  = '101'.
lt_item-ENTRY_QNT  = '1'.
lt_item-ENTRY_UOM  = 'BUC'.
lt_item-PO_NUMBER  = '4500000513'.
lt_item-PO_ITEM    = '00010'.
lt_item-MVT_IND    = 'B'.
lt_item-DELIV_NUMB = '0080000143'.
lt_item-DELIV_ITEM = '000010'.
append lt_item.

*IF you have CWM enabled
*item CWM
lt_itemcwm-MATDOC_ITM    = '0001'.
lt_itemcwm-QUANTITY_PME  = '1'.
lt_itemcwm-BASE_UOM_PME  = 'BUC'.
lt_itemcwm-ENTRY_QNT_PME = '100'.
lt_itemcwm-ENTRY_UOM_PME = 'KG'.
append lt_itemcwm.


CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
  EXPORTING
    goodsmvt_header               = ls_header
    goodsmvt_code                 = '01'
*   TESTRUN                       = ' '
*   GOODSMVT_REF_EWM              =
 IMPORTING
*   GOODSMVT_HEADRET              =
   MATERIALDOCUMENT              = l_matdoc
*   MATDOCUMENTYEAR               =
  tables
    goodsmvt_item                 = lt_item
*   GOODSMVT_SERIALNUMBER         =
    return                        = lt_return
*   GOODSMVT_SERV_PART_DATA       =
*   EXTENSIONIN                   =
   GOODSMVT_ITEM_CWM             = lt_itemcwm
          .

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
 EXPORTING
   WAIT          = 'X'
 IMPORTING
   RETURN        = lt_return
          .