What is diff b/w sy-index and sy-tabix

Hi all,
Can u plz give me the diff b/w sy-index and sy-tabix exactly and how it works.
Thanks & Regards
Venkat

Hi Venkat,
<b>1.SY-INDEX</b>
<b>-></b>Current loop pass
<b>-></b>In a DO or WHILE loop, SY-INDEX contains the number of loop passes including the current pass.
<b>2.SY-TABIX</b>
<b>-></b>Current line index
Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables.
The field is either not set or is set to 0 for hashed tables.
<b>APPEND</b> sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table.
<b>
COLLECT</b> sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0.
<b>LOOP AT</b> sets SY-TABIX to the index of the current line at the beginning of each loop lass. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE.
<b>READ TABLE</b> sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry.
<b>
SEARCH</b> <itab> FOR sets SY-TABIX to the index of the table line in which the search string is found.
I think that it clears ur doubt.
<b>Thanks,
Venkat.O</b>

Similar Messages

  • What is difference between sy-index and sy-tabix and where both are using ?

    what is difference between sy-index and sy-tabix and where both are using ?

    hi nagaraju
    sy-tabix is in Internal table, current line index. So it can only be used while looping at the internal table.
    sy-index is in Loops, number of current pass. This you can use in other loop statements also (like do-enddo loop, while-endwhile)
    SY-INDEX is a counter for following loops: do...enddo, while..endwhile
    SY-TABIX is a counter for LOOP...ENDLOOP, READ TABLE...
    Here is an example from which you can understand the difference between sy-tabix and sy-index.
    Itab is an internal table with the following data in it.
    id Name
    198 XYZ
    475 ABC
    545 PQR.
    loop at itab where id > 300.
    write :/ itab-id, itab-name , sy-tabix, sy-index.
    endloop.
    My output will be :
    475 ABC 2 1
    545 PQR 3 2
    Sy-tabix is the index of the record in internal table.
    sy-index gives the no of times of loop passes.
    So, for the first record in the output (475 ABC), 2 is the index of the record in internal table and as it is first time loop pass occured, sy-index value is 1.
    Regards,
    navjot
    award points

  • What is diff b/w order series and time seriesu2026

    what is diff b/w order series and time seriesu2026

    Hi S R,
    Order series is the concept used in SNP whereas time series is concept used in DP.
    ie In SNP, orders are stored in livecache as Order series whereas in DP, the historical data is stored with respect to time, ie time series in DP.
    Regards
    Senthil mareeswaran.

  • What is diff B/W dalta image and reverse image

    What is diff B/W dalta image and reverse image
    Edited by: Philip Eller on Jun 3, 2008 8:44 AM
    Edited by: Philip Eller on Jun 17, 2008 9:18 AM*

    Please post your question to the BW forum.

  • What is RID in non clustered index and its use

    Hi All,
    I need help regarding following articles on sql server
    1) what is RID in non clustered index and its use.
    2) What is Physical and virtual address space. Difference in 32 bit vs 64 bit Virtual address space
    Regards
    Rahul

    Next time Please ask single question in a thread you will get better response.
    1. RID is location of heap. When you create Non clustered index on heap and
    lookup happens to get extra records RID is used to locate the records. RID is basically Row ID. This is basic definition for you. Please read
    this Thread for more details
    2. I have not heard of Physical address space. I Know Virtual address space( VAS)
    VAS is simple terms is amount of memory( virtual )  'visible' to a process, a process can be SQL Server process or windows process. It theoretically depends on architecture of Operating System. 32 bit OS will have maximum range of 4 G VAS, it's calculated
    like a process ruining on 32 bit system can address max up to 2^32 locations ( which is equivalent to 4 G). Similarly for 64 bit max VAS will be 2^64 which is theoretically infinite. To make things feasible maximum VAS for 64 bit system is kept to 8 TB. Now
    VAS acts as layer of abstraction an intermediate .Instead of all request directly mapping to physical memory it first maps to VAS and then mapped to physical memory so that it can manage request for memory in more coordinated fashion than allowing process
    to do it ,if not it will  soon cause memory crunch.Any process when created on windows will see virtual memory according to its VAS limit.
    Please read
    This Article for detailed information
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • Regarding sy-index and sy-tabix

    Hi,
    What is the major difference between sy-index and sy-tabix ,
      can you give me one good example with code..
    Regards,
    Reddy.

    Hi,
    SY-TABIX - Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables. The field is either not set or is set to 0 for hashed tables.
    APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table.
    COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0.
    LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop lass. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE.
    READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry.
    SEARCH FOR sets SY-TABIX to the index of the table line in which the search string is found.
    SY_INDEX - In a DO or WHILE loop, SY-INDEX contains the number of loop passes including the current pass.
    sy-tabix is the tab index - the index of the record in the internal table you are accessing,
    sy-index is the loop counter.
    If you use a condition in LOOP the sy-index will go from 1 to n, but sy-tabix will refer to the line in the internal table.
    Hope this helps u.
    Thanks,
    Ruthra

  • Difference b/w sy-index and sy-tabix

    hai all,
    Could u explain the difference b/w sy-index and sy-tabix?
    regards,
    Selva

    Hi,
    sy-index - For Loops, Current Loop Pass.
    sy-tabix - For Internal Table, Current Line Index in internal table.
    sy-tabix is used at internal table operations (READ TABLE ... LOOP AT ...), sy-index is used at cycles (DO...n TIMES).
    SY-TABIX:
    Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables. The field is either not set or is set to 0 for hashed tables.
    it can be set by using the following:
    1.append
    2.collect
    3.loop at
    4. read
    5.search
    APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table.
    COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0.
    LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop lass. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE.
    READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry.
    SEARCH <itab> FOR sets SY-TABIX to the index of the table line in which the search string is found.
    SY-INDEX:
    SY-INDEX is used to describe the number of iteration with in the DO..ENDDO, WHILE ...ENDWHILE....
    for example,
    DO.
    WRITE SY-INDEX.
    IF SY-INDEX = 3.
    EXIT.
    ENDIF.
    ENDDO.
    it gives output as:
    1 2 3
    Regards,
    Raj.

  • Database Diff script creates redundant indexes and fails

    In Version 4.1.0.18, I create a table such that the primary key constraint and unique index have the same name:
        CREATE TABLE "MY_TABLE"
         ( "CORP_ID" CHAR(2 BYTE),
           "COMPANY_ID" NUMBER(5,0),
           CONSTRAINT "PK_MY_TABLE" PRIMARY KEY ("CORP_ID", "COMPANY_ID") ENABLE
    The DDL export of this table yields a different approach but the same end results:
        CREATE TABLE "MY_TABLE"
         ( "CORP_ID" CHAR(2 BYTE),
           "COMPANY_ID" NUMBER(5,0)
        CREATE UNIQUE INDEX "PK_MY_TABLE" ON "MY_TABLE" ("CORP_ID", "COMPANY_ID");
        ALTER TABLE "MY_TABLE" ADD CONSTRAINT "PK_MY_TABLE" PRIMARY KEY ("CORP_ID", "COMPANY_ID") ENABLE;
    Perfectly fine - no issue there.
    But if I do a complete Database Diff (all object types) and the target database is missing the table, the resulting script uses a combined approach:
        CREATE TABLE "MY_TABLE"
         ( "CORP_ID" CHAR(2) NOT NULL ENABLE,
           "GL_ACCOUNT" VARCHAR2(16),
           CONSTRAINT "PK_MY_TABLE" PRIMARY KEY ("CORP_ID","COMPANY_ID") ENABLE
       CREATE UNIQUE INDEX ."PK_MY_TABLE" ON "MY_TABLE" ("CORP_ID","COMPANY_ID");
    In this script, the CREATE TABLE will correctly create both the constraint and index.  Therefore the CREATE INDEX fails because the index already exists.

    In this script, the CREATE TABLE will correctly create both the constraint and index.  Therefore the CREATE INDEX fails because the index already exists.
    Can't help you beyond saying that is a bug since the DIFF should NOT do both of those.
    Someone from the sql dev team will need to tell you if the bug is in sql dev or the package sql dev is using to do the diff.
    Can you open the log window and review the SQL being generated/executed by sql dev?
    Sql Dev is likely using the DBMS_METADATA_DIFF package to generate the diff:
    http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_metadiff.htm
    If they are using it correctly but you get that error then it is an Oracle DB bug that needs to be filed.
    If sql dev is using the package incorrectly then sql dev has a bug and the team can address that.
    Sorry I can't help you more.

  • What's the relation between SESCrawlerExport index and UCM index?

    Does the SESCrawlerExport index feeds on changes from the UCM indexer?
    What happens if the UCM->Admin Applets->Repository Manager->Indexer->Automatic Update Cycle is disabled.
    Can the SESCrawlerExport index recollect changes?
    Thanks
    @

    you are right!
    Is there a threshold? The sql which ran above threshold can be captured?
    and I try that:
    1. there are three sql scripts (loop 10, 10000, 100000000)
    anmh@MYORACLE> select sql_id,sql_text,bind_data from v$sql where sql_text like '%count%a2%';
    8hxar1zmt4p24
    begin for i in 1..10 loop select count(*) into :cnt from a2; end loop; end;
    akmfy8m24dhvf
    begin for i in 1..10000 loop select count(*) into :cnt from a2; end loop; end;
    51ugvw2ajg75m
    begin for i in 1..100000000 loop select count(*) into :cnt from a2; end loop; end;
    2. check in dba_hist_sqltext:
    (1) loop 100000000 :
    anmh@MYORACLE> select sql_id from dba_hist_sqltext where sql_id='51ugvw2ajg75m';
    SQL_ID
    51ugvw2ajg75m
    (2) loop 10000 :
    anmh@MYORACLE> select sql_id from dba_hist_sqltext where sql_id='akmfy8m24dhvf';
    SQL_ID
    akmfy8m24dhvf
    (3) loop 10 :
    anmh@MYORACLE> select sql_id from dba_hist_sqltext where sql_id='8hxar1zmt4p24';
    no rows selected
    It prove that Hemant is right.

  • What is diff b/w Include Structure and Append Structure at Database Level

    Hi Experts,
    Could you please let me know what is the main difference between .Include Structure and .Append Structure at SE11?
    Thanks in advance and for good answer will give good points.
    Sekhar

    Hi,
    1. Append Structures
    Append structures can only be assigned to a single table.
    Append structures are created in the custome rnamespace ( ZZ or YY)
    In case of new versions of the standard table during upgrade, the append structures are automatically appended to the new version of the standard table
    Append structures can not be used with cluster and pool tables
    Append structures are created in transaction SE11. Display the standard table fields and press the Append structure button.
    When you press the button, SAP sugests a name for the new append structure. After you has accepted the name,
    a screen will be shown where you can enter the new fields.
    Remember to activate.
    2. Customizing Includes
    Some of the SAP standard tables contains special include statements called Customizing includes. In contrast to Append structures,
    Note that customizing includes are created by SAP, but the customer supply the fields for the include.
    Customizing includes begin with CI_ and is part of the customer namespace
    One Customizing include can be inserted into more than one table.
    You can find Customizing includes in SE11 under structures.
    Try to take a look at table RKPF which uses the Customizing include CI_COBL (In an IDES system). Next try to add a field to CI_COBL, and activate it. If you go back to table RKPF you will se that your new field has been added.
    Regards,
    Ferry Lianto

  • What is diff between oracle application server and weblogic server?

    what is the exact difference between oracle application server and weblogic application server?

    The difference between Oracle Application Server AND WebLogic Server has been discussed in a lot of forums dated 2008 and earlier comparing OAS10g with WebLogic10.0/WebLogic9.2
    But, now since Oracle has taken over WebLogic, this is not really important.
    Now, OAS has no further releases post 10g. WebLogic Server will be the Oracle's strategic application server going forward.
    So, if your query is for choosing one of them for a new environment, you are better of with WebLogic Server 10.3.6 OR WebLogic Server 12g
    As we will not have further releases of OAS and also OAS10g will be end of life soon, we recommend Oracle WebLogic Server.
    If you still want to know the differences, here is one such old oracle documentation link that talks about it
    http://docs.oracle.com/cd/B10467_16/migrate.904/b10425/asmwl02.htm
    Arun

  • Could anyone tell what's diff between mvt type 301 and 647?

    Hi,
    Since there has 301 already why still need 647??
    What's the difference???
    Thanks!!!
    Would be better tell some detail regarding the movement type useage and difference in different module...
    Thank you very much

    Hi,
    Movement type 301 is used to transfer material from a storage location in one plant to a storage location in a different plant. The value of the material is transferred at the moving average price of the issuing plant.
    Movement 301 needs to be used each time material is moved from plant to plant. Normally both plants would be within the same agency and the physical distance not great when this movement type is used.
    A goods issue for a stock transport order with delivery in Shipping is posted using movement types 641, 643, 645, or 647.
    647 Goods issue for a stock transport order in one step
    (Shipping)
    Unlike movement type 641 when a goods issue is posted using movement type 647, a goods receipt line (movement type 101) is generated automatically in the receiving plant. If a purchase order item is flagged as a returns item in the stock transport order, you can post the goods receipt of the returns in the issuing plant with movement type 677.
    For more knowledge in Movement type check out this
    http://forum.saptechies.com/viewtopic.php?p=7505&sid=ee37f12564fc1c8aa9e5e131a5f402d9
    Reward if this helps you
    Regards
    AK

  • What is diff. b/w Class loading and class initializing??

    Hi Guys,
    When we are using final keyword as:
    final static int cout;
    Then class will load but not initialize?
    Could any one explain this??
    Thanks in advance.

    >
    When we are using final keyword as:
    final static int cout;
    Then class will load but not initialize?
    Could any one explain this??
    >
    The class will load but not initialize? Where did you get that from?
    See 4.12.4. final Variables in the Java Language Spec
    http://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.12.4
    >
    A blank final is a final variable whose declaration lacks an initializer.

  • Which to use - Sy-index or sy-tabix ??

    This is what i found out about SY-INDEX and SY-TABIX but which one to use when i want to delete a line of data from an internal table ? I tried both sy-index and sy-tabix and both works fine and returning the expected output for me but which one is better of to use ?
    SY-TABIX :- For Internal Table, Current Line Index
    SY-INDEX :- For Loops, Current Loop Pass
    The below code is where i uses the Delete ..
    LOOP AT dmg.
            CONCATENATE
                   dmg-dmg00
                   dmg-dmg01
                   dmg-dmg02
                   dmg-dmg03
                   dmg-dmg04
                   dmg-dmg07
                   dmg-dmg08
                   dmg-dmg09 INTO tli_down1 SEPARATED BY '*'.
            APPEND tli_down1. CLEAR tli_down1.
            DELETE dmg INDEX sy-index.
            EXIT.
          ENDLOOP.

    Right. Just like what they said upstairs, sy-babix is the best choice.
    One more thing is, if you want to concatenate fields of table dmg and append to tli_down1 on by one. You should not use EXIT after delete dmg.
    In that case ,only one line can be appended into tli_down1 table.
    > The below code is where i uses the Delete ..
    >
    > LOOP AT dmg.
    >         CONCATENATE
    >        dmg-dmg00
    >         dmg-dmg01
    >        dmg-dmg02
    >         dmg-dmg03
    >        dmg-dmg04
    >         dmg-dmg07
    >        dmg-dmg08
    >         dmg-dmg09 INTO tli_down1 SEPARATED BY '*'.
    >   APPEND tli_down1. CLEAR tli_down1.
    >       DELETE dmg INDEX sy-index.
    >   EXIT.
    >     ENDLOOP.

  • What is the diff b/w Sap Scripts and Smart Forms

    Hi,
          Whats the diff b/w SAP Scripts and Smart Forms..
             I need the internal explanation for both Smart Forms and SAP Scripts mean when we execute what happens whether Print Program r Forms starts execution 1st  and SIMILARLY FOR SMARTFORMS WHETHER FM'S  R FORMS.
    Thanks & Regards,
    Gopi.

    Hi
    Difference with SMARTFORMS vs. SapScript(SE71)
    The Following are the differences :-
    a) Multiple page formats are possible in smartforms which is not the case in SAPScripts
    b) It is possible to have a smartform without a main window .
    c) Labels cannot be created in smartforms.
    d) Routines can be written in smartforms tool.
    e) Smartforms generates a function module when activated.
    f) Unlike sapscripts (RSTXSCRP), you cannot upload/download Smartform to your local harddisk.
    It was said that it was provided in CRM 3.0 version, but not available in R/3. You can download smartforms into Local PC in a XML format. In the same way you can upload this XML format into Smartform. From the smartform editor itself you can call download option, if you are working in CRM 3.0 environment.
    In R3 also, you can download into XML format. However, it's not sure about uploading. Refer to the program 'SF_XSF_DEMO'.
    In 4.7 Enterprise, other have seen this utlity which is completey missing in 4.6c. There is functionality to downlaod a complete form or only a particular node. (Utilities -> Download form). It will create a XML file and save it in the hard disk.
    For others, if you want to download/upload the Smartforms source, you will need the help from the Basis people. What you can do is to create a Transport and then FTP down to your local harddisk. When you need the Smartform source in another system, you have FTP up the Smartforms file back to the SAP server. Finally, the Basis team, will tp it into your system.
    g) The protect and endprotect command in sapscript doesn't work with smartforms. For example on a invoice: First data of position no 80. is printed on page one, other data of position no 80 is printed on page 2. And there's nothing you can do about it. Actually, there is something you can do about it. By using a folder node and checking the 'protect' checkbox, everything in that folder will be page protected.
    check out this link:
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    Reward points if helpful.
    Regards,
    Swathi.

Maybe you are looking for