Monday, January 7, 2013

SAP ECC6.0 : VEPVG and Delivery Not Created - Part 2

In my previous entry, I wrote about VEPVG table not being maintained correctly whenever an Order's line item's was change, particularly the delivery date. In a bid to find out why VEPVG was not maintained, I had ST05 switch on so I can do a trace on VEPVG and see where it is updating the table. Needless to say, locating the VEPVG was easy and not a monumental task. So, as a result, you will get below result if you do the same too.

Now back, the my own issue, VEPVG was not showing an Order's line item for Delivery creation when Delivery Date was changed. Here's what ST05 found for me:



** INSERT THE VEPVG
18:12:15.013       332 SAPLV05I   VEPVG      REEXEC 
18:12:15.013       142 SAPLV05I   VEPVG      REEXEC
18:12:15.014         24 SAPLV05I   VEPVG      DECLARE
18:12:15.014       276 SAPLV05I   VEPVG      PREPARE
18:12:15.014    2,380 SAPLV05I   VEPVG      EXECSTM
18:12:15.016       228 SAPLV05I   VEPVG      REEXEC
18:12:17.940           8 / /DBVE       VEPVG      REOPEN
18:12:17.940       584 / /DBVE       VEPVG      FETCH  
18:12:17.941           4 SAPLSETB  D020S       OPEN   
18:12:17.942           6 SAPLSVIX  TDDAT       READ SI
18:12:17.943           3 CL_ABAP   TRDIR         OPEN 
  

** DELETE THE VEPVG
18:18:20.772       282 SAPLV05I VEPVG     REEXEC  <<- b="b" deleted="deleted" here="here" ot="ot">
18:18:27.811         12 / /DBVE      VEPVG     REOPEN 
18:18:27.811       498 / /DBVE      VEPVG     FETCH    
18:18:27.812          6 SAPLSVIX  TDDAT      READ SI 

No wonder, I could not see my expected line in VEPVG, ST05 is telling me that SAP is inserting a record then removing it. But WHY?! ST05 only shows WHAT the program is doing. So, you need to understand the logic in order to understand WHY it is doing this. 


When I double click the DELETE statement, I notice the condition to it is "IF ARRAY_DELETE = ' '". Why would the ARRAY_DELETE be blank and resulting missing record in VEPVG? 

Well, ARRAY_DELETE is used in several SAP Index update Program. This programs manages all the indexes for Orders, Deliveries, Billing and Invoices. All of it which will be use in creating subsequent documents in the background. It is damaging if the index table especially VEPVG is not maintained correctly because you will be face a group of angry customers/users asking you why my delivery/billing not created since yesterday? The automation not working? 

Here's the list of Index Programs:
- RV_BILLING_INDEX_UPDATE
- RV_DELIVERY_INDEX_SAVE
- RV_INVOICE_LIST_INDEX_UPDATE
- RV_SALES_DOCUMENT_INDEX_UPDAT

Now, we know what is not updating and where it is not updating but do we know why?? The reason all point to how you maintain your user exit especially how you manage your X and Y tables for VBEP i.e. YVBEP and XVBEP. 

williamwilstroth... VEPVG, INDEX