on 02-27-2015 11:48 AM
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
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,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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).
I encourage you to read the following documentation:
Rescheduling - V_V2 - Supply Chain Management (SCM) - SCN Wiki
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.
It looks V_V1 is old program and not supported by SAP.
Can you try in V_V2 or V_R2?
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.