How to retrieve the data from SAP database.

Hi Pals,
How to retrieve data from SAP R/3 System to my third party software. I will make my query little bit more clear. There is a list of assets entered and stored in the SAP system. For example 3 mobile phones.
1) Mobile 1- Nokia
2) Mobile 2 - Samsung
3) Mobile 3 u2013 Sony
Now think I do not know what all assets is there. I have to retrieve the data and get it on my third party software. Just display the list of assets. Lets say SAP XI is also there. Now how will I map it and get the details.
Please give me step by step method.
N.B: Just to read the data from SAP database.
Please make the flow clear step by step.
Thanking you
AK

Hi,
You can use RFC or ABAP Proxy to make synchronous call with SAP.
Under RFC or ABAP Proxy Program you can get the data from SAP tables. Direct access to SAP Database is not preferrable even if its possible.
The better way to go for RFC or PROXY.
You will send the request from Third party system and the it will be as input parameters from RFC/ Proxy it will response based on it.
This got it all..
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5474f19e-0701-0010-4eaa-97c4f78dbf9b
/people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi
/people/stefan.grube/blog/2006/09/21/using-the-soap-inbound-channel-of-the-integration-engine
/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit - File to RFC
HTTP to RFC - A Starter Kit
/people/community.user/blog/2006/12/12/http-to-rfc--a-starter-kit
Refer
Thanks
Swarup
Edited by: Swarup Sawant on Jun 4, 2008 9:32 AM

