Get Source database type in variable

Hi All,
I want to get source database type value in variable. Means if my source db is ORACLE then I should get 'ORACLE' value and if it is SQL SERVER then 'sql servere' something like this. Let me explain you in more details. My target databse is fixed and that is ORACLE. But my source can be different. It may be ORACLE, SQL SERVER or DB2. So I want to get source database type in my variable and based on that I want to go to different path in master package..
Thanks
-Pallav

Hello,
My Bad You had mentioned it earlier i should have read your initial post carefully !
But TYPE ANY doesn't define an internal table, generic type for a table should be ANY TABLE.
Anyway check this code snippet:
DATA: go_tab_descr TYPE REF TO cl_abap_tabledescr,
      go_struc_descr TYPE REF TO cl_abap_structdescr,
      wa_comp TYPE abap_compdescr.
FIELD-SYMBOLS:
<wa> TYPE ANY, "FS to store Work Area value
<val> TYPE ANY.  "FS to store field value
go_tab_descr ?= cl_abap_tabledescr=>describe_by_data( <itab> ).
CHECK sy-subrc = 0.
"Get the structure of your internal table
go_struc_descr ?= go_tab_descr->get_table_line_type( ).
LOOP AT <itab> ASSIGNING <wa>.
  LOOP AT go_struc_descr->components INTO wa_comp.
*   To access the components of the structure dynamically
    ASSIGN COMPONENT wa_comp-name OF STRUCTURE <wa> TO <val>.
  ENDLOOP.
ENDLOOP.
You can check this thread Re: Create Dynamic Structure at Runtime via ALV-Methods! for further details.
Hope this is useful.
BR,
Suhas
Edited by: Suhas Saha on Nov 30, 2010 4:49 PM

