Any way to use OBDC in SAP to access MySQL DB and retrieve data

I'd like to logon to an external MySQL DB (can de done easily enough with PHP)   but I'd like to do it with ABAP if possible.
Connecting via OBDC I should be able to retreive the data from the DB  and then use it in my SAP application.
Some databases will allow connection via
EXEC SQL.
connect to :dbsid
  ENDEXEC.
EXEC SQL.
    set connection :dbsid
  ENDEXEC.
EXEC SQL.
  open xxxxxxx for
  select
...... data from external DB
from tablespace in external db
ENDEXEC.
do.
  EXEC SQL.
    fetch next XXXXXX into
           :db_table_field, .... etc
             ENDEXEC.
  if sy-subrc ne 0.
    exit.
  endif.
  insert table int_sap_table.
enddo.
EXEC SQL.
  close XXXXXX
ENDEXEC.
If you can make this type of stuff work for a MySQL DB i'd appreciate the answer.
Using PHP has a drawback as you need to have it installed on the front end PC and run in Foreground.
The EXEC SQL commands run in batch which is what you need if you are talking about 100,000's of records from an external DB.
Cheers
jimbo

Hi Graham
Currently it doesn't seem to support MySQL.
Now that SAP has taken over again the development of MAXDB I can't see it providing  direct MySQL to SAP functionality.
MAXDB is available but that would mean changing the entire architecture and we don't want to do that.
I think probably the best route to go would be to create a BAPI which is capable of performing a logon to the remote  MySQL DB server, get the data and either send it back as  IDOCS, an external flat file, or as an internal table depending on the volume of data to be retrieved.
The good thing about MySQL is that the command line interface makes logging on and retrieving data quite simple.
This data is actually wanted in a BI  / BW system to provide for a number of business proces analyses.
I did think abut using "Web Services"  but the data retrieval will essentially be done offline.
There is no requirement currently for transferring data FROM SAP back to the MySQL database ( although if you've ever dealt with top level management you know how quickly developments can change).
PHP for all it's drawbacks is the really easy way - but we'll have a problem doing this in background from the SAP servers. For foreground tasks it's a real doddle if you have php on your front end.
for example
<?php
$username = "pee_wee";
$password = "let_me_in";
$hostname = "localhost";        */* IP address of remote DB server */*
$dbh = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
print "Connected to MySQL<br>";
// you're going to do lots more here soon
mysql_close($dbh);
?>
Batch mode also seems OK  also from the documentation
http://dev.mysql.com/doc/refman/5.1/en/batch-mode.html
so running an ABAP which can issue system commands (readily available) should work in theory provided the SAP server can connect to the remote MySQL server machine.
Thanks for your suggestions however
Cheers
jimbo

Similar Messages

  • Is there any way to use flash without all the bloated code?

    I  want to put a flash player on my site, however with dreamweaver the  "insert movie" option puts a ton code in my markup to the point where i  cant even tell what im looking at. Is there any way to use flash without  all the bloat?

    Yes and no.  Some bloat as you call it is necessary to support all browsers.  That said, this on-line tool takes your Flash code and converts it to valid XHTML Strict standards.  In the process, the code is minimized a bit.  Be sure to test in an XHTML Strict doc type page.
    http://www.validifier.com/
    Nancy O.
    Alt-Web Design & A
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Hii all is there any way to manage payroll in sap B1?

    hii all is there any way to manage payroll in sap B1? if not then is i can manage with this add-on ?

    Hi,
    you can use payroll addon that is developed by certain SAP partner company.
    if you want to manage the payroll manually, you can use vendor master data as employee and using journal entry to accomodate payroll transaction or using outgoing payment.
    JimM

  • Any way to use cursor values inside other cursor by bulk collect?

    hi,
    Is there any way to use cursor get_tables value insdide loop get column if i am using bulk collect in both cursors?
    I tried a lot but i am nt able to do it.kindly help...
    create or replace procedure MULTIPLE_CURSORS_PROC is
    v_owner varchar2(40);
    v_table_name varchar2(40);
    v_column_name varchar2(100);
    cursor get_tables is
    select distinct tbl.owner, tbl.table_name
    from all_tables tbl
    where tbl.owner = 'SYSTEM';
    cursor get_columns is
    select distinct col.column_name
    from all_tab_columns col
    where col.owner = v_owner
    and col.table_name = v_table_name;
    begin
    open get_tables;
    loop
    fetch get_tables into v_owner, v_table_name;
    open get_columns;
    loop
    fetch get_columns into v_column_name;
    end loop;
    close get_columns;
    end loop;
    close get_tables;
    end ;

    hi there
    Refer this
    CREATE OR REPLACE PROCEDURE MULTIPLE_CURSORS_PROC
    IS
       TYPE scol IS VARRAY (10000) OF VARCHAR2 (32767);
       v_table_name    scol;
       v_column_name   scol;
       TYPE curtyp IS REF CURSOR;
       get_columns     curtyp;
       CURSOR get_tables
       IS
          SELECT   DISTINCT tbl.table_name
            FROM   all_tables tbl
           WHERE   tbl.owner = 'SYSTEM';
    BEGIN
       OPEN get_tables;
       LOOP
          FETCH get_tables BULK COLLECT INTO   v_table_name;
          FOR indx IN v_table_name.FIRST .. v_table_name.LAST
          LOOP
             SELECT   DISTINCT col.column_name
               BULK   COLLECT
               INTO   v_column_name
               FROM   all_tab_columns col
              WHERE   col.table_name = v_table_name (indx);
             FOR ind IN v_column_name.FIRST .. v_column_name.LAST
             LOOP
                DBMS_OUTPUT.put_line (v_column_name (ind));
             END LOOP;
          END LOOP;
          EXIT WHEN get_tables%NOTFOUND;
       END LOOP;
       CLOSE get_tables;
    END MULTIPLE_CURSORS_PROC;regards
    Hitesh

  • Any way to use filter to exclude tables in navagation pane?

    Is there any way to use filter to exclude a set of tables from the table list in the navagation pane? I have a number of tables (15+) starting with the same prefix eg. AB123 that I would like eliminate from the list. They sort right to the top and I always have to scroll down, and go through the show more dialog to see the entire list.
    I am sure I'm missing something, but not sure what. Help Center has nothing to offer.
    Thanks
    Glenn

    This has been mentioned on the forum before - basically the need for more elaborate ways to filter (multiple conditions as well as 'not like'). It is on our list for future consideration, meaning post-production.
    -- Sharon
    Message was edited by:
    sbkenned

  • Is there any way to use -useLegacyAOT option in FlashBuilder 4.6?

    I need to build my ipa with old version of Engine because i have some problems about loading images from outside. Since with Air 15 it is default engine, and i cannot quit Air 15 because of the iTunes specs. I cannot add -useLegacyAOT=yes to compiler options on Adobe Flash Builder 4.6 because it seems that it can be added at FB4.7.
    So is there any way to add this options when i am using FB4.6
    Thanks in advance.

    DeepakJ wrote:
    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       Count(*)
    10         AA        1
    10         BB        2
    10         CC        2
    20         AA        2
    20         BB        2Output-2
    Dept      Loc       Count(*)
    10         AA        1
    BB        2
    CC        2
    20         AA        2
    BB        2
    Yes, using the <tt>lag</tt> analytic function and specified ordering of the data:
    select
        nullif(d.deptno, lag(d.deptno) over (order by d.deptno, d.loc, e.mgr nulls first)) deptno
      , nullif(d.loc, lag(d.loc) over (order by d.deptno, d.loc, e.mgr nulls first)) loc
      , e.mgr
      , count(*) n
    from
        dept d
          join emp e
            on d.deptno = e.deptno
    group by
        d.deptno
      , d.loc
      , e.mgr
    order by
        d.deptno
      , d.loc
      , e.mgr nulls first;
    DEPTNO  LOC       MGR   N
        10  NEW YORK         1
                      7782   1
                      7839   1
        20  DALLAS    7566   2
                      7788   1
                      7839   1
        30  CHICAGO   7698   4
                      7839   1
        40  BOSTON    7698   2
                      7902   1

  • I'm using TestStand/Labview to do a string value test. Is there any way to use a variable in the edit string value test?? This forces you to hard code a string to test against.

    I'm using TestStand 2.0/Labview 6i to do a string value test. Is there any way to use a string variable in the edit string value test instead of an actual string?? This forces you to hard code a string to test against.

    Hi ART,
    You can also use the LimitLoader step to load your string into to step similar to the Numeric Step type.
    There should be an example of this in the Resource Library | TestStand
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • 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       Count(*)
      10         AA        1
      10         BB        2
      10         CC        2
      20         AA        2
      20         BB        2Output-2
      Dept      Loc       Count(*)
      10         AA        1
                 BB        2
                 CC        2
      20         AA        2
                 BB        2Thanks,
    Deepak

    DeepakJ wrote:
    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       Count(*)
    10         AA        1
    10         BB        2
    10         CC        2
    20         AA        2
    20         BB        2Output-2
    Dept      Loc       Count(*)
    10         AA        1
    BB        2
    CC        2
    20         AA        2
    BB        2
    Yes, using the <tt>lag</tt> analytic function and specified ordering of the data:
    select
        nullif(d.deptno, lag(d.deptno) over (order by d.deptno, d.loc, e.mgr nulls first)) deptno
      , nullif(d.loc, lag(d.loc) over (order by d.deptno, d.loc, e.mgr nulls first)) loc
      , e.mgr
      , count(*) n
    from
        dept d
          join emp e
            on d.deptno = e.deptno
    group by
        d.deptno
      , d.loc
      , e.mgr
    order by
        d.deptno
      , d.loc
      , e.mgr nulls first;
    DEPTNO  LOC       MGR   N
        10  NEW YORK         1
                      7782   1
                      7839   1
        20  DALLAS    7566   2
                      7788   1
                      7839   1
        30  CHICAGO   7698   4
                      7839   1
        40  BOSTON    7698   2
                      7902   1

  • Time Machine Beautiful Background - any way to use it apart from TM

    The picture of moving universe as the background of TM processes is beautiful. Is there any way to use it apart from TM (screen saver, desktop image) ?

    Not easily. It's not a single display. The "moving parts" are separate.
    The basic background is at:
    /System/Library/PrivateFrameworks/Backup.framework/Versions/A/Resources/vortex.p ng
    You could select and right-click it, and select it as your desktop picture, but it won't move.
    Or display it with Preview, save it as a jpg, import it into iPhoto, make an album containing it, then select the album as your screen saver.

  • Any way to use a quick and dirty icon like cLabel in the quick tools toolbar?

    I am a javascript cut-and-paster with ability to cobble things together.
    In previous versions of Acrobat, I had tools that were added to the toolbar using the technique shown in this script:
    app.addToolButton({cName: "MyFlattenButton",
       cLabel: "Flatten",
       cEnable: "event.rc = (app.doc != null);",
       cExec: "flattenPages();"
    That would create a toolbar button with the "icon" that read "Flatten" which is all that I needed.  I could click on it and it would flatten all pages in the document.
    I used this to create several different tools, all with different names and cLabels.
    This script still works in Acrobat XI (it adds the tool to the add-on tools list, and then I can add it from there to the quick tools toolbar).  The cLabel names show up in the add-on tools list, but not in the quick tools toolbar.  In the toolbar they all use the same generic icon (but they all work correctly).
    From reading in this forum I see that there is a way to create a custom icon but it does not look easy.  Is there any simple way to just have text appear as the icon as I used to do for earlier versions of Acrobat?
    Thanks.

    One further question...
    I found a code snippet somewhere online that attempted to deal with this issue.  That led me to this (failed) solution:
    this.importIcon("myIconFlat", "/D/J/CAD Standards/Stamps/Acrobat tools/flatten.jpg", 0);
    var flatIcon = util.iconStreamFromIcon(this.getIcon("myIconFlat"));
    app.addToolButton({cName: "MyFlattenButton",
       cLabel: "Flatten",
       oIcon: flatIcon,
       cEnable: "event.rc = (app.doc != null);",
       cExec: "flattenPages();"
    The problem there is that importIcon is not allowed from a folder-level javascript, apparently.  Would there be any way to use the importIcon part of this from the console and then cut and paste some output into the rest of the script?  Just looking for a way to get the icon into my script.

  • Is there any way to use a file transfer protocol to upload files to icloud?

    Is there any way to use a file transfer protocol to upload files to icloud?

    Unfortunately, no.
    You will need a 3rd party web host to upload your websites to. Depending on the version of iWeb you are using you have a couple of publishing options:
    iWeb ’09 (3.0.4) you can publish to an FTP Server or a local folder. ( With the built in FTP in iWeb you will end up with an address like “www.YourDomain.com/sitename/Home.html )
    iWeb ’08 you can publish your website to a local folder
    Basically all Web Hosting companies are iWeb-compatible.
    If you’re looking for a good hosting I would recommend IX Web Hosting I have been using them to host my own websites for several years now and that their customer support is awesome too.
    http://jeffnitschke.com/IXWebHosting.html
    http://jeffnitschke.com/wordpress/2012/06/how-do-i-move-my-mobileme-site-ix-web- hosting-blog/
    "I may receive some form of compensation from my recommendation or link."

  • Is there any way to use a MacBook Pro as a router to set up a wireless connection for XBOX live.

    Is there any way to use a MacBook Pro as a router to set up a wireless connection for XBOX live.

    Mac OS X 10.6 Help: Sharing your Internet connection

  • Is there any way to use a aunetreceive for a track within GarageBand?

    Is there any way to use a aunetreceive for a track within GarageBand?
    I have an application, Soundboard, which sends audio via the aunetsend plugin. I'd like to manage the output of this application within Garageband as a track. Is there any possible way to do this?
    Thanks

    Alas, no, not in VBA.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Is there any way to use a For Each Loop for each property of an User Defined Type?

    Is there any way to use a For Each Loop for each property of an User Defined Type? That would be very handy!
    Jorge Barbi Martins ([email protected])

    Alas, no, not in VBA.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Is there any way to use Internet Explorer on a Mac? I have one insurance company that I do business with that you must use internet explorer

    Is  there any way to use Internet Explorer on a Mac Book Pro? I have one company that I do business with that only uses Internet Explorer

    Internet Explorer is not available for Mac.
    But you can make Safari pretend to be Internet Explorer in some cases.
        Safari > Preference > Advanced
        Checkmark the box for "Show Develop menu in menu bar".
        "Develop" menu will appear in the Safari menu bar.
        Click Develop, move mouse down to "User Agent".
        Select Internet Explorer from popup on the rightside.
        After using Internet Explorer, revert back to Safari, doing the same routine.

Maybe you are looking for

  • How to download list of child materials used in subcontracting PO

    Hi All, We have a querry : In the PO with Item category "subcontracting-L" ,which table can be used to download the child materials ? Please note that BOM has not been created for Parent (or Header) and child materials. Regards, Kiran

  • Sprite color Change on mousEnter?

    I am trying to make a sprite change color when my mouse goes over it and chage back with my mouse leaves it. I tryed on mouseEnter me sprite(1).foreColor = color(0,0,100) end mouseEnter and the sprit does change color but it does not change back. Wha

  • Icon Editor Templates

    Have there been any changes between LabVIEW 2012 and 2014 in the way the Icon Editor handles the templates? I opened a file in LabVIEW 2012 and started modifying the icon from the default.  I picked the _box template and worked from there.  It is a b

  • Help... itunes could not connect to this iphone. an unknown error occured (OxE8000084)

    trying to sync my ipod and now this is what it say.. itunes could not connect to this iphone. an unknown error occured (OxE8000084)

  • Mouse can't double-click open folders

    I have a mac 10.4.11. I don't know what happened but my mouse can't seem to double-click and open folders in my desktop and folders within folders. I can can only do so by highlighting and using shortcuts on the keyboard. Can someone helps me fix thi