‎2006 Jan 12 11:54 AM
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
‎2006 Jan 12 12:49 PM
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.
‎2006 Jan 12 12:36 PM
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
‎2008 Mar 24 4:51 PM
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
‎2006 Jan 12 12:49 PM
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.
‎2006 Jan 12 2:39 PM
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.
‎2006 Oct 04 9:12 PM
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.
‎2007 Feb 03 2:21 PM
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?