Similar Messages

  • How to get the Database type from weblogic Db connection

    I want to use database version control in my application . that means different database type use different Sql Statement. Such as in weblogic7.0 if I create SqlServer JDBC pool then I will use some special Sqlserver sql Statement . such as some join statement. If I create Oralce JDBC pool then I have to use different Sql statement . because these two database support different Sql statement.
    What my question is how to get the database type from the connection.

    For a normal jdbc driver you can use
    Connection.getMetaData()
    To get the meta data, in particular the getDatabase...() methods.
    That might or might not work.
    However, at the very least in the server you have access to the weblogic properties so you can parse the pool property to figure it out.

  • What is the view to get the database type using oem grid

    Currently i have oem grid 11g , and i want to query a view where i can get the database type like (standalone, cluster database type).
    In OEM we have search option as database/cluster/clusterdatabase.....so for this type i want to check in database level in repository.Please provide me the view with in the grid repository.

    Some handy views can be found here:
    http://docs.oracle.com/cd/E11857_01/em.111/e12135/views.htm#BACCFCAB
    SQL> select target_type, count(*) from MGMT$TARGET group by target_type;
    TARGET_TYPE                      COUNT(*)
    osm_cluster                             3
    oracle_listener                        36
    oracle_exa_cisco_switch                 2
    oracle_exa_kvm                          2
    oracle_home                            68
    has                                    12
    rac_database                            3
    weblogic_j2eeserver                     2
    oracle_apache                           1
    oracle_ias_farm                         1
    oracle_exa_pdu                          2
    oracle_oms                              1
    cluster                                 3
    oracle_exadata_grid                     3
    oracle_exa_ilom                        12
    oracle_exadata_dbsys                    3
    oracle_oms_console                      1
    j2ee_application                        3
    metadata_repository                     2
    oracle_apm                              1
    oracle_exadata                         21
    oracle_ibswitch                         5
    oracle_dbmachine                        3
    oracle_ibnetwork                        2
    oracle_beacon                           1
    oracle_oms_pbs                          1
    oracle_em_service                       2
    oracle_dbsys                           18
    oracle_emd                             25
    osm_instance                           12
    oracle_database                        27
    host                                   25
    weblogic_domain                         1
    oracle_emrep                            1
    34 rows selected.Good luck.

  • How to get the Database Type quan in my internal table?

    Hi, I have the following problem, I have a Database Table with a column foo (QUAN with length 15 and 3 dec). Now I want to read this field into a Internal Table and the corrospoding field is:
    foo(19) TYPE C,
    But this is not working I'm getting the dump:
    DBIF_RSQL_INVALID_RSQL
    CX_SY_OPEN_SQL_DB
    What is the correct abap type in my structure to put this QUAN in my internal table?

    Hi Michael,
         when you know your data base field name then u can define your variable f00 of your db field type like
         foo type <dbtabname>-<fieldname)  -----ex -- j_1iexcdtl-menge
         or define foo as packed no
         data : foo(19) type p decimals 3.
    Regards

  • Shared Services Configuration : Database type

    Hi all,
    i installed essbase and couldn't connect to sql to load the data into essbase( though it works fine with excel and text file)
    after numerous pondering on the forums I could not find a solution to my probelm
    why i could not connect to sql from essbase ?
    I decided to retry the installation . I have come to a point within installation where i need to select
    Shared Services Configuration : Database type
    unfortunately oracle is not available here though I have installed oracle 11g on my machine and setup users to be used in the epm system ( version 11.1.2)
    the only type available is the oracle jdbc driver .
    Any suggestion as to how i can get oracle database type here ?
    OR am i missing something prior to installation.

    To connect to load data or metadata follow steps
    1. Create a system DSN in the machine which is hosting Essbase Server.
    2. Select Create Rule file.
    3. Go To File and select Open SQL.
    4. Select Application and Application
    5. Select DSN and provide user credentials.
    Hope this helps.
    Database Type - Is the database Type which you want to use i.e. IBM DB2 / MS SQL Server / Oracle...
    Hope this helps.
    Regards,
    Manmohan Sharma

  • Getting error while creating the variable of Schema Element type

    Hi everybody,
    For creating a variable of schema element type I am doing the following steps...
    Select 'Variables' after right clicking on bpel process. IN this window, go to 'Create VAriable' then select 'Element' type. Now in Type Choose, I expanded the my imported schema files. And selected a element type, then click ok to create this variable... I am getting the message...
    IN ORDER TO SAVE IMPORTED WSDL/SCHEMA FILES, YOU MUST HAVE A PARTNER LINK LOCATED UNDER THE CURRENT PROJECT DIRECTORY.
    What is mean by that.
    I have imported the schema files in project. AFter that I have imported them into the WSDL also. Now why I am getting error while creating the variable. However I can create variable directly in .BPEL file then everything is fine. And it is working also. But what is mean with the above error? Why I am not able to create variable through GUI?
    Thanks.

    Hi,
    I have this same problem this morning, and I was going crazy, until I found this webpage on the internet:
    [http://technology.amis.nl/blog/1803/problem-importing-xml-schema-in-bpel-process|http://technology.amis.nl/blog/1803/problem-importing-xml-schema-in-bpel-process]
    The idea is that the jdeveloper is not very good working with directories with spaces on the directory name. If you move all your work to a directory without spaces, it will work smoothly. At least, it had worked for me.
    Regards,
    Nacho

  • How to get data type of variable in program..

    Hi ABAP Guru.
    I need to know how to get data type of variable or any structure field.. because I got short dump when use command REPLACE ALL OCCURANCE ... with variable/structure field that has data type I or P, I think it should be used with data type CHAR only, So I need to check the data type first.
    Please give me your advice
    Thank you all.
    Nattapash C.

    data : v_value type i,
             v_char(10) type c.
    v_value = 10.
    move v_value to v_char.
    REPLACE ALL OCCURRENCES of '#' from v_char....
    Best regards,
    Prashant

  • How to get the data type of a variable

    Hi
    I'm new to java and I'd like to put some variables with different data type into the HashMap. But when I'm going to get the value
    of the variable I want to know its data type (int,String,long,float etc.) before I do some processing.
    here's my sample code:
    //start...
    Map m = new HashMap();
    String s1 = "String1";
    String s2 = "String2";
    int i1 = 5;
    int i2 = 10;
    m.put(1,s1);
    m.put(2,i1);
    m.put(3,12);
    m.put(4,s2);
    //end...
    when I'm going to retrieve the variable, I'd like to assign it to another variable with the same data type. but the problem is, before
    I assign it I must know its data type so that I could not have an error.
    thanks in advance

    I don't think you will be able to put primitives (ints, floats, etc) in, without wrapping 'em first (java.lang.Integer, java.lang.Float...).
    You can get the type with
    Object biggles;
    // Get biggles
    if( biggles instanceof String )
       System.out.println( "Biggles is a string, yeah biggles" );or with refection
    Class bigglesClass = biggles.getClass();
    System.out.println( "Biggles is of type: " + bigglesClass.getName() );

  • Can Audit Vault be used for getting detailed read type information from the siebel database?

    Can Audit Vault be used for getting detailed read type information from the siebel database?

    Kramer wrote:
    saurabh wrote:
    check below cmd to see where archive are generated.
    SQL> archive log list
    And also check the following
    SQL> select flashback_on from v$database;
    Hi
    Here is the out put
    SQL>  select flashback_on from v$database;
    FLASHBACK_ON
    NO
    SQL>  archive log list
    Database log mode              Archive Mode
    Automatic archival             Enabled
    Archive destination            USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence     11
    Next log sequence to archive   12
    Current log sequence           12
    The flashback is not enabled. But archive log list shows archive destination is specified to use_db_recovery_file_dest.  And I checked the log_archive_dest_10 still empty
    Flashback off or on has nothing to do with it. 

  • Why am I getting  'Unable to signon to the Source Database.' just prior to 'Running the DBTSFIX Report' step.

    We are upgrading from Tools 8.53 to Tools 8.54 in HCM. I am receiving logging event 'Unable to signon to the Source Database.' just prior to 'Running the DBTSFIX Report' step. I found case 1545297.1 where it said to choose initial move as opposed to move

    For Tools only upgrades, while creating the jobs, you should choose 'Initial' and not 'Move to production'
    An excerpt from http://docs.oracle.com/cd/E56736_01/psft/acrobat/Getting_Started_on_Your_PeopleTools_Upgrade_08_2014.pdf is given below
    MTP indicates that this step runs only in Move to Production upgrade passes. The step is not applicable to the initial pass. This is not applicable for PeopleSoft PeopleTools-only upgrades.

  • Exchange 2010 - 2013 Public Folder Migration target database gets much bigger than source database

    Hi,
    i have a question about the pf migration from Exchange 2010 to Exchange 2013. The source database ist about 370 GB. The migration process is still running. At the moment the target database is already 491GB big. Is that a normal behaviour during the migration
    process.
    Thanks

    Hi,
    After you have finished the public folder migration process, you can compare the item count of public folders to make sure all public folders have been moved to Exchange 2013.
    You can check this by comparing the snapshots before and after the migration. You can refer to the "How do I know this worked?" section in the following article.
    Migrate Public Folders to Exchange 2013 From Previous Versions
    http://technet.microsoft.com/en-us/library/jj150486(v=exchg.150).aspx
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • How I can transfer data from the database into a variable (or array)?

    I made my application according to the example (http://corlan.org/2009/06/12/working-in-flash-builder-4-with-flex-and-php/). Everything works fine. I changed one function to query the database - add the two parameters and get the value of the table in String format. A test operation shows that all is ok. If I want to display this value in the text area, I simply drag and drop service to this element in the design mode
    (<s:TextArea x="153" y="435" id="nameText" text="{getDataMeanResult.lastResult[0].name}"  width="296" height="89"  />).
    It also works fine, just a warning and encouraged to use ArrayCollection.getItemAt().
    Now I want to send the value to a variable or array, but in both cases I get an error: TypeError: Error #1010: A term is undefined and has no properties..
    How can I pass a value from the database into a variable? Thank you.
    public var nameTemp:String;
    getDataMeanResult.token = authors.getDataMean(arrayOfNumber[0], dir_id);
    nameTemp = getDataMeanResult.lastResult[0].name;
    public var nameArray:Array = new Array();
    for (var i:uint=o; i<3; i++){
    getDataMeanResult.token = authors.getDataMean(arrayOfNumber[i], dir_id);
    nameArray[i] = getDataMeanResult.lastResult[0].name;
    And how i can use syntax highlighting in this forum?

    Astraport2012 wrote:
    I have to go back to the discussion. The above example works fine when i want to get a single value of the database. But i need to pass an array and get an array, because i want to get at once all the values for all pictures tooltips. I rewrote the proposed Matt PHP-script and it works. However, i can not display the resulting array.
    yep, it won't work for Arrays, you'll have to do something slightly more intelligent for them.
    easiest way would be to get your PHP to generate XML, then read that into something like an ArrayList on your HTTPService result event (depends what you're doing with it).
    for example, you could have the PHP generate XML such as:
    <pictures>
         <location>test1.png</location>
         <location>test2.png</location>
         <location>test3.png</location>
         <location>test4.png</location>
         <location>test5.png</location>
         <location>test6.png</location>
    </pictures>
    then you'll read that in as the ResultEvent, and perform something like this on it
    private var tempAC:ArrayList = new ArrayList
    protected function getStuff_resultHandler(event:ResultEvent):void
        for each(var item:Object in event.result.pictures)
           var temp:String = (item.@location).toString();
           tempAC.addItem(temp);
    in my example on cookies
    http://www.mattlefevre.com/viewExample.php?tut=flash4PHP&proj=Using%20Cookies
    you'll see an example of how to format an XML structure containing multiple values:
    if($_COOKIE["firstName"])
            print "<stored>true</stored>";
            print "<userInfo>
                    <firstName>".$_COOKIE["firstName"]."</firstName>
                    <lastName>".$_COOKIE["lastName"]."</lastName>
                    <userAge>".$_COOKIE["userAge"]."</userAge>
                    <gender>".$_COOKIE["gender"]."</gender>
                   </userInfo>";
        else
            print "<stored>false</stored>";
    which i handle like so
    if(event.result.stored == true)
                        entryPanel.title = "Welcome back " + event.result.userInfo.firstName + " " + event.result.userInfo.lastName;
                        firstName.text = event.result.userInfo.firstName;
                        lastName.text = event.result.userInfo.lastName;
                        userAge.value = event.result.userInfo.userAge;
                        userGender.selectedIndex = event.result.userInfo.gender;
    depends on what type of Array you're after
    from the sounds of it (with the mention of picture tooltips) you're trying to create a gallery with an image, and a tooltip.
    so i'd probably adopt something like
    <picture>
         <location>example1.png</location>
         <tooltip>tooltip for picture #1</tooltip>
    </picture>
    <picture>
         <location>example2.png</location>
         <tooltip>tooltip for picture #2</tooltip>
    </picture>
    <picture>
         <location>example3.png</location>
         <tooltip>tooltip for picture #3</tooltip>
    </picture>
    etc...
    or
    <picture location="example1.png" tooltip="tooltip for picture #1"/>
    <picture location="example2.png" tooltip="tooltip for picture #2"/>
    <picture location="example3.png" tooltip="tooltip for picture #3"/>
    etc...

  • The 'Third Party Connections' drop down box on the 'Source Database' step in the Migration Wizard is empty.

    Here are the environmental details:  
    SQLDeveloper 32-bit Version 3.2.20.09 (Build MAIN-09.87)
    Oracle Database:  12C single instance (no RAC)
    Oracle client:  12C 32 bit
    Windows 64 bit desktop
    I am attempting to migrate an MS Access application to Oracle.  I pick the ‘Migrate’ selection from the ‘Tools’ Menu SQL Developer.  This puts me into the Migration Wizard.  When I get to the ‘Source Database’ step of the migration wizard, the ‘Choose the Third Party database from which you are migrating’  drop-down box is not being populated with the current available connections. It is empty.  If I type a valid connection name into the box, SQL Developer takes it on this screen but does not keep it for the next screen/step.  It has no persistence.  I even tried to make sure that each connection was open/connected before beginning the migration process.
    Due to the fact that I am attempting to migrate an MSAccess application, I am mixing 32-bit and 64 bit software.  This may be the issue as to why the drop down is losing addressability.  I have not applied any patches to this version of SQL Developer.

    Hi,
    If you need easy way to migrate Microsoft Access to Oracle probably it is more reasonable to review some tools specially designed to this purpose. For example:
    Access to Oracle converter by Intelligent Converters
    Access to Oracle converter by SpectralCore
    Access to Oracle converter by Interface Computers
    Hope, this will help.
    Sincerely,
    Vlad

  • Stroring data taken from database as a variable

    Hi there I;m having a problem and I was wondering if anyone can help me?
    I am trying to extract data from a MySQL database and store the variables so I can use them in another bean...
    so far I am getting a SQL exception error but I dont know what Im doing wrong.......
    My bean code is :
    public int getAge(int age) throws SQLException, Exception{
    if(con != null){
    try{
    String userName = null;
    ResultSet rs;
    Statement stmt = con.createStatement();
    rs = stmt.executeQuery("SELECT (age) FROM gymuser WHERE Username='" userName "'");
    age = rs.getInt("age");
    return age;
    } catch(SQLException sqle){
    error = "SQLException: could not search gymuser";
    throw new SQLException(error);
    catch(Exception e){
    error = "An exception occured while searching gymuser";
    throw new Exception(error);
    } else {
    error = "Exception: connection to database was lost";
    throw new Exception(error);
    The JSP that calls this is :
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@page import="java.sql.*, java.io.*, java.util.*;"%>
    <jsp:useBean id="details" scope="session" class="fitness.DBQuery" />
    <jsp:useBean id="conn" class="fitness.DBConnect" />
    <jsp:useBean id="currentuser" scope="session" class="fitness.currentuserBean" />
    --%>
    <%--
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    --%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>GetDetails</title>
    </head>
    <body>
    <h1>GetDetails</h1>
    <%
    int age = 0;
    String userName = currentuser.getName();
    conn.connect();
         details.setCon(conn.getCon());
         details.getAge(age);
    conn.disconnect();
    %>
    </body>
    </html>
    Any help you have to offer would be greatly appreciated as Im desperate!! :-)

    Thanks for your help, greatly appreciated....
    I havent ever had to use DTO's before as this is the first time in my project where I need t use databasa data as variables in other classes.....so I should have a classthat looks like this ??: /*
    * GymUser.java
    * Created on 26 April 2007, 13:02
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package fitness;
    import java.sql.*;
    import java.io.*;
    import java.util.*;
    import java.util.Date;
    import java.io.Serializable;
    * @author Hegstatic
    public class GymUser implements Serializable{
        /** Creates a new instance of gymUser */
         private String error;
         private String userName;
         private int age; // + getter + setter
        private double weight;
        private String gender;
        public int getAge(){
             return age;
        public void setAge(int i)
             age = i;
        public double getWeight()
            return weight;
        public void setWeight(double d)
            weight = d;
        public String getGender()
            return gender;
        public void setGender(String string)
            gender = string;
        Connection con;
        private String Frankie;
    public GymUser getGymUser()
                     if(con != null){
                     try{
                    ResultSet rs;
                    Statement stmt = con.createStatement();
                   rs = stmt.executeQuery("SELECT * FROM gymuser WHERE Username='" +Frankie+ "'");
                    List<GymUser> gymUsers = new ArrayList<GymUser>();
                    while (rs.next()) {
                        GymUser gymUser = new GymUser();
                        gymUser.setAge(rs.getInt("age"));
                        gymUser.setWeight(rs.getDouble("weight"));
                        gymUser.setGender(rs.getString("gender"));
                        gymUsers.add(gymUser);
        return gymUsers;
                     } catch(SQLException sqle){
                   error = "SQLException: could not search gymuser";
                    throw new Exception(error, sqle);
                   catch(Exception e){
                   error = "An exception occured while searching gymuser";
                   throw new Exception(error);
                    } else {
                   error = "Exception: connection to database was lost";
                   throw new Exception(error);
        }The IDE is telling me that the value I have for
    return gymUsers; is wrong...
    Was just wondering if I am going in the right direction and how would I call the variables age, weight, gender in a JSP page??
    Again Thank you !!
    Hegtic

  • How to get Source of DB Triggers

    Hey All,
    I want to get source code of Database Triggers from database.
    I have Oracle8i (8.1.7) database then Metadata.get_ddl is not availabe. I also tried ALL_SOURCE, USER_SOURCE but I didn't get Complete Source Code of Database Triggers.
    There any other way I can get Complete Source code of database triggers?
    Thanks

    How are you querying user_source?
    column text format a60;
    column name format a15;
    SELECT name, text
      FROM user_source
    WHERE type = 'TRIGGER'
    ORDER BY name, line;
    NAME            TEXT
    DEPT1           trigger dept1
    DEPT1           before insert on dept
    DEPT1           begin
    DEPT1             raise_application_error( num => -20107,
    DEPT1                                      msg => 'Trigger error' );
    DEPT1           end;
    ODBC_EMP_TST    TRIGGER odbc_emp_tst
    ODBC_EMP_TST    BEFORE INSERT ON emp
    ODBC_EMP_TST    FOR EACH ROW
    ODBC_EMP_TST    BEGIN
    ODBC_EMP_TST      INSERT INTO emp_log VALUES('X');
    ODBC_EMP_TST    END;Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com/askDDBC

Maybe you are looking for

  • When i login to a website, it loads then gives me a blank page ?

    I can view a page regularly, like everything is normal until i go to log in. I get a blank page as soon as the page loads, and this happens to many websites. Ive tried searching in safemode, editing my firewall settings, removing cookies, disabling p

  • Why isn't the opt-in=true working?

    I can never get this to work first time, maybe someone else could look at the code because I've been looking for an hour and can't see what's wrong with it. Fresh eyes please! <form action="/FormProcessv2.aspx?WebFormID=28752&OID={module_oid}&OTYPE={

  • Airplay doesn't recognize Apple TV

    I have the AirPlay icon (finally, after 8.02 upgrade!) in the Control Center on both my iPhone 6 and iPad mini w/RD, but neither one recognizes the Apple TV. I have done all the necessary software updates on everything, tried unplugging, counting to

  • What level suplemental logging requires to setup Streams at Schema level

    Hi, Working on setting-up streams from 10g to 11g db @ schema level. And the session is hanging with statement "ALTER DATABASE ADD SUPPLEMENTAL LOG DATA" while running following command - generated using DBMS_STREAMS_ADM.MAINTAIN_SCHEMAS. Begin dbms_

  • Sub-Mdules Combination

    Gurus,     I wanted to circulate my resume in the market as a SAP HR Consultant. And I am really confused, as I want to know what combination of sub-modules are advised to put in the resume for the resume to have good demand throughout the year. All