quarta-feira, 24 de agosto de 2016

Rescheduling - V_V2

Purpose


The purpose of this page is to explain how rescheduling works and why is it used.

Overview

Rescheduling allows the redistribution of already confirmed quantities to other documents

Rescheduling of Sales Documents (V_V2)

The program SDV03V02 takes the selected documents and unconfirms them all. Then they are rechecked, one after the other, based on the customising customer has set priorities of sorting can be customized to a much finer level.
  1. Delivery priority
  2. Date the document was created
  3. Number of the sales document
  4. Alternatively the flag in V_V2 can be set to consider the delivery date instead of the creation date
Example:
There are two customer orders requiring the same material on the same date but there is only one piece in stock. Order of customer A has got the only piece in stock left, as his order was created earlier at 10am today. The order of customer B was created later in the day at 3pm today. Because, there was no stock left, order did not get a confirmation. But Customer B has a higher delivery priority (more important customer) and upon running rescheduling with a prioritization on delivery priority, order of Customer B will receive the confirmed quantity of 1 piece while the order of customer A will lose it.

 

Debugging Hints

  • Data selection

  1. In report SDV03V02, Depending on user’s entries on selection screen open and relevant sales orders and stock transport documents with their items/schedules are being read from the database and stored in an internal table (called XTAB)
  • Data processing

  1. Main module: XTAB_CHECK_AND_SAVE.
  2. Records of the internal table are read one by one, checked against ATP and saved with new results.
  3. Correction records’ are created to track and memorize the results of the availability check.
  4. An error during process will leave the ATP-situation unchanged.
  • Data Output

  1. Results list prepared throughout process (internal table ‘output’) and created via module XTAB_LIST 
  • Selecting Material and Plant

  1. SELECT FROM VAPMA FOR ENTERED MATERIAL/PLANT.
  • Check Header Status (VBUK)

  1. IF SY-SUBRC   NE 0                     OR
                    VBUK-GBSTK EQ CHARC                    OR     „completed          
                    VBUK-RFGSK EQ CHARC                    OR     „fully referenced     
                    VBUK-LFGSK EQ CHARC                     OR     „fully delivered    
                    VBUK-VBTYP CN VBTYP_VERK          OR     „no sales document
                    VBUK-VBTYP CA VBTYP_RETOUR     OR     „Retour           
                    VBUK-VBTYP CA VBTYP_OHNE_EINTEILUNG.     „No schedule lines
                    DA_SKIP_BELEG   = CHARX.                                        
  •  Check tem Status (VBUP)

  1.   IF VBAP-PROSA NE CHARB. (B = Replacement item of product selection)    
                      CHECK VBUP-GBSTA NE CHARC    AND      „completed
                      VBUP-RFGSA NE CHARC   AND                     „fully referenced
                      VBUP-LFGSA NE CHARC   AND                     „fully delivered
                      VBUP-ABSTA NE CHARC                              „not rejected
                      ELSE.                              
                      CHECK VBUP-ABSTA NE CHARC.       
                      ENDIF.                             

Process Flow

Correction Records

  • What are Condition Records

In the rescheduling process requirements are NOT read from database when ATP is checked for a material (while stocks and planned receipts are).The base for the sequence of the redistribution of confirmed quantities is how the internal table containing all 'to be processed records' are sorted. Also ATP is called with the values (quantities and dates) stored in the internal table. When reading from the database, all requirements would be read and would be added up against the stocks and planned receipts. But this will not allow redistribution. Therefore requirements are not read from the database. In order to track what has been confirmed (new) for a material in the rescheduling process this data is stored in the correction records.   
  • When and how are correction records handled

When a material is checked against ATP all available (sales and stock transport) requirements are read from the internal correction record tables to reflect an appropriate ATP-situation (Internal table sales: XVBBD) Entries are forwarded into p_atpcsx to be used in the ATP-check .A new correction record is saved following the ATP-check. It can also be a case that the same material is found in two lines items in a stock transport order so the changes to the first item have to be directly reflected. Should an error occur during the update of a document, the correction records have to be changed to the values of the situation before the check.

Frequent Issues

  • More than one material is shown in results, only one was requested. During rescheduling, if one material is selected for rescheduling, and there is a delivery block or a complete delivery indicator (on header level of sales order) on ANY of the orders that the program picks up, it will reschedule ALL of the materials found on that order that had the block/indicator.
  • All documents had a confirmation quantity, but rescheduling ran anyhow .Within rescheduling there is a button UNCONFIRMED DOCUMENTS REQUIRED. When populated, you would expect that any order with a fully confirmed quantity to not be considered for rescheduling. But: It just needs one unconfirmed sales document to start the rescheduling. Still all selected sales documents will take part in rescheduling (unconfirmed or confirmed). About the Status confirmed/not confirmed please have a look into note 304570

Related Content

Related Documents

Related SAP Notes/KBA

SAP Note: 304570 - VBUP-BESTA status is "not yet confirmed"
SAP KBA: 1567491 - V_V2 / SDV03V02 - Sales order Items are not selected
Fonte: https://wiki.scn.sap.com/wiki/display/SCM/Rescheduling+-+V_V2

Nenhum comentário:

Postar um comentário