Plz reduse the f8 time

dear all,
in my internal order report i have this select query.
in debugging i obserd that select sum( wkgbtr) is taking more time .how to make it fast .plz advise me. in o/p i need to present the values of sum (whgbtr) for present yer and previous year so i used 2 times .but it taking more time.
select  ktext gsber idat1 idat3 objnr from aufk into corresponding fields of
     table it_aufk1
      where kokrs = p_kokrs
        and objnr in p_objnr.
loop at it_aufk1.
select sum( WKGBTR )
    perio
     from coep into table  IT_COEP1 where objnr EQ IT_AUFK1-objnr
                                    and gjahr = p_gjahr
                                    and kokrs = p_kokrs
                                    and beknz <> 'A' and beknz <> 'L'
                   group by coepobjnr coepperio.
some mathematial operations.
num = p_gjahr - 1.
    SELECT
        SUM( WKGBTR )
      INTO TABLE IT_COEP2
      FROM COEP
     where objnr eq IT_AUFK1-objnr
             and beknz <> 'A' and beknz <> 'L'
             and gjahr eq num .
endloop.
thanking you,
sudhakar

Hi,
Do not put SELECT statements in a LOOP.
Try using FOR ALL ENTRIES along with the table.
select sum( WKGBTR )
perio
from coep into table IT_COEP1 FOR ALL ENTRIES in it_aufk1 where objnr EQ IT_AUFK1-objnr
and gjahr = p_gjahr
and kokrs = p_kokrs
and beknz <> 'A' and beknz <> 'L'
group by coepobjnr coepperio.
some mathematial operations.
num = p_gjahr - 1.
SELECT
SUM( WKGBTR )
INTO TABLE IT_COEP2
FROM COEP
FOR ALL ENTRIES IN IT_AUFK1
where objnr eq IT_AUFK1-objnr
and beknz <> 'A' and beknz <> 'L'
and gjahr eq num .
Regards,
Sesh

