Skip to Content
author's profile photo Former Member
Former Member

Accessing SAP Tables from a Java application

Hi,

I know, the forum is called "Web Application Server" but because it's Java question I hope to get answers here.

I have a small stand-alone Java application that needs to access (read-only) all records from a SAP table. Is there a possibility to do this without writing a BAPI before?

thanks a lot

Paul

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Feb 07, 2005 at 06:47 PM

    Hi Paul,

    You can use JCo to call the standard remote-enabled function RFC_READ_TABLE. There is one annoyance involved with this function, though: each row of data returned is packed into a single string, so you must either specify a delimiter and use e.g. String.split(...) to parse out the column values or use the returned metadata to extract each value based on position and length attributes of the column.

    Another option (although this is usually not allowed in a productive environment) is to establish a direct JDBC connection to the database, thus bypassing the ABAP application layer entirely.

    Regards,

    Thorsten

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 08, 2005 at 08:27 AM

    I checked the productive system and it doesnt contain this BAPI. So I need to write one my own?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 08, 2005 at 08:22 AM

    hm, okay.. both sounds a bit strange. But I will check out whether the general get table data BAPI is accessible within the produktive system. The dev system got it.

    Thanks,

    Paul

    P.S. I read about giving "reward points"? Where is it?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.