How does sy-tabix affect by binary search transforming no fields?

1 report ztx1110.
     2 data: begin of it occurs 3,
     3           f1(2) type n,
     4           f2    type i,
     5           f3(2) type c,
     6           f4    type p,
     7           end of it.
     8
     9   it-f1 = '40'. it-f3 = 'DD'. it-f2 = it-f4 = 4. append it.
    10  it-f1 = '20'. it-f3 = 'BB'. it-f2 = it-f4 = 2. append it.
    11
    12 sort it by f1.
    13 do 5 times.
    14     it-f1 = sy-index * 10.
    15     it-f3 = 'XX'.
    16     it-f2 = it-f4 = sy-index.
    17     read table it
    18         with key f1 = it-f1
    19         binary search
    20         transporting no fields.
    21     if sy-subrc <> 0.
    22         insert it index sy-tabix.
    23         endif.
    24     enddo.
    25
    26 loop at it.
    27     write: / it-f1, it-f2, it-f3, it-f4.
    28     endloop.
in this program changing value of sy-tabix as such sy-index.
means in it's first loop it's value is 1, on second loop it's 2, and so on up to 5.
okay that is due to binary search.
but why binary search affecting this system variable?

Hi Vinay,
It is simple.
This depends on your select query. 
CASE 1: If you use select ..into table.....,  then there wil be nothing in your header ls_vbap. Now if you execute READ stmt..you will get nothing.
CASE 2: If you use Select..... into ls_vbap.....append ls_vbap....clear ls_vbap.....endselect.   In this case also the output of READ will be nothing because you are clearing header.  So while READ stmt you are comparing ls_vbap-vbeln and ls_vbap-posnr , as nothing in it you will get nothing
CASE 3: If you use case 2 without CLEAR stmt then always you will get the index of the last fetched record...i.e., the last record of the internal table before sorting..
I think it is helpful for you....if you are not clear just reply me

