cancel
Showing results for 
Search instead for 
Did you mean: 

Call a BAPI/Proxy from a UDF

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

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...

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

Answers (4)

Answers (4)

Former Member
0 Kudos

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

prateek
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

prateek
Active Contributor
0 Kudos

can this rfc channel be able to connect to the synchronous proxy (BAPI) in the SAP system.

An RFC channel can only call an RFC (sync). And by "proxy" if u mean the ABAP proxy, then that call is not possible.

Regards,

Prateek

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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-8214c6d1...

Below are few links:

RFC Lookup.

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

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.