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

Call a BAPI/Proxy from a UDF

Hi,

I am trying to call a BAPI present in SAP system from XI using a UDF in message mapping.

I'm totaly not clear with my design.Wud like som help.

My requirment wud be to call the BAPI from a UDF.A synchronous proxy can be designed for this BAPI structure and can we call this +proxy+ from a UDF and use the response received from this proxy in further mapping. Eg: Source Structure- > UDF -> call BAPI(Proxy)- BAPI response -> Target Structure

I presently dont have the proxy being created in mySAP system.So can there be a chance for me to create a java proxy whcih wud call BAPI and receive the response.

References

-


SAP library http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/frameset.htm

Java API http://pbsaccounting.sourceforge.net/darkslide/javadoc/umich/cac/queryengine/LookupService.html

Threads https://www.sdn.sap.com/irj/sdn/forums https://www.sdn.sap.com/irj/sdn/forums

Thanks

Chetana

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Jan 30, 2008 at 06:08 AM

    First of all, during lookups it is a direct RFC call and no Proxy

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/801376c6-0501-0010-af8c-cb69aa29941c

    So can there be a chance for me to create a java proxy whcih wud call BAPI and receive the response.

    No proxy implementation is required

    Regards,

    Prateek

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 06:51 AM

    Hi

    Thank you for the replies.I could completely understand how to make a rfc call and webservice call from udf.

    I would like to take my question further.The BAPI in the SAP system would be as a synchronous proxy.Is there a posibility to call this Proxy from my UDF and get a response.If its possible,which adapter should i use.The lookupservice api call make a call depending on the service name and channel.So is this proxy call possible.

    Prateek,Iam unable to open the link u sent.

    Thanks

    Chetana

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Prerequisites for the lookups...

      The mapping lookup API is available as of SAP NetWeaver ’04 SPS13.

      The API for mapping lookups supports access using the RFC, JDBC, and SOAP adapters. If you want to use a third-party adapter for a mapping lookup in an application system, the adapter must fulfill the following requirements:

      ● The adapter must support synchronous calls.

      ● The adapter must not depend on information from a receiver agreement. If the adapter depends on this information, processing of the mapping lookup is terminated.

      You can only execute mapping lookups using the central Adapter Engine.

      Regards,

      Sunil.

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 07:17 AM

    Hi

    If i make a receiver rfc adapter where server type is SAP.My UDF will be able to call the rfc channel.I use the Lookupservice API available.

    But the doubt i have is, can this rfc channel be able to connect to the synchronous proxy (BAPI) in the SAP system. Can this be possible.

    Thanks

    Chetana

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 06:18 AM

    Hi,

    This article provides details on the usage of Generic Lookup API used for calling RFC from user defined functions. https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439

    Below are few links:

    RFC Lookup.

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439

    SAP XI Lookup API: the Killer - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer

    DB lookup - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

    SOAP Lookup - /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function

    cheers,

    Sunil.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 09:27 AM

    If its not a abap proxy .say its java proxy then can udf call the BAPI with rfc channel?

    RFC call to BAPI is possible and i can call it from a UDF.Also if its a webservice i can make a soap call from the udf.

    Is there any other way i can call the BAPI in SAP system.

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

    • If its not a abap proxy .say its java proxy then can udf call the BAPI with rfc channel?

      No

      RFC call to BAPI is possible and i can call it from a UDF.Also if its a webservice i can make a soap call from the udf.

      Yes. Also for a databse lookup, udf can be used

      Is there any other way i can call the BAPI in SAP system.

      Yes.

      1. Directly configuring the RFC adapter

      2. Using ABAP proxy and then in tht code calling the RFC

      Regards,

      Prateek

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.