Dynamic streaming taking too long time to switch video using NetStreamPlayOptions in AS3

Hi,
     Can any one tell me why dynamic streaming taking too much time to switch video from lower bit rate to higher bit rate and vice versa.
I am doing dynamic streaming in following ways -
var param:NetStreamPlayOptions = new NetStreamPlayOptions();
param.oldStreamName=oldStream();
param.streamName=newStream()
param.transition=NetStreamPlayTransitions.SWITCH;
ns.play2(param);
ns.addEventListener(NetStatusEvent.NET_STATUS, switchMode);
I am using duel buffering and that is 3 seconds when video starts and 10 seconds when "NetStream.Buffer.Full". Video taking approximately 30-50 seconds to switch video and when I am calling the above code.
Thanks & regards
Sunil Kumar

Hi Sunil,
Was my link useful to you? If you have not gone through the link which I suggested just go through the below lines it may help you:
For a faster switch with optimal keyframe interval and client-side buffer, when Flash Media Server (FMS) receives a "switch" command, the server waits for a keyframe to switch to the new stream. FMS looks for the keyframes in the new stream in chunks equal to the client's buffer size(NetStream.bufferTime), so having a client buffer larger than the keyframe interval of the stream would help with a fast switch response time from the server—in other words, a shorter delay between a "switch" call to the server and the client receiving bits from the new stream in response.
Following values are considered most optimal:
Keyframe interval: 5 sec.
Client-side buffer: 6–10 sec.
So to maintain optimal keyframe interval you can go for fresh encoding of your videos which will give you a chance to set keyframe interval or if you dont want to do this then I would suggest you to increase the client-side buffer.
Regards,
Amit

