How do I loop through selected links?

Hi!
I'm looking for clues on how to run a script on selected links (selected in the Links window).
Like this sample script that runs an alert when links are missing:
var aDoc = app.activeDocument;
for(var n = 0; n < aDoc.links.length; n++) {
     var aLink = aDoc.links[n];
     if (aLink.status == LinkStatus.linkMissing) {
          alert(aLink.filePath);
Is there something like LinkStatus.linkSelected?
Or some other way for the script to sort out the selected links.
Any input would be extremely appreciated!
Thanks!
/Peter

Hi,
I would modify line #17:
while (listSelection && cItem = listSelection.shift() ) {
cause empty selection leads to error.
Uwe,
In case of unique - troubles could depends on what are you going to do with output and how.
If we talk about dialog list only - it is much more comfortable to user just to select a link name once instead of - let say - 125 clicks (in theory).
But maybe a better idea is to return just an array of names and convert it to useful list of object (one name into many links) outside of mDialog function()
Jarek

Similar Messages

  • Help with Trigger - looping through SELECT results

    How do I loop through a SELECT query within a Custom Trigger? I can
    execute the query fine, but the PHP mysql_xxx_xxx() functions don't
    appear to work inside a custom trigger. For example:
    This ends up empty:
    $totalRows_rsRecordset = mysql_num_rows($rsRecordset);
    While this returns the correct # of records:
    $totalRows_rsRecordset = $rsRecordset->recordCount();
    I need to loop through the records like I would with
    mysql_fetch_assoc(), but those mysql_xxx_xxx() don't seem to work.
    This works great outside a custom trigger, but fails inside a custom
    trigger:
    do {
    array_push($myArray,$row_Recordset['id_usr']);
    while ($row_Recordset= mysql_fetch_assoc($Recordset));
    What am I missing?
    Alec
    Adobe Community Expert

    Although the create trigger documentation does use the word "must", you are quite free to let the trigger fire during a refresh of the materialized view. Generally, you don't want the trigger to fire during a materialized view refresh-- in a multi-master replication environment, for example, you can easily end up with a situation where a change made in A gets replicated to B, the change fired by the trigger in B gets replicated back to A, the change made by the trigger in A gets replicated back to B, in an infinite loop that quickly brings both systems to their knees. But there is nothing that prevents you from letting it run assuming you are confident that you're not going to create any problems for yourself.
    You do need to be aware, however, that there is no guarantee that your trigger will fire only for new rows. For example, it is very likely that at some point in the future, you'll need to do a full refresh of the materialized view in which case all the rows will be deleted and re-inserted (thus causing your trigger to fire for every row). And if your materialized view does anything other than a simple "SELECT * FROM table@db_link", it is possible that an incremental refresh will update a row that actually didn't change because Oracle couldn't guarantee that the row would be unchanged.
    Justin

  • Multi-record block (how do I loop through the block)

    I created a two canvas form. On the first canvas, the user enters data and selects 1 - 30
    reports that they want to run. When they click on <NEXT> button, I create a multi-record
    control block and display each record on the second screen using
    go_block;
    clear_block;
    move data;
    create_record;
    The user then selects on the second canvas which reports to run now and which to run later via
    a LOV. When they press the <RUN> button, I want to start at the first record and either run the
    report or schedule it. Then I want to move onto the second and the third until all selected reports
    have been handled. I know I should use a loop but can't seem to make it work.
    So my question is, How do I loop through the records in a multi-record control block, pass the information
    for that one record to a parameter form and then execute the request? Each control block record contains
    10 parameter fields.
    Thanks.
    Bob

    go_record(1);
    << do your processing >> -- This is executed only for the first record.
    if :system.last_record = 'TRUE' then -- If the 1st record is also the last record.
    RETURN;
    end if;
    LOOP
    next_record;
    << do your processing >>
    if :system.last_record = 'TRUE' then
    EXIT;
    end if;
    END LOOP;
    I created a two canvas form. On the first canvas, the user enters data and selects 1 - 30
    reports that they want to run. When they click on <NEXT> button, I create a multi-record
    control block and display each record on the second screen using
    go_block;
    clear_block;
    move data;
    create_record;
    The user then selects on the second canvas which reports to run now and which to run later via
    a LOV. When they press the <RUN> button, I want to start at the first record and either run the
    report or schedule it. Then I want to move onto the second and the third until all selected reports
    have been handled. I know I should use a loop but can't seem to make it work.
    So my question is, How do I loop through the records in a multi-record control block, pass the information
    for that one record to a parameter form and then execute the request? Each control block record contains
    10 parameter fields.
    Thanks.
    Bob

  • How do I: Loop through Application objects

    How would I loop through the application object?  My goal is to see if the object is a label and change its font size.
    pseudocode would look like this:
    function setsize(change int) {
      for each obj in application {
        if obj is of type label {
          set font size to font size + change
    Once I got that working, I'd add other objects that display text.  The "change" would be a number to increase (positive) or decrease (negative) the size.
    Thanks,
    Jerry

    I have this:
              <mx:HBox id="resultTextBox"
                  width="100%"
                  verticalScrollPolicy="off" horizontalScrollPolicy="auto">
                  <mx:Label id="resultPotentialResultsLabel"
                      text="Food Stamp potential eligibility for household, estimated monthly benefit amount "
                      styleName="textNormal"
                      toolTip="Results message"
                      tabIndex="200" tabEnabled="true"  fontSize="40"/>
                  <mx:Text id="resultPotentialResultsData"
                      styleName="resultNumberNormal"
                      toolTip="Final results"
                      tabIndex="202" tabEnabled="true" />
              </mx:HBox>
    When I expand the font size it pushes the "resultPotentialResutsData" to limbo.  I tried adding the horizonal scroll bar to allow the user to still see the results,  The scroll doesn't appear.
    1) is there a way to get the box to expand to fix the content?
    2) is there a way to get the scroll bar to appear when needed?
    3) is there a way to wrap the text (in this case the second field) in the HBox?

  • How do I Loop through a recordset using PHP

    I have a recordset containing a MySql table with 5 columns, each one containing an email address of an official in a club.
    Each row represents a different club, and each column a different type of official.
    The first column represents chairmen, the next treasurers etc...
    The recordset is called $mailset.
    I need to loop through each row of $mailset and extract the email addresses of each column and concatenate them into a string seperated by semi colons ; so it ends up like this:
    [email protected];[email protected];[email protected]; and so on.
    This is how the recordset is set up:
    mysql_select_db($database_dummyread, $dummyread);
    $query_mailset = "SELECT club_chair_email, club_treas_email, club_sec_email, club_delegate_email, club_deputy_email FROM clubs";
    $mailset = mysql_query($query_mailset, $dummyread) or die(mysql_error());
    $row_mailset = mysql_fetch_assoc($mailset);
    $totalRows_mailset = mysql_num_rows($mailset);
    ?>
    I tried using a  loop to step through the recordset, but it always shows the first record, so its not moving the pointer through the file.
    The pseudo code aught to be something like this:
    Initialise variables and move to the first record
    If there are records to process
                   Read a record
                        Process all columns
                Move on to the next record
    else
         if there are no records
              print an error message
    else
    Print the results.
    Can anyone give me a hint as to how to move from row to row in a recordeset under the control of a loop.
    I am using PHP and MySql. (as far as I know, it is the original - not PDO or MySqli)

    Each call to mysql_fetch_assoc($mailset) retrieves the value at the current location and increments the pointer in the recordset array. So use either a do or while loop and call mysql_fetch_assoc($mailset) from within the loop.
    From the docs:
    Returns an associative array that corresponds to the fetched row and moves the internal data pointer ahead. mysql_fetch_assoc() is equivalent to calling mysql_fetch_array() with MYSQL_ASSOC for the optional second parameter. It only returns an associative array.

  • How do I loop through tables, not columns in a table?

    Sorry if this is a long one. My problem is actually quite simple. I am trying to write either an ad hoc PL/SQL block or a stored procedure to loop 18 times (thru 18 tables) and perform a SQL query on those tables, returning 18 resultsets. I would like the results to show up on the screen (or in a spool file, whatever).
    So far I have tried 3 different approaches, none of which have worked.
    1. I tried to assign the select query to a variable (qry) and use EXECUTE IMMEDIATE qry. This forced me thru a variety of errors to declare variables and assign the result to them--EXECUTE IMMEDIATE qry into nm0, nm1, nm2...
    The problem with that was the resultset returned more than the variable was built for as there might be no rows returned, or it might be a thousand rows of data. So I tried changing the variables to VARRAYS, but it gave me a type mismatch as the underlying columns were NUMBER and VARCHAR2.
    DECLARE
         ctr number;
         TYPE NUMLIST IS VARRAY (1000) OF NUMBER;
         TYPE VARLIST IS VARRAY (1000) OF VARCHAR2(15);
         nm0 NUMLIST NOT NULL DEFAULT 1;
         nm1 VARLIST;
         nm2 NUMLIST NOT NULL DEFAULT 1;
         nm3 VARLIST;
         nm17 NUMLIST NOT NULL DEFAULT 1;
         qry VARCHAR2(2000) := 'klx_uln_p000_cells';
    BEGIN
    FOR ctr IN 1..17 LOOP
         IF ctr &lt; 10 THEN
              qry := 'SELECT
              A.DIM_0_INDEX,
              S0.SYM_NAME,
              A.DIM_1_INDEX,
              S1.SYM_NAME,
              A.DIM_2_INDEX,
              S2.SYM_NAME,
              A.DIM_3_INDEX,
              S3.SYM_NAME,
              A.NUMERIC_VALUE,
              B.NUMERIC_VALUE
              FROM
              KHALIX.klx_uln_p00'||ctr||'_cells A,
              KHALIX.klx_ucn_p00'||ctr||'_cells B,
              KHALIX.KLX_MASTER_SYMBOL S0,
              KHALIX.KLX_MASTER_SYMBOL S1,
              KHALIX.KLX_MASTER_SYMBOL S7
              WHERE
              A.DIM_0_INDEX=B.DIM_0_INDEX AND
              A.DIM_1_INDEX=B.DIM_1_INDEX AND...
              A.DIM_7_INDEX=S7.SYM_INDEX';
         ELSE
              qry := 'SELECT
              A.DIM_0_INDEX...
              A.DIM_7_INDEX=S7.SYM_INDEX';
         END IF;
         BEGIN
         dbms_output.put_line('SELECT FOR KLX_ULN_P00'||ctr||'_CELLS');
         dbms_output.put_line(nm16);
         dbms_output.put_line(nm17);
         EXECUTE IMMEDIATE qry into nm0,nm1,nm2,nm3,nm4,nm5,nm6,nm7,nm8,nm9,nm10,nm11,nm12,nm13,nm14,nm15,nm16,nm17;
    --     dbms_output.put_line(qry);
         dbms_output.put_line(nm16);
         dbms_output.put_line(nm17);
         EXCEPTION
              WHEN NO_DATA_FOUND THEN
                   dbms_output.put_line('No data found for Query '||ctr);
         END;
    END LOOP;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
              dbms_output.put_line('No data found for Query '||ctr);
    END;
    2. So then I used REF CURSOR to create a stored procedure and return the values. That allowed me to run my query AND tokenize the tablenames with a counter so that it would loop through the different tables! However, I still could not get it to display the results without going to SQL Plus and typing 'print c;'.
    3. So, finally I tried to create a looping wrapper around the ref cursor to have some variable (ctr) increment so my query would get performed on table0_cells through table17_cells. This, too, did not work.
    If I manually go to SQL Plus and type:
    variable ctr number
    begin
    :ctr := 1;
    end;
    exec dupe_find(1,:c);
    it will execute for the first table (klx_uln_p001_cells) and I can then type 'print c' to see what was returned. But when I try putting this within a wrapper PL/SQL block with a Loop to make ctr go from 0 - 17 (to loop through table_names klx_uln_p000_cells to klx_uln_p017_cells), it does not work.
    Help! It should be very simple to loop through tables, shouldn't it? I just want a script that will loop through tables, perform a query on each table and display the results. For some reason, I can only find documentation examples on looping through columns that are all in the same table.
    Dave

    Here's a working example using your first strategy ...
    create table t1 (id number);
    create table t2 (id number);
    insert into t1 values (100);
    insert into t1 values (101);
    insert into t2 values (200);
    insert into t2 values (201);
    declare
    v_table_name user_tables.table_name%type;
    type ttab_id is table of t1.id%type index by binary_integer;
    tab_id ttab_id;
    begin
    for i in 1 .. 2 loop
    v_table_name := 't' || i;
    execute immediate 'select id from ' || v_table_name
    bulk collect into tab_id;
    dbms_output.put_line('query from ' || v_table_name);
    for j in 1 .. tab_id.count loop
    dbms_output.put_line(tab_id(j));
    end loop;
    end loop;
    end;
    There are many other ways to do this (especially if you need to do more than just print out the data).
    Richard

  • How can I loop through a Vector and compare

    I'm working on a school project that is a quiz server. Instructors could telnet into the app and create quizes and then users can take them. I have it so it can set up new quizes so far. Right now I'm working on it so the user can choose a quiz and take the test. Since it requires proper user handling I have it so I display the quiz ID and quiz Name. The user would need to enter the quiz ID to take it. I have it that as it displays the ID's it enters them into a Vector. Then I do a loop through all elements until I get one that equals the user selection. I'm having problems with it though. Here's some code:
    do
    quizCheck = false;
    for (int i=0;quizReference.size();i++)
    if (selectionInt==quizReference.elementAt(i))
    quizCheck=true;
    }while (quizCheck==false);
    It's giving me a Error #300:method==(int,java,lang.Object)not found in class testproject.TestProject on the if line. Is there a way to handle this scenario. Also is there a better way?

    Hi,
    elementAt(...) returns an Object - of what type is your selectionInt? - guess, it is a primitve int value, not an Object.
    You can find it easier - say, you have Integer values in that Vector - and selectionInt is an int value - now you can find it using
    int p = quizReference.indexOf(new Integer(selectionInt));
    p is either -1 (if not found) or the index of the first found element, with the same int value as selectionInt.
    Hope, this helps
    greetings Marsian

  • How do i loop through a pl/sql collection based on a condition.

    hi, can any one help me or provide me sample code where  i have to loop through a collection  based on condition . just like where clause in sql. your help is highly appreciated....
    {code}
    create table MODEL1
      model_id  NUMBER ,
      model_seq NUMBER,
      p_ind     VARCHAR2(1)
    insert into model1 (MODEL_ID, MODEL_SEQ, P_IND)
    values (4, 103, 'U');
    insert into model1 (MODEL_ID, MODEL_SEQ, P_IND)
    values (3, 102, 'P');
    insert into model1 (MODEL_ID, MODEL_SEQ, P_IND)
    values (2, 101, 'U');
    insert into model1 (MODEL_ID, MODEL_SEQ, P_IND)
    values (1, 100, 'P');
    MODEL PROCEDURE......
    procedure (  param1,param2)        ( assume this procedure is being called from other procedure and collection has been populated already)
    TYPE  l_tab is table of  MODEL1%rowtype;
    begin
    loop through l_tab records where  ltab.model_id=param1  and  p_ind =p
    Join based on if else condition.
    if   param2 is not null then
       l_tab.model_seq=param2 and ltab.p_ind='P'
    if param2 is null then
             l_tab.p_ind='P'          etc...........
       {code}

    Hi,
    Try something like this:
    DECLARE
    TYPE L_TAB IS  TABLE OF MODEL1%rowtype;
    TAB L_TAB;
    param1 number := 1;
    param2 number := 999;
    BEGIN
    select
      model_id
      ,model_seq
      ,p_ind
    bulk collect into TAB
    from
      MODEL1
    DBMS_OUTPUT.PUT_LINE('PARAM1: ' || PARAM1);
    DBMS_OUTPUT.PUT_LINE('PARAM2: ' || PARAM2);
    DBMS_OUTPUT.PUT_LINE('     MODEL_ID, MODEL_SEQ, P_IND' );
    FOR X IN TAB.FIRST .. TAB.LAST
    LOOP
    DBMS_OUTPUT.PUT_LINE('OLD: ' || TAB(X).MODEL_ID || '         ' || TAB(X).MODEL_SEQ || '        ' || TAB(X).P_IND );
        IF TAB(X).model_id = param1 AND TAB(X).p_ind = 'P' THEN
          IF param2       IS NOT NULL THEN
            TAB(X).model_seq := param2;
    --        TAB(X).p_ind := 'P';     -- THIS IS NOT NEEDED SINCE THE CONDITION STATE L_TAB(X).P_IND = 'P' ALREADY
    NULL;
          END IF;
          IF param2     IS NULL THEN
    --          TAB(X).p_ind  := 'P'; -- THIS IS NOT NEEDED SINCE THE CONDITION STATE L_TAB(X).P_IND = 'P' ALREADY
    NULL;
          END IF;
        END IF;
    DBMS_OUTPUT.PUT_LINE('NEW: ' || TAB(X).MODEL_ID || '         ' || TAB(X).MODEL_SEQ || '        ' || TAB(X).P_IND );
    END LOOP;
    END;
    PARAM1: 1
    PARAM2: 999
         MODEL_ID, MODEL_SEQ, P_IND
    OLD: 4         103        U
    NEW: 4         103        U
    OLD: 3         102        P
    NEW: 3         102        P
    OLD: 2         101        U
    NEW: 2         101        U
    OLD: 1         100        P
    NEW: 1         999        P
    Regards,
    Peter

  • Loop through select and create cursor

    Is it possible to create a cursor after looping through a select?
          FOR TEST IN
            SELECT *
              FROM SOMETABLE
             WHERE SOMEID > 100
           ) LOOP
              IF TEST.NAME = 'AB' THEN
                   --CREATE CURSOR AND LOAD DATA
                   --LOAD TEST.ID, TEST.NAME, TEST.ADATE INTO NEW CURSOR
              END IF;
           END LOOP;     This is just a sample not the actual scenario.

    SeshuGiri wrote:
    Is it possible to create a cursor after looping through a select?Yes. But is also usually the wrong thing to do.
    A cursor loop within another cursor loop is known as a nested loop join in SQL. The SQL language is perfectly able to do joins like that. And far better and faster. It has a very clever optimiser and has more sophisticated algorithms than just a nested loop, for joining data sets.
    The sample code you've posted shows a very old 80's style Cobol approach to processing ISAM files or magnetic tape. In a row-by-row fashion.
    This approach does not scale in the modern database, where the SQL language is a data set processing language - and not an I/O interface for merely reading a record/row and writing a record/row as we did in the 80's with file-based data records.
    The basic approach to Oracle is: Maximise SQL. Minimise PL/SQL (Java/etc).
    This means using the very flexible, incredibly powerful, SQL language first and foremost to crunch database data. And only when the processing is beyond the capability of the SQL language alone, employ PL/SQL. Else restrict PL/SQL to managing only the process flow and error handling of SQL language statements.

  • How do I loop through AFrames?

    I feel dumb asking this but I really think the code I have should work. All I want to do is loop through all the aframes in a document. To do this, I assign the first Aframe to a variabe named vAFrame. Then, I created a while loop where the test is vAFrame.ObjectValid(). however, the while loop never tests to true even though the data browsers shows that the vAFrame variable contains a valid object AND it supports the ObjectValid() method AND the valid object is an AFrame. I must be missing something really obvious here. Any ideas?
    main ()
    function main()
        var vDoc=app.ActiveDoc;
        var vFlow=vDoc.MainFlowInDoc;
        var vTextFrame=vFlow.FirstTextFrameInFlow;
        var vAFrame=vTextFrame.FirstAFrame;
        while (vAFrame.ObjectValid())
            vAFrame=vAFrame.NextAFrame;

    I am heads down on a project so I can't give you much code right now, but I can point you in the right direction. The method you are using only works for a single text frame, so you would also have to include a loop for all of the text frames in the flow. A better approach is to get a list of FrameAnchor items from the main flow of the document. Then you can loop through the text items to process each anchored frame.
    // Set a variable for the main flow in the document.
    var flow = doc.MainFlowInDoc;
    // Get a list of the anchored frames in the flow.
    var textItems = flow.GetText(Constants.FTI_FrameAnchor);
    // Loop through the anchored frames.
    for (var i = 0; i < textItems.len; i += 1) {
      var aFrame = textItems[i].obj;
      // Do something with the anchored frame here.
    Note that this will only get anchored frames in the main flow itself; it will skip anchored frames that are inside table cells or nested in other anchored frames. Please let me know if you have any questions or comments.
    Rick Quatro

  • JDev 10.1.3.4: How to properly loop through the rows of a VO?

    Hi,
    This is a newbie question. Using JDeveloper 10.1.3.4 I am trying to loop through the rows of a view object. I am sure that the VO returns the following rows in that order:
    200809
    200902
    200906If I use this code (where termsOpen is the VO instance):
    while (termsOpen.hasNext()) {
       System.out.println(termsOpen.getCurrentRow().getAttribute("Term"));
    }it proves to be an endless loop and I get "200809" printed on the console endlessly. The API says that hasNext() "does not move the current row". A book says that the pointer initially is at row 0. I wonder why it prints the first row. So the code is changed to:
    while (termsOpen.hasNext()) {
       Row currRow = termsOpen.next();
       System.out.println(currRow.getAttribute("Term"));
    }But now I get only the last two rows printed on the console, and do not get to see the first row:
    200902
    200906What's wrong?
    Thanks for helping!
    Newman

    Hi, Branislav,
    Thank you for the suggestion.
    I tried that also. When the code is
    while (termsOpen.hasNext()) {
       System.out.println(termsOpen.getCurrentRow().getAttribute("Term"));
       termsOpen.next();
    }I get only the first two rows and last row is dropped:
    200809
    200902To get all the three row, I end up using this code:
    System.out.println(termsOpen.first().getAttribute("Term"));
    while (termsOpen.hasNext()) {
       Row currRow = termsOpen.next();
       System.out.println(currRow.getAttribute("Term"));
    }But that shouldn't be the way of doing the work. If I use a block of 50 lines of code to process each row, the code will have to be written once before the while loop and another time inside the while loop.
    The book which says that the pointer starts at the row slot before the first row is found on the internet, on p.469. It makes sense to me that the pointer starts at row 0. But unfortunately the actual copy of JDev 10.1.3.4 I am using behaves otherwise.
    Newman

  • I was wondering how I can loop through all records in a database?

    I'm using a do while loop to loop through all the records in a database is there a way I can simulate to EOF. I tried something to simulate it but I don't think it'll work. I assume there's a better way.
    Here's my code:
    boolean noRecords=false;
    do
    noRecords=false;
    if (queryResults.next())
    serverOutput.print(queryResults.getInt("itemID");
    serverOutput.println(queryResults.getString("itemName");
    else
    noRecords=true;
    }while(noRecords==false);

    i think i know what you mean...
    try this
    while (queryResults.next()) {
    serverOutput.print(queryResults.getInt("itemID");
    serverOutput.println(queryResults.getString("itemName");
    when .next() returns false, it will exit the while loop. you don't need the other code you have there, the above should do it all.
    is that what you're after?

  • How to put loop in select query..?

    Hi All,
    I am setting select query which CRecordSet is going to execute.
    Existing query is,
    Select branchNumber,Count(*) from branches where branchNumber = %d and dowloadType >%d;  
    Here %d is getting filled every time with new value. Now this query is getting execute 500 times if 500 branches are there.
    We want to improve performance. and want branchnumber and count(*) in One go.
    something like, 
    select branchNumber,Count(*) from Branches where 
    (branch =1 and dowloadType >2)
    (branch =2 and dowloadType >100)
     (branch =3 and dowloadType >234)
    how can we do that?
    Kindly help me on this.
    Thanks,
    Sachin.

    Thanks For reply. but here values are coming from different collection from source code.
    For e.g.  Map[branchNumber][DownloadType] = [1,233],[2,444],[30,234],[5,456].
    Now these values i need to insert at the place of  S.branch   and    S.DownloadType                              
    SELECT GB.Branch ,
    COUNT(*)
    FROM @Sample S
    INNER JOIN @GroupBy GB ON GB.Branch = (value from map)
    AND GB.DownloadType < (value from map)
    GROUP BY GB.Branch;

  • How can I get a selected link when the bookmark tab is on the side to stay bright blue or some other color

    I want the faded gray color to change to blue or another color after I click a link.

    The sidebar is no longer selected after you click a link in the sidebar, so the blue color is change to a gray color to indicate that the sidebar doesn't have focus..

  • How to handle Loop within Select For all entries

    hi all,
    i have a requirement where I need to include 2 country code .
    so in selection screen s_bukrs has AU00 - AU99 & NZ00 -NZ99
    select countrycode
             from ZCTYCOD
             into table lt_zctycod
            where ( land1 ge  s_bukrs-low(02) AND
                          land1 Le  s_bukrs-HIGH(02).
    SO countrycode entries r in table lt_zctycod.
    Now I need to loop into this SELECT ...FOR ALL ENTRIES....
    LOOP AT LT_ZCTCOD.
        SELECT * FROM zbase
                 APPENDING TABLE ts_base
                 FOR ALL ENTRIES IN ts_zdocket
                 WHERE zzumicur = ts_docket-zzumicur AND
                       ( status = c_rej OR
                         status = c_sus ) AND
                   CTYCOD = LT_ZCTCOD-Ctycod.                 
      ENDIF.
    Is there any best approach to AVOID LOOP INSIDE FOR ALL ENTRIES...any alternative approach to have good performance
    APPRECIATE UR HELP
    THANKS

    Hi,
    You can create ranges for your ZCTYCOD
    DATA: R_ZTYCODE TYPE RANGE OF ...
    so your program flow will be like this
    1. select ZTYCOD into LT_ZTYCOD
    2. loop at LT_ZTYCOD, assign each value to R_ZTYCODE
    3. select form zbase ..... where CTYCOD in R_ZTYCODE
    hope it helps

Maybe you are looking for