Hello experts , When I create a Goods Receipt with reference to Purchase Order using BAPI_GOODSMVT_CREATE, the following error message appears. No goods receipt possible for purchase order <PO number> <line item number>. But the GR is getting created manually using Transaction MIGO for the same PO number. Here is the code: SELECT deliverydocument, “vbeln deliverydocumentitem, “posnr plant “werks FROM i_deliverydocumentitem “lips INTO TABLE @DATA(dlv_item) WHERE deliverydocument IN @inb_delv ” OR deliverydocument IN @delv_num ) AND plant IN @Store. IF sy–subrc = 0. SELECT deliverydocument, “vbeln supplier “lifnr FROM i_deliverydocument “likp INTO TABLE @DATA(dlv_hdr) FOR ALL ENTRIES IN @dlv_item WHERE deliverydocument = @dlv_item–deliverydocument AND deliverydate IN @s_date_tmp AND sddocumentcategory = ‘7’. IF sy–subrc = 0. SELECT businesspartner, “partner bpidentificationtype, “type bpidentificationnumber “idnumber FROM i_bupaidentification “but0id INTO TABLE @DATA(bp_id) FOR ALL ENTRIES IN @dlv_hdr WHERE businesspartner = @dlv_hdr–supplier AND bpidentificationtype = ‘GLREG’. IF sy–subrc = 0. SELECT low FROM ztle_constant INTO TABLE @DATA(legacy_vendor) WHERE name = ‘ZS4_LEGACY_VENDOR’. IF sy–subrc = 0 AND legacy_vendor IS NOT INITIAL. …
GR not getting posted through BAPI_GOODSMVT_CREATE-code, but successfully posted by MIGO transaction Read More »