Skip to Content
avatar image
Former Member

Use of BAPI to create delivery..

For the business process of our company, we create inbound delivery in Purchase Order based on vendor data. We use BDC now with transaction VL31 since there is no BAPI available. We are on version 4.7 now.

SAP has published BAPI_DELIVERYPROCESSING_EXEC which offers this facility, but the note 577453 says it is not released to the customer. We would like to know how reliable this is to use. I don't see any other alternative also, because VL31 is an outdated transaction. Could anyone suggest an alternative.

Best regards,

Balagopal

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Nov 01, 2007 at 06:36 AM

    The BAPI you mention works fine for creating outbound deliveries from sales orders and stock transport schedule agreements. SAP would rather we did not use it, but I use it and have no problems. I must admit I have not tried using it for inbound deliveries.

    For inbound deliveries I have been using function module IDOC_INPUT_DESADV and I fill up the IDOC data table with code like the below example:-

    SELECT * FROM ekpo WHERE ebeln EQ purchase_order

    AND ebelp IN r_ebelp.

    • 'E1EDP07'. IDoc: Purchase order data shipping notification

    • Set PO Data

    rec_e1edp07-bstnk = ekpo-ebeln.

    rec_e1edp07-posex = ekpo-ebelp.

    PERFORM fill_idoc_data TABLES int_idoc_data

    USING 7 'E1EDP07' 4 '03' rec_e1edp07 w_docnum.

    • 'E1EDP09'. IDoc: Item data shipping notification

    • Set UOM

    w_meins = ekpo-meins.

    • Convert the unit of measure to ISO format

    CALL FUNCTION 'SAP_TO_ISO_MEASURE_UNIT_CODE'

    EXPORTING

    sap_code = w_meins

    IMPORTING

    iso_code = rec_e1edp09-vrkme.

    rec_e1edp09-lfimg = ekpo-menge.

    PERFORM fill_idoc_data TABLES int_idoc_data

    USING 8 'E1EDP09' 7 '04' rec_e1edp09 w_docnum.

    ENDSELECT. "Item Level

    FORM fill_idoc_data TABLES pa_edidd STRUCTURE edidd

    USING pa_segnum LIKE edidd-segnum

    pa_segnam LIKE edidd-segnam

    pa_psgnum LIKE edidd-psgnum

    pa_hlevel LIKE edidd-hlevel

    pa_sdata TYPE any

    pa_docnum LIKE edidd-docnum.

    pa_edidd-segnum = pa_segnum.

    pa_edidd-segnam = pa_segnam.

    pa_edidd-psgnum = pa_psgnum.

    pa_edidd-hlevel = pa_hlevel.

    pa_edidd-sdata = pa_sdata.

    pa_edidd-docnum = pa_docnum.

    APPEND pa_edidd.

    ENDFORM. " FILL_IDOC_DATA

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 02, 2007 at 10:22 AM

    Thanks, HARDY.

    We are able to update using this. But the confirmations tab in the Purchase ORder is not getting updated with this document. If I do online, it updates the confirmations tab in the Purchase Order item. Is there anything I am missing in this. Your help will be highly appreciated.

    Best regards,

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 24, 2010 at 05:12 PM

    GN_DELIVERY_CREATE does the job (not released for customer use by SAP if you are a purist!)

    Add comment
    10|10000 characters needed characters exceeded