cancel
Showing results for 
Search instead for 
Did you mean: 

Partial delivery in VL10D

rafael_zaragatzky
Active Contributor
0 Kudos

Dear Gurus,

We are having the following problem. We have a shell program that creates deliveries for STO's by calling trs VL10D in the background. There's no problem when the stock is sufficient. But when there's no enough stock, VL10D refuses to create a delivery, saying that "only X pieces of material A are available".

We want the system to deliver the available quantity. When the user runs VL10D manually, this is not a problem, because s/he can just change the quantity on VL10D screen before proceeding to delivery generation, but this doesn't seem to be possible in CALL TRANSACTION.

Hence my question. Is it possible to let the system create a partial delivery in VL10D automatically? I have already checked the customer master ("max. no. deliveries" = 9 and "partial deliveries" = space, i.e. no restriction). I have also tried setting the avail. check rule = C (Delivery proposal) in the IMG option "Define Default Settings" under Avail. check (table TVTA).

Nothing helps.

If you don't see a possibility to let VL10D create partial delivery for the available quantity, maybe you know other way of creating deliveries for STO's by a program? Any BAPI or something?

TIA

Raf

Accepted Solutions (1)

Accepted Solutions (1)

tomasz_domanski
Contributor
0 Kudos

Hi Raf,

Can't you simply check available stock before calling transaction in your abap code (simple selection on table MARD, depending what you allocate as available for STO ) and then pass the right value into call transaction parameters (assuming the qty is there)?

BR,

Tomek

rafael_zaragatzky
Active Contributor
0 Kudos

Thank you, Tomek.

Indeed, this was my second alternative if not possible to solve in std. I left it to be #2, because I am unsure if one can populate fields on a report screen (not a dynpro) in CALL TRANSACTION.

BR

Raf

Answers (3)

Answers (3)

rafael_zaragatzky
Active Contributor
0 Kudos

Hi everybody,

Many thanks again for your tips. Just want to update you that I decided to exhaust option #2, i.e. tell VL10D which quantity to deliver. If the programmer doesn't manage to pass the value to the report screen that VL10D has, we will change the program to use BAPI_OUTB_DELIVERY_CREATE_STO instead of CALL TRANSACTION.

I am closing this thread.

BR

Raf

RobynCouch
Contributor
0 Kudos

I'm guessing the message you are getting is VL150.  A quick where used on that message from SE91 suggests it's only used in one place.  It looks like your problem is definitely coming from availability checking, I'm no expert in this area but try setting up a break point and examining the variables used in the if statement:

  PERFORM AVAILABILITY_CHECK USING RESBD_B

                                   WADAT_TMP
                                   LFMNG_TMP

                                   RESBQ_TMP

                                   VBELN_TMP

                                   POSNR_TMP

                                   SPACE.

  IF LFMNG_TMP GT RESBQ_TMP-VFMNG AND

      RESBQ_TMP-VERPR EQ SPACE.

    WRITE RESBQ_TMP-VFMNG TO MENGE_TMP UNIT RESBQ_TMP-MEINS.
    MESSAGE E150(VL) WITH MENGE_TMP             " Liefermg. > Verf. Mg.

                          RESBQ_TMP-MEINS
                          RESBD_B-MATNR.

  ENDIF.

rafael_zaragatzky
Active Contributor
0 Kudos

Hi Robyn,

No, I am satisfied with the results of the ATP check. It reports correctly the available quantity. What I want is that the system will also use this available quantity for the generation of the delivery (instead of the open STO quantity).

But I will definitely check the place that you showed - maybe there's possibility to alter the delivery quantity there. Many thanks for the tip.

BR

Raf

JL23
Active Contributor
0 Kudos

Can you try to ignore the availability check for the delivery item category in 0VLP customizing (should be item category NLN and NLC)

rafael_zaragatzky
Active Contributor
0 Kudos

Hi Jürgen,

The system then creates the delivery for the entire STO quantity, ignoring the fact that there are only 3 pcs in stock. 😞

BR

Raf

JL23
Active Contributor
0 Kudos

Yes, that is what I expected, but I do not really see anything wrong, as you can then pick what you have and the STO will be closed according to the settings made in PO delivery tab.

rafael_zaragatzky
Active Contributor
0 Kudos

Thank you, Jürgen.

I wouldn't like loading this activity on the users that process the delivery. They are not very skillful with SAP.

This will be my option #4. 🙂 #3 is altering the delivery quantity in some user exit in VL10D. I remember there were some.

BR

Raf

JL23
Active Contributor
0 Kudos

The settings about partial deliveries and max number of deliveries is not considered in deliveries, see 842829 - Characteristics of replenishment deliveries from STOs


Instead you have similar fields (5% of this functionality)  in a purchase order delivery tab, explained in a bit more detail in 1889803 - Complete delivery for STO not working in every case.



RobynCouch
Contributor
0 Kudos

I'm really surprised to read that first note.  I have successfully made use of those fields in an STO scenario.  I set the max deliveries to 1 and the partial delivery indicator to A to create a scenario where I need the STO to be closed after a delivery has been created.

rafael_zaragatzky
Active Contributor
0 Kudos

Dear Robyn,

My problem is not to close the STO after the first delivery. The field "partial delivery" works well for this purpose. My problem is to let the system generate the first delivery with the available quantity only (lower than the STO quantity).

As I wrote, this functionality is available when one runs VL10D manually (get the message about unavailability, then back off and change the quantity). But I would like the system to do it automatically. I believe thi sis possible for deliveries for sales orders.

BR

Raf