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

DELIVERY

Former Member
0 Likes
1,040

Hi,

Please advise me a BAPI which will create delivery. I need to pass all line items with quantity for creating delivery along with shipping point and others.

Thanks in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
933

Hi ulrich,

I need to create an outbound delivery with reference to SO.

AS per your mail, if i have a FM i would directly call that FM and pass the parameters.

How to use the method. assume i have a so, can u give me an example and if it is not released for customers, u mean to say that it will create problem for me while doing the transportation.

6 REPLIES 6
Read only

0 Likes
933

Hi,

You could use BAPI DeliveryProcessing.Execute to create deliveries with reference to purchase orders and sales orders. There is no BAPI to create deliveries without reference at the moment.

If you use BAPI DeliveryProcessing.Execute please take into account, that this BAPI is not released for customers, therefore there are some limitations which are described in note 577453 (in trx. BAPI you have to set the filter to 'All' to see this BAPI).

Best regards, Ulrich

Read only

0 Likes
933

Hello

Did you use this BAPI in 4.7 for creation additional item lines intoexisting NLCC delivery that was created with reference to NB purchase intercompany order in transaction VL10B?

Eddie

Read only

Former Member
0 Likes
934

Hi ulrich,

I need to create an outbound delivery with reference to SO.

AS per your mail, if i have a FM i would directly call that FM and pass the parameters.

How to use the method. assume i have a so, can u give me an example and if it is not released for customers, u mean to say that it will create problem for me while doing the transportation.

Read only

0 Likes
933

The function module behind the BAPI is BAPI_DELIVERYPROCESSING_EXEC.

The report below shows a very simple example how to use the function module to create a delivery for a single sales order item. For each item you want to deliver you need to create one line in table REQUEST. For example the table RETURN contains the messages of the delivery creation and table CREATEDITEMS returns the delivery items which were created.

As the BAPI is not released for customers the function or interface might be changed incompatibly. But this is only a minor risk, as for example between 4.6C and ERP2004 the main function remained unchanged (like the creation of deliveries for sales orders).

Best regards, Ulrich

REPORT  zz_test_bapi                        .

DATA:
  ls_request     TYPE bapideliciousrequest
, lt_request     TYPE bapideliciousrequest OCCURS 0
.

PARAMETERS:
  p_vbeln TYPE  vbeln_vl    "sales order number
, p_posnr TYPE  posnr_vl    "sales order item
, p_lfimg TYPE  lfimg       "delivery quantity (Sales UoM)
, p_datvw TYPE  datvw DEFAULT '2'
, p_date  TYPE  datum DEFAULT sy-datlo
, p_time  TYPE  uzeit DEFAULT sy-uzeit
.

  ls_request-document_type      = 'A'.
  ls_request-document_numb      = p_vbeln.
  ls_request-document_item      = p_posnr.
  ls_request-quantity_sales_uom = p_lfimg.
  ls_request-date_usage         = p_datvw.
  ls_request-date               = p_date.
  ls_request-time               = p_time.

  APPEND ls_request TO lt_request.

  CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'
    TABLES
      request                 = lt_request.

COMMIT WORK.

Read only

Former Member
0 Likes
933

You can also use this fmod. Let me know if this was useful for you.

ITAB_DOCUMENTS-DOC_CAT = '2'.

ITAB_DOCUMENTS-DOC_NBR = 'NNNNNNNN'. " Sales Order #

ITAB_DOCUMENTS-DOC_POS = "NNNNN'. " Line Item

ITAB_DOCUMENTS-DEL_QUANT = 100. "Qty ITAB_DOCUMENTS-DEL_UNIT = 'EA'. "Unit of Measure

APPEND ITAB_DOCUMENTS.

*-Call the function to create deliveries

CALL FUNCTION 'W_FRM_DELIVERY_CREATE_GENERAL'

EXPORTING

I_INTERNAL_COMMIT = 'X'

I_NO_LOCK_DOCS = 'X'

I_INIT_UNIT_CONV = 'X'

TABLES

T_DOCUMENTS = ITAB_DOCUMENTS

T_MESSAGELOG = ITAB_MESSAGELOG

  • T_VBAK =

  • T_VBAP =

  • T_EKKO =

  • T_EKPO =

  • T_ekpo =

  • T_EKKN =

  • T_KNVV =

  • T_VBSK =

  • T_VBFS =

  • T_VBLS =

EXCEPTIONS

NOTHING_TO_DO = 1

MESSAGE_ACCORDING_LOGS = 2

OTHERS = 3.

Read only

0 Likes
933

Jay -- this response is exactly what I needed -- how can I award you points if I am not the person who asked the original question?