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

Getting web page into R/3 through XI?

Hi guys!

I have a requirement for getting a web page into SAP. Is it possible?

I do not know about any way, how to send GET request from XI and then receive HTML content back into XI and send it into SAP..

Any ideas?

Thanx, Peter

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2006 at 08:27 AM

    Hi Peter,

    with the standard adapters it is not possible.

    If you'll write your own module you can use this:

    import java.io.IOException;

    import java.io.InputStream;

    import java.net.HttpURLConnection;

    import java.net.MalformedURLException;

    import java.net.URL;

    public class testhttp {

    /**

    • @param args

    */

    public static void main(String[] args) {

    // TODO Auto-generated method stub

    try {

    System.setProperty("https.proxyHost", "87.555.1.80");

    System.setProperty("https.proxyPort", "8000");

    System.setProperty("http.proxyHost", "proxy");

    System.setProperty("http.proxyPort", "8000");

    URL url = new URL("http://www.openbc.com/ /> ");

    HttpURLConnection conn = (HttpURLConnection) url.openConnection();

    conn.connect();

    System.out.println(conn.getResponseCode());

    InputStream stream = conn.getInputStream();

    int b;

    while ((b = stream.read()) != -1) {

    System.out.print((char) b);

    }

    } catch (MalformedURLException e) {

    // TODO Auto-generated catch block

    e.printStackTrace();

    } catch (IOException e) {

    // TODO Auto-generated catch block

    e.printStackTrace();

    }//catch

    Regards Mario

    }

    }

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2006 at 08:31 AM

    Hi Peter,

    Based on my understanding,

    From your web page , you should be having an option to send the contents as a http request to XI.

    In XI you can convert this request to a BAPI XML using some mapping and post the result to R3 using RFC adapter.

    At the R3 End , you should have a BAPI which does the posting to R3 and send back the response to your web page.

    The whole process would be a synchronous.

    Let me know if this is helpful.

    Rgds,

    Senthil.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi guys, thanx for answers!

      Senthilnatan, I didn't mean it this way. I meant, that you want to get some web page from internet into your R/3. So R/3 sends request to XI, XI gets the page and sends it into R/3. There is no prob R/3<->XI, but XI<->web page.. XI could send GET request, but can not handle response.. To get any (for example HTML) content into XI is via HTTP receiver adapter, which is in fact HTTP server and you MUST send the data via POST method and the HTML content is one of the params.

      Haowever, thanx guys!

      We probably try to solve it woth Java proxies..

      Thanx for hint, Mario!

      Peter

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.