Similar Messages

  • Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory

    Could u plz help me to find simple example for how to save data file in a spread sheet or any other way in the real time controller for Sbrio 9642 using memory or usb flash memory

    Here are a few Links to a helpful Knowledge Base article and a White Paper that should help you out: http://digital.ni.com/public.nsf/allkb/BBCAD1AB08F1B6BB8625741F0082C2AF and http://www.ni.com/white-paper/10435/en/ . The methods for File IO in Real Time are the same for all of the Real Time Targets. The White Paper has best practices for the File IO and goes over how to do it. 
    Alex D
    Applications Engineer
    National Instruments

  • Problem posted for the third time! PLZ HELP! Mic not working! :)

    Hey all!
    My Microphone isn't working. Im useing the onboard Live 24-Bit. To this I have at 7.1 Creative Inspire TD7700 with the external decoder, connected. Im useing the Optical cable, if that have anything to do with this.
    When I connect my micrphone, I cant use it at the same time that I play sounds. The difference is when I use the "Digital Output Only" function in the mixer. Here is what it does:
    When DOO is on: I can play and hear all sounds, but my microphone is not working at all.
    When DOO is off: I can record with the micrphone, no problem. I can create and record pretty good wave-files. But I can't hear anything.
    A thin I could do is to turn DOO off, record af wave, turn DOO on, and play the file. -But how cool is that?
    Besides, the primary reason that I got the mic, is that I play alot of World of Warcraft. And I want to use TeamTalk.
    Therefore, isn't there a way to get both things at once, just like "in the good old days"?      Plz help!

    Thana, the mods/admins are on strike...just bump this question if they stop their strike...

  • Hi my iPhone 4 is stolen, I ve on it Igotya app. It sent me the pic and location of the *******. I don't know what to do next; a question plz does the phone get locked after 3 times of entering wrong password lock, thanks

    Hi my iPhone 4 is stolen, I ve on it Igotya app. It sent me the pic and location of the *******. I don't know what to do next; a question plz does the phone get locked after 3 times of entering wrong password lock, thanks

    What To Do If Your iDevice Is Lost Or Stolen
    If your iPhone, iPod, iPod Touch, or iPad is lost or stolen what do you do? There are things you should do in advance - before you lose it or it's stolen - and some things to do after the fact. Here are some suggestions:
    Reporting a lost or stolen Apple product
    What-To-Do-When-Iphone-Is-Stolen
    Lost or Stolen iPhone? Here’s What to do.
    6 Ways to Track and Recover Your Lost/Stolen iPhone
    It pays to be proactive by following the advice on using Find My Phone before you lose your device:
    Find My iPhone
    Setup your iDevice on MobileMe
    How To Set Up Free Find Your iPhone (Even on Unsupported Devices

  • How to play more than 2 audio at the same time in a page

    I worked for interactivity book's page in Hype and I inserted two audio in a page
    One is background music played when page opend, Other is effect audio that played when touch the object.
    i added this widget in ibooks author.
    In ibooks-author on mac, i can hear two sound well. but in ibooks on ipad i got the problem..
    When i touch the object and play effect sound, background audio is stopped.
    Moreover, after effect sound ended then bgm is not played.
    i hope to hear two sound at the same time on ibooks, if not, play bgm continue after effect audio over.
    plz answer this problem.. T.T

    I got the same problems! I can't play multi audio at the same time. Would you mind letting me know the detail of how to deal with this problems.
    Regards,

  • Is it possible to get 2-ch signals from TDS2012 oscilloscope at the same time with LabVIEW "7.0"?

    Hi, everyone.
    I've been trying to get the signals from 2-ch of Tektronix TDS2012 oscilloscope at the same time using IVI connection with LabVIEW "7.0"
    I've already searched this developer zone for the answer.
    I've tried the famous example: "IviScope - Acq Dual Wfm Edge Triggered.vi"
    and it gave me the error message like:
    Error -1074110451 occurred at IviScope Initialize With Options.vi
    Possible reason(s):
    Driver Status:  (Hex 0xBFFA600D) Primary Error: (Hex 0xBFFA600D) The Config Server module is not present on the system.
    I think I've installed all~ the required softwares for IVI. For example, ICP 2.2, IVI engine 2.0.46, and tktds1k2k ivi (instrument driver for tds2012, in fact this one is for LabVIEW "7.1"... :-P)
    TDS2012 and my computer is connected through HPIB(GPIB) and it is shown on the MAX (a GPIB instrument as well as an IVI hardware asset)
    I've tried GPIB connection but it gives me asynchronous signals...
    Is it possible to get 2 signals at the same time with LabVIEW 7.0(not 7.1 or higher) by any means?
    What in the earth is the "Config Server" in this case?
    I don't need to sticking to IVI and any method to achieve my goal will be welcome.
    Could anyone give me the hint for this problem, plz?

    I think your problem is that the instrument specific driver is version 7.1 and you are using the class driver with 7.0. You can create your own 7.0 driver by downloading the LabWindows driver and using the Import CVI Instrument Driver under the Tools>Instrumentation menu.
    Since you don't seem to have a good reason to use IVI, why don't you try the native LabVIEW driver at http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=E3B19B3E9139659CE034080020E748.... I believe you have all of the functions to setup each channel and then when you trigger the scope, both channels will be captured. You would then transfer each waveform separately. The data is always read sequentially but that's not important as long as both channels are triggered at the same time.

  • Need to get the exact time of each picture that I saved ( maybe as a excel sheet or word )

    Hi guys,
    I am actually a new labview user. I have successfullly been able to save pictures. But unfortunately I got two problems. The first one is that I need to use two cameras at the same time. The program I have so far is for one camera. The second problem is that I need to get the exact time for each picture saved in the profile.
    I would appreciate if someone can help me with that. Anyway plz find attached the subvi.
    Regards,
    Abbas
    Attachments:
    Abbas progress.vi ‏54 KB

    Hi Abbas,
    First, I notice that you are using IMAQ for USB.  Is there any particular reason you are not using IMAQdx?  This is the newer, supported driver for use with USB cameras that supports acquiring from multiple cameras at the same time. 
    Check these two articles:
    Can I Acquire from Multiple USB Cameras Simultaneously Using IMAQdx?
    Can I Acquire from Two USB Cameras Simultaneously with NI-IMAQ for USB Cameras 1.0?
    And also this example (if you camera does not support acquiring from multiple cameras at the same time):
    Toggle Between Multiple USB Cameras
    As for timestamps, some cameras output them with the frame timing.  However, usually this is not a feature of USB cameras; if it is not, you can look into timing options within LabVIEW.  Try playing with the property node for IMAQdx and the Acquisition Attributes.
    Cheers,
    Marti C
    Applications Engineer
    National Instruments
    NI Medical

  • HT4993 Everytime i plug my phone into itunes it says it cant connect because the phone is locked well i restored my phone twice and set a new passcode the last time and it still wont work . I even deleted itunes and reinstalled it , it dosent work . HELP

    Everytime i plug my phone into itunes it says it cant connect because the phone is locked well i restored my phone twice and set a new passcode the last time and it still wont work . I even deleted itunes and reinstalled it , it dosent work . HELP PLZ !!

    I had the same issue. I tried everything unchecking / rechecking, formatting Iphone and restoring from backup etc etc.
    In the end it was a simple issue which might of might not help you.
    A number of months ago I relocated by Itunes folder to a NAS drive. It appears when I did the last I tunes update Itunes set the destination path of the Itunes media to the default location, the result was Itunes couldn't install music,apps, video until I set the correct destination path.
    The bit that confused me was it was transferring some media. This was of course the media I had downloaded since the last Itunes update which had gone to the default location.
    I hope that makes sense and is off some help.

  • Quality Inspection for the 1st time Receive of Batch

    Hi all.
    My requirement is just to do the quality inspection when the Batch(MCHA-CHARG) is received in the first time in MIGO.
    No quality inspection is required for next & consequtive goods receive for the same batch.
    for the 1st time receive, the stock will go to quality inspection stock for any batch of a material. From the next time , the stock will go directly to unrestricted stock without quality inspection. is it possible? plz advice.
    Thanks
    pabi

    Hi Pabi,
    I am not sure if this will help you, but here are the three options that you might want to consider:
    - Source inspection. The idea here is that an IL is created for a purchase order prior to GR. All subsequent receipts for this PO can be configured to skip inspection.
    - Control if insp. lot in material master (insp. set-up). In this case, the system will not create new insp. lot, if there's already one open for the same batch - it will merely add the qty of the new GR to the same open insp. lot.
    - With dynamic modification you can let the following receipts of the same material from the same vendor to go without QI, but you can't fine-tune it by batch.
    I know this is not the same what you want, but I can't recall at the moment a function that will satisfy your requirement exactly.
    BR
    Raf
    Edited by: Rafael Zaragatzky on Aug 7, 2011 4:32 PM

  • How to avoid the run time error  "java.lang.OutOfMemoryError"

    hi
    i have written a code to read a txt file ,i used FileReader to read a file . the code is working well for small txt files. but when i tried to read a large file(greater than 2MB), a run time error called "java.lang.OutofMemoryError" appeared .
    plz suggest the methods to read txt files of large capacity(greater than 25MB) .if possible give an example.

    thanks for ur replies
    i am new to java programming .i am a student persuing B.Tech final semester .i got struck in my project while reading a large txt file(greater than 3MB) . i am now giving a part of code that i had used in my project .it working fine with the txt files less than 3MB ,but when i am treing to read a file greater than 3MB , it is displaying a run time error "java.lang.outofmemoryerror"
    i have tried using "java -Xmx" ,it is working , but is there any better option ??
    here is the part of code:
       FileReader fin;
        al=new ArrayList();
         try
              fin=new FileReader(filename);
         catch(FileNotFoundException e)
           System.out.println("File not foumn");
         return;
    while((i=fin.read())!=-1)
           al.add(new Character((char)i));
         fin.close(); 
         Object obj[]=al.toArray();plz help me
    --santosh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Hi, how to load mac without running windows (bootcamp)? The problem is this: the last time i ran the windows, but he hangs and died (can not run further  the logo). now i can not load not windows, not maс! how to be, what to do???

    The problem is this: the last time i ran the windows, but he hangs and died (can not run further  the logo). now i can not load not windows, not maс! how to be, what to do???

    can any body help me, plz!!

  • My facetimeicon is exist on notifcation center only  and i cannot use it at the same time iam having problem with activiting imessage on my iphone

    Hi guy . My facetime exists in notification center only and there is no icon for facetime in the setting pane to activate it after i update to ios7.0.4. At the same time my imessage is taking long time to be activated . Any body can help me plz.

    Hi thanks my imessage worked but it is using my email and not my number . In the imessage my iphone number in imessage is not exisiting .what i have there my email and the imessage of my second number on iphone 4 even though when i open apple id  on my apple id my number is there

  • To compare given time with the system time

    i need to compare the given time with system time.i dont know how to compare with system time
    in my application i need to end the time when both time is equal i need to give permission to access my page
    thank u
    plz help me

    Date d =new Date();
    System.out.println(d);
    Date d1 =new Date("04/28/2006 16:37");
    System.out.println(" "+d.getTime()+"  "+d1.getTime());you can use like this. d1 contains the user date
    as u mentioned
    startTime = new Date( "04/28/2006 12:37");
    EndTime = new Date( "04/28/2006 18:37");
    if curTime = new Date();
    then you can compare like
    if(curTime.after(startTime) && curTime.before(EndTime)
    hope it will work

  • Use select & update(query) at the same time

    I'm sorry to trouble you.
    I am racking my brains to find a solution to the problem.
    I don't search a problem in my source.
    I maked every effort.
    I am tired to death.
    I wanna use (select & update(query)) at the same time.
    The Source compiled but have not access to DB
    plz help me.
    Can you give me a hand?
    sorry my bad English..
    link my source
    http://www.netian.com/~111nice/bangnew.java

    can you clearly explain whats problem and what error your are getting

  • ACE 4710: Find out the response time of a real server

    Hi to everyone,
    I have a couple of ACE 4710 and I need to find out what is the response time of a real server.
    Is there a way for this?
    Thank you for any answer!
      giorgio romano

    Hi,
    Kindly add the following line in your serverfarm configuration:
    predictor response syn-to-synack
    Suppose your serverfarm looks like this:
    serverfarm host AAA_FARM
    predictor response syn-to-synack
    probe HTTP_PROBE
    probe TCP9001_PROBE
    rserver SC106
    inservice
    rserver SC107
    inservice
    rserver SC108
    inservice
    rserver SC109
    inservice
    rserver SC110
    inservice
    rserver SC111
    inservice
    rserver SC112
    inservice
    rserver SC113
    inservice
    rserver SC114
    inservice
    rserver SC120
    inservice
    rserver SC131
    inservice
    And then use the following command to see the average response time from your rserver as follows:
    ACE1/prod# show serverfarm AAA_FARM detail
    serverfarm     : AAA_FARM, type: HOST
    total rservers : 11
    active rservers: 11
    description    : ServerFarm AAA
    state          : ACTIVE
    predictor      : RESPONSE
    method            : syn-to-synack
    samples           : 8
    failaction     : -
    back-inservice    : 0
    partial-threshold : 0
    num times failover       : 0
    num times back inservice : 0
    total conn-dropcount : 0
    Probe(s) :
    HTTP_PROBE,  type = HTTP
    TCP9001_PROBE,  type = TCP
    ----------connections-----------
    real                  weight state        current    total      failures
    ---+---------------------+------+------------+----------+----------+---------
    rserver: SC106
    x.x.x.x.:0        8      OPERATIONAL  2          1125       0
    max-conns            : 4000000   , out-of-rotation count : 0
    min-conns            : 4000000
    conn-rate-limit      : -         , out-of-rotation count : -
    bandwidth-rate-limit : -         , out-of-rotation count : -
    retcode out-of-rotation count : -
    load value           : 0
    average response time (usecs) : 81   ----> thats what you might be looking for
    From other day :
    rserver: SC114
    x.x.x.x:0        8      OPERATIONAL  70         10903      2
    max-conns            : 4000000   , out-of-rotation count : 0
    min-conns            : 4000000
    conn-rate-limit      : -         , out-of-rotation count : -
    bandwidth-rate-limit : -         , out-of-rotation count : -
    retcode out-of-rotation count : -
    load value           : 0
             average response time (usecs) : 1334                       ----> thats what you might be looking for
    For Serverfarm BBB_FARM
    serverfarm     : BBB_FARM, type: HOST
    total rservers : 1
    active rservers: 1
    description    : ServerFarm BBB
    state          : ACTIVE
    predictor      : RESPONSE
    method            : syn-to-synack
    samples           : 8
    failaction     : -
    back-inservice    : 0
    partial-threshold : 0
    num times failover       : 1
    num times back inservice : 1
    total conn-dropcount : 0
    Probe(s) :
    ----------connections-----------
    real                  weight state        current    total      failures
    ---+---------------------+------+------------+----------+----------+---------
    rserver: SC208
    x.x.x.x:0        8      OPERATIONAL  0          0          0
    max-conns            : 4000000   , out-of-rotation count : 0
    min-conns            : 4000000
    conn-rate-limit      : -         , out-of-rotation count : -
    bandwidth-rate-limit : -         , out-of-rotation count : -
    retcode out-of-rotation count : -
    load value           : 0
             average response time (usecs) : 0   ----> thats what you might be looking for
    Use more detials for response predictor:
    http://www.cisco.com/en/US/docs/app_ntwk_services/data_center_app_services/ace_appliances/vA3_1_0/configuration/slb/guide/rsfarms.html#wp1068831
    Configuring the Application Response Predictor
    To instruct the ACE to select the server with the lowest average response time for the specified response-time measurement based on the current connection count and server weight (if configured), use the predictor response command in server farm host or redirect configuration mode. This predictor is considered adaptive because the ACE continuously provides feedback to the load-balancing algorithm based on the behavior of the real server.
    To select the appropriate server, the ACE measures the absolute response time for each server in the server farm and averages the result over a specified number of samples (if configured). With the default weight connection option configured, the ACE also takes into account the server's average response time and current connection count. This calculation results in a connection distribution that is proportional to the average response time of the server.
    The syntax of this command is as follows:
    predictor response {app-req-to-resp | syn-to-close | syn-to-synack}[samples number]
    The keywords and arguments are as follows:
    •app-request-to-resp—Measures the response time from when the ACE sends an HTTP request to a server to the time that the ACE receives a response from the server for that request.
    •syn-to-close—Measures the response time from when the ACE sends a TCP SYN to a server to the time that the ACE receives a CLOSE from the server.
    •syn-to-synack—Measures the response time from when the ACE sends a TCP SYN to a server to the time that the ACE receives the SYN-ACK from the server.
    •samples number—(Optional) Specifies the number of samples over which you want to average the results of the response time measurement. Enter an integer from 1 to 16 in powers of 2. Valid values are 1, 2, 4, 8, and 16. The default is 8.
    For example, to configure the response predictor to load balance a request based on the response time from when the ACE sends an HTTP request to a server to when the ACE receives a response back from the server and average the results over four samples, enter:
    host1/Admin(config)# serverfarm SFARM1
    host1/Admin(config-sfarm-host)# predictor response app-req-to-resp
    samples 4
    To reset the predictor method to the default of round-robin, enter:
    host1/Admin(config-sfarm-host)# no predictor
    To configure an additional parameter to take into account the current connection count of the servers in a server farm, use the weight connection command in server farm host predictor configuration mode. By default, this command is enabled. The syntax of this command is as follows:
    weight connection
    For example, enter:
    host1/Admin(config)# serverfarm SF1
    host1/Admin(config-sfarm-host)# predictor response app-request-to-resp
    samples 4
    host1/Admin(config-sfarm-host-predictor)# weight connection
    To remove the current connection count from the calculation of the average server response time, enter:
    host1/Admin(config-sfarm-host-predictor)# no weight connection
    You can use threshold milliseconds parameter which is optional Specifies the required minimum average response time for a server. If the server response time is greater than the specified threshold value, the ACE removes the server from the load-balancing decision process (takes the server out of service).
    Enter an integer from 1 to 300000 milliseconds (5 minutes). The default is no threshold (servers are not taken out of service).
    In case if you have measures the response time from  when the ACE sends a TCP SYN to a server to the time that the ACE receives a CLOSE from the server  use syn-to-close      (already discussed previously)
    If you have to measures the response time from when the ACE sends a TCP SYN to a server to the time that the ACE receives the SYN-ACK from the server use syn-to-synack   (already discussed previously)
    SAMPLES parameter is optional and  specifies the number of samples that you want to average from the results of the response time measurement and response time is used to select the server with the lowest response time for the requested response-time measurement. If you do not specify a response-time measurement method, the ACE uses the HTTP app-req-to-response method.
    Whenever a server's load reaches zero, by default, the ACE uses the autoadjust feature to assign a maximum load value of 16000 to that server to prevent it from being flooded with new incoming connections. The ACE periodically adjusts this load value based on feedback from the server's SNMP probe and other configured options.
    Using the least-loaded predictor with the configured server weight and the current connection count option enabled, the ACE calculates the final load of a real server as follows:
    final load = weighted load × static weight × current connection count
    where:
    •weighted load is the load reported by the SNMP probe
    •static weight is the configured weight of the real server
    •current connection count is the total number of active connections to the real server
    The ACE recalculates the final load whenever the connection count changes, provided that the (config-sfarm-host-predictor) weight connection command is configured. If the (config-sfarm-host-predictor) weight connection command is not configured, the ACE updates the final load when the next load update arrives from the SNMP probe.
    If two servers have the same lowest load (either zero or nonzero), the ACE load balances the connections between the two servers in a round-robin manner.
    HTH
    Plz rate if u find it useful.
    Sachin

Maybe you are looking for

  • Unable to change field from available text options in SM30?

    It is either yes or no. I cannot change to yes , it keeps going back to no when I save. Anysuggestions?    Thanks.

  • How to create SAP System

    Hi all, Is this possible to assign the role, based on the organization structure? In which SAP system stores organization structure in it. How to create the SAP system to store my organization structure through EP. Helpful answers will appreciate. Th

  • Workitem stunned in 'in process' status

    Hi Export, I met a workflow problem in CRM. This workflow is for DPA approval. It generate a workflow in CRM, then trigger another workflow for approval in R/3. After approval completed in R/3, it call back to CRM, and then CRM update status and cond

  • Folio will not appear on ipad

    Hello! Created a folio and shared it with people who have downloaded the Adobe viewer on their iPad. They log into the viewer with their Adobe ID, but the folio that I have shared does not come up. What am I doing wrong? How will the folio appears wi

  • Tune transfer

    ok, i know that "tune transfer for ipod" isn't a product of apple, but.. i bought this product which transfers songs from my ipod into itunes and it works pretty much fine, songs are being transferred onto my computer.. the problem is that i've just