Similar Messages

  • How does condition category affect the price procedure

    Hello Gurus,
         there is a case as following:
    if the condition type in the pricing analysis says in a billing document that the ‘‘condition is found and set,” and one is using the condition requirement number 024 (which only determines the price in billing document) yet still has to do new pricing in order to obtain the condition record, Should the condition category be blank, the system would propose the message “condition is found and set” but does not provide an actual condition record.
       the fault would be that the condition category on the condition type should be equal to L.
       so my question is " how does condition category affect the price procedure" ? thanks very much!

    Hi Zhang,
    -->Condition category is a classification of conditions according to predefined criteria.
    -->These categories include packaging costs, delivery costs, output taxes and discounts.
    -->The classification of conditions by condition categories can be used for analysis.
    I hope it will clear for you
    Regards,
    Murali.

  • Can i upgrade my laptop's graphic card? and how does this upgrading affect the other functions?

    is it possible to upgrade my HP Split 13-m111TU x2 PC's graphic card? how does one go about this upgrading process? does it affect the other functions and features of the laptop? 

    Hi:
    The graphics adapter in your model cannot be upgraded.

  • How to use a standard library binary search if I'm not searching for a key?

    Hi all,
    I'm looking for the tidiest way to code something with maximum use of the standard libraries. I have a sorted set of ints that represent quality levels (let's call the set qualSet ). I want to find the maximum quality level (choosing only from those within qualSet ) for a limited budget. I have a method isAffordable(int) that returns boolean. So one way to find the highest affordable quality is to start at the lowest quality level, iterate through qualSet (it is sorted), and wait until the first time that isAffordable returns false. eg.
    int i=-1;
    for (int qual : qualSet) {
         if !(isAffordable(qual))
              return i;
         i++;
    }However isAffordable is a slightly complicated fn, so I'd like to use a binary search to make the process more efficient. I don't want to write the code for a binary search as that is something that should be reused, ideally from the standard libraries. So my question is what's the best way of reusing standard library code in this situation so as to not write my own binary search?
    I have a solution, but I don't find it very elegant. Here are the important classes and objects.
    //simple wrapper for an int representing quality level
    class QualityElement implements Comparable<QualityElement>
    //element to use to search for highest quality
    class HiQualFinderEl extends QualityElement {
         HiQualFinderEl(ComponentList cl) {...}
    //class that contains fair amount of data and isAffordable method
    class ComponentList {
         boolean isAffordable(int qual) {...}
    //sorted set of QualityElements
    TreeSet<QualityElement> qualSet When you create an instance of HiQualFinderEl, you pass it a reference to a ComponentList (because it has the isAffordable() method). The HiQualFinderEl.compareTo() function returns 1 or -1 depending on whether the QualityElement being compared to is affordable or not. This approach means that the binary search returns an appropriate insertion point within the list (it will never act as if it found the key).
    I don't like this because semantically the HiQualFinderEl is not really an element of the list, it's certainly not a QualityElement (but it inherits from it), and it just feels ugly! Any clever suggestions? Btw, I'm new to Java, old to C++.
    If this is unclear pls ask,
    Andy

    Thanks Peter for the reply
    Peter__Lawrey wrote:
    you are not looking for a standard binary searchI'm not using a binary search in the very common I'm searching for a particular key sense, which is the Collections.binarySearch sense. But binary searches are used in other situations as well. In this case I'm finding a local maximum of a function, I could also be solving f(x)=0... is there a nice generic way to handle other uses of binary search that anyone knows of?
    I would just copy the code from Collections.binarySearch and modify itI have this thing about reusing; just can't bring myself to do that :)
    It would be quicker and more efficient than trying to shoe horn a solution which expects a trinary result.Not sure I understand the last bit. Are you referring to my bastardised compareTo method with only two results? If so, I know, it is ugly! I don't see how it could be less efficient though???
    Thanks,
    Andy

  • How does the attribute gets the data from R/3 field?

    Hi Experts,
    It could be silly Q.  IO has attributes x, y, z.......  When we map r/3 field to IO, and it is added to the cube and when we create a report, how does the attribute gets data?  I've been working in BW and suddenly I got confused.  Someone please provide me some info
    Thanks,
    Radha

    X,Y,Z being attributes of an info object A.
    When A gets loaded it will be loaded with X,Y,Z.
    If A is a cube and if you wish you can bring X,Y,Z also in the cube in one or more dimensions.
    If you keep X,Y,Z as vag attributes rather than in te cube as dimensions, then , the system will generate SIDs for them.
    Ravi Thothadri

  • How does image borders affect calculatio​n of "center of mass" of particles?

    Hi!
    I have a question about how borders in the images affect calculation of "center of mass".
    My original image (0) is a 640x480 grayscale image with border of 3.
    I make a binarized image (1) of the original image (0) to search for particles. For each particle I find, I use the ROI for the particle to extract a third image (2) from the original image (0).
    All of the images have borders of 3.
    When using the ROI from particles in image (1), are the boundingBox-coordinates related to the outer edges of the image (which makes the image actually 646x486), or is it related to the original origo of the image (making the image "logically" 640x480)?
    The same question goes for calculation of
    center of mass for the particle, when using image (2). After running a particle filter on image (2), I use imaqCalcCoeff() to calculate IMAQ_CENTER_MASS_X and IMAQ_CENTER_MASS_Y, stored in local_x and local_y. To get the global_x and global_y, which is the center point of the particle related to the origo of image (0), I say that:
    global_x = local_x + boundingBox.left;
    global_y = local_y + boundingBox.top;
    Do I need to make further adjustments since I am using borders, e.g. adding/extracting 3 from the global_x and global_y to have a correct answer, or is IMAQ vision taking care of this for me?
    Do I have to actually define that:
    global_x = local_y + boundingBox.left - borderSize;
    or
    global_x = local_y + boundingBox.left - 2*borderSize;
    I guess (and hope) that the answer is no, that I can use:
    global_x = local_x + boundingBox.left;
    -but I need it confirmed...
    Thanks,
    Torbjørn

    The image border is only used for processing (filters, etc.) It is not included in any coordinates or measurements. Therefore, don't include it in any calculations.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • How does Google know what I am searching Bing for?

    How in the world do Google ads appear in Safari for items I searched Bing for?

    There are some easy steps you can take to enhance your privacy on the Web.
    From the Safari menu bar, select
    Safari ▹ Preferences ▹ Extensions
    Take an inventory of the extensions you've installed, if any. Some Safari extensions are adware or spyware. Read the privacy policies or terms of use carefully. Remove any that you don't really need or aren't sure about.
    One extension that you may want to install is called "Ghostery." It blocks many tracking cookies. But there are reports that it sometimes causes Safari to crash. I use it and have had no problems.
    If you've installed any ad-supported hacks such as "Glims" that modify Safari, uninstall them according to the developer's instructions. Doing so will enhance the stability of Safari, as well as your privacy.
    In the Safari preferences dialog, select the Privacy tab. You have the option to remove data, such as cookies, stored on your computer by web servers. You can remove all such data, or remove only some of it by clicking the  Details button. The other settings are pretty much self-explanatory.
    On a more advanced level, you can change the DNS servers used by your computer, or your router, to look up the addresses of all Internet servers that you use. In general, the best choice from the standpoint of privacy is to use your ISP's DNS servers. Your Internet traffic goes through your ISP's network anyway, so in theory there's no loss of privacy in using its DNS servers. Avoid third-party DNS services such as "OpenDNS," which is in the business of selling information about you to marketers.
    Consider using ad-blocking software such as "GlimmerBlocker," which also blocks some forms of JavaScript abuse that can be used to track you. It's only suitable for advanced users, and it may block some web content that you want to see.
    When using a public network such as a Wi-Fi hotspot, keep in mind that others connected to the same network may be able to eavesdrop on your network traffic. They won't be able to read the contents of that traffic if you connect to secure websites such as this one, but they will know the addresses of the sites. The same goes for email and messaging. Some public VPN services market themselves as a solution to this problem, but using those services may have serious security and privacy implications.

  • How does time machine affect programs? ala Logic?

    Say I do a software update and it stinks, buggy, et-cetera, how would I grab Logic from TIME MACHINE and use that version (pre update) or does it update the whole computer? I'm thinking its not sophisticated enough (TM) to know that if I grab LOGIC that it needs to grab the preferences, package receipts, application support as well as the LOGIC application itself. If you do have to restore the desktop (ALL) again, is there a better way than time machine or can you somehow use time machine.
    • Or is it that sophisticated?
    Thanks!

    Time Machine is almost like a clone with archival capabilities. It will store a minimumal restorable version of your system on the backup drive with all the preferences, kernel extensions, and files and applications. Time machine is sophisticated enough to understand for a few Apple applications how to restore addresses, e-mail, and other files back into their applications from an archive. However, the only restore that I've read it is able to restore an application is an entire hard disk restore much like restoring a clone. This is especially true if the application is divided into drivers, extensions, preferences, and plugins across the hard drive.

  • How does buffer size affect double buffered waveform generation?

    I had originally posted the following question:
    "Why does the double buffered waveform generation pause after the first buffer before continuing?"
    "I am using an AT-AO-10 board to generate a multiple channel waveform in double buffered mode. The board's DAC's are updated by an external clock signal. While the waveform generation performs well, I notice that after the first buffer has been generated there is a time delay before the next buffer is output. However the second buffer and thereafter perform well without any time delays. If anyone can provide me an explanation on why this happens I would appreciate it. I am using NI-DAQ API functions to generate the waveforms and my settings for the WFM_DB_Config function are 1 for oldDataStop to disallow regeneration of data and 0 for partialTransferStop to not stop when a half buffer is partially transferred."
    -posted by Vadi on 6/7/2001
    I received a response from Geneva as follows:
    Geneva L. on 6/11/2001 says:
    "Vadi,
    The first thing is to make sure that you have the latest version of NI-DAQ installed, NI-DAQ 6.9.1. If you need to install it, make sure you completely uninstall any prior versions. Then, you will have examples installed in either the NI-DAQ or the CVI directory. In the AO directory, you should find the WFMdoubleBuf example.
    Start with that to make sure the output appears as you expect. Then, you can modify it to apply your external update clock, following the idea presented in the WFMsingleBufExtUpdate example. You might even want to double-check that your external clock acts as you expect using an oscilloscope.
    Finally, modify the example such that you can update on multiple channels, remembering that you interleave each channels buffer into one buffer for WFM_DB_Transfer. Whatever data is in the buffer will be updated on the output channels.
    Regards,
    Geneva L.
    Applications Engineer
    National Instruments"
    I have checked my version of NI-DAQ and it is 6.9.1. I am generating the double buffered waveform according to the format shown in WFMdoubleBuf and with some modifications from WFMsingleBufExtUpdate to allow me to use my external update clock. However I continue to notice the same phenomena again and again. For a buffer size of 7500 or 10000 points there is a time lag meaning after the first buffer has been output there is a noticeable time delay before the second buffer and buffers there after is output. This time lag doesn't exist for the buffers that are output after the first buffer but it does exist for the first buffer. When I decrease the buffer size down to 5000 points the time lag disappears (Note: this phenomena also occurs when I use an internal time base as opposed to my external clock). Is there a reason for this? I am using a AT-AO-10 board and I know the on board FIFO is 1024 points deep. However from the documentation provided it doesn't indicate that double buffered mode uses the on board FIFO at all. In fact, the functions require that the FIFO mode be turned off (in WFM_Load) for double buffered waveform generation. Is there a reason why when the buffer size is increased that there is a time lag after the first buffer? Is this because of the functions themselves or is this because of the AT-AO-10 board?

    Vadi,
    Make sure that your buffer size is set to the same number of points that you're actually writing to the buffer initially. For instance, if you run the example as-is, the NIDAQMakeBuffer puts exactly the ulCount amount of data into the buffer. Then, it continuously writes out half buffers. Thus, if you are not writing enough data to fill up the buffer the first time, there will be that lag until the section where half buffers are output.
    Regards,
    Geneva L.
    Applications Engineer
    National Instruments
    http://www.ni.com/ask

  • Scale out question: how does instance name affect primary/secondary node

    Hi:
    OBIEE 11.1.1.6.4, Windows 2008
    On a test instance the following happened:
    1. Enterprise install of OBIEE 11g had problems
    2. Reinstalled OBIEE 11g, but the installer created an instance2
    3. All was well with this install
    4. Performed all necessary shared catalog and RPD steps
    5. On a second server, installed OBIEE 11g using the scale-out option
    6. On second server, this created an instance1 directory
    7. All components start up and we can log into OBIEE using either server1 or server2
    Question:
    Does OBIEE use the instance names in a scale-out? Our primary node is instance2 and the secondary node is instance1, though on a separate server. Will this cause a problem?
    Thanks for any help.

    Hello,
    This can be run on any of the replicas that the availability group participates in to return the primary instance:
    select primary_replica FROM sys.dm_hadr_name_id_map nim
    inner join sys.dm_hadr_availability_group_states ags
    on nim.ag_id = ags.group_id
    WHERE nim.ag_name = 'MyAvailabilityGroupNameHere'
    Sean Gallardy | Blog | Microsoft Certified Master

  • How does firewire cable affect quality?

    I am a new Mac user and new to video editing. I just recently purchased a MacBook and plan to begin editing my many many hours of miniDV video.
    To transfer the video from my camera to the Macbook, I pruchased an inexpensive cable (around $5) from a bargain internet site. I have seen cables for as much as $40 at the local Circuit City.
    How important is the firewire cable to maintain the quality of the video? Before I begin importing my video onto my new 500GB external drive I want to make sure I am retaining the quality.
    Thanks!
    MacBook   Mac OS X (10.4.9)  

    Thanks Klaus1 and Matt!
    I successfully imported one tape onto my Macbook. Everything seems to work fine with the cable. I can control the camcorder from the Mac and the video looks good.
    I really like how iMovie breaks the tape into several clips. I thought I was going to get one large file that I would have to parse myself!
    MacBook   Mac OS X (10.4.9)  

  • How does FireFox 4 affect AVG virus protection.

    I saw on your Fire Fox 4.0 possible problems. That downloading Fire Fox 4.0 would cause AVG virus protection to not work properly. What effect doe Fire Fox 4.0 have on AVG virus protection

    I think you need version 10 (also known as AVG 2011):
    '''Regarding AVG FREE:'''
    "...version 10.0.1209 is compatible with Firefox 4."
    http://forums.avg.com/ww-en/avg-free-forum?sec=thread&act=show&id=154821#post_154821
    '''Regarding AVG paid:'''
    "If Firefox 4 reports that only AVG Safe Search is incompatible with Firefox 4.0, please proceed according to FAQ 3271 to update your AVG.
    In case Firefox 4 reports that either AVG Security Toolbar or both AVG Security Toolbar and AVG Safe Search are incompatible with Firefox 4.0, please perform repair installation of AVG, according to FAQ 3251.
    Note: In case you meet this issue with AVG 9.0, kindly upgrade to AVG 2011 to rectify the issue."
    http://www.avg.com/us-en/faq.num-4222#num-4222

  • How does new computer affect ipods

    What needs to be done if I get a new mac and transfer my itunes to the new computer and get rid of the old computer. What should I do to insure the my ipods work on the new computer?

    Make sure your new computer is authorized in iTunes. Disable autosync in itunes, connect your ipod, right click on it in the device list and choose backup.
    This will save data, pictures and settings to itunes. See what's included in this backup here: http://support.apple.com/kb/HT1766
    Transfer your purchases the same way to copy all apps and bought media from the Store to your computer.
    Set up at least one contact and event on your computer to be able the merge your calendars and contacts after your ipod got wiped during the first sync.
    The rest of the data can be restored from the backup you made.
    Restoring: http://support.apple.com/kb/HT1414
    Music is one way only, from the computer to your device, unless you bought the songs in itunes and transferred your purchases.

  • How does one change a "rollover" value in a text field of a fillable PDF?

    I have a fillable PDF, and the values displayed when rolling the pointer over a fillable text field are showing some strange values.  I inherited this form from someone who is no longer with the company.  I need to be able to change the values but can't figure out how.  I'm new to LiveCycle so any help is greatly appreciated.

    When you click on the field, right click to properties.  If the tab isn't there then go to the top toolbar, click on Window and it should appear in the list there.  Once you click on it in the Window menu it will appear as a tab on your properties box.

  • How to binary search ITAB without structure

    Hi everybody,
    I defined an ITAB with
    lt_rlm_pods TYPE TABLE OF int_ui.
    where int_ui is a data-element not a structure!
    So, the following is not possible:
    READ TABLE lt_rlm_pods  WITH KEY int_ui = ls_anlage-int_ui
                    BINARY SEARCH
                    TRANSPORTING NO FIELDS.
    Does anbody know how to performe the binary search?
    Thanks
    Regards
    Mario

    Hi Mario,
    Try this:
    TYPES: BEGIN OF ty_int_ui,
                 int_ui TYPE int_ui,
                 END OF ty_int_ui.
    DATA: lt_rlm_pods TYPE TABLE OF ty_int_ui.
    READ TABLE lt_rlm_pods  WITH KEY int_ui = ls_anlage-int_ui
                                            BINARY SEARCH
                                            TRANSPORTING NO FIELDS.    
    Regards,
    Viswa.                                                      

Maybe you are looking for

  • Problem converting XML back to ABAP Structure using XSLT

    Hi Experts, I am currently trying to convert this xml file back to my ABAP structure but i have been unsuccessful so far. In XML file contain more than 1 reocrd. But my XSLT program is retriving only only first record. Try to help to get all the reco

  • G4ti4200 it go boom!

    Ive installed a Ti4200 128mb in my pc; all was fine (games played and windows found the card fine), the problem occured when I ran '3D! Turbo Experience' to check the card, and I found after a minute the PC switched itself off abruptly. Hmm, I though

  • Web Tools Payment terms default

    Hello experts, I have set my default Payment terms to 3 payments for all customers. First payment right away at 50% followed by 25% the next month, and 25% third month. Will webtools authorize the total amount when the order is processed?  If so how

  • ESS UI Customization

    Hi, I am working on ESS/MSS customization. Can you please let me know if it is possble to set the calendar view by default as hidden and on click to show using FPM ? It would be a real great help from your side if you could guide me on this. Also let

  • Making a repeating/seamless pattern

    I need to generate a repeating/seamless background from a logo. But I am having trouble doing it due to the complexity of the placement of the pattern. Wonder if anyone could shed some light on how to make this into a repeating pattern. Example (I ma