Exposing ABAP function modules as web services

Hi All,
I am trying to expose function modules as web service but when i click on 'Web service Homepage' button it is throwing error :
"Setting for J2EE server do not exist".
Could you please guide me through this?
Regards,
Abhijeet.

hi
r u releasing the web service for FMs
here r the steps.
To release FMs as webservice it should be RFC enabled.
then goto SE80 and search for the FM u want to release web service.
then right click on the FM
then Create->web service
then give the web service name then continue.
click on chk box for relase run time.
then assign one request and package
now goto WSADMIN tcode ahere u can see ur webservice and then use that.
mark points if helpful
Regs
Manas Ranjan Panda

Similar Messages

  • Benefits of exposing function module as web services

    Hi All,
    We are developing a case study about exposing function modules as web services.
    Those web services would be later used for integration to SAP box with a Java application.
    Kindly help me with the pros and cons of exposing function modules as web services when compared to SAP PI. Also please do quote some examples, wherever possible.
    Thanks,
    Varun

    Hi Varun,
    Pros--->
    1)Exposing FM as Web Services is indeed a good choice when you want service consumer to be platform and language independent.
    i.e it can be consumed by .Net, java or any other language.
    2) You are moving towards SOA
    3) Composing Business Process by concatenating different functional modules is easy.
    4) Complexity is less while consuming services Java, CAF etc.
    Cons----> Performance for Web Services is comparatively less than JCo .
    If you are bringing PI in between landscape, you are increasing one more layer of middleware which would also hit performance.
    The benefit which PI can give is monitoring your company wide integrations at one central point when you have huge systems.
    Hope this helps.
    Piyush

  • Migrating BAPI & RFC function modules into web services

    What is the advantage of migrating BAPI & RFC function modules into web services?

    Hi.
    That's a very good question. Why did you ask it, are you considering doing so?
    I wouldn't think there would be any performance advantages using WebServices.
    You could make your BAPI's available for other systems than Web Dynpro or SAP systems by turning them into WebServices.
    That could be an issue when you want to use different integration engines perhaps.
    A WebService might also be better for dealing with large number of requests I guess.
    When dealing with XML you can also use the advantage of XSLT for validating your data.
    The main advantages would still be the availability of your service for non-SAP systems.
    /Mikael

  • RFC_NO_AUTHORITY calling ABAP function from a Web Service

    Hi,
    We have a web service that publishes existing BAPIs, and some custom ABAP functions.
    When calling the custom ABAP functions we a "system exception" in the client side. Looking at SM21 the log has a dump:
    The user "1DDD8B960830" in the client 310 attempted to execute the function
      module
    "RFCPING" from the function group "SYST", but does not have the appropriate
    RFC authorization.
    Error in the ABAP application program.
    The current ABAP program "SAPLSYST" had to be interrupted because it contains
    a statement that cannot be executed.
    We're on  SAP-Release 710
    Please take into account that RFCPING is not a function we're calling...
    Any help would be appreciated
    Edited by: Enrique VETERE on Jun 25, 2008 5:35 PM

    Hi Enrique,
    a search for string "RFCPING authorization" in SAP notes shows up note 1108662 as the result, solution:
    > Add the function group SYST to the RFC authorization. Add the function group "SYST" to the default role SAP_BC_WEBSERVICE_SERVICE_USER in the authorizations for "Cross-application Authorization Objects" in the area "Authorization Check for RFC Access" and the object "Name of RFC object to be protected" and save and activate this role. You should then execute a user comparison for this role."
    Please check the complete note.
    HTH, regards, Boris

  • How to use an ABAP exception as a web service fault

    Hi experts,
    I have created a web service out of an ABAP function module, using the SAP standard wizard for web services. The ABAP function has some exceptions defined. Now the question is: How can I "translate" these ABAP function exceptions to web service faults?
    In the WSDL file I can see that the web service defines the faults, but they are not part of the web service operation (in the WSDL file). So when I load the definition into JDeveloper, the faults are not recognized.
    Any ideas what I am missing here?
    Thanks in advance!
    Kind regards, Matthias

    Exceptions from SAP function module are not translated as web service fault message, this is a standard behaviour due among other to the fact that exceptions are not "in line" with the definition a web service fault message.
    Usually when you want to use a standard SAP function module and expose it as web service, you need to "wrap-it" into a new Z function module.
    In that new function module you must capture the exceptions and convert them into a web service fault message structure (usually containing error type, text and number)
    Karim

  • Issue in creating web service for a ABAP Function Module

    Hi,
    now i'm learning how to create web service for a ABAP Function Module. I used the following steps.
    1. select the Function Module, named "zws_test".
    2. in the context menu, select "create->proxy object". so we enter into wizard.
    3. in the wizard, press the radio button "Service Provider".
    4. in the next page, press the radio button "Existing ABAP Objects(Inside Out)".
    5. In the next page, Enter the "zws_test_prvider" as Service Definition and select "Function Module" as Endpoint Type.
    6. in the next page, enter "zws_test" as Function Module and mark the "Mapping der Namen" button
    7. in the next page,select "PRF_DT_IF_SEC_LOW" as Profile and mark "Deploy Service".
    8. Save in the local package.
    9. then it will pop up a window with title "WSDL Source". i selected "URL/HTTP Destination" and press "OK".
    10.in the next page, i enter the URL as "http://hostname:portnumber/", and press "OK".
    11. then it will pop up a window with title "Display logs". A record with error message "HTTP error(return code 404, message "Not found")" appears.
    12. i press "ok" and a service provider with name "zws_test_prvider" appears in my local package.
    13. i use "zws_test_prvider"'s URL to create a service consumer "ZCO_WS_TEST_CONSUMER" and logic portal "LP1".
    14. But when i test my service consumer "ZCO_WS_TEST_CONSUMER", it will throw an exception "cx_ai_system_fault" with errortext "SOAP:14 Unexpected element -el=definitions ns=http://schemas.xmlsoap.org/wsdl/".
    15. I use t-code SM59 to test connection  and get the following info.
          Status HTTP Response     200
          Status Text                      OK
          Duration Test Call             328 ms.
    who can give me the reasons about item 11 and 14, and explain me how to create service provider and service consumer for a Function Module.
    Thanks in advance
    Johnney

    have you seen this weblog
    /people/thomas.jung3/blog/2004/11/15/bsp-150-a-developer146s-journal-part-xiii-developing-abap-webservices

  • Exposing an RFC enabled function as a Web Service in Minisap

    Hi all,
    i'm trying to expose an RFC enabled function as a Web Service in my Minisap installation. Everything works fine, until i actually want to finish the Web Service wizard. It always quotes that the object can only be deployed in an sap paket. If i try to put it in the $TMP paket, by marking it as a local object, i always get the message that test objects can not be deployed in external pakets.
    Any idea?
    Furthermore the virtual interface with the name i selected in the Web Service wizard seems to exist, at least i can not try to deploy the Web Service again with the same name. Actually, i also can't find a place where i can delete the virtual interface. Any hint on that issue is also appreciated.
    Thanks in advance!
    /Marc

    I wanted to write a web service adapter:
    @WebService
    public class MyWebService implements StreamSender {
         private StreamSender eventSender;
         @WebMethod
         public void echo(String msg) {
              eventSender.sendInsertEvent(new MyEvent(msg));
    After deploying I've got NullPointerException, eventSender is null. This is because MyWebService instance is NOT on the spring context, since it was created by jetty via reflection.
    So now I'm trying another approach. I want to inject an adapter from the spring context into the web service:
    I wanted to write a web service adapter:
    @WebService
    public class MyWebService {
         private MyWSAdapter myAdapter;
         @Resource
         private WebServiceContext context;
         @WebMethod
         public void echo(String msg) {
              myAdapter = getMyAdapterFromSpringContext();
              myAdapter.sendInsertEvent(new MyEvent(msg));
         public MyWSAdapter getMyAdapterFromSpringContext() {
              ServletContext sc = (ServletContext) context.getMessageContext().get(MessageContext.SERVLET_CONTEXT);
              ApplicationContext springContext = WebApplicationContextUtils.getWebApplicationContext(sc);
              return (MyWSAdapter) springContext.getBean("myWSAdapter");
    So far i'm getting java.lang.NoClassDefFoundError for org.springframework.web.context.support.WebApplicationContextUtils (org.springframework.spring-web_2.5.6.jar), and trying to figure out where is the jetty classpath.

  • Web Dynpro Java Internationalization and backend ABAP function modules

    Friends,
    I have a requirement where I want my Web Dynpro Java application to support BRAZIL and CHINESE.
    I have been through the sample programs and tutorials and I understand how to support my application in these 2 languages. The challenge I am facing is how to communicate the language to the backend code (ABAP function modules) so that the function modules can written language specific error messages and texts.
    I searched SDN but could not find anything. Your help is appreciated.

    Prashant,
    When you are configuring JCo connection in WebDynpro Content Administrator, just left language settings blank for metadata connection (you may do the same for data connection). Now WD will supply language of currently logged-in user when obtaining connection settings from system landscape and you'll get necessary functionality.
    By default locale of user determined by parameter sap-locale (sap-locale=de_DE for example), settings of user's browser and lastly preferences of user stored in UME.
    Btw, BRAZIL (or Portugees for this matter) is not fully supported language by SAP, so R/3 side may be not  translated or partly translated.
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • TP3 bug when exposing app module to web service

    Hello,
    I created a simple appmodule with 3 methods:
    public class AppModuleTestImpl extends ApplicationModuleImplApp
        /**This is the default constructor (do not remove).
        public AppModuleTestImpl()
        public String method1()
            return "hello world";
        public SomeBean method2()
            return new SomeBean();
        public String method3( SomeBean bean )
            return "hello world";
    }I want to expose those methods in a web service but in the "service custom methods" selection I can only see method1 even if SomeBean implements java.io.Serializable:
    public class SomeBean implements Serializable
        private String someField;
        public SomeBean()
        public void setSomeField(String someField)
            this.someField = someField;
        public String getSomeField()
            return someField;
    }The documentation says: "Your custom method parameters and return types can use any datatype that implements the java.io.Serializable interface."
    When I look in the message tab I see this:
    Business Components: Method "method2():SomeBean" cannot be exposed via service interface because the return type "(package).SomeBean" is not supported
    Business Components: Method "method3(SomeBean):String" cannot be exposed via service interface because parameter type "(package).SomeBean bean" is not supported
    where (package) is the correct package of the bean.
    Is this a bug?
    Thanks
    Message was edited by:
    user608288

    Can anyone confirm this problem please?

  • Calling an ABAP function module

    Hi friends,
    I am developing an application in EP6 SP2 using JSPDynPage from which, want to call an ABAP function module that returns table and show the values from this table in this application.
    I went thru various blogs and APIs. I am confused between SAP JCO, JCO client service and connector framework. Do u have any documentation on how to connect to R3 systems and call a function module, retrieve results etc.
    Regards,
    Nilz

    JCo is the point to start. This gives you low level access to all rfc functions. Everything else (accept BSP and Web dynpro) are just layers of encapsulation around the low level JCo function.
    The steps are always like this:
    call the sap system for rfc login
    prepare data areas and call in java
    call the rfc in the R/3 system
    handle exceptions
    logoff and free ressource
    continue with data obtained in R/3
    There is a lot of material around jco. One book that is fairly ok is :
    SAP Interface Programming
    A comprehensive reference for RFC, BAPI, and JCo programming
    J. Meiners, W. Nüßer
    SAP PRESS ISBN 1-59229-034-5
    This helps you navigate through the wealth of information also at SDN

  • Publishing Application Modules as Web Services runs into error

    Hello,
    I want to create a web service based upon and ADF BC Application (in other words, based upon a data control).
    I want to expose the ADF BC Application functionality (DML, calling of procedures) via Web Service.
    I read in the Developers Guid for Forms4GL Developers, parapragh 33.4 (Publishing Application Modules as Web Services), how this can be done:
    How to Enable the J2EE Web Service Option for an Application Module
    To enable your application module as a web service:
    1. Enable a custom Java class for your application module and add to it one or more
    custom methods that you want to appear on the web service interface.
    2. Open the Application Module editor and on the Client Interface tab, select one or
    more custom methods to appear on the client interface.
    3. With the Application Module editor still open, on the Remote panel, select
    Remoteable Application Module, select J2EE Web Service in the Available list
    and shuttle it to the selected list.
    4. Then click OK to save your changes.
    When I follow this series of actions I get the following error:
    Failed to validate method
    oracle.javatools.parser.java.v2.classfile.ClClass$ClMethod@3146a021
    java.lang.IllegalStateException: Failed to validate method oracle.javatools.parser.java.v2.classfile.ClClass$ClMethod@3164a021 whether it is publishable
         at oracle.jbo.dt.jdevx.JdvWebServicePlatform2.getMethodPublishableStatus(JdvWebServicePlatform2.java:254)
         at oracle.jbo.dt.objects.JboWebServicePlatform.generateWebServiceCode(JboWebServicePlatform.java:308)
         at oracle.jbo.dt.objects.JboWebServicePlatform.createServer(JboWebServicePlatform.java:100)
         at oracle.jbo.dt.objects.JboDeployPlatform.createRemoteClass(JboDeployPlatform.java:2077)
         at oracle.jbo.dt.ui.module.AMSaveRemoteThread.doGeneration(AMRemotePanel.java:671)
         at oracle.jbo.dt.ui.module.AMSaveRemoteThread.run(AMRemotePanel.java:658)
    Who has any ideas?
    Regards Leon Smiers

    repost

  • Expose C based system as Web Service

    hi,
    I have a C based MES which is storing data in non-relational file based DB from Stratus.
    I need to integrate this system with SOA.
    Not sure how do I expose this system as a web service.
    Any thoughts, any links are most welcomed.
    Thanks in advance.
    Regards,

    No, it is not yet possible.
    You can only create a web service for an RFC Function Module, Function Group or Business Object.
    You may create a RFC FM as a wrapper to your Class methods and create a web service on the RFC FM.
    Regards,
    Naimesh Patel

  • Expose a class method as web service

    hi ABAPers,
    is it possibile to expose a class method as web service? I would like to write a base class with common code, while derived classes implement specific application logic.
    I have both R/3 6.40 and Netweaver 7.0 kernels, so I'm interested in both.
    thank you.

    No, it is not yet possible.
    You can only create a web service for an RFC Function Module, Function Group or Business Object.
    You may create a RFC FM as a wrapper to your Class methods and create a web service on the RFC FM.
    Regards,
    Naimesh Patel

  • Limitation on data that can be fetched (ABAP RFC) via a Web Service?

    Hi,
    Is there any limit on the data that can be fetched via a Web Service (ABAP exposed as Web Service). I am trying to fetch PI monitoring data from ABAP Tables via a Web Service and there can be thousands of messages proceesed say in a day and what if user is provided the option of fetching messages for a specefic duration.
    Please advise.
    Neha

    Hello my friend
    If I understand your question correctly, there's an environment variable CPIC_MAX_CONV handles sessions between integration engine and adapter engine (ABAP and Java). By default, the value of this variable is 500, and you might want to increase it to 1000 at least, depends on system throughput. Recommended value from SAP for Production is 5000.
    Hopefully it's helpful,
    Effan

  • Debugging of ABAP Function Module through ISA Application CRM B2C 4.0

    Hi Experts
    There is way to Debug ABAP FM through ISA CRM b2c Application by Modifying some XML Files as per Extn Guide.
    I tried modifying the <APPLICATION_HOME>\WEB-INF\xcm\customer\modification\modification-config.xml After that I restarted the Application .
    But it is not Breaking for Both Statefull & Stateless FM after running my Application.
    With Some Help i found that if we try it on Remote System ( Means SAP GUI has to in Same System where CRM is Installed ???????????). but that is not Advisable Right !!!.
    So if i am able to Debug ABAP Function Module through ISA Application from any Other remote System.
    I think it will be very Useful.
    Thanks & Regards
    Ravi Sah

    Ravi
    It is other way around !!!
    You should have SAP GUI installed on the machine in which you start(access) your B2C Application. This enables for ABAP Debugging.
    We have tried this and works fine for us !!!
    Thanks
    Jack
    <b>Allot points if my post helps !!!</b>

Maybe you are looking for

  • How to adjust the page size

    I have an indd file with a magazine, 44 pages, format 210 mm. x 275 mm. My problem is that from the beginning I made it in A4 format. This is not a problem for the printing workshop, but it is a problem when I make a pdf file, because it comes out wi

  • What is a safe CPU temp?

    So I've noticed my MBA has been getting up to 90 degrees+ while gaming (I know these aren't meant for that, but hey, it works so it will). Anyway, I was wondering if such high temps was healthy and if they are okay, and if they are fine, is it health

  • Message: the specified nodes are not clusterable

    Hi, I am geting message "the specified nodes are not clusterable" at the time of crs installation on solaris 10. i have already configure ssh and configure properelly. please suggest. thanks Anup

  • Generic File Adapter Schema

    I am trying to pick up a .csv file that doesn't comform to a strict format, mainly because of human formatting errors in the file. I've tried to create a fixed length schema and a comma delimited schema but both fail as soon as they get a file that d

  • Konsole count down same line

    I'm trying to do a count down in a terminal program. However, how can i get the effect of counting down without having to print new lines or having it appear as 88 87 86 and so on. I know how to count down and everything im just not sure as to how i