Application Development 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: 

BAPI_DELIVERYPROCESSING_EXEC

Former Member
0 Kudos

Can someone provide the input parms for this BAPI? I am having difficulty getting this to deliver a sales order.

Thanks in advance for your time.

David P

9 REPLIES 9

Former Member
0 Kudos

Hi David,

Check out program MV50AWIBF01 form CREATE_IBDLV_FROM_PURORD. Sure its for a purchase order, but I think this provides a good example which you could use for a sales order also.

If this is no good then do a where used list on the BAPI (thats what I did).

Hope that helps.

Cheers,

Brad

Former Member
0 Kudos

Hi David,

I hope by now you must have successfully implemented BAPI_DELIVERYPROCESSING_EXEC. Can you please provide input parameters? I am stuck, unable to make BAPI work.

Thank you,

Akhila G.

0 Kudos

Can anyone now please provide input parameter with an example?

... i will pay a dinner!

thank you,

Antonio

former_member221770
Contributor
0 Kudos

Hi Antonio,

Here is a little program that I wrote to test out this BAPI. This program asks for a Sales Order Number and Line Item, then creates a Delivery for 1 unit referencing that Sales Order.

TBL_REQUEST is a denormalised table holding the delivery data for each line item. This means that each record in this table contains both header and line item data.

Hope this helps.

Cheers,

Pat.

*----


REPORT ypat_create_delivery LINE-SIZE 256.

*----


  • Internal Tables

*----


  • Table to Hold Delivery Request

DATA: BEGIN OF tbl_request OCCURS 0.

INCLUDE STRUCTURE bapideliciousrequest.

DATA: END OF tbl_request.

  • Table to hold Line Items Created

DATA: BEGIN OF tbl_items OCCURS 0.

INCLUDE STRUCTURE bapideliciouscreateditems.

DATA: END OF tbl_items.

  • Table to hold BAPI Return Messages

DATA: BEGIN OF tbl_return OCCURS 0.

INCLUDE STRUCTURE bapiret2.

DATA: END OF tbl_return.

*----


  • Structures

*----


DATA: st_vbak LIKE vbak,

st_vbap LIKE vbap.

*----


  • Selection Screen

*----


PARAMETERS: p_vbeln LIKE vbak-vbeln,

p_posnr LIKE vbap-posnr DEFAULT '000010'.

*----


  • Start of Selection

*----


START-OF-SELECTION.

SELECT SINGLE *

INTO st_vbak

FROM vbak

WHERE vbeln = p_vbeln.

CHECK sy-subrc EQ 0.

SELECT SINGLE *

INTO st_vbap

FROM vbap

WHERE vbeln = p_vbeln AND

posnr = p_posnr.

----


End of Selection

*----


END-OF-SELECTION.

IF st_vbak IS INITIAL.

WRITE:/ 'Invalid Sales Order'.

EXIT.

ENDIF.

tbl_request-document_numb = st_vbap-vbeln.

tbl_request-document_item = st_vbap-posnr.

tbl_request-ship_to = st_vbak-kunnr.

tbl_request-sold_to = st_vbak-kunnr.

tbl_request-sales_organisation = st_vbak-vkorg.

tbl_request-distribution_channel = st_vbak-vtweg.

tbl_request-division = st_vbak-spart.

tbl_request-plant = st_vbap-werks.

tbl_request-quantity_sales_uom = '1'.

tbl_request-sales_unit = st_vbap-vrkme.

tbl_request-base_uom = st_vbap-meins.

tbl_request-material = st_vbap-matnr.

tbl_request-delivery_date = st_vbak-bstdk.

tbl_request-delivery_time = '160000'.

tbl_request-transp_plan_date = st_vbak-bstdk.

tbl_request-loading_date = st_vbak-bstdk.

tbl_request-goods_issue_date = st_vbak-bstdk.

tbl_request-extdelv_no = '98765'.

tbl_request-document_type = 'A'. "Delivery

tbl_request-document_type_predecessor = 'A'. "Sales Ord

tbl_request-document_type_delivery = 'LF'.

APPEND tbl_request.

CALL FUNCTION 'BAPI_DELIVERYPROCESSING_EXEC'

TABLES

request = tbl_request

createditems = tbl_items

return = tbl_return.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

LOOP AT tbl_return.

WRITE:/ tbl_return-type,

tbl_return-id,

tbl_return-number,

tbl_return-message.

ENDLOOP.

0 Kudos

I am trying to create an Inbound Delivery for a Purchase Order with the following parameters using BAPI_DELIVERYPROCESSING_EXEC; but got this error.

" Dlv. type (dlv. catgry for mat. 7698-AR and BWART ) cannot be determined ".

And when I did not pass the parameter

wa_delvreq-DOCUMENT_CATEGORY_SD = '7', I got a dump.

Any suggestions welcome.

wa_delvreq-document_numb = wa_GPA_SUPPLY_INVOICE-PONUMBER.

wa_delvreq-document_item = wa_GPA_SUPPLY_INVOICE-POITEM.

wa_delvreq-ship_to = 'AUS-9015'.

wa_delvreq-sold_to = 'AUS-9015'.

wa_delvreq-sales_organisation = '2001'.

wa_delvreq-distribution_channel = '00'.

wa_delvreq-division = '10'.

wa_delvreq-plant = '2001'.

wa_delvreq-vendor = '0020001622'.

wa_delvreq-PURCHASE_ORGANISATION = '2001'.

wa_delvreq-quantity_sales_uom = '1'.

wa_delvreq-sales_unit = 'EA'.

wa_delvreq-base_uom = ''.

wa_delvreq-material = wa_GPA_SUPPLY_INVOICE-PURMAT.

wa_delvreq-delivery_date = sy-datum.

wa_delvreq-delivery_time = '160000'.

wa_delvreq-transp_plan_date = sy-datum.

wa_delvreq-loading_date = sy-datum.

wa_delvreq-goods_issue_date = sy-datum.

wa_delvreq-extdelv_no = '98765'.

wa_delvreq-document_type = 'B'. "Delivery - A-SalesOrder

wa_delvreq-document_type_predecessor = 'B'. "A-Sales Ord

wa_delvreq-document_type_delivery = 'EL'. " Sales Delivery - 'LF'.

wa_delvreq-DOCUMENT_CATEGORY_SD = '7'.

wa_delvreq-RECEIVING_POINT = '2001'.

Former Member
0 Kudos

David,

I need the same information as you do...

Did you resolve your problem ?

If yes, can you post the solution ?

It will be highly appreciated.

0 Kudos

I'm using this Bapi in reference to a MM scheduling agreement. I have a similar error message when I don't have enough demand in my agreement. If there is a demand everything is fine. I think the problem is the same with SD SA.

0 Kudos

Hi,

I have the same problem. Anyone has fix the problem?

I'm using BAPI_DELIVERYPROCESSING_EXEC and sometimes (not frequently) i obtain the message - Dlv. type (dlv. catgry for mat. and BWART ) cannot be determined -

I can't find the cause.

The problem is that my movement type is not 411 or 412 like the oss note says.

Thx!

Former Member
0 Kudos

Hi,

I too have the same requirement of creating an outbound delivery using BAPI_DELIVERYPROCESSING_EXEC. Can you please help?

Please provide sample example too if possible.

Thank you.

Gayatri