Quantcast
Channel: SCN : All Content - SAP ERP - Logistics Materials Management (SAP MM)
Viewing all articles
Browse latest Browse all 6446

BAPI_GOODSMVT_CREATE Movement 101 -> 543 - include serial numbers

$
0
0

Hi All.

 

We are using BAPI_GOODSMVT_CREATE to create a movement 101 for outsourcing material. On this call we are also passing the serial number tab in order to be filled with serial number already created.

This MOV101 also creates a MOV543 to consume the vendor stock (ex. 2 serial numbers). However, We are not able make these 2 serials filled on MIGO screen.

 

At MIGO:

 

image1.png

 

The input serial numbers for 101 movement are ok. However, when we click the next:

image2.png

The expected serial numbers were not filled.

 

 

Code used:

 

   wa_code = '01'.   wa_header-pstng_date = lv_keydate.   wa_header-doc_date   = lv_keydate.   it_item-move_type = '101'.   it_item-mvt_ind   = 'B'.   it_item-po_number = wa_ekpo-ebeln.   it_item-po_item   = wa_ekpo-ebelp.   it_item-material  =  wa_ekpo-matnr.   it_item-plant     = wa_ekpo-werks.   it_item-stge_loc  = wa_ekpo-lgort.   it_item-entry_qnt = wa_ekpo-menge.   it_item-entry_uom = wa_ekpo-meins.   APPEND it_item.   LOOP AT it_serial_numbers INTO wa_serial_numbers.     wa_bapi_serial_numbers-matdoc_itm = '0001'.     wa_bapi_serial_numbers-serialno   = wa_serial_numbers.     APPEND wa_bapi_serial_numbers TO it_bapi_serial_numbers.     CLEAR: wa_bapi_serial_numbers.   ENDLOOP.   LOOP AT it_input_serial_numbers INTO wa_serial_numbers.     wa_bapi_serial_numbers-matdoc_itm = '0002'.     wa_bapi_serial_numbers-serialno   = wa_serial_numbers.     APPEND wa_bapi_serial_numbers TO it_bapi_serial_numbers.     CLEAR: wa_bapi_serial_numbers.   ENDLOOP.   SET UPDATE TASK LOCAL.   CALL FUNCTION 'BAPI_GOODSMVT_CREATE'     EXPORTING       goodsmvt_header       = wa_header       goodsmvt_code         = wa_code     IMPORTING       materialdocument      = n_doc       matdocumentyear       = ano_doc     TABLES       goodsmvt_item         = it_item       goodsmvt_serialnumber = it_bapi_serial_numbers
return                = it_msg.

 

 

The second loop to input serial numbers was a try to pass those 2 serial numbers to the line 2, but same result.

 

Best Regards,

Charles


Viewing all articles
Browse latest Browse all 6446

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>