How to copy data from transparent table to our own ceated z table?

How to copy data from transparent table to our own ceated z table?
Plz tell me different methods and which one is best?
Is get data from sflight into table z* is correct?

Hi Ajay,
let us consider you have to copy EKKO table to ZEKKO table
1. In ABAP program define internal table based on EKKO
<b>     eg: i_ekko</b>
2. Select the data from EKKO to i_ekko
<b>     eg: select * from ekko into table i_ekko.</b>
3. insert into Z-TABLE from the internal table
<b>     eg: INSERT EKKO FROM TABLE I_EKKO.
           COMMIT WORK.</b>
<u>To insert in internal table you can use the following:</u>
1. INSERT [wa INTO|INITIAL LINE INTO] itab [INDEX idx].
2. INSERT [wa INTO|INITIAL LINE INTO] TABLE itab.
3. INSERT LINES OF itab1 [FROM idx1] [TO idx2] INTO itab2 [INDEX idx3].
4. INSERT LINES OF itab1 [FROM idx1] [TO idx2] INTO TABLE itab2.
<u>To inert in database table, use the following:</u>
1. INSERT INTO <dbtabname> [CLIENT SPECIFIED] VALUES wa.
2. INSERT <dbtabname> [CLIENT SPECIFIED] FROM TABLE itab.
3. INSERT <dbtab> [CLIENT SPECIFIED]. oder
4. INSERT <dbtabname> [CLIENT SPECIFIED] ... .
<b>Reward points.. if helpful.
Cheers !
Moqeeth.</b>

