2014 Jan 03 6:18 AM
Hi,
I have developed Upload Program for creating STO's using BAPI_PO_CREATE1,after creating STO's ,for this STO's OBD numbers are created automatically and stored in LIPS table.Now i want to display STO ,OBD,Quantity in ALV report.
For this i will fetch OBD from LIPS table based on PO,here it takes more time and gives runtime error in Production.can anyone tell me ow to solve this?
Thanks
2014 Jan 03 7:12 AM
Hi Sai Ganesha,
You may have to limit your Select on LIPS with more parameters in the WHERE clause like using both Reference document number and Item in your SELECT.
Can you provide your SELECT on LIPS which is causing the runtime error so that the viewers will be able to help you better.
Regards,
Leenu
2014 Jan 03 7:21 AM
Hi Sai,
i will sujjest you to use inner join for the same, LIPS is a transparent table so use
inner join on LIPS and other transparent table you have used, this will limit your time out
problem, hope it will help you.
2014 Jan 03 7:41 AM
Hi Sanjeev,
Here i am using one Transparent table and one internal table,We can't use innerjoin on internal tables...
2014 Jan 03 7:46 AM
Hi Sai,
It is not problem of the select query! what is dump says. The secondary index is available in LIPS for preceding document.
I think so you are wrtten the select statement in the loop and end loop.
better to paste your code here.!
select vbeln posnr qty from LIPS where vgbel = sto po number.
Exactly how you are collecting!
Rg, Kiran
2014 Jan 03 7:49 AM
Hi Sai,
This is wrong! why 15 seconds - just use 3 seconds or 2. since you are handling inside the loop to update for several STO's
WAIT UP TO 15 SECONDS.
""""""""""""""""""""""""""""""""""""""
* sort it_po by po.
IF it_po IS NOT INITIAL.
SELECT vbeln
matnr
vgbel
lfimg
FROM lips
INTO TABLE it_lips
FOR ALL ENTRIES IN it_po
WHERE vgbel = it_po-po
and erdat = sy-datum. " avoid this from the select (use the secondary index only )
ENDIF.
if required DELETE IT_LIPS[] WHERE ERDAT NE SY-DATUM.
2014 Jan 03 8:35 AM
Hi Kiran,,
If i put Wait upto 2 or 3 seconds within the loop.It will take..more time for each STO,So that i have put outside the loop.
2014 Jan 03 8:44 AM
Hi Sai,
Just try the select and avoid the ERDAT from where clause. If you will find the much difference!
check the ST05 ALSO.
2014 Jan 03 8:49 AM
Actually i didn't put ERDAT field in Live program...For testing purpose i have included..
2014 Jan 03 9:14 AM
Hi Sai,
The select statement is fine, Even working fine to get the outbound deliveries for STO's.
Have you debug the program in PRD! what exactly the time consuming statement!
2014 Jan 03 9:43 AM
No Kiran,I didn't run this program in Production....Actually DC people are running this in production..
2014 Jan 03 9:46 AM
Hi Sai,
Just get the temporary debug access and trace the exact issue in the program
I think this is the better way to trace the error/correction, rather than assuming more things
Rg, Kiran
2014 Jan 03 10:00 AM
Yah...Kiran,but if i will run this in production for testing purpose,it is creating STO's and OBD's..DC people are run this program in the early morning.
This is the runtime error.
2014 Jan 03 10:13 AM
Is there any possibility to findout the program name based on Runtime errors in ST22?
2014 Jan 03 10:21 AM
Yes, You can check the dumps and in which point it is happening!
2014 Jan 03 10:24 AM
2014 Jan 03 10:26 AM
Hi Check the ST22 selection!
you have the program name and user ID....
2014 Jan 03 11:17 AM
Yes Kiran...I have found that...But still fetching data from LIPS table it is giving Time_Out error.How can i solve this issue?
2014 Jan 03 11:41 AM
Hi Sai,
Why don't you use EKBE table, which confirms delivery creation against STO. You can check delivery by passing EKBE-VGABE = '8' and output BELNR is OTB. May be performance also could be boost up while passing EKBE-BELNR to LIPS-VBELN , as it is key field.
Thanks
Deependra
2014 Jan 03 7:55 AM
Hi Sai Ganesha,
Are you trying save PO and get the report simultaneously?
If yes, it will take more time.. Because you are executing commit.
So, once you save the Po and comeout. Then run the report.
If No, please check whenever using for all entries option, internal table content.
Arivazhagan S
2014 Jan 03 6:40 PM
Just wondering - why does everyone keep guessing and "throwing the darts" at the issue while if OP bothered to run ST05 (that has already been suggested by Kiran 10 posts above) or any other available performance trace tool it would probably give him/her an answer?
By the way, in case of the timeouts there is usually a performance problem and the exact place where it times out (which you'd see in the short dump) may have nothing to do with it. The program might spend lots of time in one place and then time out later in some other place (because the preceding code took too long). Inconceivable, I know...