Help withe loop on tables

Hallow in my table itab I have employee (sobid employee number and names ex. 80 emp) in my loop(b_itab) I get all he employee that doing the course (their sobid just 3 emp) how can I use b_itab to write to other table (d_itab) to write all the employee that don’t doing the course .I need a  general solution.
<b>Ex.i have a table with 80 emp and I doing a loop on this table and find 3 employee that doing course how can I do  comparison in the 2 table that if the employee not in b_itab(emp doing course) write them in d_itab(oteer table).</b>    .if u need more details  please let me now.
regards

Loop at itab.
Specify the condition here if they are doing the course
if (Condition here)
append itab to b_itab.
else
append itb to d_tab.
endif.
endloop.
The other option will be:
loop at itab.
read table b_itab with key course = itab-course.
if sy-subrc NE 0.
append itab to d_itab.
endif.
endloop.
Can you try these options? If not, please give the structure of the internal table to know exactly you want to do.
Best Regards,
Vibha
*Please mark all the helpful answers

Similar Messages

  • Is it possible to make a search help with dynamic  selection table?

    Hi Experts,
    Is it possible to create search helps with dynamic seletion tables means
    i dont know the selection table names at the time of creation of search help.
    These tables will be determined at runtime.
    if yes, Please give an idea how to create and pass the table names at runtime.
    Thanks
    Yogesh Gupta

    Hi Yogesh,
    Create and fill your itab and show it with FM F4IF_INT_TABLE_VALUE_REQUEST
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'field to return from itab'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'field on your screen to be filled'
          stepl           = sy-stepl
          window_title    = 'some text'
          value_org       = 'S'
        TABLES
          value_tab       = itab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
    Darley

  • Help with looping and counting

    i am in a CS 1 class and need help with this loop
    /*Write a program that will allow the user to enter a character
              until the capital letter Z is entered
         The program should count the number of letters entered
              and print the total after the loop is completed*/
    here is what i have it doesn't end nor does it count and i don't know hwo to make it count also i suck at do..while loops hehe
    char b,Z=0;
              Scanner a = new Scanner(System.in);
         do
                   System.out.print("Enter a letter: "+"\n");
                   b=a.next().charAt(0);
              while (b !=Z);
    i know that its not even close to being right just help me out here
    Edited by: purplesmurf on Nov 14, 2008 7:25 PM

    The following program will count the number of chacters entered until Z is enetered.
    import java.io.*;
    class count
         public static void main(String[] args)throws IOException
              char ch;
              int cnt=0;
              DataInputStream br=new DataInputStream(System.in);
              do
              System.out.print("Enter a character:");
              ch=(char)br.read();
              if(ch!='Z')
                   cnt++;
              else
                   break;
              }while((ch=(char)br.read())!='Z');
              System.out.println("The Number of entered characters are:"+cnt);
    }

  • Help with the insert table/form tool in BIP 10.1.3.2.1

    Hi, I'm trying to use the insert table/form tool in BIP, and running into some issues that I don't understand. First off, my data coming in looks like this (left column of tool):
    Rowset
    --- Row
    ------ Customer ID
    ------ Customer Name
    ------ Customer City
    ------ Product
    ------ Amount Sold
    I would like the output to do the following:
    a) have one page per customer. Customer should be determined by customer ID, and has attributes of customer ID, customer Name, Customer City
    b) Show a table of all products and the total Amount Sold by product for that customer
    c) Give a "grand total" for the customer
    Can someone help with the steps needed to do this? I've tried several variations of the following without much luck:
    1) Added Rowset and all children to the "Template" pane
    2) Clicked on the "Row" group, and set Grouping = Customer ID, with a break of "New page per Element"
    3) Clicked on the newly created (from step 2) Cust ID group, and set it to group by Product
    4) Moved "amount sold" to be at same level as Product
    5) Moved all of the customer attributes (name, address, etc.) to be at same level as Cust ID
    6) On the Cust ID level, set the style to table
    7) on row and rowset levels, set style to free form
    This seems to be VERY close, except that it isn't creating a total amount for the sum of all products purchased by a customer. What do I need to do inside the tool to get a total per customer to show up?
    Thanks in advance!
    Scott
    p.s. the final hierarchy in the template window looks like this:
    Rowset (style = freeform, no grouping/sort by/breaks)
    --- Row (style = freeform, group by customer ID, break new page per element)
    ------ Customer ID (style = table, group by product, no breaks)
    --------- Product (nothing special)
    --------- Amount Sold (calc for grouping = SUM)
    ------ Customer Name (nothing special)
    ------ Customer City (nothing special)
    Thanks very much for the help!
    Scott

    To anyone else who sees this post, the answer is to do the following. Insert the Amount Sold field using the "Insert Field" tool, and set the function to sum, with the grouping checkbox turned on.
    Thanks,
    Scott

  • I need Help with loop

    Hello everyone this is my first time posting here, i have always find java easy(up to this point), this is my first class in programming java i am just needing help with the "for loops" i cant seem to get the program generate 10 random math questions. if you guys can please help i will appreciate it, i have been working on it for a couple of hours. I am not finished with it yet but thats the only thing i need help with.
    import javax.swing.JOptionPane;
    public class Lab5
    public static void main(String[] args)
    int num1 = (int) (Math.random() * 100 + 1);
    int num2 = (int) (Math.random() * 100 + 1);
    int sum = num1 + num2;
    int product = num1 * num2;
    int quotient = num1 / num2;
    int difference = num1 - num2;
    for (int i = 0; i > 11; i++);
    int number = (int)(Math.random()*4);
    if (number == 0 )
    String s1 = JOptionPane.showInputDialog(null, num1 + " + " + num2 + "=" );
    if(number == 1)
    String s3 = JOptionPane.showInputDialog(null, num1 + " - " + num2 + "=" );
    if(number == 2)
    String s3 = JOptionPane.showInputDialog(null, num1 + " x " + num2 + "=" );
    if(number == 3)
    String s4 = JOptionPane.showInputDialog(null, num1 + " &divide; " + num2 + "=" );

    for (int i = 0; i > 11; i++);Two problems with this line:
    1) The second part of a For loop is the constraint. You have said that for the loop to be entered, i must be greater than 11. Well since you've also told i to begin at 0, this will never happen. Thus, the loop will never enter. You may have meant less than?
    2) You put a semicolon in the line. Semicolons are used to end statements. The For loop, when used as a block with curly braces, is not a single statement and does not require a semicolon. Here's the two structures of a basic For loop:
    for(int i = 0; i <= 100; i++) {
        //this is a block. you can put multiple statements in here and they are all part of the loop
        int a = 1;
        int b = i;
    //if your loop only needs to use a single statement, no braces are required
    for(int i = 0; i <= 100; i++)
        int a = i;

  • Issue with loop in table control

    Hello experts,
    I have 20 entries in my table control  but the loop is going through only for 10 entries..please help me?
    Thanks

    Hi
    In PBO
    module status_your_screen_number.
    loop at itab with control tc.
    endloop.
    in PAI.
    loop at itab.
    module modify_itab
    endloop.
    in Program
    Module status_your_screen_Number.
    describe table itab lines tc-lines -
    > THis will give you Scroll Bars for Table Control
    endmodule
    module modify_itab. -
    > If Required ( If you are modifying the Data of table control )
      DESCRIBE TABLE itab LINES lin.
      IF tc-current_line > lin.
        APPEND itab.
      ELSE.
        MODIFY itab INDEX tc-current_line. ---> This Ensures your data both Upward And Downward Scrolling
      ENDIF.
    endmodule
    Cheers
    Ram
    Edited by: Ramchander Krishnamraju on Oct 28, 2009 8:59 AM
    Edited by: Ramchander Krishnamraju on Oct 28, 2009 9:26 AM

  • Help with Loop Function

    I am trying to automate converting Pages documents to Word. Maybe later to reopen them in Pages but with the options set to create flat files.
    I select the files I want and they open ok. The export goes ok and I click the file close button,
    Maybe this close does not work as I get twice as many files open after each loop.
    How do I stop the loop function bringing all the files in again each time.?
    Get Selected Items
    Open Finder Items
    Watch Me Do:
    Click "Pages" in the Dock
    Click the "File" menu
    Export
    Click the "Next..." button
    Click the "<fill the title>" button
    Loop (use the current results as input)
    Your help would be welcome!
    Message was edited by: putnik

    Thanks again,
    The "Dispense Items Incrementally" seems to work well enough. However, now the workflow stops at the end of the second loop. The file is closed but the "Watch Me" function seems to want something else to happen (it continues active). The only first file is still listed in the loop function.
    Get Selected Items
    Dispense Items Incrementally
    Open Finder Items
    Watch Me Do:
    Click "Pages" in the Dock
    Click the "File" menu
    "Export"
    Type '
    Type '
    <Cmd W>
    Loop (up to 10 times, use the current results as input)
    Note that I am learning to avoid mouse gestures where possible as things move about to much...
    Any idea what I need to do?

  • Help with an expanding table on a form

    I currently use a form as a photo log for tracking the image number and a photo description.  The form was created in MS Word.  I would like to create this form using LiveCycle Designer and have tried a few things but nothing works the way I would like it to.  The photo log is a table with two columns and a header row.  The table expands (by using the TAB key) the number of rows commensurate with the number of photos entered.  The columns are for a photo number and a photo description.  I would like to be able to create this in LIveCycle so that it works as easily as the MS word doc does (as far as expanding the rows).  I've checked on this forum and cannot find any help topics or threads that match my specific needs.  can anyone offer some insight as to how to solve the problem?  I thank you in advance for your assistance.
    Jim

    You'll need an "exit" event for the last line in your table. You'll need to check to be sure that it isn't empty, and that it's the last line. Then after you add the line (if necessary) you'l need to set the focus back to the first column in the new line.
    Bonus: You'll probably want to be able to have the code check to see if a line is empty (and not the last line) so that you don't have a bunch of empty lines.
    If you'd like some code help, PM me what you're starting with.

  • Need help with paging in table layout

    Hi
    I am creating a basic table-form page with around 5000 rows in database table that needs to be displayed.
    However what i see after creating the table form page and adding detail groups i loose paging in the table layout.
    This is however undesirable.I cannot think of what is exactly making this happen there are no significant changes that i have made to the application.
    If I could know what possibly is causing the change, help would be appreciated.
    I can discuss this in detail.

    Which version of JHeadstart are you using?
    What do you mean with "i loose paging in the table layout"? Are the previous/next set and drop down list to select a range no longer displayed?
    Can you reproduce this in the HR demo applcation?
    If you remove the detail groups again, is pagination then working again.
    Steven Davelaar,
    JHeadstart team.

  • Need help with calc from tables

    I have a table that contains query #1 and have another table
    that contains a field that needs to use the result of the cfset in
    another calc.
    The new calc in query #2 needs to divide the Num_Checks_Trans
    from query #1 by the by the Weekly_Hours_Recorded in query #2.
    Can anyone help me figure this out?
    <b>1.</b>
    <cfquery name="QryEmployeeDetail"
    datasource="NBProdReports">
    SELECT TblContractInfo_SubMenuTable.User_ID,
    TblContractInfo_SubMenuTable.Contract_Number,
    TblContractInfo_SubMenuTable.Transaction_Type,
    TblContractInfo_SubMenuTable.Num_Checks_Trans, TblTransType.Value,
    TblContractInfo_SubMenuTable.Notes, TblMasterTrans.Date_Opened
    from TblContractInfo_SubMenuTable, TblMasterTrans,
    TblTransType
    WHERE TblContractInfo_SubMenuTable.Task_Number =
    TblMasterTrans.Task_Number
    and TblTransType.Transaction_Type =
    TblContractInfo_SubMenuTable.Transaction_Type
    And TblMasterTrans.Date_Opened BETWEEN
    #createODBCDate(DED_startDate)# AND #createODBCDate(DED_endDate)#
    order BY TblMasterTrans.Date_Opened ASC,
    TblContractInfo_SubMenuTable.User_id ASC
    </cfquery>
    <cfset totalTrans = 0 />
    <cfloop query="QryEmployeeDetail">
    <cfset totalTrans = totalTrans +
    (QryEmployeeDetail.Num_Checks_Trans * QryEmployeeDetail.Value)
    /></cfloop>
    Text
    2.
    <cfquery name="QryEmployeeDetail"
    datasource="NBProdReports">
    SELECT TblContractInfo_SubMenuTable.User_ID,
    TblContractInfo_SubMenuTable.Contract_Number,
    TblContractInfo_SubMenuTable.Transaction_Type,
    TblContractInfo_SubMenuTable.Num_Checks_Trans, TblTransType.Value,
    TblContractInfo_SubMenuTable.Notes, TblMasterTrans.Date_Opened
    from TblContractInfo_SubMenuTable, TblMasterTrans,
    TblTransType
    WHERE TblContractInfo_SubMenuTable.Task_Number =
    TblMasterTrans.Task_Number
    and TblTransType.Transaction_Type =
    TblContractInfo_SubMenuTable.Transaction_Type
    And TblMasterTrans.Date_Opened BETWEEN
    #createODBCDate(DED_startDate)# AND #createODBCDate(DED_endDate)#
    order BY TblMasterTrans.Date_Opened ASC,
    TblContractInfo_SubMenuTable.User_id ASC
    </cfquery>

    This can be rewritten as a single query which is good for a
    number of reasons, including we only make one trip to the database
    and we do our calculations on the SQL backend, which is faster than
    doing them in CFML.
    What you're going to want to do is SUM() the total
    transaction values by having a column like SUM(Num_Checks_Trans *
    Value) AS totalTrans. To get the value for your other column you
    can calculate that like Num_Checks_Trans / Weekly_Hours_Recorded. I
    didn't see the latter in either of your queries so I'm not sure
    where it comes from, but you can definitely use it in your SELECT
    clause when calculating.
    Since SUM() is an aggregate function, you'll have to use a
    GROUP BY clause to make it work. You'll have to GROUP BY each
    column in the SELECT statement. If some of the columns have
    differing data that you won't want to use in the GROUP, you can
    always use a nested subquery as part of your FROM clause and then
    join that to the original queries with the totals.
    I hope that helps.
    - William

  • Help with quierying a table with varchar as dates

    guys need a little help im close but i just can't close the deal.
    i have a table that the field is dataytped as varchar2 but it holds a date like such '20100615' todays date.
    I know the first thing you guys are going to say is that this should be formatted as a date but it is not my table and i have to deal with this.
    any how here is the problem im trying to query for a range of dates and im having one hell of a time doing it.
    as you cant tell from my query below im atempting to bring back only 15days worth of data by date.
    can someone please point out the obvious. I've been at it for a day now trying to get this to work.
    select DISTINCT to_date(fwvitals_date, 'YYYYMMDD') "fwvitals_date"
    FROM fwvitals
    where fwvitals_date
    between (((SELECT MAX(fwvitals_date)FROM FWVITALS)))
    AND ((select to_CHAR(sysdate-15, 'YYYYMMDD') from dual))

    Hi,
    user633029 wrote:
    guys need a little help im close but i just can't close the deal.
    i have a table that the field is dataytped as varchar2 but it holds a date like such '20100615' todays date.
    I know the first thing you guys are going to say is that this should be formatted as a date but it is not my table and i have to deal with this.You're absolutely correct!
    any how here is the problem im trying to query for a range of dates and im having one hell of a time doing it.
    as you cant tell from my query below im atempting to bring back only 15days worth of data by date.
    can someone please point out the obvious. I've been at it for a day now trying to get this to work.
    select DISTINCT to_date(fwvitals_date, 'YYYYMMDD') "fwvitals_date"
    FROM fwvitals
    where fwvitals_date
    between (((SELECT MAX(fwvitals_date)FROM FWVITALS)))
    AND ((select to_CHAR(sysdate-15, 'YYYYMMDD') from dual))"WHERE x BETWEEN y AND z" is equivalent to
    "WHERE x >= y AND x <= z".
    If y > z, then no rows will ever qualify, and if y is the gratest value in your table, then (probably) very few rows, perhaps only 1 will satisfy the condition even if z > y.
    What exactly are you trying to do?
    It helps if you post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data. If the results are conditional, give a couple of examples, e.g,, "If I run the query at any time on June 15, I want ... but if it's June 16, then I want ..."
    If you want the most recent 15 days, including today (that is, when run on June 15, you want June 1 through June 15) then:
    SELECT DISTINCT 
         fwvitals_date
    FROM      fwvitals
    WHERE       fwvitals_date     BETWEEN     TO_CHAR (SYSDATE - 14, 'YYYYMMDD')
                   AND     TO_CHAR (SYSDATE,      'YYYYMMDD')
    ;Fortunately, the strings are in a format such that sorting is meaningful, so you don't have to run TO_DATE on each one, and get conversion errors.
    Edited by: Frank Kulash on Jun 15, 2010 9:52 PM

  • Help with looped equation

    I am really struggling here with this (what seems) fairly simple labview problem.  I have a set of equations that rely on the answer of the previous other formula and so forth.  I can do this easily enough in excel.  I tried to recreate this function in labview and have been really struggling to get it to work.  I have tried using while loops and for loops, which I think is what I need to do here, but I haven't had much success.  Anyways, I attached the spreadsheet with the two formulas, a .png showing the relationship of the formulas in the spreadsheet, and my .VI.  Thanks for your help in advance.
    Solved!
    Go to Solution.
    Attachments:
    Formula.xlsx ‏42 KB
    Formula.png ‏38 KB
    Untitled 1.vi ‏8 KB

    You need both a loop and a shift register.
    Lynn
    Attachments:
    Looped equations.2.vi ‏10 KB

  • Help with Loops!! All loops are RED and unclickable after Leopard upgrade.

    I may need to just remove soundtrack pro from my computer and start from scratch again. When I upgraded to Leopard I failed to select preserve user settings when I did an archive and install. So therefore I had to find and drag files to the new library. This is on my Power Mac G5.
    I have a Macbook Pro laptop and I used that as a guide of how I have that set up. On my G5, I have all my loops in the same folders they are in on my laptop. When I open STP, and pull up my loop files, they are all listed in red. When I try to click on them, nothing happens.
    I have them set up as MAC>Library>Audio>Apple Loops>Apple Loops for Soundtrack Pro, Apple Loops for GarageBand, PowerFX Loops
    I am not sure if I am dealing with a bunch of corrupt files and need to start with a new slate or what.
    I also noticed that most if not all the audio loops end in .CAF instead of .AIFF in the folders. However when STP is open, the files ARE listed as .aiff files but they are red and non clickable.
    Any suggestions appreciated!
    Thanks!
    Message was edited by: DVX100Shooter
    Message was edited by: DVX100Shooter
    Message was edited by: DVX100Shooter

    Yea once I rearranged the loops and then opened STP and then Indexed those loops, I got everything back to normal except my Trumpet files. I cannot locate them anywhere. There are only 4 loops but I searched my HD and still can't locate where they are but I got everything else back to working.

  • Need help with loops! Where can I find them?

    I have garageband '09 and when I go through my loops, over half of them are missing. That is to say they are labeled and there is a list of them, but only half work, The rest of them are see-through text and wont play music. It has said I could get them back with a software update but it always comes back that everything is up to date. im wondering if they might be in a folder and garageband doesnt know of that folder as where to look or what. Any Ideas please??

    Bachman22 wrote:
    only half work, The rest of them are see-through text and wont play music. It has said I could get them back with a software update
    http://www.bulletsandbones.com/GB/GBFAQ.html#cantdownloadloops
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • Need help with loop cursor

    Hi,
    I'm doing a data conversion and am fairly new to PL/SQL.
    I have a cursor and in the loop i have a select statement
    which returns ORA-01403(no data found). I need to skip this
    row in the cursor and continue with the next.
    BEGIN
    OPEN cur_fill_split;
    LOOP
    FETCH cur_fill_split into S_ASR,S_CLIENT_NO, S_DIRCODE, S_SPLIT_RATE, I_WAYS,
    S_BRANCH_NUMBER, S_BRANCH_NAME, S_DIV_NUMBER, S_DIV_NAME, S_ITEMCODE, S_LINE;
    EXIT WHEN cur_fill_split%NOTFOUND;
    select order_number INTO N_ORDER_NUMBER from order_header
    where cmr_number||client_number||dir_number = s_asr||s_client_no||s_dircode;
    SELECT SEQ INTO I_SEQ FROM ORDER_DETAIL
    WHERE ORDER_NUMBER = N_ORDER_NUMBER
    AND LINE_ORDER_NUMBER = TO_NUMBER(S_LINE);
    ********(errors on the above select)********
    END LOOP;
    CLOSE cur_fill_split;
    END;
    Thanks,
    Brian

    Hi,
    I think there r 2 methods, one is by giving begin - end inside the loop as shown below 1st ex:
    & the 2nd method is by selecting the record count & then based on that value executing further commands.
    I think 2nd method is more safer than the 1st method.
    Method 1:
    1)
    -- ---------------Procedure Begin------------------
    BEGIN
    OPEN cur_fill_split;
    LOOP
    FETCH cur_fill_split into S_ASR,S_CLIENT_NO, S_DIRCODE, S_SPLIT_RATE, I_WAYS,
    S_BRANCH_NUMBER, S_BRANCH_NAME, S_DIV_NUMBER, S_DIV_NAME, S_ITEMCODE, S_LINE;
    EXIT WHEN cur_fill_split%NOTFOUND;
    select order_number INTO N_ORDER_NUMBER from order_header
    where cmr_number||client_number||dir_number = s_asr||s_client_no||s_dircode;
    BEGIN
    SELECT SEQ INTO I_SEQ FROM ORDER_DETAIL
    WHERE ORDER_NUMBER = N_ORDER_NUMBER
    AND LINE_ORDER_NUMBER = TO_NUMBER(S_LINE);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    END;
    END LOOP;
    CLOSE cur_fill_split;
    END;
    -- ---------------Procedure End------------------
    Method 2)
    By selecting the record count & based on that records, deciding the program control.
    -- ---------------Procedure Begin------------------
    declare
    rec_cnt number := 0;
    BEGIN
    OPEN cur_fill_split;
    LOOP
    FETCH cur_fill_split into S_ASR,S_CLIENT_NO, S_DIRCODE, S_SPLIT_RATE, I_WAYS,
    S_BRANCH_NUMBER, S_BRANCH_NAME, S_DIV_NUMBER, S_DIV_NAME, S_ITEMCODE, S_LINE;
    EXIT WHEN cur_fill_split%NOTFOUND;
    select order_number INTO N_ORDER_NUMBER from order_header
    where cmr_number||client_number||dir_number = s_asr||s_client_no||s_dircode;
    /* Here we are using cnt variable & checking for
    the record count, if count = 0, then it will skip */
    select count(*) into rec_cnt from ORDER_DETAIL
    WHERE ORDER_NUMBER = N_ORDER_NUMBER
    AND LINE_ORDER_NUMBER = TO_NUMBER(S_LINE);
    if rec_cnt > 0 then
    SELECT SEQ INTO I_SEQ FROM ORDER_DETAIL
    WHERE ORDER_NUMBER = N_ORDER_NUMBER
    AND LINE_ORDER_NUMBER = TO_NUMBER(S_LINE);
    end if;
    END LOOP;
    CLOSE cur_fill_split;
    END;
    -- ---------------Procedure End------------------
    Try it out & mail me
    Good luck

Maybe you are looking for

  • Macbook pro acts like it will startup then shuts off

    I hit the start button and it begins to boot up. The apple sign comes on, the loading bar starts up then it all shuts off 3 seconds later.

  • Creation of multiple nodes in target IDOC as per field from sender file

    Hi SapAll. here i have  got a requirement in an File To Idoc Interface. the requirement is there will be one field under sender  file which will be repeating for multiple records(ItemCount),here pi need to check the value of this field for each recor

  • Svchost.exe errors after installing iTunes 7.0.1.8

    I have two computers that starting throwing svchost.exe errors immediately after installing iTunes 7. First it happened on my desktop. In preparation to reinstall Windows XP on my desktop, I prepared my laptop to use while my desktop was out of commi

  • Change Language of Safari in Windows

    I wish to have safari installed on a windows virtual machine in UK english for compatibility testing. I have uninstalled safari, changed everything setting on the vm to UK and removed every registry file that referenced safari or apple, but when I in

  • Transaction in display mode

    i have created a transaction and now i want to make it in display mode whenever i call this tcode from another program