How to copy data from one node to another or fromone table to another table

Hi,
I have a two tables.I am populating data in first table and on the click of first table ,selected row data should be copied to the second table.
How do i achieve this requirement and what should be the cardinality of the second table
Thanks
Bala Duvvuri

Hi,
For this u have to fetch the selected row.
For fetching the selected row go to the events of first table and select "OnLeadselect".
Create a new method for this.
Now in this method read the value of the selected row with method get_static_attributes.
with this u will have the selected row in the element.
not just bind this elemnt with the second table.
Second node will also have the cardinality 0:n, because this is also binded with the table.
Coding part for this is as below:
method ONACTIONSELECT .
    DATA lo_nd_cn_mara TYPE REF TO if_wd_context_node.
    DATA lo_el_cn_mara TYPE REF TO if_wd_context_element.
    DATA ls_cn_mara TYPE wd_this->element_cn_mara.
    DATA ls_cn_mara1 TYPE wd_this->elements_cn_mara.
  navigate from <CONTEXT> to <CN_MARA> via lead selection
    lo_nd_cn_mara = wd_context->get_child_node( name = wd_this->wdctx_cn_mara ).
  @TODO handle not set lead selection
    IF lo_nd_cn_mara IS INITIAL.
    ENDIF.
  get element via lead selection
    lo_el_cn_mara = lo_nd_cn_mara->get_element(  ).
  @TODO handle not set lead selection
    IF lo_el_cn_mara IS INITIAL.
    ENDIF.
  alternative access  via index
  lo_el_cn_mara = lo_nd_cn_mara->get_element( index = 1 ).
  @TODO handle non existant child
  IF lo_el_cn_mara IS INITIAL.
  ENDIF.
  get all declared attributes
    lo_el_cn_mara->get_static_attributes(
      IMPORTING
        static_attributes = ls_cn_mara ).       " here u are getting the selected row of the table.
APPEND ls_cn_mara to ls_cn_mara1.      " append the row in the table so that can be binded with the second node
  DATA lo_nd_cn_maraout TYPE REF TO if_wd_context_node.
  DATA lo_el_cn_maraout TYPE REF TO if_wd_context_element.
  DATA ls_cn_maraout TYPE wd_this->element_cn_maraout.
navigate from <CONTEXT> to <CN_MARAOUT> via lead selection
  lo_nd_cn_maraout = wd_context->get_child_node( name = wd_this->wdctx_cn_maraout ).
Bind the table with the second node
lo_nd_cn_maraout->bind_table( ls_cn_mara1 ).
endmethod.
->cn_mara  is the first node.
->cn_mara1  is the second node
Thanks,
Pankaj Aggarwal
Edited by: Pankaj Aggarwal on Nov 19, 2008 7:40 AM