Similar Messages

  • Discoverer report taking too long time to open.

    HI,
    Discovere reports are taking too long time to open. Please help to resolve this.
    Regards,
    Bhatia

    What is the Dicoverer and the Application release?
    Please refer to the following links (For both Discoverer 4i and 10g). Please note that some Discoverer 4i notes also apply to Discoverer 10g.
    Note: 362851.1 - Guidelines to setup the JVM in Apps Ebusiness Suite 11i and R12
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=362851.1
    Note: 68100.1 - Discoverer Performance When Running On Oracle Applications
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=68100.1
    Note: 465234.1 - Recommended Client Java Plug-in (JVM/JRE) For Discoverer Plus 10g (10.1.2)
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=465234.1
    Note: 329674.1 - Slow Performance When Opening Plus Workbooks from Oracle 11.5.10 Applications Home Page
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=329674.1
    Note: 190326.1 - Ideas for Improving Discoverer 4i Performance in an Applications 11i Environment
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=190326.1
    Note: 331435.1 - Slow Perfomance Using Disco 4.1 Admin/Desktop in Oracle Applications Mode EUL
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=331435.1
    Note: 217669.1 - Refreshing Folders and opening workbooks is slow in Apps 11i environment
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=217669.1

  • Taking too long time to get LOV

    HI,
    I have created a customer folder in which the query retuns 0.5 million records.
    I have created a item class in airline_name column which is being used in the worksheet as parameter.
    The problem is it is taking too long time near about 2 min to get LOV when the user wants to search the exact name.
    Thanks,
    Himanshu Tiwari

    Hi,
    Usually, you should not use the folder that the report is based on to define the LOV. You should use a separate folder to define the LOV that is optimised to return the content of the LOV.
    Rod West

  • Hyperion Planning Web URL is taking Too long time to respond

    Hi,
    When Users are accessing Hyperion Planning URL web link its taking too long time to respond.We restarted the services after these for 2 hours it works fine after that again same issue.Please advise.

    Hi John,
    Follwing is the Log noted: when URL is slow:
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R com.hyperion.planning.olap.EssbaseException: ESSG_ERR_OPERATIONFAILED (1100027)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.olap.HspEssbaseGridAPI.HspSaveGrid(Native Method)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.olap.HspEssGConnection.hspSaveGrid(Unknown Source)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.olap.HspEssbaseJniOlap.loadOrSaveForm(Unknown Source)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.olap.HspEssbaseJniOlap.saveForm(Unknown Source)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.db.HspFMDBImpl.saveFormGrid(Unknown Source)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.SaveFormGrid(Unknown Source)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.Save(Unknown Source)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.Save(Unknown Source)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.Save(Unknown Source)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at HspEnterData.Handle(Unknown Source)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at HspEnterData.doPost(Unknown Source)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1213)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:658)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:526)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:764)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:133)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:457)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:300)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
    [8/15/12 10:17:21:204 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1551)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R com.hyperion.planning.olap.EssbaseException: ESSG_ERR_OPERATIONFAILED (1100027)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.olap.HspEssbaseGridAPI.HspSaveGrid(Native Method)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.olap.HspEssGConnection.hspSaveGrid(Unknown Source)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.olap.HspEssbaseJniOlap.loadOrSaveForm(Unknown Source)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.olap.HspEssbaseJniOlap.saveForm(Unknown Source)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.db.HspFMDBImpl.saveFormGrid(Unknown Source)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.SaveFormGrid(Unknown Source)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.Save(Unknown Source)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.Save(Unknown Source)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.Save(Unknown Source)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at HspEnterData.Handle(Unknown Source)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at HspEnterData.doPost(Unknown Source)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1213)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:658)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:526)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:764)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:133)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:457)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:300)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
    [8/15/12 10:17:21:220 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1551)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R com.hyperion.planning.olap.EssbaseException: ESSG_ERR_OPERATIONFAILED (1100027)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.olap.HspEssbaseGridAPI.HspSaveGrid(Native Method)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.olap.HspEssGConnection.hspSaveGrid(Unknown Source)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.olap.HspEssbaseJniOlap.loadOrSaveForm(Unknown Source)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.olap.HspEssbaseJniOlap.saveForm(Unknown Source)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.db.HspFMDBImpl.saveFormGrid(Unknown Source)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.SaveFormGrid(Unknown Source)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.Save(Unknown Source)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.Save(Unknown Source)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.Save(Unknown Source)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at HspEnterData.Handle(Unknown Source)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at HspEnterData.doPost(Unknown Source)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1213)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:658)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:526)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:764)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:133)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:457)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:300)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1551)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R com.hyperion.planning.HspRuntimeException: There was an error during the save process.
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.db.HspFMDBImpl.saveFormGrid(Unknown Source)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.SaveFormGrid(Unknown Source)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.Save(Unknown Source)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.Save(Unknown Source)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.Save(Unknown Source)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at HspEnterData.Handle(Unknown Source)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at HspEnterData.doPost(Unknown Source)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1213)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:658)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:526)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:764)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:133)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:457)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:300)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
    [8/15/12 10:17:21:236 GMT+08:00] 00000019 SystemErr R      at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1551)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R com.hyperion.planning.olap.EssbaseException: ESSG_ERR_OPERATIONFAILED (1100027)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.olap.HspEssbaseGridAPI.HspSaveGrid(Native Method)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.olap.HspEssGConnection.hspSaveGrid(Unknown Source)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.olap.HspEssbaseJniOlap.loadOrSaveForm(Unknown Source)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.olap.HspEssbaseJniOlap.saveForm(Unknown Source)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.db.HspFMDBImpl.saveFormGrid(Unknown Source)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.SaveFormGrid(Unknown Source)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.Save(Unknown Source)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.Save(Unknown Source)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at com.hyperion.planning.HyperionPlanningBean.Save(Unknown Source)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at HspEnterData.Handle(Unknown Source)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at HspEnterData.doPost(Unknown Source)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1213)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:658)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:526)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
    [8/15/12 10:17:21:251 GMT+08:00] 00000019 SystemErr R      at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:764)

  • Attribute Change run taking too long time to complete.

    Hi all,
    Attribute change run has been taking too long time to complete.It has to realign 50 odd aggreagates, some by delta , some by reconstruction. But inspite of all the aggregates it used to finish in quick time earlier. But since last 4-5 days it is taking indefinite time to finish.
    Can anyone please suggest what all reasons may be causing this? and what possibly can be the solution to the problem? It is becoming a big issue. So kindly help with ur advises.
    Promise to reward your answer liberally.
    Regards,
    Pradyut.

    Hi,
    Check with your functional owners in R/3 if there are mass changes/realignments or classification changes are going on regarding master data. e.g. reasigning materials to other material groups. This causes a major realignment in BW for all the aggregates. Otherwise check for parameterchanges / patches or missing db stats with your sap basis team.
    Kind regards, Patrick Rieken.

  • Why iPad2 is taking too long time for a software update?

    Hi, i have iPad2 with iOS 4.3, now I'd like to update to iOS 6.1.2, but it is taking too long time to update when i connect to iYunes.My internet speed is 15mbps.I am unable to understand the problem.Please help me

    Hi, i have iPad2 with iOS 4.3, now I'd like to update to iOS 6.1.2, but it is taking too long time to update when i connect to iYunes.My internet speed is 15mbps.I am unable to understand the problem.Please help me

  • When query is taking too long time

    When query is taking too long time,Where and how to start tuning it?
    Here i've listed few things need to be considered,out of my knowledge and understanding
    1.What the sql is waiting for(wait events)
    2.Parameter modification need to be done at system/session level
    3.The query has to be tuned (using hints )
    4.Gathering/deleting statistics
    List out any other things that need to be taken into account?
    Which approach must be followed and on what basis that approach must be considered?

    When query is taking too long time,Where and how to start tuning it?explain plan will be good start . trace also
    Here i've listed few things need to be considered,out of my knowledge and understanding
    1.What the sql is waiting for(wait events)When Oracle executes an SQL statement, it is not constantly executing. Sometimes it has to wait for a specific event to happen befor it can proceed.
    Read
    http://www.adp-gmbh.ch/ora/tuning/event.html
    2.Parameter modification need to be done at system/session levelDepend on parameter , define parameter , trace done on session level for example
    3.The query has to be tuned (using hints )Could be help you but you must know how to use .
    4.Gathering/deleting statisticsDo it in non working hours , it will impact on database performance , but its good
    List out any other things that need to be taken into account?Which account ?
    Which approach must be followed and on what basis that approach must be considered?you could use lot of tools , Trace , AWR

  • I am trying to update my ipad mini but taking too long time 5 hours

    i am trying to update my ipad mini to ios 7  but taking too long time 5 hours so what i have to do
    Message was edited by: GOPAL DHRUW

    You can try resetting your iPad by simultaneously pressing and holding the Home and Sleep/Wake buttons until you see the Apple Logo. This can take up to 15 seconds so be patient and don't release the buttons until the logo appears.
    Try again to see if the problem persists.

  • Java Web Start is taking too long time to fill the bar

    Hi All,
    I am using Eclipse and using JBOSS from Remote and when I am deploying an applent with Java Web Start, it is taking a very long time for filling the bar(taking more time for verifying and downloading Application).
    Can anyone help me for fixing it.
    Thanks in Advance.

    795697 wrote:
    Hi,
    when I am deploying an Applet with the help of Java Web Start It is taking too much time for verifying and downloading the application.
    I am using Eclipse and JBOSS.
    This is the problem.
    I think you can understand it.I can't. I don't understand what Eclipse and JBoss have to do with webstart and I can't understand what webstart has to do with deploying an applet.
    Its all just completely unrelated! I'm just going to make a dumb assumption and say that it is your computer.

  • WebI Report is taking too long time to opening

    Hi All,
    When iam trying to open the WebI report in Infoview , it is taking long time to open and refresh,
    Please suggest me a solution.
    Thanks in advance..
    Regards,
    Mahesh

    Hi,
    As the issue you are facing is that the webi report is taking too long to open and refresh, I would recommend the below steps.
    1. Check whether the webi report is set to "Refreh on Open" if yes probably you need to uncheck, save the report and open it again.
    2. Try to run the same query in the backend database and see if it returns the data.
    3. Try to run refresh the report for a smaller data selection.
    4. make the report run on a specific webi server, and when refreshing have your BOBJ admin monitor that process to see if the process is going in a hung state, using High memory etc.
    5. restart webi process and run again
    Thanks,
    aKs

  • Taking too long time for booting

    Hi there,
    I just bought myself an iphone 5s. . Try to get up started for the 1st time but the thing keep booting or loading too long time for endless hours. What may go wrong? Appreciate if you could help me on this.

    But payment run before due date. you are not run before due date once check it

  • Taking too long time to login!

    Hi Experts,
    I am facing a low performance problem in B1. After I enter the user id and password on the login screen of B1 in our client PCs, it takes a long time (around 180sec) to log in to the system. The initial log in time is too long for end users.
    However, once it is logged in it running fine. Also, it is fast if I try to login in the server machine (localhost). I have checked the network and the hardware. Everything is fast and smooth except login.
    Is there any way out to make the login process faster?
    Please advise
    Ken Ma

    Dear Ken,
    Sometimes the login process can be delayed due to several factors, please verify your clients machines meet the minimum requirements. You can use the below link to get the necessary documents:-
    http://channel.sap.com/sbo/documentation
    I would suggest to have at least 1Gb Ram on your clients machines for better performance.
    regards,
    Feroz Dosani

  • Stored Procedure  is taking too long time to Execute.

    Hi all,
    I have a stored procedure which executes in 2 hr in one database, but the same stored procedure is taking more than 6 hour in the other database.
    Both the database are in oracle 11.2
    Can you please suggest what might be the reasons.
    Thanks.

    In most sites I've worked at it's almost impossible to trace sessions, because you don't have read permissions on the tracefile directory (or access to the server at all). My first check would therefore be to look in my session browser to see what the session is actually doing. What is the current SQL statement? What is the current wait event? What cursors has the session spent time on? If the procedure just slogs through one cursor or one INSERT statement etc then you have a straightforward SQL tuning problem. If it's more complex then it will help to know which part is taking the time.
    If you have a licence for the diagnostic pack you can query v$active_session_history, e.g. (developed for 10.2.0.3, could maybe do more in 11.2):
    SELECT CAST(ash.started AS DATE) started
         , ash.elapsed
         , s.sql_text
         , CASE WHEN ash.sql_id = :sql_id AND :status = 'ACTIVE' THEN 'Y' END AS executing
         , s.executions
         , CAST(NUMTODSINTERVAL(elapsed_time/NULLIF(executions,0)/1e6,'SECOND') AS INTERVAL DAY(0) TO SECOND(1)) AS avg_time
         , CAST(NUMTODSINTERVAL(elapsed_time/1e6,'SECOND') AS INTERVAL DAY(0) TO SECOND(1)) AS total_time
         , ROUND(s.parse_calls/NULLIF(s.executions,0),1) avg_parses
         , ROUND(s.fetches/NULLIF(s.executions,0),1) avg_fetches
         , ROUND(s.rows_processed/NULLIF(s.executions,0),1) avg_rows_processed
         , s.module, s.action
         , ash.sql_id
         , ash.sql_child_number
         , ash.sql_plan_hash_value
         , ash.started
    FROM   ( SELECT MIN(sample_time) AS started
                  , CAST(MAX(sample_time) - MIN(sample_time) AS INTERVAL DAY(0) TO SECOND(0)) AS elapsed
                  , sql_id
                  , sql_child_number
                  , sql_plan_hash_value
             FROM   v$active_session_history
             WHERE  session_id = :sid
             AND    session_serial# = :serial#
             GROUP BY sql_id, sql_child_number, sql_plan_hash_value ) ash
           LEFT JOIN
           ( SELECT sql_id, plan_hash_value
                  , sql_text, SUM(executions) OVER (PARTITION BY sql_id) AS executions, module, action, rows_processed, fetches, parse_calls, elapsed_time
                  , ROW_NUMBER() OVER (PARTITION BY sql_id ORDER BY last_load_time DESC) AS seq
             FROM   v$sql ) s
           ON s.sql_id = ash.sql_id AND s.plan_hash_value = ash.sql_plan_hash_value
    WHERE  s.seq = 1
    ORDER BY 1 DESC;:sid and :serial# come from v$session. In PL/SQL Developer I defined this as a tab named 'Session queries' in the session browser.
    I have another tab named 'Object wait totals this query' containing:
    SELECT LTRIM(ep.owner || '.' || ep.object_name || '.' || ep.procedure_name,'.') AS plsql_entry_procedure
         , LTRIM(cp.owner || '.' || cp.object_name || '.' || cp.procedure_name,'.') AS plsql_procedure
         , session_state
         , CASE WHEN blocking_session_status IN ('NOT IN WAIT','NO HOLDER','UNKNOWN') THEN NULL ELSE blocking_session_status END AS blocking_session_status
         , event
         , wait_class
         , ROUND(SUM(wait_time)/100,1) as wait_time_secs
         , ROUND(SUM(time_waited)/100,1) as time_waited_secs
         , LTRIM(o.owner || '.' || o.object_name,'.') AS wait_object
    FROM   v$active_session_history h
           LEFT JOIN dba_procedures ep
           ON   ep.object_id = h.plsql_entry_object_id AND ep.subprogram_id = h.plsql_entry_subprogram_id
           LEFT JOIN dba_procedures cp
           ON   cp.object_id = h.plsql_object_id AND cp.subprogram_id = h.plsql_subprogram_id
           LEFT JOIN dba_objects o ON o.object_id = h.current_obj#
    WHERE  h.session_id = :sid
    AND    h.session_serial# = :serial#
    AND    h.user_id = :user#
    AND    h.sql_id = :sql_id
    AND    h.sql_child_number = :sql_child_number
    GROUP BY
           ep.owner, ep.object_name, ep.procedure_name
         , cp.owner, cp.object_name, cp.procedure_name
         , session_state
         , CASE WHEN blocking_session_status IN ('NOT IN WAIT','NO HOLDER','UNKNOWN') THEN NULL ELSE blocking_session_status END
         , event
         , wait_class
         , o.owner
         , o.object_nameIt's not perfect and the numbers aren't reliable, but it gives me an idea where the time might be going. While I'm at it, v$session_longops is worth a look, so I also have 'Longops' as:
    SELECT sid
         , CASE WHEN l.time_remaining> 0 OR l.sofar < l.totalwork THEN 'Yes' END AS "Active?"
         , l.opname AS operation
         , l.totalwork || ' ' || l.units AS totalwork
         , NVL(l.target,l.target_desc) AS target
         , ROUND(100 * l.sofar/GREATEST(l.totalwork,1),1) AS "Complete %"
         , NULLIF(RTRIM(RTRIM(LTRIM(LTRIM(numtodsinterval(l.elapsed_seconds,'SECOND'),'+0'),' '),'0'),'.'),'00:00:00') AS elapsed
         , l.start_time
         , CASE
               WHEN  l.time_remaining = 0 THEN l.last_update_time
               ELSE SYSDATE + l.time_remaining/86400
           END AS est_completion
         , l.sql_id
         , l.sql_address
         , l.sql_hash_value
    FROM v$session_longops l
    WHERE :sid IN (sid,qcsid)
    AND  l.start_time >= TO_DATE(:logon_time,'DD/MM/YYYY HH24:MI:SS')
    ORDER BY l.start_time descand 'Longops this query' as:
    SELECT sid
         , CASE WHEN l.time_remaining> 0 OR l.sofar < l.totalwork THEN 'Yes' END AS "Active?"
         , l.opname AS operation
         , l.totalwork || ' ' || l.units AS totalwork
         , NVL(l.target,l.target_desc) AS target
         , ROUND(100 * l.sofar/GREATEST(l.totalwork,1),1) AS "Complete %"
         , NULLIF(RTRIM(RTRIM(LTRIM(LTRIM(numtodsinterval(l.elapsed_seconds,'SECOND'),'+0'),' '),'0'),'.'),'00:00:00') AS elapsed
         , l.start_time
         , CASE
               WHEN  l.time_remaining = 0 THEN l.last_update_time
               ELSE SYSDATE + l.time_remaining/86400
           END AS est_completion
         , l.sql_id
         , l.sql_address
         , l.sql_hash_value
    FROM v$session_longops l
    WHERE :sid IN (sid,qcsid)
    AND  l.start_time >= TO_DATE(:logon_time,'DD/MM/YYYY HH24:MI:SS')
    AND  l.sql_id = :sql_id
    ORDER BY l.start_time descYou can also get this sort of information out of OEM if you're lucky enough to have access to it - if not, ask for it!
    Apart from this type of monitoring, you might try using DBMS_PROFILER (point and click in most IDEs, but you can use it from the SQL*Plus prompt), and also instrument your code with calls to DBMS_APPLICATION_INFO.SET_CLIENT_INFO so you can easily tell from v$session which section of code is being executed.

  • Query taking too long time

    Hello all i hav a query which is taking result from 4 tables
    select name, date, emp_id, salary from table1, table2, table3,table4 where date= :date and other conditions
    but when im doing same query and changin date format
    select name, date, emp_id, salary from table1, table2, table3,table4 where date= TO_DATE(:date,'DD/MM/RRRR') and other conditions
    the query is gettin hang no response
    please advice.
    Thanks

    Execution Plan                                        
    Plan hash value: 2265139331                                        
          Id        Operation                                    Name                           Rows        Bytes       Cost (%CPU)      Time          
         0      SELECT STATEMENT                                                           14647       3146K       1443   (1)      00:00:18      
         1       HASH GROUP BY                                                             14647       3146K                                     
         2        CONCATENATION                                                                                                                    
         3         MERGE JOIN CARTESIAN                                                    8444       1814K        738   (1)      00:00:09      
         4          NESTED LOOPS                                                                                                                   
         5           NESTED LOOPS                                                          1     202        635   (1)      00:00:08      
         6            NESTED LOOPS                                                         1     138        633   (1)      00:00:08      
         7             NESTED LOOPS                                                        1     103        632   (1)      00:00:08      
         8              NESTED LOOPS                                                       1     85        631   (1)      00:00:08      
         9               VIEW                               table     3     84        628   (1)      00:00:08      
         10                UNION-ALL                                                                                                                
         * 11                  HASH JOIN                                                       1     37        279   (1)      00:00:04      
         * 12                   TABLE ACCESS BY INDEX ROWID     table     1     31          4   (0)      00:00:01      
         * 13                    INDEX RANGE SCAN               table     1                      3   (0)      00:00:01      
         14                  TABLE ACCESS FULL               table     9472     56832        275   (1)      00:00:04      
         * 15                  HASH JOIN                                                       1     37        319   (1)      00:00:04      
         * 16                   TABLE ACCESS BY INDEX ROWID     table     1     31         10   (0)      00:00:01      
         * 17                    INDEX RANGE SCAN               table     1                      9   (0)      00:00:01      
         18                  TABLE ACCESS FULL               table     36233        212K        308   (1)      00:00:04      
         * 19                  HASH JOIN                                                       1     43         31   (4)      00:00:01      
         * 20                   TABLE ACCESS BY INDEX ROWID     table     1     37          3   (0)      00:00:01      
         * 21                    INDEX RANGE SCAN               table     1                      2   (0)      00:00:01      
         22                  TABLE ACCESS FULL               table     2546     15276         27   (0)      00:00:01      
         23               TABLE ACCESS BY INDEX ROWID        table     1     57          1   (0)      00:00:01      
         * 24                 INDEX UNIQUE SCAN                 table     1                      0   (0)      00:00:01      
         25              TABLE ACCESS BY INDEX ROWID         table     1     18          1   (0)      00:00:01      
         * 26                INDEX UNIQUE SCAN                  table     1                      0   (0)      00:00:01      
         27             TABLE ACCESS BY INDEX ROWID          table     1     35          1   (0)      00:00:01      
         * 28               INDEX UNIQUE SCAN                   table     1                      0   (0)      00:00:01      
         * 29             INDEX RANGE SCAN                      table     2                      1   (0)      00:00:01      
         30           TABLE ACCESS BY INDEX ROWID            table     2     128          2   (0)      00:00:01      
         31          BUFFER SORT                                                            7977        140K        736   (1)      00:00:09      
         32           TABLE ACCESS FULL                      table     7977        140K        102   (0)      00:00:02      
         33         NESTED LOOPS                                                            310     68200        704   (1)      00:00:09      
         34          NESTED LOOPS                                                           1     202        635   (1)      00:00:08      
         35           NESTED LOOPS                                                          1     138        633   (1)      00:00:08      
         36            NESTED LOOPS                                                         1     103        632   (1)      00:00:08      
         37             NESTED LOOPS                                                        1     85        631   (1)      00:00:08      
         38              VIEW                                table     3     84        628   (1)      00:00:08      
         39               UNION-ALL                                                                                                                 
         * 40                 HASH JOIN                                                        1     37        279   (1)      00:00:04      
         * 41                  TABLE ACCESS BY INDEX ROWID      table     1     31          4   (0)      00:00:01      * 41             TABLE ACCESS BY INDEX ROWID table131     4   (0) 00:00:01
         * 42                   INDEX RANGE SCAN                table     1                      3   (0)      00:00:01      
         43                 TABLE ACCESS FULL                table     9472     56832        275   (1)      00:00:04      
         * 44                 HASH JOIN                                                        1     37        319   (1)      00:00:04      
         * 45                  TABLE ACCESS BY INDEX ROWID      table     1     31         10   (0)      00:00:01      
         * 46                   INDEX RANGE SCAN                table     1                      9   (0)      00:00:01      
         47                 TABLE ACCESS FULL                table     36233        212K        308   (1)      00:00:04      
         * 48                 HASH JOIN                                                        1     43         31   (4)      00:00:01      
         * 49                  TABLE ACCESS BY INDEX ROWID      table     1     37          3   (0)      00:00:01      
         * 50                   INDEX RANGE SCAN                table     1                      2   (0)      00:00:01      
         51                 TABLE ACCESS FULL                table     2546     15276         27   (0)      00:00:01      
         52              TABLE ACCESS BY INDEX ROWID         table     1     57          1   (0)      00:00:01      
         * 53                INDEX UNIQUE SCAN                  table     1                      0   (0)      00:00:01      
         54             TABLE ACCESS BY INDEX ROWID          table     1     18          1   (0)      00:00:01      
         * 55               INDEX UNIQUE SCAN                   table     1                      0   (0)      00:00:01      
         56            TABLE ACCESS BY INDEX ROWID           table     1     35          1   (0)      00:00:01      
         * 57              INDEX UNIQUE SCAN                    table     1                      0   (0)      00:00:01      
         58           TABLE ACCESS BY INDEX ROWID            table     2     128          2   (0)      00:00:01      
         * 59             INDEX RANGE SCAN                      table     2                      1   (0)      00:00:01      
         * 60           TABLE ACCESS FULL                       table     293     5274         68   (0)      00:00:01      
    Predicate Information (identified by operation id):                                        
       3 - access("a.id"="b.id")                                        
      12 - access("a.id"="b.id")                                        
      13 - filter("a.id"="b.id")                                        
      14 - access("a.id"="b.id")                                        
      16 - access("a.id"="b.id")                                        
      17 - filter("a.id"="b.id")                                        
      18 - access("a.id"="b.id")                                        
      20 - access("a.id"="b.id")                                        
      21 - filter("a.id"="b.id")                                        
      22 - access("a.id"="b.id")                                        
      25 - access("a.id"="b.id")AND ("a.id"="b.id")                                        
      27 - access("a.id"="b.id")                                        
      28 - access("a.id"="b.id")                                        
      32 - access("a.id"="b.id")                                        
      36 - access("a.id"="b.id")AND ("a.id"="b.id")                                        
      37 - filter("a.id"="b.id")                                        
      40 - access("a.id"="b.id")                                        
      41 - filter("a.id"="b.id")                                        
      42 - access("a.id"="b.id")                                        
      44 - access("a.id"="b.id")                                        
      45 - filter("a.id"="b.id")                                        
      46 - access("a.id"="b.id")                                        
      48 - access("a.id"="b.id")                                        
      49 - filter("a.id"="b.id")                                        
      50 - access("a.id"="b.id")                                        
    Statistics                                        
             71  recursive calls                                        
              0  db block gets                                        
           2975  consistent gets                                        
              0  physical reads                                        
              0  redo size                                        
           2172  bytes sent via SQL*Net to client                                        
            520  bytes received via SQL*Net from client                                        
              2  SQL*Net roundtrips to/from client                                        
              1  sorts (memory)                                        
              0  sorts (disk)                                        
              1  rows processed

  • Report is taking too long time. Please advice

    Hi Experts,
    I have created a report which is almost exploding the BOM and getting the all
    material documents from MKPF for the given date and then based on those material documents selecting the 601 (Sales) from MSEG. Later based on the material, batch and 901 its drilling down. If it gets the raw materials in that, add those otherwise again if you find some FG or Semi finish in that further explode it.
    like that this will go to the deeper level.
    I have run this report for almost all the plants and they are updated successfully
    but some plants are there which might have the large data due to drill down batch level. So atlast giving the dump.
    Please suggest me how get it tuned so that my all plants give the data is speedy way. Thanks in advance.

    The code is:
    REPORT  zsales_variance_1 NO STANDARD PAGE HEADING MESSAGE-ID ymsg LINE-SIZE 1000.
    TABLES: mara,
            zcon_variance,
            zsales_variance,
            t001k,
            makt,
            mkpf,
            aufm,
            mbew.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE t2.
    PARAMETER       s_bukrs LIKE zcon_variance-bukrs DEFAULT '1000' OBLIGATORY.
    SELECT-OPTIONS: s_matnr FOR mara-matnr DEFAULT 'FG only'.
    PARAMETER:      so_werks LIKE zsales_variance-werks OBLIGATORY.
    SELECT-OPTIONS: s_pcdf FOR aufm-budat OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    RANGES: s_werks FOR zsales_variance-werks.
    *******Filling the Range internal table for fixing the plants for Company code 1000: Start
    s_werks-sign = 'I'.             "Include
    s_werks-option = 'BT'.          "Pattern
    s_werks-low = '1001'.            "Low Value
    s_werks-high = '1025'.              "High Value
    APPEND s_werks.
    *******Filling the Range internal table for fixing the plants for Company code 1000: End
    DATA: BEGIN OF it_mara OCCURS 0,
          matnr LIKE mara-matnr,
          mtart LIKE mara-mtart,
          matkl TYPE matkl,
          werks LIKE marc-werks,
          indi1(8) TYPE c,
          ok(2) TYPE c,
         maktx LIKE makt-maktx,
          END OF it_mara.
    *DATA it_mara1 LIKE it_mara OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF it_t001k OCCURS 0,
          bwkey LIKE t001k-bwkey,
          matnr LIKE mara-matnr,
          zplp1 LIKE mbew-zplp1,
          maktx LIKE makt-maktx,
          END OF it_t001k.
    DATA: BEGIN OF it_mbew OCCURS 0,
          matnr LIKE mara-matnr,
          bwkey LIKE t001k-bwkey,
          zplp1 LIKE mbew-zplp1,
          maktx LIKE makt-maktx,
          END OF it_mbew.
    DATA: BEGIN OF it_makt OCCURS 0,
          matnr LIKE makt-matnr,
          maktx LIKE makt-maktx,
          END OF it_makt.
    DATA: it_makt1 LIKE it_makt OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF it_mkpf OCCURS 0,
          mblnr LIKE mkpf-mblnr,
          mjahr LIKE mkpf-mjahr,
          END OF it_mkpf.
    *DATA: BEGIN OF it_mseg OCCURS 0,
         mblnr LIKE mseg-mblnr,
         matnr LIKE mara-matnr,
         werks LIKE mseg-werks,
         bwart LIKE mseg-bwart,
         menge LIKE mseg-menge,
         meins LIKE mseg-meins,
         dmbtr LIKE mseg-dmbtr,
         END OF it_mseg.
    DATA: BEGIN OF it_final OCCURS 0 ,
              mandt TYPE mandt,
              bukrs LIKE zcon_variance-bukrs,
              werks LIKE zcon_variance-werks,
              matnr LIKE zcon_variance-matnr,
              component LIKE zcon_variance-component,
              mtart LIKE zcon_variance-mtart,
              maktx LIKE zcon_variance-maktx,
              componentdisc LIKE zcon_variance-componentdisc,
              matkl LIKE zcon_variance-matkl,
              menge LIKE zcon_variance-menge,
              meins LIKE zcon_variance-meins,
              dmbtr LIKE zcon_variance-dmbtr,
              verpr LIKE zcon_variance-verpr,
              zplp1 LIKE zcon_variance-zplp1,
              confirmtodate LIKE zcon_variance-confirmtodate,
              confirmfromdate LIKE zcon_variance-confirmtodate,
              currency TYPE waers,
              mtart_matnr TYPE mtart,
             ok(2) TYPE c,
      END OF it_final.
    DATA: BEGIN OF it_final_compo OCCURS 0 ,
            mandt TYPE mandt,
            bukrs LIKE zcon_variance-bukrs,
            werks LIKE zcon_variance-werks,
           matnr LIKE zcon_variance-matnr,
            component LIKE zcon_variance-component,
            mtart LIKE zcon_variance-mtart,
           maktx LIKE zcon_variance-maktx,
            componentdisc LIKE zcon_variance-componentdisc,
            matkl LIKE zcon_variance-matkl,
            menge LIKE zcon_variance-menge,
            meins LIKE zcon_variance-meins,
            dmbtr LIKE zcon_variance-dmbtr,
            verpr LIKE zcon_variance-verpr,
            zplp1 LIKE zcon_variance-zplp1,
            confirmtodate LIKE zcon_variance-confirmtodate,
            confirmfromdate LIKE zcon_variance-confirmtodate,
            currency TYPE waers,
            mtart_matnr TYPE mtart,
       ok(2) TYPE c,
    END OF it_final_compo.
    DATA: ok(2) TYPE c.
    DATA : it2 LIKE it_final OCCURS 0 WITH HEADER LINE.
    DATA : it2_temp LIKE it2 OCCURS 0  WITH HEADER LINE.
    DATA:  it_compo LIKE it_final_compo OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF it3 OCCURS 0 ,
        mandt TYPE mandt,
        bukrs LIKE zcon_variance-bukrs,
        werks LIKE zcon_variance-werks,
        matnr LIKE zcon_variance-matnr,
        component LIKE zcon_variance-component,
        mtart LIKE zcon_variance-mtart,
        maktx LIKE zcon_variance-maktx,
        componentdisc LIKE zcon_variance-componentdisc,
        matkl LIKE zcon_variance-matkl,
        menge LIKE zcon_variance-menge,
        meins LIKE zcon_variance-meins,
        dmbtr LIKE zcon_variance-dmbtr,
        verpr LIKE zcon_variance-verpr,
        zplp1 LIKE zcon_variance-zplp1,  " if this is 0.
        confirmtodate LIKE zcon_variance-confirmtodate,
        confirmfromdate LIKE zcon_variance-confirmtodate,
        currency TYPE waers,
    END OF it3.
    DATA: BEGIN OF it_aufm OCCURS 0,
           aufnr LIKE aufm-aufnr,
           matnr LIKE aufm-matnr,
           charg LIKE aufm-charg,
           bwart LIKE aufm-bwart,
          END OF it_aufm.
    DATA: it_aufm1 LIKE it_aufm OCCURS 0 WITH HEADER LINE.
    DATA: it_aufm3 LIKE it_aufm1 OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF it_aufm2 OCCURS 0,
          matnr LIKE aufm-matnr,
          charg LIKE aufm-charg,
          bwart LIKE aufm-bwart,
          werks LIKE aufm-werks,
          END OF it_aufm2.
    DATA: BEGIN OF it_aufm_901 OCCURS 0,
          aufnr LIKE aufm-aufnr,
          matnr LIKE aufm-matnr,
          werks LIKE aufm-werks,
          bwart LIKE aufm-bwart,
          budat LIKE aufm-budat,
          menge LIKE aufm-menge,
          meins LIKE aufm-meins,
          dmbtr LIKE aufm-dmbtr,
          bwart_901 LIKE aufm-bwart,
          bwart_902 LIKE aufm-bwart,
          bwart_261 LIKE aufm-bwart,
          bwart_262 LIKE aufm-bwart,
          indi1(8) TYPE c,
          901 LIKE mara-matnr,
         aufnr LIKE aufm-aufnr,
    END OF it_aufm_901.
    DATA: BEGIN OF it_mpb OCCURS 0,
         aufnr LIKE aufm-aufnr,
          matnr LIKE mara-matnr,
          werks LIKE aufm-werks,
          bwart LIKE aufm-bwart,
          yes TYPE c,
          END OF it_mpb.
    DATA: it_temp LIKE it_aufm_901 OCCURS 0 WITH HEADER LINE.
    DATA: it_aufm_901_backup LIKE it_aufm_901 OCCURS 0 WITH HEADER LINE.
    DATA: indi1(8) TYPE c.
    DATA: bwart_901 LIKE aufm-bwart,
          bwart_902 LIKE aufm-bwart,
          bwart_261 LIKE aufm-bwart,
          bwart_262 LIKE aufm-bwart.
    DATA: BEGIN OF it_aufnr OCCURS 0,
          aufnr LIKE aufm-aufnr,
          yes TYPE c,
          matnr LIKE aufm-matnr,
          werks LIKE aufm-werks,
      END OF it_aufnr.
    DATA yes TYPE c.
    DATA: BEGIN OF it_aufm_901_filter OCCURS 0,
          aufnr LIKE aufm-aufnr,
          matnr LIKE aufm-matnr,
          werks LIKE aufm-werks,
          bwart LIKE aufm-bwart,
          bwart_pm(4) TYPE c,
          indi TYPE c,
          budat LIKE aufm-budat,
          menge LIKE aufm-menge,
          meins LIKE aufm-meins,
          dmbtr LIKE aufm-dmbtr,
         bwart_901 LIKE aufm-bwart,
         bwart_902 LIKE aufm-bwart,
         bwart_261 LIKE aufm-bwart,
         bwart_262 LIKE aufm-bwart,
         aufnr LIKE aufm-aufnr,
      END OF it_aufm_901_filter.
    DATA: BEGIN OF it1 OCCURS 0,
          aufnr LIKE aufm-aufnr,
          matnr LIKE aufm-matnr,
          werks LIKE aufm-werks,
          bwart LIKE aufm-bwart,
         bwart_pm(4) TYPE c,
          indi TYPE c,
          budat LIKE aufm-budat,
          menge LIKE aufm-menge,
          menge_f(14) TYPE c,
          meins LIKE aufm-meins,
          dmbtr LIKE aufm-dmbtr,
          dmbtr_f(14) TYPE c,
          dmbtr_v(14) TYPE c,
          menge_v(14) TYPE c,
          901 LIKE mara-matnr,
      END OF it1.
    DATA: it4 LIKE it1 OCCURS 0 WITH HEADER LINE.
    DATA: it5 LIKE it4 OCCURS 0 WITH HEADER LINE.
    DATA: add_menge TYPE menge_d,
          add_dmbtr TYPE dmbtr.
    DATA: BEGIN OF it1902 OCCURS 0,
          aufnr LIKE aufm-aufnr,
          matnr LIKE aufm-matnr,
          werks LIKE aufm-werks,
          bwart LIKE aufm-bwart,
         bwart_pm(4) TYPE c,
          indi TYPE c,
          budat LIKE aufm-budat,
          menge(14) TYPE c,
          menge_v(14) TYPE c,
          meins LIKE aufm-meins,
          dmbtr(14) TYPE c,
          dmbtr_v(14) TYPE c,
      END OF it1902.
    DATA: it1902_add LIKE it1902 OCCURS 0 WITH HEADER LINE.
    DATA: it1902_add1 LIKE it1902 OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF it1262 OCCURS 0,
          aufnr LIKE aufm-aufnr,
          matnr LIKE aufm-matnr,
          werks LIKE aufm-werks,
          bwart LIKE aufm-bwart,
         bwart_pm(4) TYPE c,
          indi TYPE c,
          budat LIKE aufm-budat,
          menge(14) TYPE c,
          menge_v(14) TYPE c,
          meins LIKE aufm-meins,
          dmbtr(14) TYPE c,
          dmbtr_v(14) TYPE c,
      END OF it1262.
    DATA: it1262_add LIKE it1262 OCCURS 0 WITH HEADER LINE.
    DATA: it1262_add1 LIKE it1262 OCCURS 0 WITH HEADER LINE.
    DATA: indi TYPE c,
         bwart_pm(4) TYPE c,
          menge_v(14) TYPE c,
          dmbtr_v(14) TYPE c,
          menge_f(14) TYPE c,
          dmbtr_f(14) TYPE c.
    DATA: matnr LIKE mara-matnr,
          maktx LIKE makt-maktx,
          cnt TYPE i,
          cnt1 TYPE i,
          cnt2 TYPE i.
    DATA: BEGIN OF it_aufm_901_1 OCCURS 0,
          matnr LIKE aufm-matnr,
          werks LIKE aufm-werks,
          bwart LIKE aufm-bwart,
         budat LIKE aufm-budat,
          menge LIKE aufm-menge,
          meins LIKE aufm-meins,
          dmbtr LIKE aufm-dmbtr,
          mengefinal LIKE aufm-menge,
          aufnr LIKE aufm-aufnr,
          END OF it_aufm_901_1.
    DATA: BEGIN OF it_aufm_901_2 OCCURS 0,
         matnr LIKE aufm-matnr,
         werks LIKE aufm-werks,
         bwart LIKE aufm-bwart,
         budat LIKE aufm-budat,
         menge LIKE aufm-menge,
         meins LIKE aufm-meins,
         dmbtr LIKE aufm-dmbtr,
         mengefinal LIKE aufm-menge,
          aufnr LIKE aufm-aufnr,
          END OF it_aufm_901_2.
    DATA: BEGIN OF it_aufm_901_3 OCCURS 0,
          bukrs LIKE zcon_variance-bukrs,
          werks LIKE zcon_variance-werks,
          matnr LIKE zcon_variance-matnr,
          maktx LIKE zcon_variance-maktx,
          component LIKE zcon_variance-component,
          componentdisc LIKE zcon_variance-componentdisc,
          mtart LIKE zcon_variance-mtart,
          matkl LIKE zcon_variance-matkl,
          menge LIKE zcon_variance-menge,
          meins LIKE zcon_variance-meins,
          dmbtr LIKE zcon_variance-dmbtr,
          map LIKE zcon_variance-verpr,
          zplp1 LIKE zcon_variance-zplp1,
          confirmtodate LIKE zcon_variance-confirmtodate,
          confirmfromdate LIKE zcon_variance-confirmtodate,
          bwart LIKE mseg-bwart,
         END OF it_aufm_901_3.
    DATA: BEGIN OF it_aufm_261 OCCURS 0,
          matnr LIKE aufm-matnr,
          werks LIKE aufm-werks,
          bwart LIKE aufm-bwart,
          budat LIKE aufm-budat,
          menge LIKE aufm-menge,
          meins LIKE aufm-meins,
          dmbtr LIKE aufm-dmbtr,
          aufnr LIKE aufm-aufnr,
          END OF it_aufm_261.
    DATA: BEGIN OF it_aufm_261_1 OCCURS 0,
          matnr LIKE aufm-matnr,
          werks LIKE aufm-werks,
          bwart LIKE aufm-bwart,
         budat LIKE aufm-budat,
          menge LIKE aufm-menge,
          meins LIKE aufm-meins,
          dmbtr LIKE aufm-dmbtr,
          issueq LIKE aufm-menge,
          aufnr LIKE aufm-aufnr,
          map LIKE zcon_variance-verpr,
          END OF it_aufm_261_1.
    DATA: BEGIN OF it_aufm_261_2 OCCURS 0,
          matnr LIKE aufm-matnr,
          werks LIKE aufm-werks,
          bwart LIKE aufm-bwart,
         budat LIKE aufm-budat,
          menge LIKE aufm-menge,
          meins LIKE aufm-meins,
          dmbtr LIKE aufm-dmbtr,
          issueq LIKE aufm-menge,
          aufnr LIKE aufm-aufnr,
          map LIKE zcon_variance-verpr,
          END OF it_aufm_261_2.
    DATA: flag1,
          flag2,
          flag3,
          flag4,
          menge LIKE aufm-menge,
          menge902 LIKE aufm-menge,
          menge262 LIKE aufm-menge,
          mengefinal LIKE aufm-menge,
          issueq LIKE aufm-menge,
          map LIKE zcon_variance-verpr,
          dmbtr LIKE aufm-dmbtr,
          flagtab TYPE c.
    DATA: mandt TYPE sy-mandt.
    DATA: it_zcv TYPE zcon_variance,
          it_zcv_compo TYPE zcon_variance_c.
    DATA: BEGIN OF it_mseg OCCURS 0,
          mblnr LIKE mseg-mblnr,
          matnr LIKE mseg-matnr,
          werks LIKE mseg-werks,
          charg LIKE mseg-charg,
          menge LIKE mseg-menge,
          dmbtr LIKE mseg-dmbtr,
          bwart LIKE mseg-bwart,
          END OF it_mseg.
    DATA: it_mseg1 LIKE it_mseg OCCURS 0 WITH HEADER LINE.
    DATA: it_mseg_temp LIKE it_mseg OCCURS 0 WITH HEADER LINE.
    DATA: it_mseg_601 LIKE it_mseg OCCURS 0 WITH HEADER LINE,
          it_mseg_601_add LIKE it_mseg OCCURS 0 WITH HEADER LINE.
    DATA: it_mseg_602 LIKE it_mseg OCCURS 0 WITH HEADER LINE,
          it_mseg_602_add LIKE it_mseg OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF it_1 OCCURS 0,
          matnr LIKE mseg-matnr,
          werks LIKE mseg-werks,
          charg LIKE mseg-charg,
          menge(16) TYPE p DECIMALS 2, " LIKE mseg-menge, Changed later to get more space and to avoid any possible overflow: Viren;c
          dmbtr(16) TYPE p DECIMALS 2, " LIKE mseg-dmbtr, Changed later to get more space and to avoid any possible overflow: Viren;c
          bwart LIKE mseg-bwart,
          meins LIKE mseg-meins,
          END OF it_1.
    DATA: it_temp1 LIKE it_1 OCCURS 0 WITH HEADER LINE.
    DATA: it_261 LIKE it_1 OCCURS 0 WITH HEADER LINE,
          it_262 LIKE it_1 OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF it_sv OCCURS 0,
          mandt TYPE mandt,
          bukrs TYPE bukrs,
          werks TYPE  werks_d,
          matnr TYPE  matnr,
          component TYPE zcomponent,
          charg TYPE charg_d,
          period TYPE zperiod,
          gjahr TYPE gjahr,
          mtart TYPE mtart,
          maktx TYPE maktx,
          componentdisc TYPE zcomponentdisc,
          matkl TYPE matkl,
          menge(16) TYPE p DECIMALS 2, "menge_d,     Changed later to get more space and to avoid any possible overflow: Viren;c
          meins TYPE meins,
          dmbtr(16) TYPE p DECIMALS 2, "  dmbtr,     Changed later to get more space and to avoid any possible overflow: Viren;c
          zplp1 TYPE dzplp1,
          sales_variance TYPE zvariance,
          charg_fg TYPE charg_d,
          confirmtodate LIKE zcon_variance-confirmtodate,
          confirmfromdate LIKE zcon_variance-confirmtodate,
          currency TYPE waers,
          END OF it_sv.
    DATA: it_zsv TYPE zsales_variance.
    DATA: cyear(4) TYPE c,
          cmonth(2) TYPE c.
    INITIALIZATION.
      t2 = 'Please select'.
    START-OF-SELECTION.
      PERFORM determine_material_codes.
      PERFORM dtrmine_plnt_bsd_on_cmpny_cods.
    PERFORM determine_material_documents.
      PERFORM determine_mat_doc1.
      PERFORM fill_sales_variance.
    END-OF-SELECTION.
    *&      Form  determine_material_codes
          text
    -->  p1        text
    <--  p2        text
    FORM determine_material_codes .
    For Material selection
      IF s_matnr-low IS INITIAL AND s_matnr-high IS NOT INITIAL.
        s_matnr-low = s_matnr-high.
      ENDIF.
      SELECT matnr mtart
      FROM   mara
      INTO TABLE it_mara
      WHERE  matnr IN s_matnr
      AND mtart = 'IFIG'.
      IF it_mara[] IS INITIAL.
        MESSAGE e001.
        EXIT.
      ENDIF.
    ENDFORM.                    " determine_material_codes
    *&      Form  dtrmine_plnt_bsd_on_cmpny_cods
          text
    -->  p1        text
    <--  p2        text
    FORM dtrmine_plnt_bsd_on_cmpny_cods .
      SELECT bwkey FROM t001k INTO TABLE it_t001k
      WHERE bukrs = s_bukrs.
      IF it_t001k[] IS INITIAL.
       mandt = sy-mandt.
       DELETE FROM zsales_variance CLIENT SPECIFIED WHERE mandt = mandt.
       IF sy-subrc = 0.
         COMMIT WORK.
       ENDIF.
        MESSAGE e002.
        EXIT.
      ENDIF.
    ENDFORM.                    " dtrmine_plnt_bsd_on_cmpny_cods
    *&      Form  determine_mat_doc1
          text
    -->  p1        text
    <--  p2        text
    FORM determine_mat_doc1 .
    If optional fields is not filled then go by plant specifications
      CLEAR it_mbew.
      CLEAR  it_t001k.
      SORT it_t001k BY bwkey.
      DELETE ADJACENT DUPLICATES FROM it_t001k COMPARING bwkey.
      PERFORM select_material_docs.
    ENDFORM.                    " determine_mat_doc1
    *&      Form  select_material_docs
          text
    -->  p1        text
    <--  p2        text
    FORM select_material_docs .
      SELECT mblnr mjahr
      FROM mkpf
      INTO TABLE it_mkpf
      WHERE budat IN s_pcdf.
      IF  NOT it_mkpf[] IS INITIAL.
        CLEAR  it_mkpf.
        SORT it_mkpf BY mblnr.
        DELETE ADJACENT DUPLICATES FROM it_mkpf COMPARING mblnr.
        SELECT mblnr
               matnr
               werks
               charg
               menge
               dmbtr
               bwart
        FROM mseg
        INTO TABLE it_mseg
        FOR ALL ENTRIES IN it_mkpf
        WHERE mblnr = it_mkpf-mblnr
        AND   mjahr = it_mkpf-mjahr
        AND   ( bwart = '601' OR bwart = '602' )
        AND matnr IN s_matnr. " Added to select the only materials given in Material field.
        cnt = 0.
        DATA lv_index TYPE sy-tabix.
        SORT it_mara BY matnr ASCENDING.
        SORT it_mseg BY matnr ASCENDING.
       IF NOT it_mara[] IS INITIAL AND NOT it_mseg[] IS INITIAL.
         LOOP AT it_mara.
           LOOP AT it_mseg WHERE MATNR = IT_MARA-MATNR .
             IF NOT it_mseg IS INITIAL.
               APPEND LINES OF it_mseg TO it_mseg1.
               MOVE-CORRESPONDING it_mseg TO it_mseg1.
               APPEND it_mseg1.
               CLEAR it_mseg.
             ENDIF.
           ENDLOOP.
         ENDLOOP.
       ENDIF.
        DATA index TYPE sy-tabix.
    start
       LOOP AT it_mara.
         index = sy-tabix.
         CLEAR it_mseg.
         READ TABLE it_mseg WITH KEY matnr = it_mara-matnr BINARY SEARCH.
         IF NOT it_mseg IS INITIAL.
           it_mara-indi1 = 'FOUND'.
         ELSE.
           it_mara-indi1 = 'NOTFOUND'.
         ENDIF.
         MODIFY it_mara INDEX index.
       ENDLOOP.
       DELETE it_mara WHERE indi1 = 'NOTFOUND'.
       SORT it_mara BY matnr ASCENDING.
       SORT it_mseg BY matnr ASCENDING.
       lv_index = 1.
       IF NOT it_mara[] IS INITIAL AND NOT it_mseg[] IS INITIAL.
         LOOP AT it_mara.
           CLEAR it_mseg.
           LOOP AT it_mseg FROM lv_index .
             IF it_mseg-matnr <> it_mara-matnr.
               lv_index = sy-tabix.
               EXIT.
             ELSE.
               MOVE-CORRESPONDING it_mseg TO it_mseg1.
               APPEND it_mseg1.
               CLEAR it_mseg1.
             ENDIF.
           ENDLOOP.
         ENDLOOP.
       ENDIF.
       CLEAR: it_mseg,
              it_mseg1.
       REFRESH: it_mseg.
       it_mseg[] = it_mseg1[].
    END
    Select the manufacturing plants for given company code.
        IF NOT it_mseg[] IS INITIAL.
          SELECT matnr charg bwart werks
          FROM aufm
          INTO TABLE it_aufm2
         FOR ALL ENTRIES IN it_mseg
         WHERE matnr = it_mseg-matnr
         AND charg =   it_mseg-charg
          WHERE bwart = '901'.
          SORT it_mseg BY matnr charg bwart.
          SORT it_aufm2 BY matnr charg bwart.
          LOOP AT it_mseg.
            CLEAR it_aufm2.
            READ TABLE it_aufm2 WITH KEY matnr = it_mseg-matnr
                                         charg = it_mseg-charg
                                         bwart = '901' BINARY SEARCH.
            IF sy-subrc = 0.
              MOVE it_aufm2-werks TO it_mseg-werks.
              MODIFY it_mseg.
            ENDIF.
          ENDLOOP.
        ENDIF.
    Delete the plants which are not manufacturing plants.
        IF NOT it_mseg[] IS INITIAL.
          DELETE it_mseg WHERE werks <> so_werks.
        ENDIF.
        IF NOT it_mseg[] IS INITIAL.
          LOOP AT it_mseg.
            MOVE it_mseg-matnr TO it_mseg_temp-matnr.
            MOVE it_mseg-werks TO it_mseg_temp-werks.
            MOVE it_mseg-charg TO it_mseg_temp-charg.
            MOVE it_mseg-menge TO it_mseg_temp-menge.
            MOVE it_mseg-dmbtr TO it_mseg_temp-dmbtr.
            MOVE it_mseg-bwart TO it_mseg_temp-bwart.
            COLLECT it_mseg_temp.
          ENDLOOP.
        ENDIF.
        CLEAR it_mseg.
        REFRESH it_mseg.
        it_mseg[] = it_mseg_temp[].
      ENDIF.
      IF NOT it_mseg[] IS INITIAL.
    Seprate the entries having movement type '602'.
        LOOP AT it_mseg.
          IF it_mseg-bwart = '601'.
            MOVE it_mseg-matnr TO it_mseg_601-matnr.
            MOVE it_mseg-werks TO it_mseg_601-werks.
            MOVE it_mseg-charg TO it_mseg_601-charg.
            MOVE it_mseg-menge TO it_mseg_601-menge.
            MOVE it_mseg-dmbtr TO it_mseg_601-dmbtr.
            MOVE it_mseg-bwart TO it_mseg_601-bwart.
            APPEND it_mseg_601.
          ENDIF.
          IF it_mseg-bwart = '602'.
            MOVE it_mseg-matnr TO it_mseg_602-matnr.
            MOVE it_mseg-werks TO it_mseg_602-werks.
            MOVE it_mseg-charg TO it_mseg_602-charg.
            MOVE it_mseg-menge TO it_mseg_602-menge.
            MOVE it_mseg-dmbtr TO it_mseg_602-dmbtr.
            MOVE it_mseg-bwart TO it_mseg_602-bwart.
            APPEND it_mseg_602.
          ENDIF.
        ENDLOOP.
       DELETE it_mseg WHERE bwart = '602'.
    Add the entries of '601' movement type
        IF NOT it_mseg_601[] IS INITIAL.
          LOOP AT it_mseg_601.
            MOVE it_mseg_601-matnr TO it_mseg_601_add-matnr.
            MOVE it_mseg_601-werks TO it_mseg_601_add-werks.
            MOVE it_mseg_601-charg TO it_mseg_601_add-charg.
            MOVE it_mseg_601-menge TO it_mseg_601_add-menge.
            MOVE it_mseg_601-dmbtr TO it_mseg_601_add-dmbtr.
            MOVE it_mseg_601-bwart TO it_mseg_601_add-bwart.
            COLLECT it_mseg_601_add.
          ENDLOOP.
        ENDIF.
    Add the entries of '602' movement type
        IF NOT it_mseg_602[] IS INITIAL.
          LOOP AT it_mseg_602.
            MOVE it_mseg_602-matnr TO it_mseg_602_add-matnr.
            MOVE it_mseg_602-werks TO it_mseg_602_add-werks.
            MOVE it_mseg_602-charg TO it_mseg_602_add-charg.
            MOVE it_mseg_602-menge TO it_mseg_602_add-menge.
            MOVE it_mseg_602-dmbtr TO it_mseg_602_add-dmbtr.
            MOVE it_mseg_602-bwart TO it_mseg_602_add-bwart.
            COLLECT it_mseg_602_add.
          ENDLOOP.
        ENDIF.
      ELSE.
        MESSAGE e003.
        EXIT.
      ENDIF.
    Deduct the quantity and the amount for movement type '602' from '601'.
      cnt = 0.
      IF NOT it_mseg_601_add[] IS INITIAL.
        LOOP AT it_mseg_601_add.
          cnt = sy-tabix.
          CLEAR: menge_f,
                 dmbtr_f,
                 it_mseg_602_add.
          READ TABLE it_mseg_602_add WITH KEY matnr = it_mseg_601_add-matnr
                                              werks = it_mseg_601_add-werks
                                              charg = it_mseg_601_add-charg.
          IF sy-subrc = 0.
            menge_f = it_mseg_601_add-menge - it_mseg_602_add-menge.
            dmbtr_f = it_mseg_601_add-dmbtr - it_mseg_602_add-dmbtr.
            MOVE menge_f TO it_mseg_601_add-menge.
            MOVE dmbtr_f TO it_mseg_601_add-dmbtr.
            MODIFY it_mseg_601_add INDEX cnt TRANSPORTING menge dmbtr.
          ENDIF.
        ENDLOOP.
      ELSE.
        MESSAGE e003.
        EXIT.
      ENDIF.
      CLEAR: it_mseg,
             it_mseg_601_add.
      REFRESH: it_mseg.
      it_mseg[] = it_mseg_601_add[].
    select all materials and material type to match at ISFG material level
      CLEAR: it_mara.
      REFRESH: it_mara.
      SELECT matnr
             mtart
      INTO TABLE it_mara
      FROM mara
      WHERE mtart = 'ISFG'.
    Select all the order no's from AUFM to reduce to data trafficing
    SELECT aufnr matnr charg bwart
    FROM aufm
    INTO TABLE it_aufm
    FOR ALL ENTRIES IN it_mseg
    WHERE matnr = it_mseg-matnr
    AND   charg = it_mseg-charg
    AND   bwart = '901'.
      DATA : it_mc9 LIKE it_aufm OCCURS 0 WITH HEADER LINE.
      SELECT aufnr
             matnr
             charg
             bwart
      INTO TABLE it_mc9
      FROM aufm
      FOR ALL ENTRIES IN it_mseg
      WHERE matnr = it_mseg-matnr
      AND   charg = it_mseg-charg
      AND  bwart = '901'
      LOOP AT it_mseg.
        CLEAR it_mc9.
       READ TABLE it_mc9 WITH KEY matnr = it_mseg-matnr
                                  charg = it_mseg-charg
                                  bwart  = '901'.
        LOOP AT it_mc9 WHERE matnr = it_mseg-matnr AND
                             charg = it_mseg-charg AND
                             bwart  = '901'.
          IF NOT it_mc9 IS INITIAL.
            MOVE-CORRESPONDING it_mc9 TO it_aufm.
            APPEND it_aufm.
          ENDIF.
        ENDLOOP.
       SELECT aufnr matnr charg bwart
       FROM aufm
       APPENDING TABLE it_aufm
       WHERE matnr = it_mseg-matnr
       AND   charg = it_mseg-charg
       AND   bwart = '901'.
      ENDLOOP.
      cnt = 0.
    select the order no's giving material code and batch.
      CLEAR it_mseg.
      LOOP AT it_mseg.
        cnt = sy-tabix.
        CLEAR it_aufm.
       READ TABLE it_aufm WITH KEY matnr = it_mseg-matnr
                                   charg = it_mseg-charg
                                   bwart = '901'.
        LOOP AT it_aufm WHERE matnr = it_mseg-matnr AND
                              charg = it_mseg-charg AND
                              bwart = '901'.
          IF NOT it_aufm IS INITIAL.
         READ TABLE it_aufm.
            SELECT matnr
                   werks
                   charg
                   menge
                   dmbtr
                   bwart
                   meins
            INTO TABLE it_1
            FROM aufm
            WHERE aufnr = it_aufm-aufnr
            AND bwart IN (261,262)
            AND budat IN s_pcdf. " Vi
            IF NOT it_1[] IS INITIAL.
              SORT it_1 BY matnr ASCENDING.
    Select order no's one time to prevent data trafficing in IT_AUFM1.
              IF NOT it_aufm1[] IS INITIAL.
                APPEND LINES OF it_aufm1 TO it_aufm3.
              ENDIF.
              SELECT aufnr
                     matnr
                     charg
                     bwart
              FROM aufm
              INTO TABLE it_aufm1
              FOR ALL ENTRIES IN it_1
              WHERE matnr = it_1-matnr
              AND   charg = it_1-charg
              AND   bwart = '901'
              AND budat IN s_pcdf. " Vi
             IF NOT it_aufm1[] IS INITIAL.
               it_aufm3[] = it_aufm1[].
             ENDIF.
              LOOP AT it_1.
                CLEAR it_mara.
                READ TABLE it_mara WITH KEY matnr = it_1-matnr.
                IF NOT it_mara IS INITIAL.
                  CLEAR it_aufm1.
                 READ TABLE it_aufm1 WITH KEY matnr = it_1-matnr
                                              charg = it_1-charg
                                              bwart = '901'.
                  LOOP AT it_aufm1 WHERE matnr = it_1-matnr AND
                                         charg = it_1-charg AND
                                         bwart = '901'.
                    IF sy-subrc = 0.
                      READ TABLE it_aufm3 WITH KEY aufnr = it_aufm1-aufnr
                                                   matnr = it_aufm1-matnr.
                      IF sy-subrc <> 0.
                        SELECT matnr
                               werks
                               charg
                               menge
                               dmbtr
                               bwart
                               meins
                        APPENDING TABLE it_1
                        FROM aufm
                        WHERE aufnr = it_aufm1-aufnr
                        AND bwart IN (261,262)
                        AND budat IN s_pcdf. " Vi
                      ELSE.
                        DELETE it_1.
                      ENDIF.
                    ENDIF.
                  ENDLOOP.
                ELSE.
                  MOVE-CORRESPONDING it_1 TO it_temp1.
                  COLLECT it_temp1.
                  DELETE it_1.
                 ELSE.
                   DELETE it_1.
                 ENDIF.
                 ENDLOOP. " Second
                ENDIF.
                CLEAR it_1.
               delete it_1." Vi
              ENDLOOP.
            ENDIF.
            CLEAR: it_aufm.
          ENDIF.
          CLEAR: it_aufm.
        ENDLOOP.
    Seprate the data for movement type 262 and subtract 262 from 261.
        IF NOT it_temp1[] IS INITIAL.
          CLEAR it_temp1.
          LOOP AT it_temp1.
            IF it_temp1-bwart = '262'.
              MOVE-CORRESPONDING it_temp1 TO it_262.
              COLLECT it_262.
            ENDIF.
          ENDLOOP.
        ENDIF.
        DELETE it_temp1 WHERE bwart = '262'.
        IF NOT it_temp1[] IS INITIAL.
          LOOP AT it_temp1.
            IF NOT it_262[] IS INITIAL.
              CLEAR it_262.
              READ TABLE it_262 WITH KEY matnr = it_temp1-matnr
                                         werks = it_temp1-werks
                                         charg = it_temp1-charg.
              IF NOT it_262 IS INITIAL.
                it_temp1-menge = it_temp1-menge - it_262-menge.
                it_temp1-dmbtr = it_temp1-dmbtr - it_262-dmbtr.
              ELSE.
          do nothing
              ENDIF.
              MODIFY it_temp1.
            ENDIF.
          ENDLOOP.
        ENDIF.
    Push complete data about one FG code in table IT_SV.
        IF NOT it_temp1[] IS INITIAL.
          LOOP AT it_temp1.
            CLEAR it_sv.
            MOVE sy-mandt TO it_sv-mandt.
            MOVE s_bukrs TO it_sv-bukrs.
            MOVE it_temp1-werks TO it_sv-werks.
            MOVE it_mseg-matnr TO it_sv-matnr.  " This will the FG code
            MOVE it_temp1-charg TO it_sv-charg.
            MOVE it_mseg-charg TO it_sv-charg_fg.
            MOVE it_temp1-matnr TO it_sv-component.
            MOVE it_temp1-menge TO it_sv-menge.
            MOVE it_temp1-meins TO it_sv-meins.
            MOVE it_temp1-dmbtr TO it_sv-dmbtr.
            APPEND it_sv.
          ENDLOOP.
        ENDIF.
        CLEAR:    it_temp1,
                  it_1,
                  it_aufm,
                  it_aufm1.
                 it_262.
        REFRESH:  it_temp1,
                 it_262,
                  it_1,
                  it_aufm1.
      ENDLOOP.
      CLEAR: it_makt,
             it_mara.
      REFRESH: it_makt,
               it_mara.
      SELECT matnr maktx
      FROM makt
      INTO TABLE it_makt
      FOR ALL ENTRIES IN it_sv
      WHERE matnr = it_sv-matnr.
      SELECT matnr maktx
      FROM makt
      INTO TABLE it_makt1
      FOR ALL ENTRIES IN it_sv
      WHERE matnr = it_sv-component.
      SELECT matnr mtart matkl
      FROM mara
      INTO TABLE it_mara
      FOR ALL ENTRIES IN it_sv
      WHERE matnr  = it_sv-component.
      IF NOT it_sv[] IS INITIAL.
        LOOP AT it_sv.
          CLEAR it_makt.
          READ TABLE it_makt WITH KEY matnr = it_sv-matnr.
          IF NOT it_makt IS INITIAL.
            MOVE it_makt-maktx TO it_sv-maktx.
          ENDIF.
          CLEAR it_makt1.
          READ TABLE it_makt1 WITH KEY matnr = it_sv-component.
          IF NOT it_makt1 IS INITIAL.
            MOVE it_makt1-maktx TO it_sv-componentdisc.
          ENDIF.
          CLEAR it_mara.
          READ TABLE it_mara WITH KEY matnr = it_sv-component.
          IF NOT it_mara IS INITIAL.
            MOVE it_mara-mtart TO it_sv-mtart.
            MOVE it_mara-matkl TO it_sv-matkl.
          ENDIF.
          CLEAR mbew.
          SELECT SINGLE zplp1
          INTO mbew-zplp1
          FROM mbew
          WHERE matnr = it_sv-component
          AND   bwkey = it_sv-werks.
          IF sy-subrc = 0.
            MOVE mbew-zplp1 TO it_sv-zplp1.
          ENDIF.
          DATA: temp_var LIKE zcon_variance-verpr.
          temp_var = it_sv-zplp1 * it_sv-menge.
          it_sv-sales_variance = temp_var - it_sv-dmbtr.
          MOVE s_pcdf-low TO it_sv-confirmfromdate.
          MOVE s_pcdf-high TO it_sv-confirmtodate.
          CLEAR aufm.
          SELECT SINGLE * FROM aufm WHERE matnr = it_sv-component.
          IF sy-subrc = 0.
            MOVE aufm-waers TO it_sv-currency.
          ENDIF.
          CLEAR: cyear,
                 cmonth.
          cyear = s_pcdf-low+0(4).
          cmonth = s_pcdf-low+4(2).
          MOVE cmonth TO it_sv-period.
          MOVE cyear TO it_sv-gjahr.
          MODIFY it_sv.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " select_material_docs
    *&      Form  fill_sales_variance
          text
    -->  p1        text
    <--  p2        text
    FORM fill_sales_variance .
    mandt = sy-mandt.
    SELECT SINGLE * FROM zsales_variance INTO it_zsv.
    IF NOT it_zsv IS INITIAL.
       DELETE FROM zsales_variance CLIENT SPECIFIED WHERE mandt = mandt.
    ENDIF.
    Delete the plants which are not manufacturing plants.
      IF NOT it_sv[] IS INITIAL.
        DELETE it_sv WHERE werks <> so_werks.
      ENDIF.
      IF NOT it_sv[] IS INITIAL.
        SORT it_sv BY period gjahr ASCENDING.
        LOOP AT it_sv.
          MOVE-CORRESPONDING it_sv TO zsales_variance.
          MODIFY zsales_variance.
        ENDLOOP.
      ELSE.
        MESSAGE e208(00) WITH 'No record found...'.
      ENDIF.
      IF sy-subrc = 0.
        COMMIT WORK.
        MESSAGE s208(00) WITH 'Records inserted successfully...'.
      ELSE.
        ROLLBACK WORK.
        MESSAGE e208(00) WITH 'Error in records insertion'.
      ENDIF.
    ENDFORM.                    " fill_sales_variance

Maybe you are looking for

  • Airport express printing problem with Snow Leopard

    I am no longer able to print to my shared printer after upgrading to Snow Leopard. I get a message that starts with "communication failure the computer is no longer able to communicate with your printer". My network consists of a dual-band Airport ex

  • Ftp over http authentication

    Hi, we have problem opening FTP sites that require authentication. When I try to open a ftp site, example ftp://site.com, I get this message in the browser : Authentication is required by the FTP server ( ftpserver.com ). A valid user ID and password

  • Can't create Project from the Template or access project template

    Dear Experts, We are facing a issue while trying to access the project template/create the project from project template. we have 4 project template in place and of these two are working perfectly fine but From remaining two we are not being able to

  • Very Strange...10gR3 EM is working fine in Firefox but not in IE6

    Friends, OS: Windows XP SP3 DB: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod I am able to work on the "Administration" tab in FireFox browser but not able to open the "Administration" tab in IE6. But iam able to connect the db usi

  • Latentcy Issues - Illustrator CS4 only

    Just installed Creative Suite 4 Design Premium. Photoshop and InDesign are working fine. Illustrator is operating correctly. The program freezes for 20-40 seconds with my every move. Change the font, wait 20-40 seconds for the change to process. Move