Export data - uses new connection?

I've set up SQLdeveloper to automatically execute a script when a connection is started (tools->preferences->database->filename for connection startup script). The script does an "alter session set current_schema=blah" so that I don't have to keep typing the schema that I want to query. It's working fine, until I try to export the data. I get an error in the Logging page :ORA-00942: table or view does not exist. If I change my query to put in the schema name, it works fine. It looks like SQLdeveloper is creating a new connection to export the data, and isn't execuint the startup script I specified. Is there any way to get the script to execute on start of a data export connection? If not, the startup script seems pretty useless to me.

How are the queries manipulated? I could change my queries in some way to accomodate the mainpulation. Although hopefully it would be simpler than adding the schema name to the beginning of all tables.
What's the suggestion with the synonyms? Create synonyms in the schema that logs in for all the tables you want to access? The issue is there are literally huntreds of tables across many schemas, so it would be a bit tough to maintain.

Similar Messages

  • Can we use Data Pump to export data, using a SQL query, doing a join

    Folks,
    I have a quick question.
    Using Oracle 10g R2 on Solaris 10.
    Can Data Pump be used to export data, using a SQL query which is doing a join between 3 tables ?
    Thanks,
    Ashish

    Hello,
    No , this is from expdp help=Y
    QUERY                 Predicate clause used to export a subset of a table.
    Regards

  • Exporting Data using exp not working

    I am trying to export data from an applicaion and the vendor gave me a par file to help. Here is my problem.
    This is what I have tried.
    exp \"sys/****@Fieldmgr as SYSDBA\" parfile=fm_export.par
    I get this...
    About to export specified tables via Conventional Path ...
    EXP-00011: SYS.MATSRC does not exist
    EXP-00011: SYS.FIELDS does not exist
    Export terminated successfully with warnings.
    It is prefixing sys. Before everything and that seems to be the problem.
    This is how I have modified the par file.
    FILE="D:\exported\fm43.dmp"
    LOG="D:\exported\fm43_log.log"
    BUFFER=100000
    ROWS=yes
    GRANTS=yes
    INDEXES=yes
    TABLES =(MATSRC,
    FIELDS,
    SETTINGS,
    CHARLARG)
    What is causing the command to prefix sys before the table names and how can I prevent this?
    Thanks,
    Jim

    Too much is missing from your posts.
    1. Can you list both the export.par file and the import.par file. This will help clear things up.
    1) Create a new database (schema & instance) in 10g.
    Not sure what they mean by schema & instance. I've created a new database called Fieldmgr
    This means to create the database and the users. Specifically the user where you want the data to live.
    grant connect,resource to user1_name identified by user1_password;
    2) Modify the export par file as appropriate for your Oracle environment.
    I prefixed fmdb. to the tablenames.You say that you prefixed fmdb to the tablenames. I'm not sure why you did this. The dumpfile has names tab1, tab2, tab3.
    If you said tables=fmdb_tab1, fmdb_tab2, fmdb_tab3. These are not in the dumpfile. The imp utilitye will look for tables called fmdb_tab1, etc and won't find any. This is probably your biggest problem. Don't change the tablenames in the parfile. If you exported
    tables=tab1, tab2, tab3
    You need to import
    tables=tab1, tab2, tab3
    or a subset like:
    tables=tab2
    >
    3) Use the export par file on the disc to create a dump of the 9i database.
    This appeared to work and I got a 63 MB data file which seems about right and there were no warnings or errors.
    4) Modify the import par file for your environment.
    Not sure what to do here other than point to the files. I've already explained what they said here which seems incorrect from your post.
    According to the applicaion vendor I should replace these variables in the import file.
    REM * <fm_source_db> - database the dmp file was from *
    REM * <fm_dest_db> - database to load the dmp file intoThe above 2 parameters are not valid parameters for imp. I would remove them from the parfile.
    FROMUSER=<fm_source_db>
    TOUSER=<fm_dest_db>These 2 parameters are for remapping a schema name. If the source database has a user called source_user1 and you wanted these imported into the target database as targer_user5, then you would use:
    FROMUSER=SOURCE_USER1
    TOUSER=TARGET_USER5
    This would mean that in step 1 above you would use
    grant connect,resource to target_user5 identified by my_password;
    >
    5) Run the import par to move the 9i dump into the new 10g database.
    This never works. The commands I am trying are.
    imp \"sys/****@fieldmgr as sysdba\" parfile="filename.par"
    imp \"sys/**** as sysdba\" parfile="filename.par"This didn't work because you renamed the table names, you appended fmdb to the tables. These tables are not in the dumpfile so that is why you get the table not found error.
    Dean

  • Export Data Using Escape Character

    Hi All
    I have got a requirement where i need to export data from oracle with escape character.
    eg. I am using a delimiter 237(í) and if the same character is present in data it should be escaped by escape character eg. /.
    Once this file will get created i need to load this file in Netezza database which supports escape character.
    Data in oracle table
    FirstName     Lastname     Designation
    abc     xyz     mnz
    def     ghío     pqr
    Data should be exported like below
    FirstnameíLastnameíDesignation
    abcíxyzímnz
    defígh/íoípqr
    Thanks.

    943994 wrote:
    Thanks for the reply. I am new to Oracle and i am not able to find any command for exporting data in Oracle. I know we can do it manually using select statement but in that case we need to replace this delimiter with escape character and delimiter for all char fields.
    In netezza we can directly do that without this. Please see below example and let me know if any such thing is present in Oracle.
    SQL> CREATE EXTERNAL TABLE '/temp/test.csv' USING (REMOTESOURCE 'ODBC' DELIMITER 236 DATESTYLE 'YMD' DATEDELIM '-' TIMESTYLE '24HOUR' TIMEDELIM ':' MAXERRORS 0 ESCAPECHAR '\' NULLVALUE '' ) AS SELECT * FROM temp;
    .CSV file created by above command:
    abcíxyzímnz
    defígh/íoípqr
    Thankshttp://docs.oracle.com/cd/E11882_01/server.112/e22490/et_params.htm#sthref1293

  • Error when extracting data using DB Connect from an Oracle database

    Hi All,
    We are on BI 3.5 and loading data from a non-SAP (Oracle 10g) database using DB Connect.
    I received the following error messages when trying to perform "Check DataSource" using the DB Connect setup in RSA1.
    Event with errors RSDL_META_UPLOAD in DataSource
    Message no. R8287
    Warning Messages;
    Message no. RSDL053
    Field name ReceiptID contains non-alpha-numeric characters
    Field name ActivityDate contains non-alpha-numeric characters
    Field name ReceiptDate contains non-alpha-numeric characters
    Field name ReceiptLineNumber must have between 000001 and 000016 digits
    etc...
    Views are created under the owner's user name. I have checked with DB personnel and they confirm that all the authorization and security access privileges have been correctly granted to the views.
    We are also able to extract the data by running a sql query statement from the views using SQL Plus
    Currently we also have a similar extraction process set up with an Oracle 9 database, which extracts the information without any issues.
    Thanks,
    Anthony

    Hi Mr Loh.
    I know that this thread has over a year ago but i was looking for something similar for over 2 weeks ago and i ialways found this thread...I want to share my experience even that maybe you already found the same solution or something similar (i saw that you check your own post as answered):
    I made a similar connection from BI 7 SP 18, but in my case was to a Microsoft SQL database 2005. When i "check the datasource" i receive like almost 150 warnings and 1 error and all the warnings and errors are the same ones as you describe above. What i did is create a custom view in the MSSQL database and convert all the column names to uppercase and the column names i limited to 16 characters at most. after doing that all the warnings and the error described disappear and i can view the database content when you made click in the "view content table" button.
    I hope that this will help somebody and best regards
    Martin Olmos

  • Can't load data using DB Connect

    I'm trying to use DB connect to load data from an external source database into SAP BW.  Both databases are MSSQL.  I've followed the steps in the document, "Transferring Data with DB Connect".  The table in the source system has all CAPS for the table and the fields. I can see the data in the BW system via screen "DB Connect: Display of data from the database system".  However, when I create an info package and try to load the data, the job seems to hang.  It is stuck in YELLOW status with "0 from 0 records".  Does anyone have a clue?
    Thank you,
    Tony

    dear Tony,
    check if followed already all 'restictions' in oss 512739-BW external DB Connect for MS SQLServer
    Datasource not showing up in RSA3
    To avoid problems loading data, proceed as follows:
    1. Create a special login for the extraction.
    You should add this login to the db_ddladmin database role in the corresponding database. This generates a similar DB user at database level.
    The user you use must have the 'CREATE VIEW' authorization at least. This is contained in the role mentioned above.
    2. For the extraction, you should only use DB views that were created under this DB user. (refer also to type conversion, naming convention and so on)
    3. Assign the necessary authorizations (SELECT at least) to the selected user in the source tables, or the columns of these tables.
    4. Use the specially created login in the logon information when you set up the DB source system in BW.

  • Export data using SUBMIT

    I want to export a field from program1 into selct-options of another program....i recieved some reply  for this but they all  have use of export and import statement. but I have to do this only by SUBMIT statement.please suggest me for this with vey clear concepts....as i have gone through help examples.(ONLY SUBMIT STATEMENT)

    Hi,
    This example will resolves ur problem...
    This program imports the other program fields into program 1(main)
    *" Tables declarations.................................................
    TABLES:
      spfli.
    *" Type declarations...................................................
    Type declaration of the structure to hold data from table SPFLI     *
    TYPES:
      BEGIN OF type_s_spfli,
        carrid LIKE spfli-carrid,          " Carrier Id
        connid LIKE spfli-connid,          " Connection Number
        cityfrom LIKE spfli-cityfrom,      " City from
        cityto LIKE spfli-cityto,          " City to
        airpfrom LIKE spfli-airpfrom,      " Airport from
        airpto LIKE spfli-airpto,          " Airport to
        countryfr LIKE spfli-countryfr,    " Country from
        countryto LIKE spfli-countryto,    " Country to
      END OF type_s_spfli.
    Data Declaration...................................................*
         Field String To Hold Flight Details Record from SPFLI          *
    DATA
      fs_spfli TYPE type_s_spfli.
    Data Declaration...................................................*
         Internal Table To Hold Flight Details Records from SPFLI       *
    DATA
      t_spfli LIKE STANDARD TABLE OF fs_spfli.
    TYPES:
      BEGIN OF types_s_itab,
        carrid LIKE sflight-carrid,        " Carrier id
        connid LIKE sflight-connid,        " Connection number
        fldate LIKE sflight-fldate,        " Flight date
      END OF types_s_itab.
    Data Declaration...................................................*
         Field String To Hold Flight Details Record from SFLIGHT        *
    DATA
      fs_itab TYPE types_s_itab.
    Data Declaration...................................................*
         Internal Table To Hold Flight Details Records from SFLIGHT     *
    DATA
      t_itab LIKE STANDARD TABLE OF fs_itab.
    *" Type declarations...................................................
    Type declaration of the structure to hold data from table SBOOK     *
    TYPES:
    BEGIN OF type_s_sbook,
       carrid LIKE sbook-carrid,           " Carrier Id
       connid LIKE sbook-connid,           " Connection Number
       fldate LIKE sbook-fldate,           " Flight date
       bookid LIKE sbook-bookid,           " Booking number
       loccuram LIKE sbook-loccuram,       " Local currency
       loccurkey LIKE sbook-loccurkey,
       order_date LIKE sbook-order_date,   " Booking date
    END OF type_s_sbook.
    Data Declaration...................................................*
         Field String To Hold Flight Details Record from BOOK           *
    DATA
      fs_sbook TYPE type_s_sbook.
    Data Declaration...................................................*
         Internal Table To Hold Flight Details Records from SBOOK       *
    DATA
      t_sbook LIKE STANDARD TABLE OF fs_sbook.
    DATA
      w_checkbox.                          " Checkbox
    SELECT-OPTIONS:
      s_carr FOR spfli-carrid.             " Carrier id range
                          START-OF-SELECTION EVENT                      *
    START-OF-SELECTION.
      PERFORM selectq.
                          END-OF-SELECTION EVENT                        *
    END-OF-SELECTION.
      SET PF-STATUS 'YH1315_030502'.
      PERFORM display_basic.
    AT USER-COMMAND.
      PERFORM ucomm.
    *&    Form  selectq
        This subroutine retreive data from SPFLI table
      There are no interface parameters to be passed to this subroutine.
    FORM selectq .
      SELECT carrid                        " Carrier id
             connid                        " Connection number
             cityfrom                      " City from
             cityto                        " City to
             airpfrom                      " Airport from
             airpto                        " Airport to
             countryfr                     " Country from
             countryto                     " Country to
             INTO CORRESPONDING FIELDS OF TABLE t_spfli
             FROM spfli
             WHERE carrid IN s_carr.
    ENDFORM.                               " Selectq
    *&      Form  display_basic
        This subroutine displays data from internal table
      There are no interface parameters to be passed to this subroutine.
    FORM display_basic .
      LOOP AT t_spfli INTO fs_spfli.
        WRITE:
          / w_checkbox AS CHECKBOX,
            fs_spfli-carrid,
            fs_spfli-connid,
            fs_spfli-cityfrom,
            fs_spfli-cityto,
            fs_spfli-airpfrom,
            fs_spfli-airpto,
            fs_spfli-countryfr,
            fs_spfli-countryto.
      ENDLOOP.                             " LOOP AT T-SPFLI INTO...
    ENDFORM.                               " Display_basic
    *&      Form  UCOMM
      This subroutine for at user-command event
      There are no interface parameters to be passed to this subroutine.
    FORM ucomm .
      RANGES :
        r_carr FOR spfli-carrid,
        r_conn FOR spfli-connid,
        r_carrid FOR sflight-carrid,
        r_connid FOR sflight-connid,
        r_fldate FOR sflight-fldate.
      CASE sy-ucomm.
        WHEN 'DISPLAY'.
          DATA:
            lw_lines TYPE i,
            lw_lineno TYPE i VALUE 3.
          DESCRIBE TABLE t_spfli LINES lw_lines.
          DO lw_lines TIMES.
            READ LINE lw_lineno FIELD
                 VALUE w_checkbox   INTO w_checkbox
                       fs_spfli-carrid INTO  fs_spfli-carrid
                       fs_spfli-connid INTO  fs_spfli-connid.
            IF sy-subrc = 0.
              IF w_checkbox = 'X'.
                r_carr-sign = 'I'.
                r_carr-option = 'EQ'.
                r_carr-low = fs_spfli-carrid.
                APPEND r_carr.
                r_conn-sign = 'I'.
                r_conn-option = 'EQ'.
                r_conn-low = fs_spfli-connid.
                APPEND r_conn.
              ENDIF.                       " IF W_CHECKBOX = 'X'
            ENDIF.                         " IF SY-SUBRC = 0
            ADD 1 TO lw_lineno.
          ENDDO.                           " DO LW_LINES TIMES
          SUBMIT yh1314_030502_call
            WITH s_carr IN r_carr
            WITH s_conn IN r_conn
             AND RETURN.
          IMPORT t_itab FROM MEMORY ID 'YH1315'.
          LOOP AT t_itab INTO fs_itab.
            r_carrid-sign = 'I'.
            r_carrid-option = 'EQ'.
            r_carrid-low = fs_itab-carrid.
            APPEND r_carrid.
            r_connid-sign = 'I'.
            r_connid-option = 'EQ'.
            r_connid-low = fs_itab-connid.
            APPEND r_connid.
            r_fldate-sign = 'I'.
            r_fldate-option = 'EQ'.
            r_fldate-low = fs_itab-fldate.
            APPEND r_fldate.
          ENDLOOP.                         " LOOP AT T_ITAB INTO.....
          SELECT carrid                    " Carriee Id
                 connid                    " Connection number
                 fldate                    " Flight date
                 bookid                    " Booking number
                 loccuram                  " Local Currency
                 order_date                " Booking date
             INTO CORRESPONDING FIELDS OF TABLE t_sbook
             FROM sbook
             WHERE carrid IN r_carrid AND
                   connid IN r_connid AND
                   fldate IN r_fldate.
          IF SY-SUBRC NE 0.
            MESSAGE 'NO RECORDS FOUND'(006) TYPE 'S'.
          ENDIF.                           " IF SY-SUBRC NE 0
          LOOP AT t_sbook INTO fs_sbook.
            AT FIRST.
              WRITE: /5 'Carrier Id'(001),
                     20 'Conn Id'(002),
                     35 'Flight date'(003),
                     50 'Book Id'(004),
                     65 'Local Currency'(005).
            ENDAT.                         " AT FIRST
            WRITE: /5 fs_sbook-carrid,
                   20 fs_sbook-connid,
                   35 fs_sbook-fldate,
                   50 fs_sbook-bookid,
                   65 fs_sbook-loccuram CURRENCY fs_sbook-loccurkey.
          ENDLOOP.                         " LOOP AT T_SBOOK INTO.....
      ENDCASE.                             " CASE SY-UCOMM
    ENDFORM.                               " UCOMM
    Edited by: Kiran Saka on Feb 10, 2009 11:42 AM

  • Error come while extracting data using DB Connect

    Hi Exports!!!
    We are not getting data in data target while fetching data from DB Conenct Exptraction method
    We have created Source systme for DB Conenct . We are able to see data if we right click and select /EDIT database and display database content.
    We can see error in Monitor::
    [[No IDocs created; Database system
    Diagnosis
    No IDocs were created. The IDocs are created in BW with database systems as source systems. Since no IDocs were created, a short dump in BW probably occurred.
    System response
    Procedure
    Check the short dumps in BW.]]
    Please suggest !!!

    Hi,
    so your connection is fine, in RSDBC you can see data, right? You generated your DataSource and then assigned source system DS to ISource.
    What is your External DB system? If it is MSSQL then do NOT use the user sa for the connection. Create a "BWUser" in your MSSQL with all adequate rights.
    Then create a view with this user.
    CREATE VIEW BWUser.MYVIEW AS SELECT * FROM dbo.TABLE.
    Generate you DSource on BWUser.MYVIEW instead of on a dbo.* object.
    This should work it out.
    Also remind that you fields names have to cope with the DCOnnect restrictions (upper case, no / only alphanumeric chars)
    Note that there is no IDOC transfer between both systems thus the error msg is just because the source didn't not bring any data to BW; the msg is misleading you...
    let me know
    hope this helps...
    Olivier.
    Message was edited by:
            Olivier Cora

  • How to Export data using DATA Cluster?

    Hi,
    I am trying to export around 10000 records using Memory ID concept  in the same session to another spot. 
    IF sy-subrc = 0.
    Exporting the number of total records
      EXPORT g_tot_line FROM g_tot_line TO MEMORY ID c_tline.
    ENDIF.
    My issue : - It throws dump saying
    ''When the SAP paging overflow occurred, the ABAP/4 memory contained
    entries for 8 of different IDs.''
    insufficent space and i need to use the clustres.
    I am not sure how to use Clusters in this scenario....
    Any suggestions will be appreciated..
    Regards,
    Charan

    What is so complicated about Data Clusters ?
    Did you do an F1 or read the online documentation: [http://help.sap.com/abapdocu_70/en/ABAPEXPORT_DATA_CLUSTER_MEDIUM.htm], [http://help.sap.com/abapdocu_70/en/ABAPIMPORT_MEDIUM.htm]
    If you've any specific question, shoot !!!
    BR,
    Suhas

  • Export data using stored procedure to excel

    How to export and save data from SQL Server to MS Excel using stored procedure.
    Thanks in advance
    Abhinav

    You can use multiple options
    1. distributed query like OPENROWSET/OPENDATASOURCE
    http://www.excel-sql-server.com/excel-import-to-sql-server-using-distributed-queries.htm
    2. Using linked server /OPENQUERY
    http://sqlwithmanoj.com/2010/11/12/query-excel-file-source-through-linked-server/
    also see
    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Exporting data using a script

    I quite often use the export facility in SQLD to extract data from a subset of tables in my schema and generate a script of insert commands to rebuild those tables elsewhere (on MySQL database actually).
    Is there any of automating the selection process, or specifying the required output in a command line? I define the same criteria every time, which takes longer than the export process itself. :)
    Thanks for any tips you can suggest.
    CS

    Not possible (yet). You can vote on and add your comments to the existing requests for automation/command line at the SQL Developer Exchange, to add weight for possible future implementation.
    At least until then, can't you schedule a normal 'SPOOL', and automate an import with MySQL?
    Have fun,
    K.

  • How to export data using application adapter for EBS?

    my scenario is : there're some external apps need to communicate with EBS,
    and the intermedia layer supposed to be implemented by SOA suite/Fusion adapters.
    my confusion is:
    in oracle integration repository, most of APIs are CUD (create, update, delete) without R (read). but many of our usecase was querying data from EBS.
    my question is : although, considering performance and unpridictable query object and granularity,it's not a good idea using app adatper to querying data from EBS via app api, but if I using db adapter to query data directly, it seems not easy as expected because it need to know the detail table structure and relationship and to build sql by hand.
    so, is there other proper way to get outbound data integration using fusion middleware? additional, I'm not clear about the ODI functionality , is it possible and easy to use ODI perform this task, eg, is ODI has enough API to interact with fusion adapter?

    In the Adapter Wizard look under "Other Interfaces/Custom Objects/PLSQL APIs". There are many many "Get" APIs here. None of these are identified or explained in the Integration Repository but the Trading Community Architecture - Technical Implementation Guide does give a little bit of information about what they do.

  • I want to publish my data using datasocket connection on the net and I want to use Front panel binding. Can I?

    I want to publish my data on the net.
    I want to use front panel binding and I do not want
    to write the code. Can I do that. What should I modify
    in my datasocket server manager. The other question is, When I open my VI, I want to open automatically my DataSocket Server. My english is bad. When I open the LabView I also want to open my DataSocket server. How can I do this?

    To use datasockets to publish data to be accessed via the web, see the following document.
    http://digital.ni.com/public.nsf/websearch/F58A6C2DAAADECB68625672400636145?OpenDocument
    This document explains how you can create an interactive Web page with which users can view data from a remote acquisition application without the common problems of a client-server application. You use the Measurement Studio DataSocket control and Microsoft Visual Basic to create a software component that you can insert in a Web page. You then use that Web page to read, write, or share data with other applications across the Internet.
    If you want to publish data but do not want to write any code, you should consider the web publishing tool available in Labview 6.1. This tool allows
    you to create a webpage to be published from the the LabVIEW webserver on your machine. See the following link for more information on ways to easily publish to the web from LabVIEW.
    http://zone.ni.com/devzone/conceptd.nsf/webmain/E4E311FA046EE24586256B1F0074F39D?opendocument
    As for starting the datasocket server when you run your VI, you can use the 'System Exec' VI to run the application. The exe to start the server is located in the following directory:
    C:\Program Files\National Instruments\DataSocket\cwdss.exe
    I hope this is helpful.

  • Unable to see query when creating universe using new connection wizard

    Hi
    I created a query and released for OLEDB for OLAP. when i tried to create a universe after giving all the parameters like username,pwd,server,system no, id..... and check into OLAP cubes i can see the query which i developed on the multiprovider?. Can anyone help me out?
    -Thanks

    Hi,
       If you are not able to see the query, open that query in the query designer. Go to query properties-> Advanced tab and check the option "Allow external access to this query". That should solve your problem.
    Regards,
    Sanjay

  • How to export data from Elimination Value dimension member by HAL HFM adapter?

    Good day!<BR><BR>Is it possible to export HFM 4.0.5 data with HAL from the <Elimination> Value dimension member?<BR><BR>In 3.* versions it wasn't and there is Known Issue in the "HFM 3.* Adapter Read Me" file: "The Hyperion Financial Management Adapter exports data using the <entity currency> Value dimension member. The documentation erroneously states that there is a port available for the Value dimension"<BR>But there is not such point in the same file for HFM 4.0.5 AND there is Value port in the HFM 4.0.5. Adapter.<BR><BR>Thanks!<BR><BR>Regards,<BR>Georgy<BR>

    In the first approch, try to change the exporting parameter type REF TO DATA.
    Try like:
    CLASS lcl_test DEFINITION.
      PUBLIC SECTION.
        DATA: t_mara TYPE HASHED TABLE OF mara WITH UNIQUE KEY matnr.
        METHODS:
          constructor,
          get
            IMPORTING
              if_matnr TYPE matnr
            EXPORTING
              ea_mara  TYPE REF TO data.
    ENDCLASS.                    "lcl_test DEFINITION
    START-OF-SELECTION.
      DATA: lo_test TYPE REF TO lcl_test,
            lr_data TYPE REF TO data.
      FIELD-SYMBOLS: <fa_mara> TYPE ANY,
                     <f_field> TYPE ANY.
      CREATE OBJECT lo_test.
      lo_test->get(
        EXPORTING
          if_matnr = '000000000077000000'   " << Replace Your Material
        IMPORTING
          ea_mara  = lr_data ).
      ASSIGN lr_data->* TO <fa_mara>.
      ASSIGN COMPONENT 'ERSDA' OF STRUCTURE <fa_mara> TO <f_field>.
      <f_field> = space.
      WRITE: 'Done'.
    CLASS lcl_test IMPLEMENTATION.
      METHOD constructor.
        SELECT * INTO TABLE t_mara
               FROM mara
               UP TO 10 ROWS.
      ENDMETHOD.                    "constructor
      METHOD get.
        FIELD-SYMBOLS: <lfs_mara> LIKE LINE OF me->t_mara.
        READ TABLE me->t_mara ASSIGNING <lfs_mara> WITH KEY matnr = if_matnr.
        GET REFERENCE OF <lfs_mara> INTO ea_mara.
      ENDMETHOD.                    "get
    ENDCLASS.                    "lcl_test IMPLEMENTATION
    Regards,
    Naimesh Patel

Maybe you are looking for