ABAP command "import from database..."

Can someone in this forum explain to me the low level  details behind the ABAP command "import from database"?
The select in tables like stxl, indx, moni just retrieves data in hex format for the fields of type raw or lraw.
But the command import from database works fine!
What's the magic? Compression? Hash algorithms? etc?
Thanks!

When you import a field from a database, it should be the same name and format when it was exported. These databases are a cluster table where data is stored in raw. I assumed it will read the cluster portion of the record and convert it into the field structure byte by byte. These tables have field CLUSTR which store the byte size of the record. So if you are willing to program the read, where you find out the length of the field you want to IMPORT, then read that number of byte from the cluster data, move it to the field you are importing, you should be able to do your own read. However, if we can do it in 1 statement using IMPORT, we don't need to program it.
Cluster table is used to save space since you don't need to create a new database record for each line of internal table you stored into them. Hope this helps.

Similar Messages

  • Import from database

    Hi all,
    I am trying to import (schema+data) from another database by using Enterprise Manager 10g ( http://host:portno/em ). But i am getting only schema.
    how to get data also.

    I am not exporting data from file. Directly from data base by using Import from Database in Oracle Enterprise Manager 10g.
    I created Database Link and selected import type as database.Any help?
    Thankyou

  • Import from Database - how to restrict the list of schemas

    This may be more of a general Oracle question, but the problem is showing up in OBIEE, so...
    When running an Import from Database in the repository tool, I see a lot of schemas listed in the data source pane, like APEX_030200, CTXSYS, MDSYS, OLAPSYS, PUBLIC, SYS, and SYSTEM, in addition to the schema that I've used for the connection (TRAINING). There are a lot of other schemas in the database that are NOT shown in the import dialog.
    Question 1: What's special about the schemas that I've mentioned above that causes them to always show up in the import dialog?
    Question 2: How can I eliminate them from the import dialog, so that I see one and only one schema - TRAINING? What privileges or roles must I grant or revoke so that when my connecion pool uses the TRAINING schema, then TRAINING is the only schema listed on the import dialog?
    Thanks!

    to see the list of schemas
    select username from dba_users
    select distinct owner from dba_tables;{code}to know on which DB you are
    {code:java}select instance_name from v$instance;{code}
    Edited by: Leo Anderson on 7 sept. 2008 19:37                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Import from database an internal table with generic Type : Web Dynpro ABAP

    Hi everyone,
    i have a requirement in which i'm asked to transfer data flow between two frameworks, from WD Component to another. The problem is that i have to transfer internal tables with generic types. i used the import/ export from database approache but in that way i get an error message saying "Object references and data references not yet supported".
    Here is my code to extract a generic internal table from memory.
        DATA l_table_f4 TYPE TABLE OF REF TO data.
      FIELD-SYMBOLS: <l_table_f4> TYPE STANDARD TABLE.
      DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
      DATA: ls_indx TYPE indx.
      lo_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
      lo_componentcontroller->fire_vh_search_action_evt( ).
      ASSIGN l_table_f4 TO <l_table_f4>.
    *-- Import table for Help F4
      IMPORT l_table_f4 TO <l_table_f4> FROM DATABASE indx(v1) TO ls_indx ID 'table_help_f4_ID'.
    The error message is desplayed when last instruction is executed " IMPORT l_table_f4...".
    I saw another post facing the same problem but never solved "Generic Type for import Database".
    Please can anyone help ?
    Thanks & Kind regards.

    hi KIan,
    go:
    general type
    TYPE : BEGIN OF ty_itab,
               field1 TYPE ztab-field1,
               field2 TYPE ztab-field2,
    *your own fields here:
               field TYPE i,
               field(30) TYPE c,
               END OF ty_itab.
    work area
    DATA : gw_itab TYPE ty_itab.
    internal table
    DATA : gt_itab TYPE TABLE OF ty_itab.
    hope this helps
    ec

  • IMPORT FROM DATABASE doesn't work in Web Dynpro

    Hi all, I want to use the code at the bottom to get the last packages visited by a user I specify.
    But I'm getting this error:
    IMPORT var_1 ... var_N FROM DATABASE is not supported in the OO
    context. Use IMPORT name_1 TO var_1 ... name_n TO var_n FROM DATABASE
    ... instead. var_n DATABSE ... insted var_n FROM DATABASE.
    Could someone please show me how I can resolve this?
      TYPES : BEGIN OF ty_key,
                uname  TYPE euf4values-uname,
                object TYPE euf4values-object,
              END OF ty_key.
      TYPES : BEGIN OF ty_value_table,   " Last F4 Values
                obj_name    TYPE tadir-obj_name,
                encl_object TYPE tadir-obj_name,
                position    TYPE i,
              END OF ty_value_table.
      DATA : gs_key TYPE ty_key,
             f4_last_values TYPE TABLE OF ty_value_table,
             gs_value_table TYPE ty_value_table.
      gs_key-uname  = item_user.
      gs_key-object = 'K'.
      IMPORT f4_last_values FROM DATABASE euf4values(eu) ID gs_key.

    Did you check the online documentation ? [http://help.sap.com/abapdocu_70/en/ABAPIMPORT_MEDIUM.htm#&ABAP_ALTERNATIVE_4@4@]
    I see your code has differences from the example provided in the standard documentation.

  • IMPORT from database with dynamic parameter list

    Hi Gurus,
    Iu2019m having problems during import from a cluster table.
    I wanu2019t to do an import with a dynamic parameter list, but I cannot get it to work.
    Sample code ********
    DATA: BEGIN OF st_key,
    report LIKE rsvar-report,
    variant LIKE rsvar-variant,
    END OF st_key.
    DATA dirtab1 LIKE cdir OCCURS 10 WITH HEADER LINE.
    DATA dirtab2 LIKE cdir OCCURS 10 WITH HEADER LINE.
    st_key-report = 'ZPRG'.
    st_key-variant = 'VAR1'.
    IMPORT DIRECTORY INTO dirtab1 FROM DATABASE vari(vb) ID st_key.
    IMPORT DIRECTORY INTO dirtab2 FROM DATABASE vari(va) ID st_key.
    DATA: tmp_var(100)   TYPE c.
    This works - P_BWTAR is a parameter from the selection screen registred in VARI
    I'm getting the content of the field in tmp_var
    IMPORT p_bwtar TO tmp_var FROM DATABASE vari(va) ID st_key.
    This does not work - the parameter P_BWTAR is in the dirtab2-name
    I'm not getting the content
    LOOP AT dirtab2.
        IMPORT dirtab2-name FROM DATABASE vari(va) ID st_key.
      ENDIF.
    ENDLOOP.
    I have tried the syntax IMPORT (dirtab2-name) ........
    but this fails the syntax check.
    Please - if you have any suggestions  :o)
    Best Regards,
    Vibeke

    Dear Vibeke,
    Could you please explain us how you solved the problem because you have the same issue ?
    thanks a lot
    KR
    véronique

  • Problem with IMPORT FROM DATABASE

    Hello Members,
          I have a program which reads content of INDX table (cluster table) using
    IMPORT tab = lt_ccris1 FROM DATABASE indx(xa) TO wa_indx CLIENT
    sy-mandt ID 'DETAILLIST'.
    sy-subrc return is 0.
    But internal table lt_ccris1 is not populated. I expect entries to be populated here as there is an raw data entry in the INDX - CLUSTD field of database.
    1)   Also I am intereseted to knoe where is the data exported to this INDX table? Usual searches does not show any export statement.
    2)   Is there a FM which can directly read content of INDX table?
            Your help is much appreciated.

    Hi Thomas,
        Thanks for the reply.
    //How do you know your IMPORT syntax must look exactly like this? //
    I did not write this custom report and IMPORT statement is exactly the same as I have given. It is correct as per syntax.
    In SE16 INDX does contain an entry for the given key.
    I searched for EXPORT stmt in varall ways including debugging (Please note there is a SUBMIT <program> before IMPORT and if at all there is an export it should be in there). Could not find from debugging as well.
    RS_ABAP_SOURCE_SCAN does not exist in my 4.7.
    Regards
    Ram

  • Using IMPORT from Database to fetch data from CLuster

    Hi,
    I am using IMPORT From Databse to ge the data from a Cluster DB.
    IMPORT i_postings_old
            FROM DATABASE y0fsgr001(xx)
            ID l_sgr_memory_id.
    whats is happening is there is not data in  I_postings_old but there is data for the ID = l_sgr_memory_id.
    in table y0fsgr001.
    What might be the reason for this behaviour?
    Thanks
    Nishant

    When doing the corresponding EXPORT TO DATABASE (in case you are doing it) Are you using the same variable name i_postings_old ?
    Sometimes I faced this issue and in most cases it was due to the use of different variable names, maybe that's your case too.
    IMPORT i_postings_old

  • Import from database moni

    hi all
    i want to write a report like tcode st03n.
    so , i want to extract data from table moni.
    i have read some information about
    IMPORT <f1> [TO <g1>] <f2> [TO <g2>] ...   FROM DATABASE dbtab <ar>  ID <key>
    i have tried some statement like
    IMPORT xxx  FROM DATABASE moni(DD)
    ID '--TOTAL   H*MONT200808'.
    but, i could not extract the data.
    someone said, the structure of <f1> and the data in table moni  must have the same format to import  
    how can i know the data format in table moni ?

    please refer to the  SAP note 1000275
    i got the same error so i rectified it by changing  fields type of hist2 .
    below declaration of hist2 data is giving error
    data: begin of hist2 occurs 0,
            date like sy-datum,
            time like sy-uzeit,
            size      type p,     "Changed to 'p'
            free      type p,     "Changed to 'p
            used      type i,
            tables    type i,
            indices   type i,
            tsize     type i,
            isize     type i,
          end of hist2.
    error rectified with below hist2 data( tsize and isize type is changed to p)
    data: begin of hist2 occurs 0,
            date like sy-datum,
            time like sy-uzeit,
            size      type p,     "Changed to 'p'
            free      type p,     "Changed to 'p
            used      type i,
            tables    type i,
            indices   type i,
            tsize     type p,
            isize     type P,
          end of hist2.

  • ABAP command IMPORT/EXPORT

    Hi!
    I would like to know whats the replacement for the IMPORT and export commands used in 4.7c  in ECC6. Can anyone tell me whats the replacement commands for import and export command that is used in abap/4 4.7c for ECC6.
    Thanks

    Hi Aarav,
    there is nothing like replacement for import/export.there is another statements to transferdata which are Set/Get.
    when you are working with sap you have sessions.so in between session if you want to transfer data then you will use set/get parameters.import/export are used within the session.means you opened se38 and written a program and then go back to se38 initial screen and entered another program name and in that program you want the data which is in the previous program you have written in the se38 in same session.
    reward points if helpful.

  • Regarding import from database in RPD??

    Hi there,
    My database is Oracle 9i. I tried to create the ODBC connection to the databse to import the tables to rpd but it encountered some TNS error.
    Then I used Connenction Type "OCI 10g/11g"and gave TNS name and user name and password and I was able to connecet to the database.
    Why I'm not able to connecet to database using Connection Type "ODBC 3.5"? I checked the TNSNAMES.ORA file and its correct coz I'm using the same to connecet to database through TOAD also.
    Appreciate your help.

    Did you created ODBC DSN? If not create a DSN ( from control panel - administation - Data Sources (ODBC)) , then use that to import tables when using OBDC 3.5.
    - Madan

  • Timestamp import from Database wrong?

    Hi
    i have a Timestamp column in a SqlServer 2500 Database an import this into DIADEM. Diadem rounds the Milliseconds > 500 to the next second. Is this right or wrong?
    Database ......................................   Diadem
    23.10.2007 13:19:17.357 ===> 23.10.2007 13:19:17.3570
    23.10.2007 13:19:18.607 ===> 23.10.2007 13:19:19.3570     ??? why??
    23.10.2007 13:19:19.357  ===>23.10.2007 13:19:19.6070
    Can anybody explain me this?
    Thank Achim

    Hi Brad,
    i have now a simple testcase. The database table has 100 entrys. The Timestamp (WsDateTime)  is incremented by 100 milliseconds. I have no columns with a bigint!!! This is still wrong.
    The dadabase.pdf shows the databaseentries, diadem.pdf the loaded data into Diadem. Compare the WsDatetime colums...what is wrong?  Bug?
    Thanks
    Achim
    Attachments:
    DIAdem-VIEW Layout wird gedruckt.pdf ‏13 KB
    Database.pdf ‏22 KB
    Diadem.pdf ‏36 KB

  • Data level security filter to groups imported from database

    The groups that a user belongs to are stored in a table in the database. How do I create a group in the rpd to define data level security filters when the group name is retrieved from the database table depending on who logs in. One user can be a part of several groups.
    Please help.

    I created the groups manually in the rpd first and assigned security filters to the group. The same group was created in the presentation services assigning some object level security (dashboard pages visibility). But the user picks the groups (row wise initialization) correctly and not the security filters applied to the group in the rpd. The privileges to the group in the presentation services works fine. Why is the group definition in the rpd being bypassed.

  • [nQSError: 46115] - Admin Tools: can't import table from database .

    hi all,
    Need your help, i am using Bi Administration Tool, and i try to import tables from database,but encounter issue:
    (1)."File->import->from database...",select connection type as OCI 10g/11g, type TNS Name,User Name and Password,then click "OK".
    (2).select table "BI_DATA",and then click button "import",it show prompt:"Failed to perform requested action".
    (3).i try to click the symbol "+" on the left of table "BI_DATA", it show below prompt:
    [nQSError: 46115] No Unicode translation is available for some of the input characters for MultiByteWideChar().
    is there anyone can help me? thanks.
    the BI version is:
    Build: 10.1.3.4.1.090414.1900
    Release Version: Oracle Business Intelligence 10.1.3.4.1
    Package: 090414.1900

    I meet the problem, too! I can't solve it. Is anyone who can help me.
    My email is [email protected]
    thanks in avdvanced!

  • Importing materialized views from database into physical layer

    Hi,
    I have created materialized view in the database. When I try to import the materialized view into the physical layer in OBIEE 10G (using the import from database option), it is not showing in the list of available object. I have selected all the object types (tables,views etc.). Can you please let me know how to import the existing MVs in the database into the physical layer.
    Regards
    Vinodh.
    Edited by: user493441 on Jul 7, 2012 4:11 PM

    Hi Vinod,
    Refer the below links.
    Materialized Views in OBIEE
    http://gerardnico.com/wiki/database/oracle/materialized_view
    Concept of materialized views in creating datawarehouse?????
    Hope this help's
    Thanks
    Satya

Maybe you are looking for

  • How to change tree colors? example inside.

    Hello, I was looking on the Internet to find the way to change background tree to specific colors, not the same color. Here is an example...: and here's another one: Thank you'll.

  • Can't find Facebook Log at the bottom right of Iphoto

    I can not see or find the Facebook logo at the bottom right of the iphoto screen? Can anyone help

  • Material restriction by Customer

    Hello Gurus - I have a biz requirement where they would want a specific customer (sold to) to be able to order specific materials only. At first, I got a thought to define a division wherein that sold to and material be defined on that division. I am

  • Material block for specific customers:

    Hi Guru's, I am stuck with the above problem, system should block accessing some of the products/items to few customers. I tried to search in the forum but i didn't get the proper solution. Could you please solve this? Sushil

  • Sudden change in battery performance

    Hello. I am having trouble with my battery. I charge my phone every night, and ever since the last software update (2.1) have had great performance. This performance has changed this week, as my battery is already drained today at 230p. (Last week I