How to retrive data from SQL or any database.

Hi Experts,
                  I am integrating FTP, DATABASE and SAP R/3 system. 
1. FTP system stores xml files processed by customer requesting account info.
2. Database system ( SQL/Oracle)  consists of Details about Customer accounts.
3. Finally response ( Account info ) to be sent to SAP R/3 system (customer request and database response)
Scenario:  Customer request regarding account info is stored as xml in FTP server. XI has to pick the xml file and retrieve the relevant data from Database (SQL / Oracle) and store the whole data in SAP R/3 System.
Please let me know which BAPI I need to use for this scenario..and if you could explain the steps involved for this scenario that will really helps me.
Thanks and Regards,
Sunil

I dont think there will be a separate bapi for this scenario.
Use file adapter to pickup the file, call the JDBC adapter in synchronous mode (call a Stored Procedure) and then call an RFC or proxy to push the data in to R3.
Refer and File to Jdbc and File to RFC scenarios. You might need to use BPM if you below SP14 on XI 3.0 I believe..!!
VJ

Similar Messages

  • 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 retrive data from SAP Tabel

    Hi Friends,
       1)Can you please explain how to retrive data from SAP table(example AFRU).
       2) we had requriment based on the qunatity , Product name and date we need to display KPI's .KPI is based no products manfactured per day with some conditions
    Regards
    Srikanth

    Hi Udayan,
        I want to retrive SAP Table data from xMII.can you please explain elabarately how to call "RFC_READ_TABLE" from xMII.
    please do the needful
    Thanks
    Srikanth

  • How to retrive data from selected checkboxes with fieldnames

    hi experts,
    how to retrive data from selected checkboxes with fieldnames into another alv grid report.(here the fieldnames selected from  table names is dynamically).
    thankx in advance
    rani.k.

    Hi,
    Use user_command in the alv grid and then
    do the follwoing code
    FORM user_command1 USING lv_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    Declaration of local Variables
      DATA : lv_ref1 TYPE REF TO cl_gui_alv_grid.
      DATA lv_cnt TYPE i.                                    "+INS SUHESH 12.07.2008
    Check function code
      CASE lv_ucomm.
        WHEN 'ONLI'.
          CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
            IMPORTING
              e_grid = lv_ref1.
          CALL METHOD lv_ref1->check_changed_data.
    now loop ur final internal table where check = 'X'.
    now pass data to other internal table..Now the internal table will be having values that the user selcetd on the screen.
    Hope this helps.
    Regards,
    Nagaraj

  • How to retrive data  from  database views or projection views

    how to retrive data  from  database views or projection views

    Hi chintam,
    1. Very simple
    2. Just like normal select statement.
    3. Select * from VIEWNAME.
    4. (Instead of the tablename, we just have to give the viewname)
    regards,
    amit m.

  • How to retrive data from this inernal table

    hi,
    could u please explain clearly how to retrive the records  from this structure
    data: begin of itab.
    include structure sflite.
    data:end of itab.
    how to retrive data from this structure could u plz give me a code with example.

    Hi,
    TYPES: BEGIN OF struc1,
                    val1 TYPE c,
                    val2 TYPE c,
                 END OF struc1,
             BEGIN OF struc2,
                   val type struc1,
                   val3 TYPE c,
                   val4 TYPE c,
                END OF struc2.
    DATA: l_f_str1 type struc1,
          l_f_str2 type struc2.
    START-OF-SELECTION.
      l_f_str2-val-val2 = 'a'.
      write : / l_f_str2-val-val2.
    END-OF-SELECTION.

  • Importing data from SQL Server 2005 database

    Dear Friends
    Scenario:
    We have built an application for which the database is SQL Server 2005.
    Now, we have planned to switch over to Oracle 8i database.
    There is a field with data type as Varchar(Max) – which can hold data with a maximum length of 231 characters (SQL Server 2005)
    In Oracle 8i, the Varchar2 max size 4000 bytes or characters.
    We want to import the data from SQL Sever 2005 database into Oracle 8i database.In the process, the value for the particular field whose data type set as Varchar(Max) in SQL Server 2005 and contains more than 4000 characters gets automatically truncated while importing into oracle.
    We want the entire characters stored in the field to be imported into oracle database.
    Please suggest solutions.
    Thanks and regards
    Bharath Kumar V

    Use CLOB if the data is purely text data. BLOB otherwise.
    But the question is why you want to switch over to an Oracle version which is de-supported by Oracle?

  • How to retrive data from SAP Archive (from Cluster or Content Table)

    Hi,
    I am working on HR -ABAP where i have a scenario to retive employee photo and disaplay as output in smartforms.And these employee photo are stored in Cluster table SDOKCONT1 in SAP Archive Link (storage type - SAP System Database).
    Anybody can tell me the way how to retrive data ( employee Photo ) from this cluster and display its output in smartform dynamically.
    Regards,
    Sourabh Shrivastava

    Hello Sourabh,
    If I am not wrong, there are two parts two your query...
    a) Data or Content Retrieval
    b) Displaying Retrieved content
    Here is my feedback
    a) The Content can be Retrieved using the FM ARCHIV_GET_TABLE.
    Pass the Archive Object, SAP Object and the SAP Object ID and based on the Connection table entries (TOA*), the underlying Content Repository (T-code OAC0) is determined and a request for synchronous retrieval is made to the Content Server.
    b) Display of Retrieved content is normally done through dedicated viewers (Ex: Livelink Viewer) or front-end applications (Excel, Word) based on the Protocol (OAA3/OAA4) specified in the Content Reository Configuration. Hence, to my knowledge, you cannot display the content directly in the Smartform.
    With Regards
    Vijay Gajavalli

  • How to import data from SQL server to Oracle?

    Dear Sir/Madam,
    I want to move database data from SQL Server to Oracle, but don't how to do it, will you please help me do it?

    Oracle Migration Workbench is your best bet:
    http://www.oracle.com/technology/tech/migration/workbench/index.html
    Cheers, OTN

  • How to load data from UTL file to database

    Hi All,
    I am new in this technologies.
    I am facing below problem to load data from utl file to database .
    below is the script written by me :
    CREATE OR REPLACE PROCEDURE load_data AS
    v_line VARCHAR2(2000);
    v_file UTL_FILE.FILE_TYPE;
    v_dir VARCHAR2(250);
    v_filename VARCHAR2(50);
    v_1st_Comma NUMBER;
    v_2nd_Comma NUMBER;
    v_deptno NUMBER;
    v_dname VARCHAR2(14);
    v_loc VARCHAR2(13);
    BEGIN
    v_dir := ':f/rashi/dataload';
    v_filename := 'fake.txt';
    v_file := UTL_FILE.FOPEN(v_dir, v_filename, 'r');
    LOOP
    BEGIN
    UTL_FILE.GET_LINE(v_file, v_line);
    EXCEPTION
    WHEN no_data_found THEN
    exit;
    END;
    v_1st_Comma := INSTR(v_line, ',' ,1 , 1);
    v_2nd_Comma := INSTR(v_line, ',' ,1 , 2);
    v_deptno := SUBSTR(v_line, 1, v_1st_Comma-1);
    v_dname := SUBSTR(v_line, v_1st_Comma+1, v_2nd_Comma-v_1st_Comma-1);
    v_loc := SUBSTR(v_line, v_2nd_Comma+1);
    DBMS_OUTPUT.PUT_LINE(v_deptno || ' - ' || v_dname || ' - ' || v_loc);
    INSERT INTO don
    VALUES (v_deptno, UPPER(v_dname), UPPER(v_loc));
    END LOOP;
    UTL_FILE.FCLOSE(v_file);
    COMMIT;
    END;
    show error
    I am getting the below errors:
    LINE/COL ERROR
    3/8 PL/SQL: Item ignored
    3/8 PLS-00201: identifier 'UTL_FILE' must be declared
    15/1 PL/SQL: Statement ignored
    15/1 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    20/1 PL/SQL: Statement ignored
    20/19 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    36/1 PL/SQL: Statement ignored
    LINE/COL ERROR
    36/17 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    could anyone please advice me on above error.
    thanx.

    First of all, is file located on (or is accessible from) database server? If not - you can't load it neither with UTL_FILE nor with external table. You need to use client side tool like SQL*Loader or write your own client side load. If file is accessible from database server, then, as sb92075 noted, external table (assuming you are not on some ancient Oracle version) is the way to go.
    SY.

  • How save & retrive data from database using flex, coldfusion, sql server

    hi , i am very new in flex, i am trying to insert data in
    database using flex2, coldfusion, sql server. any one can help me
    please. or give me any example.

    Hi try to goto the following sites, you will get some
    direction to think
    http://weblogs.macromedia.com/pent/archives/2006/11/example_of_flex.cfm
    http://pdxphp.org/node/258
    Good Luck

  • How to retrive data from oracle dtaabase to JSP

    HI Please help me in the fallowing issue,
    I am writing 2 JSps with tomcat 5.5 while I am retiving data from database ,, I am unable to retive it.
    can any one help what is the best solution,
    Thanks IN Advance,,
    here is my code..
    <%@ page language="Java" import="java.sql.*"%>
    <%
    try
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@Spandhan:1521:orcl",
    "waveset" ,"waveset");
    Statement stmt = conn.createStatement ();
    ResultSet rset = stmt.executeQuery ("select * from "+request.getParameter('tableName'));
    while (rset.next ()){
         out.println(rset.getString (1));
    //out.println("4");
    BLOB b=rset.getBLOB ("XML");
    //out.println("5");
    out.println(b.getBytes(1,b.length()));
    //out.println("6");
    out.println("<BR/>");
    out.println("<BR/>");
    }catch(Exception e){
    out.println(e);
    %>
    My error is this ,,
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 3 in the jsp file: /test.jsp
    Generated servlet error:
    Invalid character constant
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 3 in the jsp file: /test.jsp
    Generated servlet error:
    Invalid character constant
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
    Apache Tomcat/5.5.20

    Thanks all. i did modification to the code, now i am getting onother error that
    javax.servlet.ServletException: Invalid column type: getBLOB not implemented for class oracle.jdbc.driver.T4CVarcharAccessor
    i want to retrive BLOB value from database ,,
    here is my modification code ,,
    and i am using jar OJDBC14.jar . the path is correct,I dont know whether this driver will support to retrive Blob value or not ?
    <%@ page language="Java" import="java.sql.*" %>
    <%
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@hostname:1521:orcl","waveset","waveset");
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery ("select * from USEROBJ");
    while (rset.next()){
    long l=1L;
    Blob b=rset.getBlob(1);
    int len=(int)b.length();
    String s=new String(b.getBytes(l,len));
    out.println(s);
    out.flush();
    %>
    My error is like that ...
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Invalid column type: getBLOB not implemented for class oracle.jdbc.driver.T4CVarcharAccessor
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    javax.servlet.ServletException: Invalid column type: getBLOB not implemented for class oracle.jdbc.driver.T4CVarcharAccessor
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:843)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:776)
         org.apache.jsp.test4_jsp._jspService(test4_jsp.java:74)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.sql.SQLException: Invalid column type: getBLOB not implemented for class oracle.jdbc.driver.T4CVarcharAccessor
         oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
         oracle.jdbc.driver.Accessor.unimpl(Accessor.java:358)
         oracle.jdbc.driver.Accessor.getBLOB(Accessor.java:1300)
         oracle.jdbc.driver.OracleResultSetImpl.getBLOB(OracleResultSetImpl.java:1275)
         oracle.jdbc.driver.OracleResultSetImpl.getBlob(OracleResultSetImpl.java:1461)
         org.apache.jsp.test4_jsp._jspService(test4_jsp.java:55)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
    Apache Tomcat/5.5.20
    Please help me, Thanks,
    ----------------------------------------------------

  • How to retrive data from MDM Tuple?

    Hi,
    How to retrive MDM Tuple data into a java Application? Here I have to fetch the data from MDM Tuple and populate it in a list. can anybody please help me in doing this.
    Thanks.

    Hi Sree,
    Any one of the below mentioned APIs can perform the record retrival from a Tuple.
    -   Record.getFieldValue(tupleFieldId)
    If the tuple record is part of the original table record that can be obtained using one of the Retrieve commands responsible for retrieving records.
    - TupleValue.getFieldValue(tupleFieldId)
    If the tuple record is part of another tuple record (nested tuple structure)
    Hope this helps.
    Also a good read related to this - http://help.sap.com/saphelp_nwmdm71/helpdata/en/49/03144f3fad3697e10000000a42189b/content.htm
    Regards,
    Vinay M.S

  • How to Retrive Data using Case or any other method

    Hi All
    i am new to Oracle, i have three tables. 1 )*Person* contains following data
    id,     Name,      DOB
    98,     sss,     01/01/2009
    99,     rrr,     01/01/2009
    100,     rws,     01/01/2009
    2) Reference Table Contains Following Data
    Person_ID,     Ref_type,     Reference
    98,     AAA,     jk98923
    98,     BBB,     io9898
    99,     AAA,     nb6666
    100,     BBB,     g10090
    now i need all pesons who got reference AAA only, i dont want to use any where clause. this because i have to incoporate this logic in Business Objects Report.
    i need output as follows
    Person_ID,     Name,      Reference
    98,     sss,     jk98923
    99,     rrr,     nb6666
    100,     rws,     NULL
    guys i know this is so simple for you, please come back to me on this. many thanks in advance
    Edited by: user11078264 on 17-Apr-2009 05:46

    How about something like this (note the WITH clause was used to generate sample data)?
    SQL > WITH person AS
      2  (
      3  SELECT 98  AS ID, 'sss' AS NAME, TO_DATE('01/01/2009','MM/DD/YYYY') AS DOB FROM DUAL UNION ALL
      4  SELECT 99  AS ID, 'rrr' AS NAME, TO_DATE('01/01/2009','MM/DD/YYYY') AS DOB FROM DUAL UNION ALL
      5  SELECT 100         AS ID, 'rws' AS NAME, TO_DATE('01/01/2009','MM/DD/YYYY') AS DOB FROM DUAL
      6  ),
      7  reference AS
      8  (
      9     SELECT 98       AS PERSON_ID, 'AAA' AS REF_TYPE, 'jk98923' AS REFERENCE FROM DUAL UNION ALL
    10     SELECT 98       AS PERSON_ID, 'BBB' AS REF_TYPE, 'io9898' AS REFERENCE FROM DUAL UNION ALL
    11     SELECT 99       AS PERSON_ID, 'AAA' AS REF_TYPE, 'nb6666' AS REFERENCE FROM DUAL UNION ALL
    12     SELECT 100      AS PERSON_ID, 'BBB' AS REF_TYPE, 'g10090' AS REFERENCE FROM DUAL
    13  )
    14  SELECT     PERSON_ID
    15  ,  NAME
    16  ,  MAX(DECODE(REF_TYPE,'AAA',REFERENCE,NULL)) Reference
    17  FROM       person
    18  JOIN       reference ON person.id = reference.person_id
    19  GROUP BY PERSON_ID, NAME
    20  ORDER BY PERSON_ID
    21  /
    PERSON_ID NAM REFEREN
            98 sss jk98923
            99 rrr nb6666
           100 rws

  • How to pull data from sql server ( Seperate server) & upload it into sap

    Hi All,
    I have a SQL Server database in System1,
    data base name          DB1
    Table name                 TB1
    I want pull data from TB1 & upload the same into ztable in SAP.
    How I can I achive this in ABAP.
    Thanks in Advance
    Appropriate points will be rewarded.
    Arun kumar

    Hi Arun,
    You have to do the following:
    1. Create an entry in Trxn DBCA for SQL Server in SAP, you are creating a database connection for the SQL server in SAP.
    2. You use this connection, and write Native SQL stmnts...between EXECSQL...ENDEXEC to fetch the data..and then normal ABAP statements to put that data into your ztable.
    Regards,
    Raj
    For eg:
    TABLE DBCON Entry can be like this...depends on your External database..
    CON_NAME                                  Raj                Logical name for connection
    DBMS                                           MSS              Microsoft SQL Server
    USER_NAME                                <User name>     For SQL Serve
    PASSWORD                                 <password>            "    "
    CON_ENV                  MSSQL_SERVER=<server> MSSQL_DBNAME=<database name>
    DB_RECO                 Availability type for an open database connect  
    FUNCTION z_houston_connect.
    ""Local interface:
    EXEC SQL.
    CONNECT TO 'RAJ' AS 'V'
    ENDEXEC.
    EXEC SQL.
    SET CONNECTION 'V'
    ENDEXEC.
    *- Get the data from MS-SQL Server
    EXEC SQL.
    open C1 for
    select
    l.loc_id,
    l.loc_name,
    a.acc_id,
    a.acc_name,
    d.person
    from ho_loc_mast as l
    inner join snd_acc_mast as a on l.loc_id = a.loc_id
    inner join snd_acc_addr as d on a.loc_id = d.loc_id and
    a.acc_id = d.acc_id
    where l.loc_id = '001'
    ENDEXEC.
    DO.
    EXEC SQL.
    FETCH NEXT C1 into :wa-c_locid, :wa-c_locname, :wa-c_acc_id, :wa-c_acc_name, :wa-c_person
    ENDEXEC.
    IF sy-subrc = 0.
    PERFORM loop_output.
    ELSE.
    EXIT.
    ENDIF.
    ENDDO.
    EXEC SQL.
    CLOSE C1
    ENDEXEC.
    ENDFUNCTION.

