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: 

Partial delivery with BAPI_SALESORDER_CREATEFROMDAT2

Former Member
0 Kudos

Dear All,

Is there a way to force partial delivery in BAPI_SALESORDER_CREATEFROMDAT2 ?

By default "complete delivery" is chosen.

I read somewhere that people fixed the issue using transaction OVZJ but in my case, this solution is not satisfactory because if I change this customizing, it changes the working order of the transaction VA01 (sales order creation).

If found a dedicated flag (PART_DLV) in ITEMS_IN table but I was not able to make it work...

Follow my example:

- 27 items in stock

- I want to make an order for 30 items

- VA01 creates the sales order and a delivery with confirmed quantity 27

- BAPI_SALESORDER_CREATEFROMDAT2 creates the sales order and u201Cno delivery createdu201D.

Thanks for your help.

Best regards

11 REPLIES 11

Former Member
0 Kudos

Hi,

Have you checked Order type Configuration in SPRO(T Code:VOV8) ? Check whether the Option "Immediate Delivery" is set to 'X'.

Regards

Vinod

0 Kudos

Dear Vinod,

I checked that fields.

There I have A

A Create delivery immediately

X Create delivery immediately, if quantity confirmed for today

I tried also with X but it doesn't work...

Thanks anyway!!!

Regards

0 Kudos

Hi,

Check the customer master settings for the customer code you have mentioned in BAPI. Check the field KNVV-KZTLF, this must carry the value ' '.

Alternatively you can check the same through XD03. Enter the customer code, Sales area, Distribution Channel, Sales area -> press enter -> Go to Shipping tab of Sales area details -> Check the value for option"Partial delivery for item", this should be blank.

Regards

Vinod

0 Kudos

Dear Vinod,

I checked also the field KNVV-KZTLF and it's blank!!!

The strange thing is that with transaction VA01 it works correctly!!!

But I need to use the BAPI...

Many thanks and Regards

0 Kudos

Hope you are passing

ORDER_ITEMS_IN-PART_DLV = ' '.
ORDER_ITEMS_INX-PART_DLV = 'X'.
ORDER_HEADER_IN-COMPL_DLV = ' '.
ORDER_HEADER_INX-COMPL_DLV = 'X'.

while calling BAPI.

Regards

Vinod

Edited by: Vinod Kumar on May 10, 2010 4:11 PM

0 Kudos

Dear Vinod,

actually there wasn't

ORDER_HEADER_INX-COMPL_DLV = 'X'.

now I insert it.... but it doesn't work

Many thanks and best regards.

0 Kudos

Hi fabrizio..

After the BAPI_SALESORDER_CREATEFROMDAT2 you call FM TRANSACTION_COMMIT???

regards

Marco

0 Kudos

Ciao Marco,

also without commit, the bapi returns something like:

SALES_HEADER_IN has been processed successfully

SALES_ITEM_IN has been processed successfully

EMERGENCY ORD 400021030 has been saved (no delivery created)

Thanks.

0 Kudos

Hi Fabrizio..

Yes but for a real commit aflter BAPI_SALESORDER_CREATEFROMDAT2

you must call this FM: BAPI_TRANSACTION_COMMIT

regards

Marco

0 Kudos

Ciao Marco,

I tried also with BAPI_TRANSACTION_COMMIT after BAPI_SALESORDER_CREATEFROMDAT2, but the partial delivery not created.

Thanks.

Former Member
0 Kudos

In order to give the solution to all reader in the future. I finally find a solution.

I wrote an OSS message to SAP and they aswer me in this way:

"Dear Customer,

In a BAPI, the ATP check is performed in the background.

Since the system is performing the availability check

in background, the availability screen cannot be performed.

So it is not able to make decisions regarding full

delivery, delivery proposal...In this case,the system uses

the configuration found in OVZJ. If your availability checking

rule in OVZJ is blank, the system will choose full delivery.

Sorry, but I can not give you a better solution to customizing in

OVZJ, if you whish a partial delivery."

In that transaction in customizing I insert the value "E" and the partial delivery is created from VA01 and from bapi too.