Similar Messages

  • How to copy data from mac to external hard

    how to copy data from mac to external hard

    ok - since you'll be sharing it with a PC - connect it to your windows pc - then format from there - instead of NTFS format - choose exFAT.
    or, you can read the link below on how to do it in dos mode.
    http://answers.microsoft.com/en-us/windows/forum/windows_7-files/how-can-i-forma t-external-drive-in-exfat-not-in/0f6bf19a-19d6-4470-ae05-53ddf26bb476?msgId=1860 eae3-3488-4eea-8326-f87b89d9851b
    once you've formatted it - you can now use it in both your macbook and windows computer.

  • How to Copy data from field symbol to Dynamic Internal Table

    Hi,
    I want to copy the data between two dynamic Internal tables . Following is the code were I have data in the field symbol wanted to transfer it to the other Internal table :
    REPORT  ztest.
    DATA:
           gd_dref          TYPE REF TO data,
           gd_dref1          TYPE REF TO data.
    FIELD-SYMBOLS:  <fs1>   TYPE any,
                               <fs_wa> TYPE any,
                                <field>    TYPE any,                  
                                <fs_wa1> TYPE ANY TABLE.  * Contains data from p_src
    *Copy data from p_src to p_dest*
    PARAMETERS: p_src LIKE dd02l-tabname .    * Name of Dynamic Internal table *
                             p_dest LIKE dd02l-tabname .  * Name of Dynamic Internal table*
    *DATA : lt_csks LIKE p_dest WITH HEADER LINE.
    START-OF-SELECTION.
      CREATE DATA gd_dref TYPE (p_src).
      CREATE DATA gd_dref1 TYPE TABLE OF (p_src).
       ASSIGN gd_dref->* TO <fs_wa>.
       ASSIGN gd_dref1->* TO <fs_wa1>.
       SELECT * FROM (p_src) INTO TABLE <fs_wa1>.
    *Write out data from FIELD SYMBOLS TO Table.
       loop at <fs_wa1> into <fs_wa>.
         do.
           assign component  sy-index
              of structure <fs_wa> to <field>.
           if sy-subrc <> 0.
           exit.
           endif.
           if sy-index = 1.
             write:/ <field>.
           else.
           write: / <field>.
           endif.
         enddo.
       endloop.
    *Need Logic To Copy the Data to p_dest table from <fs_wa1>.
    *p_dest is a table having a similar structure to table p_src .
    *Need Logic To Copy the Data to p_dest table from <fs_wa1>.
    EXIT.
    Thanks in Advance.

    try this...
    I have extended your source code and just used vbak/vbap as an example as they have some common fields like vbeln/erdat etc which corresponds with your requirement of 'similar structure' i.e. shared/common fields in both.
    Cheers...
    report  ztest.
    data:
      gd_dref type ref to data,
      gd_dref1 type ref to data,
      gd_dref_str type ref to data,
      gd_dref_tab type ref to data.
    field-symbols:
      <fs1> type any,
      <fs_wa> type any,
      <fs1_dest_str> type any,
      <fs_dest_tab> type any table,
      <field> type any,
      <fs_wa1> type any table.
    * contains data from p_src
    *Copy data from p_src to p_dest*
    parameters: p_src like dd02l-tabname default 'vbak',
    * name of dynamic internal table *
                p_dest like dd02l-tabname default 'vbap'.
    * name of dynamic internal table*
    *data : lt_csks like p_dest with header line.
    start-of-selection.
      create data gd_dref type (p_src).
      create data gd_dref1 type table of (p_src).
      assign gd_dref->* to <fs_wa>.
      assign gd_dref1->* to <fs_wa1>.
      select * from (p_src) into corresponding fields of table <fs_wa1>
      up to 3 rows
      where vbeln ne space.
      create data gd_dref_str type (p_dest).
      create data gd_dref_tab type standard table of (p_dest).
      assign gd_dref_str->* to <fs1_dest_str>.
      assign gd_dref_tab->* to <fs_dest_tab>.
    *write out data from field symbols to table.
      loop at <fs_wa1> into <fs_wa>.
        " break-point here - can see vbeln/waers/create date/ etc move over to new structure
        " the 'common' fields of your structures - the same will happen. if they not the same name you will have to do an
        " explicit move i.e. if fieldname = xyz ....move fieldxyz to new field123....after the move-corre
        break-point.
        move-corresponding <fs_wa> to <fs1_dest_str>.
        insert <fs1_dest_str> into table <fs_dest_tab>.
    **    do.
    **      assign component  sy-index
    **         of structure <fs_wa> to <field>.
    **      if sy-subrc <> 0.
    **        exit.
    **      endif.
    **      if sy-index = 1.
    **        write:/ <field>.
    **      else.
    **        write: / <field>.
    **      endif.
    **    enddo.
      endloop.
      " write out some dest data from the dest table build from previous loop
      loop at <fs_dest_tab> assigning <fs1_dest_str>.
        do.
          assign component sy-index of structure <fs_wa> to <field>.
          if sy-subrc <> 0.
            exit.
          endif.
          if sy-index = 1.
            write:/ <field>.
          else.
            write: / <field>.
          endif.
        enddo.
      endloop.

  • How to select data from Sql server 2005 database tableinto oracle database table

    Hi,
    I have table text1 in sql server database and text2 in oracle database (11g). Now how to move data from SQL Server table into oracle table. So please help me how to do it.
    Thanks a lot in advance.
    rk
    OS: Windows 7 professional

    Hi,
    you can use export/import wizard and specify sql server as a source and oracle as destination.
    I hope this is helpful.
    Please Mark it as Answered if it answered your question
    OR mark it as Helpful if it help you to solve your problem
    Elmozamil Elamir Hamid
    MCSE Data Platform
    MCITP: SQL Server 2008 Administration/Development
    MCSA SQL Server 2012
    MCTS: SQL Server Administration/Development
    MyBlog

  • How to save data from a server log to the java dictionary table?

    Hi,
    I need a java dictionary and a program which will read data from the log file and save records into tables.
    Can somebody help how to achieve this? Please help!
    Thanks & regards
    Amita

    Hi folks, Give some inputs here....
    Thanks & regards
    Amita

  • 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 mac book to seagate hard disk

    i cannot seem tp copy data on my external hard disk.how do i copy data from my mac book pro to seagate harddisk

    See >  Disk Formats
    drpriyamahale wrote:
    i cannot seem tp copy data on my external hard disk.
    First... Make sure the EHD is Formatted Mac OS Extended (journaled)..
    See  >  http://pondini.org/OSX/DU1.html
    From here  >  http://pondini.org/OSX/DU.html

  • How to copy data from mac to external HD Drive

    How do i copy data from mac book to an external hard disk drive?

    Click on the Desktop area (the area where there are no open windows or Dock)
    Look at the menu at the top next to the small Apple, it should say Finder
    Click on the File men and select New Finder Window
    Click on the File men and select New Finder Window (or stick in a disk, a USB, connect a hard drive and double click on the icon that appears on the Desktop)
    Grab the Window by the top area by clicking and holding the mouse button down so both are side by side.
    Click on the sidebar or open folders on the first window to get to where your files are
    Click on the sidebar or open folders on the second window to get to where your destination is going to be
    Click and drag the files or folder from one window to the other
    If this occurs between volumes, it will copy
    If this occurs on the same volume, it will move them
    If you want to copy on the same volume, use the Finder > File > Duplicate and move the copy

  • 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 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 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.

  • How to copy datas from a table to a file.

    Hi,
    Can Someone help me how to do this using queries or procedures.
    I want to copy the datas from the table to a flat file (eg. text or excel).
    example:
    CREATE TABLE emp
    (FCST_DATE DATE,
    LEVEL1 VARCHAR2(2000) ,
    Sal NUMBER,
    Insert into emp (FCST_DATE,LEVEL1,Sal) values ('01-MAR-11','175-12','1');
    Insert into emp (FCST_DATE,LEVEL1,Sal) values ('01-JAN-11','319-10','100');
    Insert into emp (FCST_DATE,LEVEL1,Sal) values ('01-AUG-11','175-1L','10');
    select * from emp;
    fcst_date Level1 Sal
    01-JAN-11 319-10 100
    01-AUG-11 175-1L 12
    01-MAR-11 175-12 1
    I want this table information in a file.
    Can someone help!
    Padma

    Hi Padu,
    Use SQLPLUS commad SPOOL for exporting sql query result.
    and see : Sqlplus – spool data to a flat file

  • How to extract data from multiple flat files to load into corresponding tables in SQL Server 2008 R2 ?

    Hi,
              I have to implement the following scenario in SSIS but don't know how to do since I never worked with SSIS before. Please help me.
              I have 20 different text files in a single folder and 20 different tables corresponding to each text file in SQL Server 2008 R2 Database. I need to extract the data from each text file and
    load the data into corresponding table in Sql Server Database. Please guide me in how many ways I can do this and which is the best way to implement this job.  Actually I have to automate this job. Few files are in same format(with same column names
    and datatypes) where others are not.
    1. Do I need to create 20 different projects ?
                   or
        Can I implement this in only one project by having 20 packages?
                 or
        Can I do this in one project with only one package?
    Thanks in advance.

    As I said I don't know how to use object data type, I just given a shot as below. I know the following code has errors can you please correct it for me.
    Public
    Sub Main()
    ' Add your code here 
    Dim f1
    As FileStream
    Dim s1
    As StreamReader
    Dim date1
    As
    Object
    Dim rline
    As
    String
    Dim Filelist(1)
    As
    String
    Dim FileName
    As
    String
    Dim i
    As
    Integer
    i = 1
    date1 =
    Filelist(0) =
    "XYZ"
    Filelist(1) =
    "123"
    For
    Each FileName
    In Filelist
    f1 = File.OpenRead(FileName)
    s1 = File.OpenText(FileName)
    rline = s1.ReadLine
    While
    Not rline
    Is
    Nothing
    If Left(rline, 4) =
    "DATE"
    Then
    date1 (i)= Mid(rline, 7, 8)
     i = i + 1
    Exit
    While
    End
    If
    rline = s1.ReadLine
    End
    While
    Next
    Dts.Variables(
    "date").Value = date1(1)
    Dts.Variables(
    "date1").Value = date1(2)
    Dts.TaskResult = ScriptResults.Success
    End
    Sub

  • How to extract data from the fields present in two or three tables

    Hi Experts,
          I have a scenario where i have to extract data from the fields of different tables. e.g. let there 2 tables which have some number of fields . I want the data of 3 fields each from these 2 tables. How can i get that??
    Sam

    Hi
    You can create view in tcode se11..
    here you include all tables from which you want to fetch the data..
    you need to give selection condition here
    eg..
    say select empname from table A, select empadd from table B.. where empno(from A)=empno(from B)
    (note that you dont need to write queries like this.. i have just given u the example)
    After creating the view you can create datasource in RSO2..
    Regards
    Swati

  • How to insert Data from a function on server A into a table on Server B.

    Hi,
    I have a function which is like this
    DECLARE @oldmax bigint, @newmax bigint
    SELECT @oldmax = max(exportTimestamp) FROM EXPORT_TIMESTAMPS
    IF @oldmax IS NULL
    SET @oldmax = 0
    SELECT * FROM ServerA.TableA.fnExportTrafficTS(@oldmax) ORDER BY storeID, TrafDate
    SELECT @newmax = max(timestamp) FROM TRAFFIC t
    IF @newmax > @oldmax
    INSERT INTO EXPORT_TIMESTAMPS
    VALUES(@newmax, GETDATE())
    And now i need to insert the data coming out of this function into ServerB Table B
    And the column names and everything coming out of the function is the same columns in Table B.So, no need to worry there.
    I have never worked with inserting data from function through linked server.
    Can someone please help me with this?
    Thanks,
    Sujith

    Well, first of all, your table structure doesn't match the structure of returned table by your table-valued function.
    This is what table valued function returns:
    [storeID] varchar(32) default('noRefID'),
    [TrafDate] [datetime] default(NULL),
    [QtyTraffic] [float] default(0)
    And this is what your table structure is:
    [tUTL_JobLogging_Key] [int] NOT NULL,
    [StoreId] [varchar](10) NULL,
    [TrafDate] [datetime] NULL,
    [Visits] [numeric](8, 2) NULL
    Apart from different size for the StoreID and using float vs. numeric and different name for the last column, there is one extra column in your table.
    So, this is the first problem you need to correct.
    Also, please post how exactly you're calling your procedure? E.g. the procedure has 2 parameters, but the values of them are not used as you're calculating them in the code. So, I assume they should not be parameters for the procedure.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

Maybe you are looking for