Maybe you are looking for

  • I have a report from WhatisHang which (in theory) tells my why my firefox constantly hangs up. But I need someone who can help figure this out.

    I hope this section will work, i couldnt find a place for Hang ups, and this problem doesnt usually cause a full crash, which is why it was hard to figure it out. I finally used the program WhatisHang to try to get an idea of what is causing the seem

  • Why can't I download more than 3 movies on my i-pad

    I-tunes won't let me download more than 3 movies in my file.  I have converted my movies into H264 format which play great on the i-pad, but it won't let me download more than 3 movies.. Not sure why

  • Configuring TV-OUT in MX400D-T64

    Hello, I have a MSI MX400D-T64 with a GeForce2 chip, and I have configured the card to show the image on the PC monitor and on a TV. The result is that I can see the same image on both the monitor and the TV , but the TV does not show the whole  imag

  • Exchange Product Update Not Available

    I purchased PHP Ajax Datagrid (Version 1.4.9) through Adobe Exchange several days ago and it does not work with DW CC. I contacted the developer and he said that I need to update to version 1.4.10 to correct the problem. Version 1.4.10 is showing as

  • Help me resolve graphics stuttering

    I'm not sure when this started... but it's reached a point where I must do something about it because it's really, really annoying. I bought my Macbook Pro (Build 10J567) in January 2009. I don't know when exactly this problem started but it's been a