2016 Jan 28 7:16 AM
Hello,
I am facing problem with this bapi such as BAPI_GOODSMVT_CREATE. when i consumed 2 quantity for 2 serial numbers such as
serial number : ABC1,ABC2. for 261 movment type that time 2 quantity gets consumed but its related only 1 serial number(ABC1) gets consumed for 261 movement type. another serial no : ABC2 not gets consumed for 261 movment type . please tell that how to fulfill this requirement.
currently i am passing this parameters to this BAPI.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = gmhead
goodsmvt_code = gmcode
* TESTRUN = 'X'
IMPORTING
goodsmvt_headret = mthead
materialdocument = log_data-mat_doc
matdocumentyear = log_data-doc_year
TABLES
goodsmvt_item = item
goodsmvt_serialnumber = srno
return = errmsg. "
2016 Jan 28 7:20 AM
This is just the standard BAPI call, it does not explain what values you submit
2016 Jan 28 7:30 AM
Hello Jurgen,
Please find below details
gmhead-pstng_date = sy-datum. "current date"
gmhead-doc_date = sy-datum. "current date"
gmhead-pr_uname = sy-uname. "user name"
gmcode-gm_code = '03'. "goods movement code"
wa_item-material = it_conf-matnr2. "material number"
wa_item-plant = '1004'. "plant"
wa_item-entry_qnt = v_yield. "yield quantity for confirmation"
wa_item-move_stloc = 'G007'. "storage location"
wa_item-stge_loc = 'G007'. "storage location"
wa_item-move_type = '261'. " movement type "
wa_item-orderid = it_conf-aufnr. "this production order screen field"
wa_item-serialno_auto_numberassignment = 'X'.
2016 Jan 28 10:39 AM
Can you add a screenshot from tables goodsmvt_item and goodsmvt_serialnumber
2016 Jan 28 10:53 AM
gmhead-pstng_date = sy-datum.
gmhead-doc_date = sy-datum.
gmhead-pr_uname = sy-uname.
gmcode-gm_code = '03'.
wa_item-material = it_conf-matnr2.
wa_item-plant = '1004'.
wa_item-entry_qnt = v_yield.
wa_item-move_stloc = it_conf-lgort2.
wa_item-stge_loc = it_conf-lgort2.
wa_item-move_type = it_conf-bwart2.
wa_item-orderid = it_conf-aufnr.
wa_item-serialno_auto_numberassignment = 'X'.
APPEND wa_item TO item.
LOOP AT it_equi2 INTO wa_equi2.
wa_srno-matdoc_itm = sy-tabix.
wa_srno-serialno = wa_equi2-sernr.
APPEND wa_srno TO srno.
CLEAR wa_srno.
ENDLOOP.
this goods movement bapi and here i have passed item and srno in tables section.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = gmhead
goodsmvt_code = gmcode " add on 14 oct
* TESTRUN = 'X'
IMPORTING
goodsmvt_headret = mthead
materialdocument = log_data-mat_doc
matdocumentyear = log_data-doc_year
TABLES
goodsmvt_item = item
goodsmvt_serialnumber = srno
2016 Jan 28 2:04 PM
Do you have a mixed situation? having serial numbers for one part of the quantity and what as well automatic serial numbers for the rest?
Better post a screenshot of the tables from debugger tool