cancel
Showing results for 
Search instead for 
Did you mean: 

Rescheduling Sales orders

former_member299860
Participant
0 Kudos

Dear all,

I am facing issue while trying to reschedule the sales orders using Transaction Code - V_V1


Actually what is happening is that initially in the sales order the system gives delivery dates based on Lead time but later on when the realistic dates are given by our vendors we adjust the dates in the sales orders. We use the T-code V_V1 to do this process. When we do this ideally it should happen that it should give priority to the first sales order and confirm the quantity. But what is happeneing is that the system is randomly confirming to just any sales order which it finds in the line.

We want the system to do the confirmation on first in first out basis.Kindly help me in achieving this.

Best Regards,

AndyL

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

when rescheduling, SAP will sort by:

document type

delivery priority

sales order creation date (or scheduling date if you select soonest scheduling date)

sales order number

line item number

and then run an availability check.

Regards,

JM,

former_member223981
Active Contributor
0 Kudos

You are using V_V1 which has a very limited "Sort" functionality". This "Sort" functionality has been significantly enhanced in V_V2. Therefore, if you are on a release that contains V_V2, you should use this transaction.

The relevant code in V_V1 is here:

SDV03V01 (Form xtab_select)

***********************************

SELECT * FROM v_vmvac WHERE vkorg  = p_vkorg


                          AND vtweg  = p_vtweg


                          AND spart IN s_spart


                          AND vkgrp IN s_vkgrp


                          AND vkbur IN s_vkbur


                          AND kunnr IN s_kunnr


                          AND ernam IN s_ernam


                          AND erdat IN s_erdat


  AND vbeln IN s_vbeln.


    SELECT SINGLE * FROM vbuk WHERE vbeln = v_vmvac-vbeln.


    CHECK sy-subrc = 0 AND vbuk-lfgsk NE charc


                       AND vbuk-lfstk NE charc.



* Nur Aufträge


    IF p_orders EQ space.


      CHECK vbuk-vbtyp = charc.


    ENDIF.



    xtab-vbeln = vbuk-vbeln.


    APPEND xtab.



  ENDSELECT.


  SORT xtab.   <<<<<<<<<<<<<<<<<<<<<<

***********************************

Here, the system selects data into internal table XTAB and then sorts this table without an explicit sort key. Contrast this to the V_V2 code:

SDV03V02 (Form XTAB_SORT)

***********************************

  IF p_schlv = 'X'.

*  When on schedule line level use additional sort-criterias.


    SORT xtab BY (LV_SORT1) (LV_SORT2) (LV_SORT3)


                 (LV_SORT4) (LV_SORT5) eindt etenr.


  ELSEIF p_itemlv = 'X'.


    SORT xtab BY (LV_SORT1) (LV_SORT2) (LV_SORT3)


                 (LV_SORT4) (LV_SORT5).


  ENDIF.

***********************************

Here, XTAB is sorted by an explicit key (there is a "BY" after the sort abap command).

So I think the options for you are to:

1) Switch to using V_V2

2) Significantly modify the above coding for V_V1. This would not be an easy modification as XTAB in V_V1 only contains the VBELN field.

former_member299860
Participant
0 Kudos

Hi experts,

Thanks for the reply.

I am running V_V2 transaction but not sure how to use it. Could you explain the below screen shot please and how this will work.

Best Regards!

AndyL

Lakshmipathi
Active Contributor
0 Kudos

Have a look at this note:-

  • Note 1861066 - Everything about SDV03V02 / transaction V_V2

G. Lakshmipathi

former_member223981
Active Contributor
0 Kudos

You need to adjust the values in the "Sort Order" section according to your requirement. If you want the sales orders to be sorted based on creation date, then you should choose creation date as number 1 (in above screenshot it is currently number 3). If 2 sales orders have the same creation date, then it goes to sort it by the next criteria (whatever you have selected as number 2).

former_member299860
Participant
0 Kudos

Hi experts, and thanks for that. But some how I am not able to follow the logic. When I run the transaction with which ever criteria it says no entries in the list. Could you or anyone for that matter please just briefly explain how this process works.

Best Regards,

AndyL

former_member223981
Active Contributor
0 Kudos

I encourage you to read the following documentation:

Rescheduling - V_V2 - Supply Chain Management (SCM) - SCN Wiki

Rescheduling Sales Documents - Availability Check and Requirements in Sales and Distribution Pr - SA...

A simple example of V_V2 for you:

Available Stock = 10.

Sales Order 1 created with a required quantity of 10. This quantity is confirmed because there are 10 available.

Sales Order 2 is created with a required quantity of 10. This quantity is not confirmed because there is 0 available (Sales Order 1 is using the available stock).

In this case, V_V2 should select these sales orders ---> a sales order exists that could get a new confirmation. For example, Sales order 2 may be for a customer with a higher priority so you want to assign the available quantity to them. V_V2 allows you to do this.

Another example:

Available Stock = 20.

Sales Order 1 created with a required quantity of 10. This quantity is confirmed because there are 20 available.

Sales Order 2 is created with a required quantity of 10. This quantity is confirmed because there are 10 available.

In this case, these will not be selected by V_V2 as the confirmation & required delivery date has already been met and V_V2 cannot improve the situation.

Hope this helps.

Answers (1)

Answers (1)

Shiva_Ram
Active Contributor
0 Kudos

It looks V_V1 is old program and not supported by SAP.

Can you try in V_V2 or V_R2?

Regards,