Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_DELIVERYPROCESSING_EXEC ignores DOCUMENT_TYPE_DELIVERY

Former Member
0 Likes
1,098

Hello experts,

we want to use BAPI_DELIVERYPROCESSING_EXEC to create an outbound delivery. Everything works fine, except that the BAPI ignores DOCUMENT_TYPE_DELIVERY in table REQUEST. The created document always contains a different delivery type.

Why does the BAPI ignore the given table entry and how does it determine the other delivery type?

Best regards,

David

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
908
3 REPLIES 3
Read only

Former Member
0 Likes
909
Read only

0 Likes
908

Hello Harini,

I followed you're link and the link http://www.sapnet.ru/viewtopic.php?t=362&view=previous in the corresponding thread.



      T_REQUEST-DOCUMENT_NUMB = I_VBAP-VBELN.
      T_REQUEST-DOCUMENT_ITEM = I_VBAP-POSNR.
      T_REQUEST-QUANTITY_SALES_UOM = DC_LFIMG.
      T_REQUEST-ID = 1.

      T_REQUEST-SHIP_TO = I_VBAK-KUNNR.
      T_REQUEST-SOLD_TO = I_VBAK-KUNNR.
      T_REQUEST-SALES_ORGANISATION = I_VBAK-VKORG.
      T_REQUEST-DISTRIBUTION_CHANNEL = I_VBAK-VTWEG.
      T_REQUEST-DIVISION = I_VBAK-SPART.
      T_REQUEST-PLANT = I_VBAP-WERKS.
      T_REQUEST-SALES_UNIT = I_VBAP-VRKME.
      T_REQUEST-BASE_UOM = I_VBAP-MEINS.
      T_REQUEST-MATERIAL = I_VBAP-MATNR.

      T_REQUEST-DELIVERY_DATE = SY-DATUM.
      T_REQUEST-DELIVERY_TIME = SY-UZEIT.
      T_REQUEST-TRANSP_PLAN_DATE = SY-DATUM.
      T_REQUEST-LOADING_DATE = SY-DATUM.
      T_REQUEST-GOODS_ISSUE_DATE = SY-DATUM.
      T_REQUEST-GOODS_ISSUE_TIME = SY-UZEIT.

      T_REQUEST-EXTDELV_NO = H_EDL-LIFEX.
      T_REQUEST-DOCUMENT_TYPE = 'A'. "Delivery
      T_REQUEST-DOCUMENT_TYPE_PREDECESSOR = 'A'. "Sales Ord
      T_REQUEST-DOCUMENT_TYPE_DELIVERY = 'ZLFB'.

      APPEND T_REQUEST.

      CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
        TABLES
          REQUEST      = T_REQUEST
          CREATEDITEMS = T_CREATED
          RETURN       = T_RETURN.

      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

But it still doesn't work. The BAPI creates a delivery with another document type.

Best regards,

David

Read only

Former Member
0 Likes
908

We didn't use the BAPI... we created a batch input program for this.