Sy-subrc = 8 when looping through a table...

i am looping one table and reading other.
  now sy-subr = 8,it is showing what can be the reason.
Thanks in advance.
Edited by: Julius Bussche on Feb 24, 2009 10:50 AM
Subject title improved

Hi,
If
sy-subrc = 4 No lines were read.
sy-subrc = 8 The search key was not fully qualified.
So u can add the logic for sy-subrc = 8 or u can change the logic as
if sy-subrc is initial.
else.
endif.
Keerthi.

Similar Messages

  • Error "Screen output are too small" when looping through internal table!

    Hello All:
         I have a huge internal table with some 79000 records and while looping through them and doing some other processing inside the loop, I am getting an error "Screen output are too small"! Could someone please help mw how to fix this issue? I can send the all the code if anyone wants to look at the code. Thanks in advance and rewards are assured.
    Mithun

    Hi,
    Check this
    new-page print off.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
    destination = v_dest
    IMPORTING
    out_parameters = params
    valid = valid.
    * params-linct = '58'.
    * params-linsz = '170'.
    * params-paart = 'X_58_170'.
    * params-prtxt = v_spool_text.
    * params-primm = 'X'.
    * params-prrel = 'X'.
    NEW-PAGE PRINT ON PARAMETERS params NO DIALOG.
    After the call fm GET_PRINT_PARAMETERS params internal table contains all the values for generating spool.
    aRs

  • BRF : Looping through a table (e.g. Do Until or While, etc..)

    Hello Colleagues,
    In BRFPLus I understand we can create Loop Expressions that allow you to loop through a table and perform different Actions based  on the retrieved contents of the table.
    We are not using BRFPLus (but the old BRF instead). Does anyone know how to build Loop Expressions in BRF without the use of ABAP Function Modules?
    Your feedback would be really appreciated.
    Thanks in advance.
    Regards,
    Ivor M.

    Hello Colleagues,
    In BRFPLus I understand we can create Loop Expressions that allow you to loop through a table and perform different Actions based  on the retrieved contents of the table.
    We are not using BRFPLus (but the old BRF instead). Does anyone know how to build Loop Expressions in BRF without the use of ABAP Function Modules?
    Your feedback would be really appreciated.
    Thanks in advance.
    Regards,
    Ivor M.

  • Loop through a table

    Is it feasible to write code that loops through a table in a form? I'm currently writing separate sections of code for each row of a five-row table to validate data entries.

    Hi,
    It would be easier if your table contained one row that repeated with an initial count of five (this is set in the binding tab of the Object palette).  This will change the XML generated but assuming that is not a problem your could loop though your table with the code;
        var rows = this.resolveNodes("Table1.Row1[*]");
        for (var i=0; i<rows.length; i++)
            var currentRow = rows.item(i);
    If you do need the rows uniquely named then you could pass i and the result of "this.resolveNodes("Table1.Row"+i)" into a function.
    This is you form back ... with only the first validation converted to the new approach.
    https://acrobat.com/#d=akb0*Ptvdr3KSYN0VP*7zA
    Hope this gets you started.
    Regards
    Bruce

  • I need to loop through 1 table and read another until a value changes

    i need to read a table and sum the quantity field until a reason code changes.  how do I go about doing this?

    sort itab by reasoncode.
    Loop at itab.
    quantiy = quanity  + itab-quantity.
    at end of reasoncode.
    jtab-reasoncode = itab-reasoncodee.
    jtab-sum = quantity.
    append jtab.
    clear quantity.
    endat
    endloop.
    or
    sort itab  by reasoncode.
    loop at itab.
    at end of reasoncode.
    sum.
    jtab = itab.
    append jtab.
    endat.
    endloop.
    or
    let us say itab and jtab are two tables and you want to loop through itab and read jtab for reasoncodes.
    if jtab has only one entry for each entry in itab then use read else use loop.
    loop at itab.
    loop at jtab where reasoncode = itab-reasoncode.
    quantiy = quantiy + jtab-quanity.
    endloop.
    endloop.
    or
    loop at itab.
    read table jtab with key reasoncode = itab-reasoncode.
    if sy-subrc eq 0.
    endif
    endloop.

  • Looping through a table

    how do I loop through the following table and get it to insert records into another depending on the number that it finds in the value column. eg if there is 8 in the value column, 8 records should be inserted into another table with the same ID
    i forgot to paste an example table
    ID
    Name
    Value
    1
    john
    12
    2
    sarah
    20
    3
    Tom
    5
    I want it to look at the value column and if it is 12 it should add 12 rows with the same ID into another table. eg in the new table there will be 12 rows for John with an ID of 1. For Sarah there will be 20 rows with an ID of 2.
    sukai

    Sure!
    DECLARE @sourceTable TABLE (ID INT, Name VARCHAR(20), Value INT)
    INSERT INTO @sourceTable (ID, Name, Value) VALUES (1, 'john', 12),(2, 'sarah', 20),(3, 'Tom', 5)
    This mocks up your source table (where your data is coming from). We're simply creating a table variable, and populating it with your example data.
    DECLARE @numbers TABLE (value INT)
    WHILE (SELECT COUNT(*) FROM @numbers) < (SELECT MAX(Value) FROM @sourceTable)
    BEGIN
    INSERT INTO @numbers (value) VALUES ((SELECT COUNT(*) FROM @numbers)+1)
    END
    This creates an example numbers table. The while causes the code to loop until there are as many rows as the maximum value for the Value column in your example data. Each time the loop iterates it inserts a row, causing the COUNT(*) to be one more each time,
    we add one to that, and insert it into the numbers table.
    INSERT INTO destinationTable
    SELECT s.ID, s.Name, s.Value
    FROM @sourceTable s
    INNER JOIN @numbers n
    ON s.Value >= n.value
    ORDER BY s.ID
    This performs an insert select to a made up table. We join the rows from @sourceTable (your example data) to the @numbers table where the Value column from @sourceTable is less than or equal to the value column in the numbers table. If s.Value is 1
    we'll perform this join once. If it's 2, twice and so on. This works because of the way we set up the numbers table. If we had insert multiple 1's it would cause additional joins.
    A numbers table is a handy tool to have for things like this were you need iterations. Create a database (or schema) on your database and call it something like 'Toolbox'. In that database/schema you can put things like this that have little to do with your
    actual data, but come in handy. You can make your numbers table as long as you need. It totally wouldn't hurt at all to have a numbers table with hundreds of thousands of rows. They're just int's, they don't eat much :).
    Let me know if you'd like anything clarified more.

  • Text is not being displayed in sync on a label when looping through a list -- how to fix?

    I have a list of states (50 states).  I loop through this list (in a winform app -- VS2012) and want to display the current state ID that is being processed in the loop in the text property of a label.  I precede the label.Text = StateID line with
    Application.DoEvents() but I am also (in Debug mode) writing the same text to the console.  The console displays correctly, but there appears to be a lag in the label.Text property
    List<string> StateList = new List<string> { "al", "ak", "az","ar","ca","co","ct","de","fl","ga",...};
    foreach (string stateID in StateList)
        Application.DoEvents();
        lblStateID.Text = "State is " + stateID;  //--there is a lag here
    I vaguely recollect something about a NotifyPropertyChanged event.  I know this is common in WPF, but is there something similar in winform?  Or is there a way to make the desired text to be displayed in the label.Text property in synchronization
    with the loop?
    Rich P

    Thank you.  This is way simpler than implementing the INotifyPropertyChanged Interface.  Although, here is an article on the INotifyPropertyChanged Interface and event
    http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged(v=vs.110).aspx
    Rich P

  • Problem when loop through a list within CollectionModel

    In my bean, I have these codes to define a node.
    Map<String, Object> node = new HashMap<String, Object>();
    node.put("Nodeid", nodeid);
    List theColors = new ArrayList();
    node.put("Colors", colors);
    node.put("Type", type);
    node.put("Desc", desc);
    Then, a list of these nodes are converted to CollectionModel using ModelUtils.toCollectionModel(nodes);
    In my jspx, I am able to loop through nodes, and get Type, Nodeid and Desc from the node to show on the screen.
    I am trying to loop through the list of colors within the node to draw circles with different diameter.
    <af:forEach var="theColor" items="#{node.Colors}" varStatus="vs">
    <dvt:pointLocation pointX="50%" pointY="50%">
    <dvt:marker id="mk2" scaleX="#{15-vs.index*2}" scaleY="#{15-vs.index*2}" shape="circle" fillColor="#{theColor}" />
    </dvt:pointLocation>
    </af:forEach>
    But above code does not work.
    Can someone help me? Any suggestions?
    Thanks.

    I want to call a javascript function inside a c:forEach loop.Nope sorry, won't work.
    Java/JSP runs on the server. At the server end, any html/script code is just template text to output to an html file.
    The server produces an html file, and sends it to the client.
    Java stops running.
    Java cannot call javascript, javascript can not call java. There is no direct communication.
    Java code can produce javascript code to run on a page.
    The only communication javascript has back with the server is if it makes a request (click a link, submit a button, Ajax call...)

  • Looping through a table Help needed ....Forms 10g..... When Button Pressed

    Hye craig, hamid, christian and all ...........
    i have a user access interface which i create where there are two fields username and password and a button,
    i have also created a table USERS for users which have username and password fields ..... On useraccess interface i coded on WHEN BUTTON PRESSED like this
    declare
    go_block('users');
    execute_query;
    declare
    begin
         if :useraccess.username=:users.username and
              :useraccess.password=:users.password then
              go_block('MAINPAGE');
              else
              go_block('USERACCESS');
              MESSAGE('SORRY WRONG PASSWORD OR NOT A REGISTERED USER');
              MESSAGE('SORRY WRONG PASSWORD OR NOT A REGISTERED USER');
              end if;
    end;
    This code works for a single user in USERS table but for multiple users there has to be some looping system
    which matches the USERACCESS and USERS tables fields thoroughly ....

    Hi Majid,
    I can suggest you a workaround for this. raise a ON-LOGON trigger and you can use the LOGON_SCREEN builtin to flash the logon screen at runtime. And then try capturing the username and password.
    DECLARE
      connected BOOLEAN := FALSE;
      tries     NUMBER  := 3;
      un        VARCHAR2(30);
      pw        VARCHAR2(30);
      cs        VARCHAR2(30);
    BEGIN
      SET_APPLICATION_PROPERTY(CURSOR_STYLE, 'DEFAULT');
      WHILE connected = FALSE and tries > 0
      LOOP
        LOGON_SCREEN;
        un := GET_APPLICATION_PROPERTY( USERNAME );
        pw := GET_APPLICATION_PROPERTY( PASSWORD );
        cs := GET_APPLICATION_PROPERTY( CONNECT_STRING );
        LOGON( un, pw || '@' || cs, FALSE );
        IF FORM_SUCCESS
        THEN
          connected := TRUE ;
        END IF;
        tries := tries - 1;
      END LOOP;
      IF NOT CONNECTED THEN
        MESSAGE('Too many tries!');
        RAISE FORM_TRIGGER_FAILURE ;
      END IF;
    END ;   a sample piece of coding to help you out.
    Regards,
    Manoj Chakravarthy

  • Looping through hash table

    Hi All,
    I'm new to Powershell and recently wrote a script that used the system.directoryServices class to bind to Active directory and pull out a bunch of info I need. Problem is that once I have this stuff, I have it in a hash table and I can't seem to pull
    out just the pertinent info. As you can see from the pic below, I have a bunch of blank fields....and when I wrote a for to cycle through these and ignore the $null values...i just got back a bunch of system.collectionhashtable system.collectionhashtable system.collectionhashtable...over
    and over again. I was hoping someone could help me get out the values I need...do I need to convert this hash table into some other sort of object to work with it? I'm not to sure were I've gone wrong.
    This is what I started with to produce the below:
    $objDomain = new-object system.directoryServices.directoryEntry
    $strTopDomain = $objDomain.distinguishedName
    $strTopLDAP = "LDAP://OU=Something,OU=else,OU=other,$strTopDomain"
    $objTopOU = new-object system.directoryServices.directoryEntry("$strTopLDAP")
    $strTopOU = $objTopOU.distinguishedName
    $topFilter = "(&(computerlink=*)(iwstemplatelink=*))"
    $topObjSearcher = New-Object System.DirectoryServices.DirectorySearcher($topFilter)
    $topObjSearcher.searchRoot = $objTopOU
    $topObjSearcher.searchScope = "subtree"
    $topObjSearcher.propertiesToLoad.add("computerlink")
    $topObjSearcher.propertiesToLoad.add("iwstemplatelink")
    $topObjSearcher.propertiesToLoad.add("vpslocation")
    $objTopList = $topObjSearcher.findAll()| foreach-object { @{n='Name';e={$_.vpslocation}}, @{n='Value';e={$_.iwstemplatelink}}}
    Then I tried a while loop...something along these lines:
    $x = 0
    $y= $objTopList.count()
    while ($x -lt $y){
    if($objTopList -ne $null){
    write-host $objTopList[$x]
    x++
    But as I said above....I just got the Sytems.collections repeated over and over. Any help would be appreciated. Really not much of a scripting guy. Thanks

    Why are some people bent on being so annoying.
    Here is how to unwind the property wrappers on the searchresults collection of searchresult objects.
    $objDomain = new-object system.directoryServices.directoryEntry
    $strTopDomain = $objDomain.distinguishedName
    $strTopLDAP = "LDAP://OU=Something,OU=else,OU=other,$strTopDomain"
    $objTopOU = new-object system.directoryServices.directoryEntry("$strTopLDAP")
    $strTopOU = $objTopOU.distinguishedName
    $topFilter = "(&(computerlink=*)(iwstemplatelink=*))"
    $topObjSearcher = New-Object System.DirectoryServices.DirectorySearcher($topFilter)
    $topObjSearcher.searchRoot = $objTopOU
    $topObjSearcher.searchScope = "subtree"
    $topObjSearcher.propertiesToLoad.add("name")
    $topObjSearcher.propertiesToLoad.add("samaccountname")
    $topObjSearcher.propertiesToLoad.add("computerlink")
    $topObjSearcher.propertiesToLoad.add("iwstemplatelink")
    $topObjSearcher.propertiesToLoad.add("vpslocation")
    $objTopList = $topObjSearcher.findAll()|
    foreach-object {
    $p=@{
    Name=$_.Properties['name'][0]
    SamAccountName=$_.Properties['samaccountname'][0]
    VPSLocation=$_.Properties['vpslocation'][0]
    LWSTemplateLink=$_.Properties['iwstemplatelink'][0]
    New-Object PsObject -Property $p
    We must use the "Properties" collection as the properties loaded are NOT exposed on the object. THey are also all included as elements of a collection so we need to use the [0] to remove them.
    We can use select-object -expand properties to see the properties but the will all be wrapped and delivered as a collection of hashes.  See:
    PS C:\scripts> $s.FindAll()|select -expand properties
    Name Value
    ridsetreferences {CN=RID Set,CN=SBS01,OU=Domain Controllers,DC=TESTLNET,DC=local}
    logoncount {65535}
    codepage {0}
    objectcategory {CN=Computer,CN=Schema,CN=Configuration,DC=TESTLNET,DC=local}
    iscriticalsystemobject {True}
    operatingsystem {Windowsr Small Business Server 2011 Standard}
    localpolicyflags {0}
    Notice Name/Value pairs and the little squigglies: {}.  Not very useful until we unwrap them.
    This is one thing that always confuses the unwashed and unlevened of the computer trade.  It goes totally against everything they have come to believe.  Even I am surprised at how MS executed these bits. It is a big inconvenience until you
    program active directory in C or C#...then it all starts to make sense...sort of.
    ¯\_(ツ)_/¯

  • Hidde database values when looping through jsp:useBean collection

    <jsp:useBean id="categories" scope="request" class="java.util.Collection"/>
    <c:forEach var="dto" items="${categories}">               
    <td width="375px" class="categoryContentTD">${dto.categoryName}</td>
    <td width="75px" class="categoryContentTD">${dto.categoryStatus}</td>
    <td width="75px" class="categoryContentTDEdit" align="center">
    edit
    </td>
    </c:forEach>
    When I view source I can see the values in my database. Is there anyway to hide these from view source?

    You can use an alias for the key values. For example, if you have a list of personIDs for your list as follows:
    325244,32156,51255 that you dont want on the displayed page, you can store those numbers in a two dimentional array in the user's session scope back on the server as follows:
    1 325244
    2 32156
    3 51255
    Now, you send 1,2,3 to the JSP page. When you get back 1,2, or 3, you use that two dimentional array to convert the number back to personID. Now you have personID you can use in your datbase sql statements.
    You can use a simliar array if you dont want to display the database table column names in the JSP page (so user's dont know info about your database schema).

  • Loop through tables based on data dict values

    Hi,
    I working on an old v7.3.4 database that I'm not familiar with and I want to loop through the tables and count the occurrence of a field value based on table names i've retrieved from the data dictionary. None of the tables have relational keys defined.
    In a cursor I can loop thru all_tab_columns and load variables with the table, column names, and the datatype, but then I want to use these values in a second nested cursor to loop through each table found by the first cursor.
    When I do :
    Select var_colname from var_tabname
    i get
    The following error has occurred:
    ORA-06550: line 23, column 10:
    PLS-00356: 'V_TABNAME' must name a table to which the user has access
    ORA-06550: line 22, column 5:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 22, column 12:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 27, column 7:
    PL/SQL: SQL Statement ignored
    so it would seem I can't use a variable to substitute the table name in the 'from' clause. Does anyone know of a way round this ?
    Thanks in advance

    Hi,
    You will have to use dynamic sql to create your second cursor.
    DECLARE
         v_sql_query VARCHAR2(400);
         TYPE cur_typ IS REF CURSOR;
         c1 cur_typ;
         mYRec MyTable%rowtype;
    BEGIN
         v_sql_query := 'select * from MyTable';
         OPEN c1 FOR v_sql_query;
              LOOP
              FETCH c1 INTO mYRec;
                   EXIT WHEN c1%NOTFOUND;
                   EXIT WHEN c1%NOTFOUND IS NULL;
    /*processing here*/
              END LOOP;
         CLOSE c1;
    END;
    Regards

  • Loop through table's rows

    Hi folks,
    I have a table with multiple rows which each one of them contains one dropdown list.
    In my code I want to loop through this table rows and check each dropdown list's selected-item.
    How can I do this in code(JavaScript).
    Thank you,
    Yair

    Check this thread,
    it has solutions for JavaScript ind FormCalc.
    http://forums.adobe.com/message/3345384#3345384

  • Loop through table(table is created dynamically)

    Hi all,
    I have a table that is created dynamically.It has got 3 columns and 8 rows.In first row - first column,I have a value that is set dynamically.Now, How can I loop through this table and get this value?
    The table context node and value attributes are also created dynamically.
    Table node is "TimesheetData" and value attribute is col1.Value,col1.Value and col3.Value
    TimesheetData
    col1.Value
    col2.Value
    col3.Value
    Again.... this node and attributes are not there in my view context by default, its getting created and binded dynamically here.
    Thanks Kukku

    Hi,
    Following is the code to iterate through the elements
    //Table node is "TimesheetData" and value attribute is col1.Value,col1.Value and col3.Value
    for(int x=0;x<wdContext.getChildNode("TimesheetData",0).size(); x++)
                IWDNodeElement nodeElement = wdContext.nodeTimesheetData().getElementAt(x);
                String value1 = (String) nodeElement.getAttributeValue("col1");
                String value2 = (String) nodeElement.getAttributeValue("col2");
                String value3 = (String) nodeElement.getAttributeValue("col3");
    Regards
    Ayyapparaj

  • Loop through table in XI

    Hi Guys,
    I have scenario where i call a BAPI and get return parameter as a table. I want to loop through this table in XI/BPM. Can i get some help on how to loop thorugh table in XI?

    Hi yashpal,
    Bloack Step in a BPM is used to process a sequence of steps repeatedly  for different information.
    The block step can be processed using FOR EACH and PAR FOR EACH. For each will process the info one after the other and PAR FOR EACH will do it in parallel.
    For more info on the Block Step Type in particular and the BPM in XI , check these links,
    http://help.sap.com/saphelp_nw04/helpdata/en/f6/e1283f2bbad036e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/62/dcef46dae42142911c8f14ca7a7c39/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/3c/831620a4f1044dba38b370f77835cc/content.htm
    Hope this helps,
    Regards,
    Bhavesh

Maybe you are looking for

  • I upgraded to iOS 6 and now my iPod's not working.

    I upgraded my iPod Touch 4th gen. to iOS 6. It said to finish upgrade restart computer so I did. When I restarted it it said "iPod is in recovery mode. You must restore this iPod before it can be used with iTunes." I clicked restore then a message po

  • How to disable edit link in interactive report

    Hi, How to disable edit(e3.gif image) link interactive report. Thanks, nr

  • Best approach to report on ports in use during the month

    I have been asked to come up with a report once a month outlining the network devices ports that are in use per cust omer location. I see the report device manager but it doesnt appear to give the simple number of ports in use by the device during th

  • Problem with constant "Allow application to use ne...

    I just bought this phone today (first Nokia phone) and I'm having a pretty irritating issue with the error message: "Allow application to use network and send or receive data?"  This seems to only happen with my Gmail, fring, and eBuddy applications.

  • Cisco spa502G and spa525G ip phones hang

    Hi, our company have cisco SPA502G AND SPA525G ip phones. now the problem is some time its get hang and freeze. after that 2 or 3 times to restart to work. some time when dailing it shows service un available. current firmware for SPA502G IS    7.4.9