on 05-02-2006 4:40 PM
Hi all,
We have developed a bespoke wherein the route entered in the sales order header overwrites all the routes in the sales order line items. The standard code has been repaired for this. The issue is, in one of our environments, when we change the header route via VA02, the item routes are getting updated but this operation takes 10-15 mins and all the while the sales order is locked. The besopke code gets executed and the screen comes back to initial VA02 screen, but the DB update takes time. I request your inputs in this regard. Thanks in advance.
Regards
Murthy
Hello Suryanarayan,
The piece of code which u have given is the one which u have added in the program?? Also I don't c any issue in the code, when u say it is causing delay in update, I don't c any update in the program. Can u also indicate how did u arrive at conculsion that the piece of code which u have show is causing the problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The issue is this:
We have modified the standard screen of VA02 program wherein the route in the line items is over-written by route entered in the header. This is causing a problem in DB update, in one of our testing systems(when the Sales order has more than 4 line items only), wherein it takes around 15 mins to update the VBAK, VBAP (and other Sales Order related tables).
I was able to identify the code part that is causing the issue, but yet the reason why it is doing so is missing.
This is the code that is causing the problem.
LOOP AT xvbap WHERE updkz NE 'D'.
l_tabix = sy-tabix.
xvbap-route = vbak-zzroute.
IF sy-tcode = 'VA02'.
<<We will check if the line item exists in the DB, if yes then UPDKZ = U', else 'I'.>>
READ TABLE t_vbap_check WITH KEY vbeln = xvbap-vbeln
posnr = xvbap-posnr.
IF sy-subrc EQ 0.
v_updkz = 'U'.
ELSE.
v_updkz = 'I'.
ENDIF.
ENDIF.
MOVE v_updkz TO xvbap-updkz.
MODIFY xvbap INDEX l_tabix.
ENDLOOP.
It would be helpful if someone can share their views on this. Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Problem is Modify in Loop on same table , rebuilding the index.
Dont perform operation on XVBAP directly, create a Internal table with same structure of XVBAP say it_xvbap.
Copy the content.
it_vbap[] = xVBAP[].
Now instead of modify in loop, use Field symbols.
Loop at it_xvbap assigning <FS_XVBAP>
...................
............
..........
<FS_XVBAP>-updkz = v_updkz.
Endloop.
Rgds,
Mano Sri
Hello,
One question you have to ask yourdelf, standard SAP VA01 transaction would nto take so much time for updation.
So there must be some user enhancement or routine that is playing the foul game.
Check all SD tables not jst vbak and vbap , check in vbep, Vbfa etc if any secondrady indexes are created , keep deleting if any exits and check.
Run St05 whiel saving va03 and see where it takes more time to update.
We can only help you wiht what you can check in general , but canot get in detail , sorry.
Wish you will be sucessful with your efforts.
Regds,
Mano Sri
Hi Murthy and Mano Sri,
I encountered your old posting for delays because of your code in VA01/VA02 transaction. The problem is that you are marking line in XVBAP for update that might not be updated by the user and is not in YVBAP table, so it takes long time to verify and compare values ... As soon as you are going to append record that you marked for Update into YVBAP table with values before change (YVBAP holds OLD values), the system will be sky rocking.
Paul.
1- Did you check OSS notes about VA02 performance? I can see around lot of notes .
2- Whatre the tables which making it slow?
Thanks
Saquib
Message was edited by: Saquib Khan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.