‎2012 Feb 06 2:17 PM
Hi All,
I am facing an error like 'u2018Content of order 1011907: MDT218AJ10 transferred to interface (IMSEG): T-86410-71".
I have written the code as below. Please let me know what is missing when using the BAPI 'BAPI_GOODSMVT_CREATE'. What is the cause of this error ?
*Action in Transaction (GM_CODE)
*GM Code for Goods Issue for Production Order is 03
gs_gmcode-gm_code = '03'.
*Header Data
*Posting date
gs_header-pstng_date = sy-datum.
*Document date
gs_header-doc_date = sy-datum.
*Item Data
*Material
gs_item-material = zptp_s_rf_migo_261-matnr1.
*Movement Type
gs_item-move_type = '261'.
*Movement Indicator
gs_item-mvt_ind = 'F'.
*Stock Type
gs_item-stck_type = 'F'.
*Plant
gs_item-plant = gv_plant.
*Storage Location
gs_item-stge_loc = gv_str_loc.
*Quantity
gs_item-entry_qnt = zptp_s_rf_migo_261-menge2.
*Unit
gs_item-entry_uom = gv_uom.
*ISO code for unit of measurement
gs_item-entry_uom_iso = gv_uom.
*Order Number
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = zptp_s_rf_migo_261-aufnr
IMPORTING
output = gs_item-orderid.
*Reservation Number
gs_item-reserv_no = gv_resv_num.
*Reservation Item
gs_item-res_item = gv_resv_itm.
*Reservation Type
gs_item-res_type = gv_resv_type.
APPEND gs_item TO gt_item.
Calling BAPI_GOODSMVT_CREATE to create the Material Document Number
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = gs_header
goodsmvt_code = gs_gmcode
IMPORTING
goodsmvt_headret = gs_headret
TABLES
goodsmvt_item = gt_item
goodsmvt_serialnumber = gt_serial
return = gt_return.
Thanks in Advance.
‎2012 Feb 06 4:03 PM
Hi
Wellcome tp SDN. See SAP Note 520813 - FAQ: BAPIs for goods movements. Remember to use BAPI_TRANSACTION_COMMIT.
Regards,
Eduardo
‎2012 Feb 06 4:06 PM
hi,
did you look at message ?
System says, there are differences between the interface data and the order data. It can be anything. I think you should check
data in the interface .
this is the long explanation of your message :
Diagnosis
When calling the function module MB_CREATE_GOODS_MOVEMENT or the BAPI GoodsMovement.CreateFromData (BAPI_GOODSMVT_CREATE) to post a goods receipt for a production order, there are differences between the interface data and the order data.
Example: The order was created for plant 0001, but plant 0002 is passed on in the interface.
The system checks this for the material and the order item.
System response
Due to this difference, the system cannot post the goods receipt.
Procedure
Check the data in the interface (IMSEG-WERKS, IMSEG-AUFNR). If necessary, correct the plant or the order number in the interface.
<< Moderator message - Point begging removed >>
Edited by: Rob Burbank on Feb 6, 2012 11:24 AM
‎2012 Feb 07 4:49 AM
Hi,
Check the bellow links for working on production order bapi.
http://wiki.sdn.sap.com/wiki/display/Snippets/BAPI_GOODSMVT_CREATE-ABAP
http://wiki.sdn.sap.com/wiki/display/ABAP/SamplecodeBAPI_GOODSMVT_CREATE
http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm
Regards,
Goutam Kolluru.
‎2012 Feb 07 5:34 AM
Hi Eduardo,
Thanks for input for SAP Note. I will check on this and get back.
Hi Goktasor,
Thanks for the input.
"Check the data in the interface (IMSEG-WERKS, IMSEG-AUFNR). If necessary, correct the plant or the order number in the interface." - I have checked in the debugger. The data is correct. Same as I have entered. The plant and order number is same as entered.
Hi Goutam Kolluru,
Thanks for the input.
I have already check that links. It is for purchase order. I need good issue for production order and the reason for that error.
‎2012 Feb 07 11:29 AM
Hi Eduardo,
Regarding SAP Note. I have checked it. I haven't found the solution.
Anyways thanks for the input.