Similar Messages

  • How to retrieve the data from SAP-BAPI by using VB Code

    Hi ,
    I am new to BAPI.
    V have created an application in Visual Basic with the following fields
    EmpNo , EmpName, Addr1, Addr2, City and Phone (Only for Test)
    We have written the code for SAVING the data into SAP. Already we have
    constructed a table with the respective fields in SAP.
    For that we ourself created our own BAPI Structure / Function Group /
    Function Module/ Business Object - RELEASED related elements.
    1)Established the connection successfully.
    2)Stored the data into SAP Successfully and v r in need of
    3)HOW TO RETRIEVE THE DATA FROM SAP (USING GETLIST.....GETDETAIL....)
    Following is the code :
    'BAPI Structure  : ZBAPIEMP
    'Function Group  : ZBAPIEMP
    'Function Module : ZBAPI_EMP_CREATEFROMDATA
    'Business Object : ZBAPIEMP
    'Function Module : ZBAPI_EMP_GETLIST
    Dim bapictrl As Object
    Dim oconnection As Object
    Dim boEmp As Object
    Dim oZEmp_Header As Object
    Dim oImpStruct As Object
    Dim oExpStruct As Object
    Dim oreturn As Object
    Dim x As String
    Private Sub Form_Load()
    Set bapictrl = CreateObject("SAP.BAPI.1")
    Set oconnection = bapictrl.Connection
    oconnection.logon
    Set boEmp = bapictrl.GetSAPObject("ZBAPIEMP")
    Set oZEmp_Header = bapictrl.DimAs(boEmp, "CreateFromData", "EmployeeHeader")
    Set oImpStruct = bapictrl.DimAs(boEmp, "GetList", "EmployeeDispStruct")
    End Sub
    Private Sub cmdSave_Click()
        oZEmp_Header.Value("EMPNO") = txtEmpNo.Text
        oZEmp_Header.Value("EMPNAME") = txtEmpName.Text
        oZEmp_Header.Value("ADDR1") = txtAddr1.Text
        oZEmp_Header.Value("ADDR2") = txtAddr2.Text
        oZEmp_Header.Value("CITY") = txtCity.Text
        oZEmp_Header.Value("PHONE") = txtPhone.Text
        boEmp.CreateFromData EmployeeHeader:=oZEmp_Header, Return:=oreturn
        x = oreturn.Value("Message")
        If x = "" Then
            MsgBox "Transaction Completed!..."
        Else
            MsgBox x
        End If
    End Sub
    Private Sub cmdView_Click()
    End Sub
    COULD ANYBODY GUIDE ME, HOW TO RETRIEVE THE DATA FROM BAPI, FOR THE WRITTEN CODE.

    I didn't seen any other answers but here's how it's been done previously in our organization for a custom BAPI. In this example, we give material and language to return the part description. It's not specific to your project but may give you ideas..
    -Tim
    Option Compare Database
    Dim SAPLOGIN As Boolean
    Dim FunctionCtrl As Object
    Dim SapConnection As Object
    Sub SAPLOGOUT()
    On Error GoTo LogoutFehler
        SapConnection.logoff
        SAPLOGIN = False
    Exit Sub
    LogoutFehler:
        If Err.Number = 91 Then
            Exit Sub
        Else
            MsgBox Err.Description, vbCritical, "Fehler-Nr." & CStr(Err.Number) & " bei SAP-Logout"
        End If
    End Sub
    Function SAPLOG() As Boolean
    'Verbindungsobjekt setzen (Property von FunctionCtrl)
       Set FunctionCtrl = CreateObject("SAP.Functions")
       Set SapConnection = FunctionCtrl.Connection
    'Logon mit Initialwerten
       SapConnection.Client = "010"
       SapConnection.Language = "EN"
       SapConnection.System = "PR1"
       SapConnection.SystemNumber = "00"
       'SapConnection.Password = ""
       SapConnection.GroupName = "PR1"
       SapConnection.HostName = "168.9.25.120"
       SapConnection.MessageServer = "168.9.25.120"
         If SapConnection.Logon(0, False) <> True Then  'Logon mit Dialog
             Set SapConnection = Nothing
             DoCmd.Hourglass False
             MsgBox "No connection to SAP R/3 !"
             SAPLOGIN = False
             SAPLOG = False
             Exit Function
          End If
        SAPLOG = True
    End Function
    Function MatDescr(MatNr As String)
    Dim func1 As Object
    Dim row As Object, X As Integer, ErsteNr As String
    Dim DatensatzZähler As Long
    Dim RowField(1 To 50, 0 To 1) As String, RowLine As Long
        If Not SAPLOGIN Then
            If Not SAPLOG() Then
                MsgBox "No connection  to SAP !", 16
                SAPLOGOUT
                Exit Function
            End If
        End If
    ' Instanziieren des Function-Objektes
    Set func1 = FunctionCtrl.Add("Z_BAPI_READ_MAKT")
    ' Export-Paramter definieren
    func1.exports("MATNR") = MatNr
    func1.exports("SPRAS") = "EN"
    DoEvents
    If Not func1.call Then
        If func1.exception <> "" Then
            MsgBox "Communication Error with RFC " & func1.exception
        End If
        DoCmd.Hourglass False
        SAPLOGOUT
        Exit Function
    Else
      MatDescr = func1.imports("MAKTX")
    End If
    If MatDescr = "" Then
        MatDescr = "PART NO. NOT FOUND"
    End If
    End Function

  • How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
    That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
    This page is a good starting point for learning about Flex and PHP communication:
    http://www.adobe.com/devnet/flex/flex_php.html
    Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/

  • SQL Server Import Export Wizard fails while trying to retrieve the data from FastObjects Database

    When trying to import data from FastObjects database to SQL Server 2008 R2 using import/ export wizard we get the following error message :
    "Column information for the source and the destination data could not be retrieved, or the data types of source columns were not mapped correctly to those available on the destination provider."
    Clicked on View button, the source data is retrieved correctly.
    Clicked on Edit Mapping button, the Import Export Wizard failed with the below error message:
    ===================================
    Column information for the source and destination data could not be retrieved.
    "Test" -> [dbo].[Test]:
    - Cannot find column -1.
    (SQL Server Import and Export Wizard)
    ===================================
    Cannot find column -1. (System.Data) 
    at System.Data.DataColumnCollection.get_Item(Int32 index) at System.Data.DataRow.get_Item(Int32 columnIndex) at Microsoft.DataTransformationServices.Controls.ProviderInfos.MetadataLoader.LoadColumnsFromTable(IDbConnection myConnection, String[] strRestrictions)
    at Microsoft.SqlServer.Dts.DtsWizard.OLEDBHelpers.LoadColumnsFromTable(MetadataLoader metadataLoader, IDbConnection myConnection, String[] strRestrictions, DataSourceInfo dsi)at Microsoft.SqlServer.Dts.DtsWizard.TransformInfo.PopulateDbSourceColumnInfoFromDB(IDbConnection
    mySourceConnection) at Microsoft.SqlServer.Dts.DtsWizard.TransformInfo.PopulateDbSourceColumnInfo(IDbConnection mySourceConnection, ColumnInfoCollection& sourceColInfos)

    Hi Chennie,
    Thank you for the post.
    Does the issue persists after you use the "Write a query to specify the data to transfer" option instead of “Copy data from one or more tables or views” option? If so, the issue may occur due to incorrect data type matching between the FastObjects database
    data types and SSIS data types. In this condition, I don’t think it is necessary to upgrade the SQL Server version. Since you can open the Column Mappings dialog box, please try to modify the data type mapping manually.
    In addition, the issue seems to be the same as the issue described in the following blog:
    http://blogs.msdn.com/b/dataaccesstechnologies/archive/2010/09/09/sql-server-import-export-wizard-fails-while-trying-to-retrieve-the-data-from-pervasive-database.aspx 
    Regards,
    Mike Yin
    TechNet Community Support

  • How to retrieve the data from Website and Upload it in SAP table?

    Dear ABAPers,
            I want to retrieve the data from website and upload the same in SAP Database Table is that possible.Please help me.It is very Urgent.
    Thanks & Regards,
    Ashok.

    Dear Abhishek,
                  Thanks for your reply.But my requirement is not met.
    If i execute the program it should retrieve the data from particular website.
    Thanks & Regards,
    Ashok.

  • How to copy the data from one database to another database without DB link

    Good Day,
    I want to copy the data from one database to another database with out DB link but the structure is same in both.
    Thanks
    Nihar

    You could use SQL*Plus' COPY command
    http://technology.amis.nl/blog/432/little-gold-nugget-sqlplus-copy-command
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/apb.htm#sthref3702
    Edited by: Alex Nuijten on Sep 16, 2009 8:13 AM

  • How to retrieve the data from a jsp page for print?

    i have a dynamic jsp file which will get the data at runtime.I have a print button in the jsp.When i chick the print button it should capture the data from the jsp and print it as LANDSCAPE mode. Now i am using Java Api for this
              Following code is a working sample which prints some data in LANDSCAPE mode..This is working fine....How can i modify this to get the data from a jsp?....I am using weblogic workshop for development
              package Awtjava;
              //working example
              import java.awt.*;
              import java.awt.print.*;
              public class testPrint implements Printable {
              private static String s[];
              private static Font f;
              private static int nLines;
              public static void main (String arg[]){
              s = new String[10];
              f = new Font("Arial", Font.PLAIN, 11);
              int i;
              s[0] = "This is a printer test";
              for (i=1; i<10; i++){
              s[i] = "The next line";
              nLines = 10;
              testPrint.printa();
              public static void printa(){
              System.out.println("public static void printa () ");
              PrinterJob pj=PrinterJob.getPrinterJob();
              Book b = new Book();;
              PageFormat pf = new PageFormat();
              pf = pj.defaultPage(pf);
              b.append(new testPrint(), pf, 2);
              pj.setPageable (b);
              try{
              if (pj.printDialog()){
              pj.print();
              catch (Exception e) { System.out.println ("Error"); }
              public int print (Graphics g1, PageFormat pf, int n){
              System.out.println("public int print");
              int x,y,i,fa,fh;
              FontMetrics fm;
              Graphics2D g = (Graphics2D) g1;
              pf.setOrientation(PageFormat.LANDSCAPE);
              fm = g.getFontMetrics (f);
              fa = fm.getMaxAscent();
              fh = fm.getHeight();
              x = (int)pf.getImageableX();
              y = (int)pf.getImageableY() + fa;
              g.setFont (f);
              g.setColor(Color.black);
              if (n==1){
              for (i=0; i<10; i++){
              g.drawString (s, x, y);
              y += fh;
              return PAGE_EXISTS;
              else {
              for (i=10;i<10; i++){
              g.drawString (s[i], x, y);
              y += fh;
              return PAGE_EXISTS;
              Hope you will reply soon...
              Thanks in advance
              Maria

    Hey, I got a doubt that who will call the print method in the same program and what about the g.drawString() it is showing any output effect. Finally how the variable n will get initializing to 0 and 1 for two times respectively. Can u please elaborate on this...

  • How to retrieve the data from the RT card after the host rebooted??

    Thank you for your answer!
    how to design my application to retrieve the data that was collected on RT Series hardware while the host PC was not in communication with the embedded LabVIEW RT application.

    I rember correctly, that may be one of the more challenging varieties to pull this stunt off.
    First, you are going to have to make sure you have enough memory to buffer the data while the host if doing something else.
    If you have enough memory you may want explicitly work up a comm scheem between the host and PC (probaly using VI server) that will let the host know there is data avaiailable and it should get it.
    So, doe sit seem like we may be getting closer?
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to Centalize the data from remote database

    we have 300-400 databases across remote server.
    we want to collect the centralized inforamtion from remote server into centralized oracle database.
    1.exporting the centralized data at remote server and
    through FTP transfering it to central server and
    importing the dump in central database
    2.Creating database links and collecting data through
    Snapshot
    Which is best or Give any suggestion pls
    if possible give detail information

    Hi,
    Use Proxies For Your Sender SAP System side and Use the Appropriate Adapter at Receuver side according to the Requirement
    Now scenario willl be Proxy-Xi---
    Logic:
    1) Write the Logic inside the Proxy report to pick the records from the tables
    2) And send it to Xi, Xi will routew the data to the third party System based on the adapter you selected
    ABAP Proxies Pre-requisites
    /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
    ABAP Client Proxies
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
    Regards
    Seshagiri

  • How to delete the data from SAP R/3 DB table from BW

    Hi,
       I am facing an issue... I have populated the data into custom r/3 DB table by running a user exit.I am getting the data and loading(Full Load) it in BW ODS. But my problem is when i rerun the user exit it is giving me a short dump saying "SAPSQL_ARRAY_INSERT_DUPREC". when i delete the enteries of DB table it is working fine. But this fine in development.but i production i cannot do this.So i want to delete the DB table enteries by an ABAP program and call this ABAP program using Process chain when my ODS data LOAD is successful. How to go About this.
    P.S: I want only to delete the DB table enteries not the DB table.....
    Thanks and Regards
    Sairam phani

    Sairam,
    why don't you just add the code for deletion of records into that user exit, so it would first delete entries and then write new ones.
    Alternatively, you could use a Process Chain to trigger an event in R/3, and by that event a scheduled job would run, deleting entries from that table.
    As I don't know details of the solution you're implementing, that's all I can think of now.
    Cheers,
    /RB

  • Using bapi how to upload the data into sap database?

    hi dear all,
                  im facing problem with bapi ? let me edcuate on bapi ..
    i will be  waiting for reply.
    my e-id :[email protected]
    thanks&regards
    shiva.

    Hi
    A BAPI is a method of a SAP Business Object. BAPI enables SAP and third party applications to interact and integrate
    with each other at the Business Object / Process level.
    Check this link to know more about BAPI.
    http://www.sapgenie.com/abap/bapi/example.htm
    http://sappoint.com/abap/
    Batch Data Communication (BDC) is the oldest batch interfacing technique that SAP provided since the early versions of R/3. BDC is not a
    typical integration tool, in the sense that, it can be only be used for uploading data into R/3 and so it is not bi-directional.
    BDC works on the principle of simulating user input for transactional screen, via an ABAP program. Typically the input comes in the form
    of a flat file. The ABAP program reads this file and formats the input data screen by screen into an internal table (BDCDATA). The
    transaction is then started using this internal table as the input and executed in the background.
    In ‘Call Transaction’, the transactions are triggered at the time of processing itself and so the ABAP program must do the error handling.
    It can also be used for real-time interfaces and custom error handling & logging features. .
    To know more about BDC,
    check the link.
    http://sappoint.com/abap/
    Main differences are...
    In case of bdc data transfer takes place from flat file into sap system ie the file existing in sap system to sap sytem
    where is bapi's r remotly enabled function modules which are assigned to some business objects n used to transfer the data between different business partners who are using different systems other than sap.
    not only that...
    when you plan to upgrade your system version then bdc willnot support those upgradations where as bapi's will support.
    http://www.sap-img.com/abap/ale-bapi.htm
    SAP BAPI
    BAPI STEPS
    Hope this helps.
    ashish

  • How to retrieve the data from UME?

    Hi All,
    I have a problem with retriving data from UME.Here my problem is I have logged a pirticular user that user coming from sales-organization. I got that user But How to retrive the pirticular sales-org from UME.
    Please help me for this .
    Thanks
    Nageswara.

    Hi All,
    I have a problem with retriving data from UME.Here my problem is I have logged a pirticular user that user coming from sales-organization. I got that user But How to retrive the pirticular sales-org from UME.
    Please help me for this .
    Thanks
    Nageswara.

  • How to retrieve the data from MDM hierarchy table using MDM Java API

    Hi,
    I had a hierarchy table in MDM. This table had some column say x. I want to retrieve the values of this x column and need to show them in a drop down using MDM Java API.
    Can anyone help me to solve this?
    Regards
    Vallabhaneni

    Hi,
    Here is your code...
    TableId Hier_TId = repository_schema.getTableId(<hierarchy table id>);
    java.util.List list = new ArrayList();
    ResultDefinition Supporting_result_dfn = null;
    FieldProperties[] Hier_Field_props =rep_schema.getTableSchema(Hier_TId).getFields();
    LookupFieldProperties lookup_field = null;
    TableSchema lookupTableSchema = null;
    FieldId[] lookupFieldIDs = null;
    for (int i = 0, j = Hier_Field_props.length; i < j; i++) {
    if (Hier_Field_props<i>.isLookup()) {     
                                  lookup_field = (LookupFieldProperties) Hier_Field_props<i>;
         lookupTableSchema =repository_schema.getTableSchema(lookup_field.getLookupTableId());
                                  lookupFieldIDs = lookupTableSchema.getFieldIds();
         Supporting_result_dfn = new ResultDefinition(lookup_field.getLookupTableId());
         Supporting_result_dfn.setSelectFields(lookupFieldIDs);
         list.add(Supporting_result_dfn);
    com.sap.mdm.search.Search hier_search =new com.sap.mdm.search.Search(Hier_TId);
    ResultDefinition Hier_Resultdfn =     new ResultDefinition(Hier_TId);
    Hier_Resultdfn.setSelectFields(rep_schema.getTableSchema(Hier_TId).getDisplayFieldIds());
    ResultDefinition[] supportingResultDefinitions =
    (ResultDefinition[])list.toArray(new ResultDefinition [ list.size() ]);
    RetrieveLimitedHierTreeCommand retrieve_Hier_tree_cmd =
    new RetrieveLimitedHierTreeCommand(conn_acc);
    retrieve_Hier_tree_cmd.setResultDefinition(Hier_Resultdfn);
    retrieve_Hier_tree_cmd.setSession(Auth_User_session_cmd.getSession());
    retrieve_Hier_tree_cmd.setSearch(hier_search);
    retrieve_Hier_tree_cmd.setSupportingResultDefinitions(supportingResultDefinitions);
    try {
         retrieve_Hier_tree_cmd.execute();
    } catch (CommandException e5) {
              // TODO Auto-generated catch block
              e5.printStackTrace();
    HierNode Hier_Node = retrieve_Hier_tree_cmd.getTree();
    print(Hier_Node,1);
    //method print()
    static private void print(HierNode node, int level) {
    if (!node.isRoot()) {
         for (int i = 0, j = level; i < j; i++) {
              System.out.print("\t");
         System.out.println(node.getDisplayValue());
    HierNode[] children = node.getChildren();
    if (children != null) {
              level++;
    for (int i = 0, j = children.length; i < j; i++) {
    print(children<i>, level);
    //end method print()
    Best regards,
    Arun prabhu S
    Edited by: Arun Prabhu Sivakumar on Jul 7, 2008 12:19 PM

  • How to extract the data from SAP using Msaccess tool ?

    Hi Experts,
    Purpose u2013
    Want to extract the data in a better way rather than using the T.code u2013 SE16
    regards
    Kedar Kulkarni

    Hi,
    Try this...
    Please use the standard ABAP program "RIACCESS".
    Before using the program "RIACCESS", you need to install the PS utilities, which are part of SAPGUI install CD.
    It is available in the "\SAPGUI\PS directory". 
    Then do the followings :
    1. Select transaction code SALE -> Systems in network-> Define RFC Destination. 
    2. You will need two RFC destinations (TCP/IP connections for the front-end workstation). 
         Setup the two RFC destinations PS_ACCESS_1 and PS_ACCESS_2 and you'll have to get them to point to wdpsastr.exe and wdpsatab.exe respectively. 
    3. Then execute RIACCESS and choose PS_ACCESS_1 to generate access tables. 
    The system must also be able to access the RFC-DLL files (librfc2.dll, librfc3.dll, librfc4.dll, librfc5.dll, librfc6.dll, vrfc.dll). 
    Please note that Access only supports tables with up to 255 fields.

  • How to retrieve the data from database table to the screens

    Hi all,
    I have created a transaction to save the costing details..but if the material code already exists then it should get the header and details of that material code onto the table cotrol of the screen..i'm getiing them into my itab but only the last record of that is visible for n times as there are n records...can anyone help me in this?

    Dear anil ,
      Please give condtion in u r code on line item wise so its taking all records correctly.
    Regards ,
    Nikhil narkhede.

Maybe you are looking for

  • Ios7 doesnt show album cover in albumlists an coverflow

    Hello, I have a problem after updating the new ios7. After importing music from Itunes, some of the albumcovers are not displayed properly in my iPhone5. The cover is visible, while playing a single track, but is not displayed as icon in the albumlis

  • Data loading to Infocube from SAP R/3 System

    Hello Friends,          I started load in BW four days back in background. Initially i could able to see the load running in SM50 t.code. This load  has 28 data packets. Out of 28, five data packets are successfully updated data to the cube, Remainin

  • Is there any way to use Control Break in a SQL Query

    Hi, Is there any way to use a control break on Dept column in a SQL query to have a Output-2 instead of Output-1. Is there any way to modify the SQL query. SQL select dept, loc, count(*)   from dept group by dept, locOutput-1   Dept      Loc       Co

  • How to change the field name

    I want to change the field name in Oracle schema Can I do ir? If yes, please tell me how to type the SQL Thanks

  • Huge iTunes Store Problem

    This is essentially my biggest complaint with the iTunes store, they like to take things that are iTunes exclusives and remove them. I don't think Apple realizes that without the exclusive tracks there's absolutely no reason to buy albums from iTunes