Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Getting error while executing BAPI_GOODSMVT_CREATE

$
0
0

Hi Experts,

 

I am creating MB1B scenario through BAPI_GOODSMVT_CREATE with GM_CODE '04' and all necessary input like item and serial numbers

 

       Sample Code for that requirement. 

 

         ls_item-material = ls_item_input-material."Material

         ls_item-stge_loc = sloc_from."From Sloc

         ls_item-batch = ls_item_input-batch. "Batch

 

         ls_item-move_type = gc_311.

 

         ls_item-entry_qnt = ls_item_input-entry_qnt. "Quantity

         ls_item-entry_uom = ls_item_input-entry_uom. "Unit Of Entry

         ls_item-val_type = ls_item_input-split_val_type. "Valuation Type

 

         ls_item-move_plant = plant. "Plant

         ls_item-move_mat = ls_item_input-material."Material

         ls_item-move_stloc = sloc_to."To Sloc

         ls_item-move_batch = ls_item_input-batch. "Batch

 

***Serial Number

         IF ls_item_input-serialnumber IS NOT INITIAL.

           lv_count = lv_count + 1.

           ls_serial-matdoc_itm = lv_count.

           ls_serial-serialno   = ls_item_input-serialnumber.

           APPEND ls_serial  TO lt_serial.

         ENDIF.

 

         APPEND ls_item TO lt_item.

 

while executing the bapi getting error : "Maintain serial numbers for total quantity"

 

I have looked into some of the forums but still i am getting same issue.

'Maintain serial numbers for total quantity error in bapi_goodsmvt_create

 

Note : From Tcode i am able to create material document.

 

Thanks,

Syam


Viewing all articles
Browse latest Browse all 8332

Trending Articles



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