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: 

Send Delivery Type on BAPI_OUTB_DELIVERY_CREATE_SLS

Former Member
0 Kudos

Hi community!

Has anyone tried to send a different Delivery type on BAPI_OUTB_DELIVERY_CREATE_SLS?

This is the scenario:

In a Return sales document type (R1) we create 2 Delivery Documents one for "fine" goods (D1) and another one for damage goods (D2), the  D1 delivery is configured in the R1 Document so when we call BAPI_OUTB_DELIVERY_CREATE_SLS it creates the delivery with the items we send. Until this point there´s no problem.

The problem comes with the next step when we try to create de D2 delivery for damage goods and call the BAPI it sends the BAPI 001 message "No instance of object type OutboundDelivery has been created. External reference:" so: any ideas on how could we deal with this issue? i've checked the BAPI_OUTB_DELIVERY_SPLIT_DEC but it's not a split of a delivery, the fm BAPI_DELIVERYPROCESSING_EXEC but i read that's not a bapi for "public" use, the BAPI_OUTB_DELIVERY_SAVEREPLICA it's for "copy" of deliveries, i dunno if the ExtensionIn parameter on CREATE_SLS could be useful.

When creating the delivery on VL01N we have no problem, so maybe a call transaction?

Any ideas or comments will be appreciated.

Kind Regards!

Aarón.

1 ACCEPTED SOLUTION

former_member189779
Active Contributor
0 Kudos

BAPI_OUTB_DELIVERY_CREATE_SLS inturn calls RV_DELIVERY_CREATE. But while calling this FM it does not pass the delivery type which is import parameter of FM RV_DELIVERY_CREATE.

You can call RV_DELIVERY_CREATE directly from your program and pass your custom delivery type in import parameters.

Hope this will solve your problem.

4 REPLIES 4

vinoth_aruldass
Contributor
0 Kudos

hi,

in this case you can go for BDC call transaction method .

0 Kudos

Thx Vinoth that would be our last shot, mean while we we're trying with the BADI LE_SHP_DELIVERY_PROC to change the  delivery header and set the right delivery type. The only problem with this approach it's that the enhancement it's not getting call on the BAPI BAPI_OUTB_DELIVERY_CREATE_SLS.

former_member189779
Active Contributor
0 Kudos

BAPI_OUTB_DELIVERY_CREATE_SLS inturn calls RV_DELIVERY_CREATE. But while calling this FM it does not pass the delivery type which is import parameter of FM RV_DELIVERY_CREATE.

You can call RV_DELIVERY_CREATE directly from your program and pass your custom delivery type in import parameters.

Hope this will solve your problem.

0 Kudos

Thx Vinit we also tried the BADI LE_SHP_DELIVERY_PROC method FILL_DELIVERY_HEADER to change the delivery type on a given criteria, but creating the delivery with the right info was the correct way.