Copy selected values from a table control into another table control

hi there,
as seen in the subject i need to copy selected values from a table control into another table control in the same screen. as i dont know much about table controls i made 2 table controls with the wizard and started to change the code... right now im totally messed up. nothing works anymore and i don't know where to start over.
i looked up the forums and google, but there is nothing to help me with this problem (or i suck in searching the internet for solutions)
i have 2 buttons. one to push the selected data from the top table control into the bottom tc and the other button is to push selected data from the bottom tc into the top tc. does somebody has a sample code to do this?

you're funny
i still don't get it... can't believe, there is no tutorial or sample code around how to copy multiple selected rows from a tc.
here's my code, maybe you can tell me exactly were i have to change it:
tc1 = upper table control
tc2 = lower table control
SCREEN 0100:
PROCESS BEFORE OUTPUT.
  MODULE status_0100.
  MODULE get_nfo. --> gets data from the dictionary table
  MODULE tc1_change_tc_attr.
  LOOP AT   it_roles_tc1
       INTO wa_roles_tc1
       WITH CONTROL tc1
       CURSOR tc1-current_line.
  ENDLOOP.
  MODULE tc2_change_tc_attr.
  LOOP AT   it_roles_tc2
       INTO wa_roles_tc2l
       WITH CONTROL tc2
       CURSOR tc2-current_line.
  ENDLOOP.
PROCESS AFTER INPUT.
  LOOP AT it_roles_tc1.
    CHAIN.
      FIELD wa_roles_tc1-agr_name.
      FIELD wa_roles_tc1-text.
    ENDCHAIN.
    FIELD wa_roles_tc1-mark
      MODULE tc1_mark ON REQUEST.
  ENDLOOP.
  LOOP AT it_roles_tc2.
    CHAIN.
      FIELD wa_roles_tc2-agr_name.
      FIELD wa_roles_tc2-text.
    ENDCHAIN.
    FIELD wa_roles_tc2-mark
      MODULE tc2_mark ON REQUEST.
  ENDLOOP.
  MODULE ok_code.
  MODULE user_command_0100.
INCLUDE PAI:
MODULE tc1_mark INPUT.
  IF tc1-line_sel_mode = 2
  AND wa_roles_tc1-mark = 'X'.
    LOOP AT it_roles_tc1 INTO g_tc1_wa2
      WHERE mark = 'X'.    -
> big problem here is, that no entry has an 'X' there
      g_tc1_wa2-mark = ''.
      MODIFY it_roles_tc1
        FROM g_tc1_wa2
        TRANSPORTING mark.
    ENDLOOP.
  ENDIF.
  MODIFY it_roles_tc1
    FROM wa_roles_tc1
    INDEX tc1-current_line
    TRANSPORTING mark.
ENDMODULE.                    "TC1_MARK INPUT
MODULE tc2_mark INPUT.
  IF tc2-line_sel_mode = 2
  AND wa_roles_tc2-mark = 'X'.
    LOOP AT it_roles_tc2 INTO g_tc2_wa2
      WHERE mark = 'X'.             -
> same here, it doesn't gets any data
      g_tc2_wa2-mark = ''.
      MODIFY it_roles_tc2
        FROM g_tc2_wa2
        TRANSPORTING mark.
    ENDLOOP.
  ENDIF.
  MODIFY it_roles_tc2
    FROM wa_roles_tc2
    INDEX tc2-current_line
    TRANSPORTING mark.
ENDMODULE. 
thx for anybody who can help with this!

