Skip to Content
0
Former Member
Sep 05, 2012 at 03:29 PM

Random SQL issue.

26 Views

Hi,

I am working as SAP ABAP consultant for last 8-9 years.. This is weirdest issue I am having at my client.

Here is my situation.

We have Custom Table, Named Customer Priority Catalogs. This table has 6-8 fields Sales area - Customer (Shipto# ) - catalog# (which is nothing but VBELN from VBAK (VA41 ) ) & some more for change/create entry logs.

Just before saving order ( in MV45AFZZ Save Prepare user- exit ) we read if material is not from catalog put Rejection. It works perfectly fine almost 95%.

Now Lets talk about 5% scenario.

At some Random time it puts Item rejection even though material is on catalog. when we go back in change mode to see what happened, it resets item rejection as per logic. We notice that this happens when user activity is high in system. we are not able to replicate this issue even if we use same data like customer/materials. Even tried same sequence. But could not repeat it.

This happens for any material randomly. after getting frustrated with this issue, we decided to put some log field in VBAP table & maintain it just before SQL. We put all parameter what we pass to SQL & Sy-subrc value in log field. Just wanted to make sure if variables we are using doesn't get change by some reason, like buffering or other global parameters. When we had next Random issue we found that though we are passing Correct values to SQL ( Looking at log ) it returns with no data giving Sy-subrc = 4 . ( SQL fails to find data ). SQL is perfectly correct. works perfectly in 95%. & 100% with debugging mode.

Does any one have this kind of issue, where even though table has correct data it fails to bring it in?

Any suggestions,

--

Lubert R.