Similar Messages

  • How to copy data from one BB to another via Desktop Manager

    I've got two BBs (8900 and 9300), both actively in use and with different data (contacts, memos, etc.) on them.
    I need to copy my tasks, memos and contacts from 8900 to 9300. I tried "switch phones" option, but it substitutes data, while I need to syncronize it, so that data from 8900 is added to what is currently is on the 9300. 
    Is it possible to do it via Desktop Manager? It seems there was somewhere an option "copy data from another BB", but I can't find it in the latest Desktop Manager version.

    You would need to use Desktop Mangaer to sync BB1 with a local PIM program (such as Outlook or Lotus Notes) to get the information off BB1. Then use Desktop Manager to sync BB2 with the same PIM program. 

  • How  to transfer data from one system to another by datamart please give de

    how  to transfer data from one system to another by datamart please give details

    Hi Deba,
    Find the below SAP help doc which may help u...
    http://help.sap.com/saphelp_nw70/helpdata/en/12/43074208ae2a38e10000000a1550b0/frameset.htm
    Also find the below threads...
    Loading data from one cube to another cube.
    data copy from infocube to infocube in two different BW systems
    Delta when loading from ODS to ODS
    reg datamart
    Data mart flag
    Regards,
    KK.

  • What are the diffrent ways to copy data from one application to another?

    Hi,
    Can you guys tell me what are the different ways to copy data from one application to another application??
    I know we can do it through script logic using DESTINATION_APP.
    Is there any other way to copy data from one application to another application?
    Please help me
    Thanks,
    Charly

    You can also call a custom DTSX package in SSIS via the datamanager.
    there are at least 5 ways of transfering data in BPC between apps.
    1. Through the front end (excel etc) via evdre/evsnds
    2. Through Script logic using *Dest App
    3. Using BPC's standard export dtsx package via DM
    4. Using SSIS using BPC's custom SSIS tasks
    5. Through Script logic using stored procs.
    i am sure people will come up with more.
    remember if you use ssis and move data into any table but the wb, you need to process the cube afterwards.

  • How to copy data from one column to other column

    hi,
    can any one tell me how to copy data of  one column to other column for some specific data
    example
    productno  ocalyear        actualsales  prevplansales   currentplansales
    p001       2007                  100              120                   
    p002       2007                   90               100
    p003       2007                  120              130
    p004       2007                  140              120
    p005       2007                  150              150
    i want to copy data of p001 and p002 from prevplansales to current plansales
    productno  ocalyear        actualsales  prevplansales   currentplansales
    p001       2007                  100              120              120     
    p002       2007                   90               100              100
    p003       2007                  120              130
    p004       2007                  140              120
    p005       2007                  150              150
    is it possible to do?
    please suggest me.
    i will assign points

    Hi,
    I think the needed techniques are already described in the documentation, e.g. in
    http://help.sap.com/saphelp_nw70/helpdata/en/45/e641e4c61256dee10000000a114a6b/frameset.htm
    or
    http://help.sap.com/saphelp_nw70/helpdata/en/45/e641e4c61256dee10000000a114a6b/frameset.htm
    The main techiques used in the above example to bind the filter of the planning function to selected (marked) objects in the analysis item or to drop down boxes (or both). These techniques are used in the above examples.
    Regards,
    Gregor

  • How to copy data from one planning area to other planning area

    Hi ,
    I need to copy data from one planning area to other planning area, the MPOS for two planning areas are differant and  here my scenario is one planning area having extra key figures.
    First i need to release forecast data to CIP planning area and then,  i load the data from infocube  to MPS planning area and copy the data from CIP planning area. here both MPS and CIP planning areas having different MPOS .
    Please help me in this. Please give me the stepls i need to follow.
    Thanks in advance.
    Regards,
    Chandu

    Hi,
    You can use the transaction /sapapo/tscopy.
    In this you can configure your source plng area and destination plng area. You also have an option to map your KF. There is no problem if the MPOS are different as long as you are able to map the characteristics between the 2 MPOS.
    Alternatively, you can create an Infocube which shares common ground between the 2 planning areas and extract data from CIP plng area into the infocube and then copy teh data from infocube to MPS plng area using the the transaction /sapapo/tscube.
    Hope this helps.
    Thanks
    Mani Suresh

  • How to transfer data from one macbookpro to another

    how to you transfer data from one macbookpro to another. the other one was stolen.

    If your computer was stolen and you don't have a data backup, you can't transfer data from the stolen computer to your new one. If you have a data backup, restore the data to the new computer.

  • How to transfer DATA from one machine to another using  DBlink

    I want to transfer data from one machine to another both having oracle 8.0.5 with AIX operating system using DB link. CAn any one help me in this task

    Step one - Create and test SQLNet connections between the databases.
    Step two - Create at least on database like from one database to the other:
    CREATE DATABASE LINK linkname
    CONNECT TO user identified by password
    USING 'tnsnamesentry';
    Step three - use the dblink linkname in dml statements eg:
    insert into emp@linkname
    (select * from emp);

  • How to transfer data from one client to another client

    Dear Experts,
    Please explain how to transfer data (Materials) from one client to another client?
    Thanks,
    Ajay Kumar

    Hi Ajay,
    Check any of below methods
    Refer thread http://scn.sap.com/thread/171981 where people use IDOCs for master data transfer.
    OR
    This is done by BASIS team, by client refresh or client copy. Check with your basis team for this and there is some predefined time when they plan this activity, and in most project they do it once in 3 months etc to get production environment in test system which helps to resolve issues of production by creating similar case in test system.
    Check below threads for more information
    http://sap.ittoolbox.com/groups/technical-functional/sap-basis/cleint-copy-vs-client-refresh-1377848
    http://basissap.blogspot.in/2008/05/what-is-client-copy.html
    OR
    You can download data from one client and upload in another through BDC or LSMW.
    Regards,
    Sharat

  • How to copy file from  one location to another

    Hi,
    I am new to java, I tried the following code to move the file from one location to another
    public class CopyFiles {
    public String copy ( File source, File target)
    throws IOException {   
    FileChannel sourceChannel = null;
    FileChannel targetChannel =null;
    try {   
    sourceChannel =new FileInputStream(source).getChannel();
    targetChannel= new FileOutputStream(target).getChannel();
    targetChannel.transferFrom(sourceChannel, 0,
    sourceChannel.size());
    finally {   
    targetChannel.close();
    sourceChannel.close();
    return "Success";
    public static void main(String [] args) throws Exception{   
    File source = new File("C:\\users\\download.pdf");
    File destinationFile = new File("C:\\apple\\download.pdf");
    copy(source, destinationFile);
    The above code is working perfectly, but I Don't want to include the file name in destination file. i.e. File destinationFile=new File("C:\\apple"), and at the same time the pdf with same name has to get stored in the destination location, how can I achieve this.

    kameshb wrote:
    I Don't want to include the file name in destination file. i.e. File destinationFile=new File("C:\\apple"), and at the same time the pdf with same name has to get stored in the destination location, how can I achieve this.It's not totally clear what you're saying here, but what I think you mean is that you don't want to explicitly set the destination file name--you want to just give the copy the same name as the original. Yes?
    If that's the case, then break the original up into separate directory and file name portions, and then construct the destination path from the destination directory plus original file name. You can do that by manipulating the full path string, or by using the methods in java.io.File.

  • How to transport data from one tab to another(mapinfo)?

    Hello all,
    due to a change of design i have to transport datas from one
    spatial table to another in order to use them in mapinfo.
    How can i handle this with polygon datas?
    if i just do a simple "insert into tab select * from anothertab;
    all std datas are moved but the spatials generate errors while
    opening in mapinfo (illegal data type) any ideas or suggestions?
    Thanks i advance,
    Volker I. Lipper

    Hi,
    just a guess - maybe the necessary metadata is missing. I suggest
    you check the MAPINFO.MAPINFO_MAPCATALOG table for the
    appropriate entry (for "anothertab"). If there is no
    corresponding row, you need to make the table mappable in Mapinfo
    Pro first.
    Hope this helps,
    --- Hans.

  • Copy data from one schema to another schema tables

    Hi,
    I was doing a copy using sql developer copy feature, data copy worked perfect but for few table data didn't move there are about 30 tables from schema prod to schema dev i need to move tables are already created only data needs to be moved from prod to dev
    Can you suggest me any method were I can move all the tables data at a time from one schema to another. Please suggest.
    Thanks
    Sudhir

    Hi,
    If table structure is the same then:
    insert into dev.table_name
    select
    from
      prod.table_name  --if prod is in another database change to prod.table_name@db_link_to_prod_db
    commit
    ;Hope this helps. Otherwise give some more info about where these schema's are.
    Regards,
    Peter

  • How to Copy BoM from one organization to another Organization

    Hi We are using Oracle EBS 11i, we are having problem that when one of our finished Product moved from one org to another we are not be able to copy and we have to do manually enetr each line of BoM in new Org,
    Any one can help me to find out the solution which will help us to copy one BoM from Orag 1 to Org 2.
    Regards
    Umair

    Hi Umair,
    While using the copy option, go to the org where bill is not present.
    Enter the Parent Item in the header and go to tools--> copy bill from
    There you can select the org from which bill needs to be copied.
    Also make sure your responsibility has organization access to those inventory orgs.
    Thanks
    -Arif.

  • XML script to copy data from one repository to another

    Hi all,
    a customer wants an xml script that copy all data from the repository A to the repository B. I think that this is not possible to do this with an xml script, because the script tags (add-item, update-item, query-item, import-item, load-item, remove-item) seems don't give this feature. The same for RQL, that doesn't give you a command like "SELECT INTO".
    But what i'm asking is: Is there a way to run the copy using the repository script tags?
    Thanks.
    Edited by: user10980894 on 11-lug-2011 3.33

    Please elaborate , If what you need is to copy data from between two dissimliar repositories then it is not possible , but if a and b are having the same structure then you might be able to do that using the following and tweaking the generated xml
    Both the repositories should have the same structure and name , please follow the below commands and you will be able to export the data in below format , see if this is all you want
    export using
    bin/startSQLReository -m module -export all outputfile.xml -repository repositoryA
    Change the reference to repositoryA in the file
    import using
    bin/startSQLRepository - m module - import outputfile.xml -repository repositoryB
    <add-item item-descriptor="priceList" id="plist4350003">
    <set-property name="description"><![CDATA[Group of Thirteen States which is generally called as L13 in AT&T]]></set-property>
    <set-property name="displayName"><![CDATA[L13]]></set-property>
    <!-- export is false <set-property name="version"><![CDATA[7]]></set-property> -->
    <set-property name="basePriceList"><![CDATA[listPrices]]></set-property>
    <set-property name="creationDate"><![CDATA[9/3/2010 07:38:49]]></set-property>
    <set-property name="lastModifiedDate"><![CDATA[9/10/2010 17:02:09]]></set-property>
    <set-property name="itemAcl"><![CDATA[Admin$role$administrators-group:list,write,write_owner,write_acl,read_owner,destroy,read_acl,read;Admin$role$everyone-group:list,read]]></set-property>
    </add-item>
    please refer to this section of ATG Repository guide for further info

  • How to copy data from one table to another (in other database)

    Hi. I would like to copy all rows from one table to another (and not use BC4J). Tables can be in various databases. I have already 2 connections and I am able to browse source table using
    ResultSet rset = stmt.executeQuery("select ...");
    But I would not like to create special insert statement for every row . There will be problems with date formats etc and it will be slow. Can I use retrieved ResultSet somehow ? Maybe with method insertRow, but how, if ResultSet is based on select statement and want to insert into target table? Please point me in the right direction. Thanks.

    No tools please, it must be common solution. We suceeded in converting our BC4J aplication to PostgreSQL, the MSSQL will be next. So we want to write simple aplication, which could transfer data from our tables between these 3 servers.

Maybe you are looking for

  • Time Capsule vs. Airport Extreme w/ HD vs NAS

    It looks like I'm having trouble with my current Time Machine drive and will need to replace it. I'm considering several options. I mainly use Time Machine with a FireWire 800 drive for quick backup of my iMac. I'm pretty lax about backing up my MacB

  • How do I delete all the messages in my Inbox on my iphone 4S

    How do I delete all the messages at one time in my inbox on teh iphone 4S

  • I have latest update but some sites tell me i don't.

    Trying to access Al Jazerra. No problems before but now keeps telling me I need to update flash player which I have done. Is this a problem with Al Jazerra or my computer?  Help! Thank you, myshadowone2007

  • Address Book opens up ramdomly

    Hey guys, after 2.5 years on a Mac I have the first problem I couldn't solve myself. I'm on 10.7.3 with all of my contacts on iCloud syncing with my iPhone. For a few weeks now Address Book opens up unintentionally with hidden window. Console log say

  • SPA 525 (7.1.5a) Freezing

    Hello all, I work for a voIP provider supporting Polycom and Cisco phones. I am having an issue with Cisco SPA 525's in one of our enviroments and can't seem to figure out the problem. Essentially the phone will freeze randomly during calls and rquir