Similar Messages

  • Copying a page from one picture book into another

    Does anyone know how to copy a page from one picture book into another. I have made 2 books and would like to make a third consisting of pages from the first 2 but seem unable to do it without starting again, or at least starting from a duplicate of one and re doing all the missing pages.

    Garageclan
    Welcome to the Apple user to user assistance forums
    print each page you want to include in "book 3" to a PDF and use the send PDF to iPhoto option - this will give you the pages as images in iPhoto that you can them place into "book 3"
    See Old Toad's tutorial #19 for more details - http://web.mac.com/toad.hall/OldToadsTutorials/No._19.html - note that it is slightly different - you are only using the beginning part
    LN

  • How to get selected value from a Table?

    Dear Friends,
    when i select a value form the table i want that value to be passed to controller for deleting that record,
    please help in understaning what code must i write for the same?
    the  "Zpms_Master_Input.Output.It_P9001.Employee_Code" is the first field which i want to capture in some context or temp. variable to pass it on to controller for further porcessing.
    please give a sample code on how do i catch this employee code value and use it for my processing.
    Regards,
    Jack
    Edited by: Jack on Dec 6, 2011 11:20 AM

    Hi Kumar you have perfectly understood my requirement .... i tried coding as per your suggestion but not able to get through ...it seems with little help i would make it... the code i am writing here is as follows.
    input.setMode("DEL" );          
    P9009 inputParaABC = new P9009();     
    //inputParaABC.setEmployee_Code("2134"); ---> when i pass a hard coded employee code value i am able to delete
    //<your variable> = wdContext.current<tableNodeElement>.get<fieldname> ; --> your suggestion
    inputParaABC.setEmployee_Code(wdContext.currentIt_P9009Element().getEmployee_Code()); 
                              --> Here as per your  suggestion i am not getting a <tableNodeElement> prompt by the system, it only gives
                              --> wdContext.currentIt_P9009Element() or .createOutputElement etc but no tableNode
    the above code i have wriiten on the Controller where in am executing the RFC, how do we adjust the TableNodeElement thing in my code?? 
    Please help.

  • Get the mapping values from one message mapping into another message mappin

    Hi All,
    I created two graphical message mappings. In first message mapping i created one user defined function and set one global container parameter and I need to use this parameter in my second message mapping user defined function. But the global container parameters can be used in different user defined functions in same message mapping. So is there any way to use the values which are set in one message mapping into another message mapping. If yes, please help me how to get?

    Hi Koteswara rao,
      As you said global container parameters from first message mapping are not accessible from second message mapping program.
    i haven't faced situation like this.but, if you have some unmapped field in target message in first message mapping,you can put global variables data in that unmapped field.
    anyway the output of first message mapping would be input for 2nd messages mapping,so you can access global data(unmapped field filled with global data in 1st MM) from 2nd mapping program..
    Cheers,
    Jag

  • How to copy the value of default view textbox into another view textbox

    I create one form library and customizing in infopath 2010. on this default view one textbox is placed. in which user will enter his name.
    I create another view. in which i also place second textbox. I want when user put his name in default view textbox and save the form . then his name also copy into another view textbox .
    Kindly let me know how to do this ?

    Hi John,
    You can achieve in infopath. Steps are below:
    Default Text Box (Infopath Field A)
    Mirror Text Box (Infopath Field B)
    In Mirror Text Box, the default value would be the Field A. The default value you specified by right click on Mirror Text Box --> Properties...
    Thanks,

  • How do I pass selected values from dynamic LOV to Command SQL in Oracle

    My environment:
    Crystal 11
    Oracle 10
    I've created and tuned a SQL script for a report.  In the Database Expert, I've copied the SQL into a Command.   I've modified the Command to create 3 parameters. 
    I need help with the following:
    1) How do I create a dynamic, cascading LOV and associated prompt group for the three parameters defined in the Command?
    2) How do I pass the user selected valueS from the prompt group into the Command SQL as limits applied to the query executed against the database?

    I have the same problem with same environment .
    The main report is having a  2 level cascading dynamic parameters.
    I created a sub report with a command as below.
    *select * from (*
    select DATUM,MSEC,CNT,B1_NAME,B2_NAME,B3_NAME,ELEM_NAME,INFO_NAME,m.INFOTYPE,V.NAME,rank()
    over (partition by B1_NAME,B2_NAME,B3_NAME order by DATUM desc ,MSEC desc,CNT desc) currentRank
    from MESSAGES m,INTYDE i,VANAME v
    where  DATUM <=SYSDATE  and trim(B1_NAME)='{?B1Name}'
    and trim(B2_NAME)='{?B2Name}'
    and m.INFOTYPE=i.INFOTYPE
    and i.VALUE_NAME_NUMBER = v.VALNUM) where currentRank=1
    I needs to pass cmbination of B1Name and B2Name from main report. I created a formula like
    formula=Join({?B1Name},{?B2Name}),'|');  But this is showing some error.
    and How I will substitute this in my command . As I new to Crystal XI  help expected.

  • Dvt:pivotFilterBar - how to get selected values from filter

    Hi all,
    I have a question: how to programmatically get selected values from pivot table's filter bar?
    I have tried to use
    pivotTable.getDataModel().getDataAccess().getValueQDR(startRow, startCol, DataAccess.QDR_WITH_PAGE);but for page edge dimensions it returns BAD DATA, it seems that it returns some cached values.
    Environment: JDev 11.1.1.3.0 without any patches.
    thanks,
    Miroslaw

    Hi,
    You can retrieve the selected value in the PivotFilterBar through the model of PivotFilterBar, instead of dataaccess:
    // get the model from the pivot filter bar instance
    QueryDescriptior queryDescriptor = (QueryDescriptor)pivotFilterBar.getValue();
    // retrieve a list of criterion, each one is used to populate each lov within the pivot filter bar
    ConjunctionCriterion conjunctionCriterion = queryDescriptor.getConjunctionCriterion();
    List<Criterion> criterionList = conjunctionCriterion.getCriterionList();
    for (int i=0; i<_criterionList.size(); i++) {
    AttributeCriterion criterion = (AttributeCriterion)criterionList.get(i);
    // _selected is the currently selected value
    Object selected = criterion.getValues().get(0);
    System.out.println(_selected);
    Hope that helps,
    Chadwick

  • How do I copy an image from one Keynote presentation to another one?

    I have a previously saved presentation on Keynote in iCloud. I created it from my desktop at work. Some of the images I used for the presentation I want to use again in another presentation, onlh this time I am working off my laptop and don't have the same access to those images. Is it possible to copy/paste images from one Keynote presentation into another? I can't even seem to click on the image and save it.
    Any suggestions?

    Clicking and dragging does not work.
    Click on the image and Copy and Paste
    or
    Inspector > Metrics > File Info > click on the icon of the file and drag it to your desktop
    You can then drag that file back in wherever you want.
    Peter

  • Select values from table%ROWTYPE variable into a cursor

    I have a stored procedure which has an OUT parameter of table1%ROWTYPE.
    In future we might have to add more OUT parameters of table2%ROWTYPE etc. But at any point of time only one will have values.
    So instead of having table%ROWTYPE as OUT parameter, can I send these single row ( with variable values) in a cursor, so that declaration part atleast will not change.
    Is it possible to select values from table%ROWTYPE variable into a cursor.
    cursorOUT IS
    SELECT * FROM varREC;
    where varREC is table.ROWTYPE variable.
    Or which is the better solution in this situation.
    Thanks.

    SQL> var a refcursor
    SQL> declare
      2   bb emp%ROWTYPE;
      3  begin
      4   select * into bb from emp where rownum = 1;
      5   open :a for select bb.ename ename, bb.empno empno from dual;
      6  end;
      7  /
    PL/SQL procedure successfully completed.
    SQL> print a
    ENAME                                 EMPNO
    SMITH                                  7369Rgds.

  • Save the selected value from listbox with its respective tab control dropdown selcted values in another listbox

    Hi all,
    I am making a vi where I have to save the selected value from listbox with its respective tab control dropdown selcted values in another listbox.Whenever I select Item1 then the heading change and respective tab will open for that item.But Now I just want to save the selection and put it in another ListBox.SO that I can renmove or add according to my wish. Plz help me.
    Solved!
    Go to Solution.
    Attachments:
    my_vi.png ‏83 KB

    Hi, I successfully make the vi to insert itmes from listbox1 to listbox2.Whenever I select itmes 1 in listbox 1 it display same elected item in listbox2 , but it not appending the items in listbox2.Like If 1 is selected in listbox1 then 1 will display , next time after saving when I selct next item like 3 then in listbox 2, 1 is replaced by 3,it dont come in second row of listbox2.Hope I am able to explain.\
    Plz help me to resolve this.
    Attachments:
    listbox_update.vi ‏11 KB

  • POPUP FM to get values from a table control?

    I know about the FM POPUP_GET_VALUES to get one or more values from a popup dialog box.  I would like to find a similar FM that allows getting values from a table control or something that allows entry of multiple lines of values.  Is there such a thing, or do I need to write my own?

    it depends on what values you want to enter, better write your own to have a control on the function.

  • How to select distinct values from a table when it has composite primary ke

    Hi
    I have the requirement like , I need to select distinct one column values from the table which has composite primary key. How to acheive this functioinality using view object.
    Eg : Table 1 has col1 and col2, col3
    col1 col2 col3
    1 A NA
    1 B NA
    2 A NA
    3 C NA
    2 D NA
    primary key (col1,col2)
    I have to select distinct col1.
    Thanks

    Hi
    I got the solution for above. By Creating the read only view object we can acheive this.
    thanks

  • Need of SQL query in selecting distinct values from two tables

    hi,
    I need a query for selecting distinct values from two tables with one condition.
    for eg:
    there are two tables a & b.
    in table a there are values like age,sex,name,empno and in table b valuses are such as age,salary,DOJ,empno.
    here what i need is with the help of empno as unique field,i need to select distinct values from two tables (ie) except age.
    can anybody please help me.
    Thanks in advance,
    Ratheesh

    Not sure what you mean either, but perhaps this will start a dialog:
    SELECT DISTINCT a.empno,
                    a.name,
                    a.sex,
                    b.salary,
                    b.doj
    FROM    a,
            b
    WHERE   a.empno = b.empno;Greg

  • How to make validation in Bean and select value from another table

    I want to know how to select data from table in backing bean according to primary key i have
    the problem is that
    i have a table Employee_Salary contains Employee ids and their salary
    Empoloyee_Salary table
         Employee_ID      Number
         Employee_salary Number
    And Another table Called Employees
    Employees table
         Employee_ID     Number
         IsManager Varchar2 its value is [*Yes or NO*]
    and other columns that i don't care about this table
    i have on a jsff page an <af:table> this table is editable this is the Empoloyee_Salary table
    *i want to check before save or after insert if this employee is Manager [from Employees tabke(yes or no)] the salary*
    cannot be less that 100
    i want to know how to make this how to select the value from employees table according to the id i have in the employee_salary table how to make this and make this validation
    i have to select IsManager from Employees Table to see if this manager or no
    i want to know how to make this in a bean
    i use jdeveloper 11g
    and my project is ADF Fusion project
    and the page that have the Emplpyee_Salary table is JSFF
    thanks in advance

    You might want to write this code in a validator on the entity object if it should apply from every screen.
    If you want to access view objects from a backing bean the basics are here: http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcservices.htm#sthref918

  • Copy select value in the textfield from LOV and allow user to edit it

    Hi,
    I have a datablock with 20 records and each record has comments (say field_comments) fields. I would like to allow user to choose predefined comments populated from LOV (say lov_comments) and to append some extra comments after they choose the value from LOV.
    I have created a LOV and added Return type “field_comments” in the column mapping properties. When user clicks on a button, LOV opens up. They select the value from the LOV and the value goes to “field_comment” field. The problem with this approach, user can’t add their comment after selecting from LOV.
    I tried this way too. I created another non-visible textbox (say dummy). In the LOV, I added “dummy” field as returntype. In the dummy field, I have created “POST-CHANGE” trigger which basically says :block. field_comments = :block. Dummy.
    But, the user has to click on other field to view the selected value from the LOV. The values in the “field_comments” is not updated as soon as user click on “OK” button in the LOV.
    I would appreciate it if somebody could give me some input and help to solve my issue. Thank you for your help.
    Thank.

    Well, I tried exactly what you posted and it allowed me to SELECT from LOV and then CHANGE/APPEND new text in front of returned value in the field. It saved to the database and queried without any problems.
    Is your item allowed to INSERT/UPDATE ? If not, then set "Update/Insert Allowed" properties to Yes and attach your LOV to the item and set "Validate from list" to No.
    You may also see if you have any validation being performed on WHEN-VALIDATE-ITEM or POST-CHANGE trigger which will fail since you are editing the values populated from LOV.
    Hope it helps!

Maybe you are looking for

  • Belgium Tax Code for Invoices & Credit Notes

    Hi, According to SAP note 174811 (Configuring a Belgian Company Code) a distinction must be made between the VAT codes for SD invoices and credit notes: "... distinction which is obligatory, is the distinction between invoices and credit notes for wh

  • Satellite A200-1GM - (PSAECE) - keyboard has stoped working

    Hi I have a problem. During first time turn on my laptop, keyboard in my laptop didn't response (does means any keys reSpons when I press them). When I swtiched exteral USB keyboard, laptop keyboard working. I have the newest version of bios and driv

  • Legacy instruments missing ? Logic Studio 8

    When i try to load the Alto or Tenor Sax from Legacy Insruments library I get the following message - Audio file "TESLNOMA2X01" not found! - Anyone else get this ? I installed all Audio / Jam pack DVD's. Running Macbook pro core duo 2.33 OS 10.4.11 L

  • EP7 SP14 RuleEditor Error

    We just created a new EP7 SP14 portal server.  When I go into system administration/portal content/portal display and try and right click on a folder to add a new rule collection I get the following error:  Argument Objs : com.sapportals.portal.prt.c

  • Creative Suite 4 upgrade will not accept serial number

    I purchased Creative Suite 4 as an upgrade to Dreamweaver MX and everything was fine until my laptop packed up. On my new laptop I have re-installed Creative Suite 4 but it will not accept the serial number. I suspect this is because I do not have Dr