Skip to Content

Connect to BAPI with web service

Hi everyone,

I am trying to make a web service that call a BAPI and retrieve a result (a table or a structure).

Is it possible ? If yes, how ?

Thanks a lot.

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    Posted on Jan 03, 2005 at 03:02 PM

    Hi David,

    You can create web service use WAS (J2EE) web service framework or use portal web service framework.

    The old (second) way is portal WS.

    I don't know how to get equivalent for portal request in WS, but you can use SOAPRuntimeContext.get.... for some data you need (like CurrentUser).

    Regards,

    Roman.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Frederic,

      For some obscure reasons, I (and all the R&D) do not have the possibility to create wsdl files with se37. Maybe we have no authorizations....

      - Do you know how to create the wsdl file from a SAP Enterprise Connector ?

      - Can we create a client that is only a Java Class ? If yes, how do we deal with authentication. I remember that when I was coding Portal Components, I was passing the request object to the connection. The framework did authentication using SAP Ticket automaticaly.

      But how to do the same thing only with a Java class (or C#...) ?

      Thanks Frederic.

  • Posted on Jan 03, 2005 at 11:31 AM

    Hello David,

    You can create portal web service call JCo Client portal service - it will establish connection and retrieve data.

    See link for JCo:

    http://media.sdn.sap.com/html/submitted_docs/60_sp2_javadocs/sapjco/index.html

    Regards,

    Roman.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Roman,

      I already did a connection to BAPI using JCo connection.

      I am using Netweaver 04.

      I thought that I could make my application become a web service by executing a wizard...like making an EJB or a java class a web service.

      So, if I understand good, there is no new ways to create a web service with Netweaver 04 for applications that would connect using JCo. I have to create a service. In this service connect to SAP/R3 using JCo.

      And finally create a web service from a service.

      Is this right?

      Thanks.

  • Posted on Jan 03, 2005 at 12:52 PM

    Yes, you right - The old verified way 😊

    You should always match any service to SOAP, and use only simple objects.

    You welcome notify me - if you will find something else.

    Regards,

    Roman.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 03, 2005 at 01:10 PM

    Could you be more specified ?

    Regards,

    Roman.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Roman,

      I am using Netwaever 04. I followed the tutorials to create web services for java classes and/or EJBs.

      In order to create ws, I created Virtual Interface which is a new stuff in Netweaver 04.

      Now that you told me to create a web service in the old way for connecting to JCo connection, should I create also a virtual interface ?

      Now for creating a client : should I create a proxy ?

      Another question :

      In the service, I only get a context. How do I get the request object (like in DynPage) ?

      I just try to get the equivalent for

      IPortalComponentRequest request =

      (IPortalComponentRequest) this.getRequest();

      Do u know how ?

      Thanx

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.