Consuming Busniess Object Operations in Application Service

Hi,
I am currently working on CE7.1.
Is there any way in CE7.1 to consume the operations of a business object in a application service present in the same application? Please give the procedure in detail.
I am able to access the business object structure in the application service by maintaining a dependency but not the operations defined for the business object.
Thanks,
Rahul

Hi Rahul,
I am facing the same problem.
I am not able to access the Business Object Operations namely CRUD operations in the application service.
I have defined the BO as dependencies in the application service.
But when i open the Operations tab, it is empty.
can you please help me out as to how you solved your problem?
Thanks & regards.
Gaurav Raghav

Similar Messages

  • Use the findByMultipleParameters bo operation in application service

    Hi
    I am trying to use the default findByMultipleParameters operation of a business object in an application service.
    I want to use the application service exposed as a webservice within webdynpro.
    But how can I pass all the parameters i a way, that it is not necessary to fill all fields in webdynpro? Is there any example code?
    Any help would be appreciated.
    Bernd

    Hi Ketan,
    You can implement findAll or findById in application service. First while defining the operations set the output parameter to be a structure which contains that BO(You create yourself a complex structure for it-there you can set cardinality).
    Then in the application service under that operation using the service Bean of the BO access the Bo's corresponding methods(either findById or findAll). Get that output and set it in the output parmeter and return it.
    public com.caf.types.FindAllAmendmentsResMsg findAllAmendments(
                   @javax.jws.WebParam(name="inputParameter1")
                   com.hcl.xapps.ipr.caf.types.FindAllAmendmentsReqMsg inputParameter1) {
              FindAllAmendmentsResMsg response = new FindAllAmendmentsResMsg();
              try {
                   List<Amendment> amendmentList = new ArrayList<Amendment>();
                   amendmentList = (List<Amendment>) this.getAmendmentService().findAll();
                   response.setAmendmentList(amendmentList);
              } catch (CAFFindException cfe) {
              return response;
    The above is an example for findAll.
    Hope it helps you
    Regards,
    Srinivasan Subbiah

  • Retrieve multiple records of  Business Object in a Application Service?

    Hi,
    I am working on CE71.
    I want to know how to retrieve multiple records of a Business Object in a Application Service?
    Regards,
    Rahul

    Hi,
    This can be achieved by adding find method on one or multiple attributes of the business object.
    Suppose There is a customer business object with attributes (name, id , city, country ). Now you can add findByCity operation that will return all the Customer Objects which have the City = as entered by user.
    Now this find operation can then be called by your application service and this list can then be returned as output of the application service.
    Hope this helps,
    Ashutosh

  • Complex return type for operations in Application Services

    Hi all,
    I am trying to create a complex return type for one of operation in CAF Application service.I have created a complex dataStructure  named productList and added product bussiness object as its attribute with cardinality 0--n. And used product dataType as my return type.
    But I am not getting any output but its work fine with cardinality 0--1.
    I am using CE 7.1 SP5 trial version.......
    Can anyone

    Hi,
    And used product dataType as my return type.
    Are you sure you did not forgot to change you operations return type to "productList"?
    Best regards
    Philipp

  • Exception in calling a web service from a composite application service

    Hi,
    I have created a composite application service with external service as a web service. My web service is deployed on localhost as well as I am running my composite application service in localhost. When i try to test the application service, I get the exception
    com.sap.caf.mp.base.exception.InvocationException: Invalid parameters
    The exception happens in MPConnector.java 'process' method where I am calling the execute operation on the service.
    I have tried testing this through Service Browser as well as creating a callable object on the Application service and testing the callable object.
    I am using the NWDS 7.0.06 version
    and EP installed on my machine is the Sneak Preview 7.0 sp 7
    Will appreciate all help in this regard.
    Thanks,
    Prachi

    Hi Navneet,
    I have verified the input/output parameters. They are simple types. All are Strings. Nothing really complex there.
    I have the Service Exceptions added already.
    And definitely the permissions are disabled but still this isn't working.
    Any more clues might be helpful.
    Thanks,
    Prachi

  • Web Dynpro access Application Services directly?

    We're looking at implementing some processes using Guide Procedures, and I have a question about design 'style'.
    I'm creating a data layer using Entity Services.  The entity services will be utilized by the Application Services to create a business layer.  How to do this is clear, and straightforward.
    However, where I have a question is how the automatically generated Web Dynpro application (or any other Web Dynpro application, for that matter) can interact with Application Services.  I've seen sample applications where the Web Dynpro application interacts with application services via mapping from the Web Dynpro interface layer through the GP Runtime - from my perspective, this looks like a good way to deal with a small amount of data being passed between the steps in the GP.
    The primary Web Dynpro application will let the user interact with the data, massaging it until it's in a form where the next person needs to deal with it.  I was thinking of having the Web Dynpro application interact with the Application Services layer directly to move data from the database to the web dynpro application, and back again.  The only thing that would be passed between the steps in the GP would be the guid of the primary data structure.  I would also expose a method of the Application Service as a CO which would take the guid and return the entire business object, so viewing screens could be constructed - as well, PDF's could be generated, and so on.
    Is this considered bad form in a GP, specifically accessing Application Services directly, instead of through a step in the GP?  I understand that what I want to do ties the Web Dynpro application directly to the Application Services layer, but my thinking is that the CO that encompasses the Web Dynpro should be 'atomic', in that all operations related to that specific step should be contained in a single CO.  In other words, the action of creating the business object, fiddling with it, an then submitting it upstream should be contained in one CO.
    Comments, suggestions?

    Hi,
          In the Composite Application Framework scenario, you first create the Business Entities. These act as data holder. To fill the data within these entities the Application services are created. These application services are later exposed as a webservice and deployed.
                   These webservices can contain different methods along with the CRUD operations depending on the Process Flow and Design implemented. We can import the webservices as a model in the WebDynPro Component. The UI elements of the Views can be binded to the Model. So when we execute the model methods the data gets entered into the Business objects.
                   This WebDynPro component should be a callable object ( It requires some Dependencies to be added to the WebDynPro Component ). So that you can have Input/Output parameters and ResultStates. These parameters are useful if you have to pass some parameters from one view to other within the same component. So this WebDynPro Callable object includes the Application service calls and also the passing of data through the GP Input/Output Structures.
                   These callable objects are then included within the Process.
      This is how I think a Composite Application must be designed.

  • Design of application service

    Hello CAF Experts,
    I created a CAF business object with some entity service. Now I would like to create an application service on top of that. The question is how should this be designed.
    Is there a way to call CAF entity service directly from the new application service. If so, has anybody a coding example?
    Or is it the better way to import the entity services as external webservices and access them from the new application service? Also here I would appreciate a little coding example.
    Thanks,
    Michael

    hi,
    For Business Objects:
    You have created the Business Objects all ready.
    Now, Create an application service. Add your Business Objects as dependency to the application service so that you can access these business objects in the application service.
    For example, Travel is a Business Object. TravelAS is an application service. Now add Travel as a dependency to the TravelAS. In the TrvelAS, You can access Travel using the following code.
    List<Travel> travelList = this.getTravelService().findByStartLocation(
                        startLocationQF);
    [Creating application service.|http://help.sap.com/saphelp_nwce711/helpdata/en/45/173644c24026cae10000000a11466f/content.htm]
    For external services:
    First you import the external saervice(Web service/ RFC) in to your project. Then create application service and do default mapping between your imported external service and this application service. The application service acts as a wrapper for the external service.
    [Architectural Guidelines for Business Logic|http://help.sap.com/saphelp_nwce711/helpdata/en/45/173644c24026cae10000000a11466f/content.htm]
    Thanks

  • Calling an operation of a exposed Application Service fails

    Hi,
    I have created two applications A & B.
    Application A has a business operation1 and a application service1. Application service1 calls some operations on the Business Object1 and is also exposed as a web service.
    In application B, I have consumed the exposed Application Service1. In application B, there is also one appication service2 which is calling operation of the application service1.
    On executing the application B, I get the an exception ObjectNotexist exception when the call to an operation in Application A is made.
    However, application A works perfectly fine when executed independently.
    Regards,
    Rahul

    Hi Rahul,
    It seems the reason is you have not created the destination for the Web Services exposed from your application A.
    See, there are two ways of importing the services from project A into project B
    1. You can re-use the project A in Project B, set the dependencies appropriately, and use the services of A in project B.
    2. You can expose the services from A as web service and then import them in B & then use them.
    You have chosen the second option (Which is not recommended way). This type of usage requires you to create "external service configurations" to define endpoints for the imported services in project B.
    This is how u do it : Open the Service Registry at http:///caf ® Administrative tools ® External Service Configuration.
    Check this link for more info
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/2a508e74d33f66e10000000a11466f/frameset.htm
    Hope this helps,
    Ashutosh

  • BO-findAll operation to use in Application service

    Hi Experts,
    I am new to CAF development, i have requirement that i need to read the CAF database records based on the Custom key created. It returns a object with the entire record( sometimes multiple records) so how to read those records from the object(return value) and display them one by one.
    It would be helpful if you could send some sample code.
    thanks
    ketan

    Hi Ketan,
    You can implement findAll or findById in application service. First while defining the operations set the output parameter to be a structure which contains that BO(You create yourself a complex structure for it-there you can set cardinality).
    Then in the application service under that operation using the service Bean of the BO access the Bo's corresponding methods(either findById or findAll). Get that output and set it in the output parmeter and return it.
    public com.caf.types.FindAllAmendmentsResMsg findAllAmendments(
                   @javax.jws.WebParam(name="inputParameter1")
                   com.hcl.xapps.ipr.caf.types.FindAllAmendmentsReqMsg inputParameter1) {
              FindAllAmendmentsResMsg response = new FindAllAmendmentsResMsg();
              try {
                   List<Amendment> amendmentList = new ArrayList<Amendment>();
                   amendmentList = (List<Amendment>) this.getAmendmentService().findAll();
                   response.setAmendmentList(amendmentList);
              } catch (CAFFindException cfe) {
              return response;
    The above is an example for findAll.
    Hope it helps you
    Regards,
    Srinivasan Subbiah

  • Calling operation of the exposed BO Service in another Application Service

    Hi,
    I am working on Composite Application development in CE7.1.
    I have the following scenario:
    A business object is exposed as a web service.
    The web service of the business object is imported as an external service in another CA Application.
    On the composite application explorer,
    under the "composite application --> external --> External Services" node I can see both the operations provided from the exposed business object.
    My Question: If I define an operation on the application service as implemented, how can I call the operations of the exposed business objects?
    Thanks,
    Yasar

    Hi Yasar,
    Fallow the fallowing steps.
    1)  First expose your BO(Exp_BO) as a web service.
    2) Import that web service( (Exp_BO) as an external service in what ever project you want.
    3) create an application service(eg AppService)
    4) right click the imported external service and choose default mapping. select "create methodes in existing application service" and choose AppServioce.It will create the methodes with same name and map them to the Exposed BO methodes.
    5)Next in the implemted method call the web service(ExpBO) methodes.
    I am giving an example:
    LocalInventorBO is the local BO.
    Inventor is the Exposed BO.It is having a method create(inventorId).This create method dosn't return actual Inventor.But it will create InventorType.We have to use that type.
    public com.hcl.ramp.types.LocalInventorBO CustomImplementedOperation(java.lang.String inventorId) throws com.sap.caf.rt.exception.CAFServiceException {
              com.sap.caf.demo_sap_com.xipvault_practice1.modeled.InventorType inventorType=this.create(inventorId);
              com.hcl.ramp.types.LocalInventorBO localInventorBO=     this.getLocalInventorBOService().create();
              localInventorBO.setInventorId(inventorType.getInventorId());
              return localInventorBO;

  • How to use an Adobe interactive form in an Application service operation?

    Hi,
    I have a peculiar requirement here:
    The user wants that on the trigger of a specific operation an operation of the Application service should get invoked: this operation should pick up a Adobe form template from a destination and then prefill this forms with some values and then store the same in the backend DMS.
    It's very easy to accomplish this task in WD Java with the use of Interactive form element but here we don't want any kind of user interaction for these forms, just the form templates will be prefilled with some dynamic values and then the same will be saved as is.
    Can some one please provide some insight into how the same can be acieved, any API's etc?.
    Please reply ASAP.
    Regards,
    Manish

    hi
    try this tutorial on
    online interactive
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on online interactive pdf form - 29.htm
    for offline interactive form
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on offline interactive pdf form using download - 30.htm
    for downloading and uploading pdf forms
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on offline interactive pdf form using e-mail - 31.htm
    regards
    saravana

  • Object null reference error while creating Web applications, Service applications etc after restoring AD accounts

    Hi,
    The old Active Directory accounts of my server were removed, those accounts are used by some of the SharePoint sites. A new AD account was created and when I try to replace the old accounts with new I am facing issue. I am also unable to create new web application,
    service application from my Central Administration. I also tried by restoring old accounts but still I am facing same issues, I
    am getting the error message Object
    reference not set to an instance of an object. for any create activities in Central Administration.
    Thanks in Advance for your help

    Thanks for the reply. When I am trying to update service account of services also I am getting error
    message Object
    reference not set to an instance of an object. i.e., while selecting component(web/service application from drop down) redirecting to error page

  • How to use an Interactive form in a CAF Application service operation ?

    Hi,
    I have a peculiar requirement here:
    The user wants that on the trigger of a specific operation an operation of the Application service should get invoked: this operation should pick up a Adobe form template from a destination and then prefill this forms with some values and then store the same in the backend DMS.
    It's very easy to accomplish this task in WD Java with the use of Interactive form element but here we don't want any kind of user interaction for these forms, just the form templates will be prefilled with some dynamic values and then the same will be saved as is.
    Can some one please provide some insight into how the same can be acieved, any API's etc?.
    Please reply ASAP.
    Regards,
    Manish

    Hi Manish,
    If I get you correctly then you want to Upload a prefilled Adobe IF from some location without any user interaction and save it to some Backend/Temp storage: You need to have something like you have a user inbox and mail comes to this with the Adobe Form as an attachment, you extract the attachment and read it using available Java apis for reading. You can also specify a particular folder where you can place the filled form and then read it using FileInputStream and can save it in the backend after you have it in binary form in your application.
    Hope this helps!!
    Cheers,
    Arafat

  • Business Objects, external services and application services in CAs

    Hi All,
    right now we are developing our first eSOA Composite Application with CE and I have some questions regarding Business Objects, the import of external services and the development of application services.
    As I understood there are two ways to provide business functionality for composite applications:
    a. Import backend functionality as an external service (e.g. BAPI, RFC) at the CAF, build the application service which can be used as a callable object for UIs or the GPs
    b. Develop a local Business Object (in CAF) providing the business logic, create the application service which again can be used as a callable object. Furthermore the application service can be exposed as a Web Service (external service).
    My questions:
    1. When is it appropriate to to import external services in stead of developing local BOs?
    2. Under what conditions is it advisable to (solely) develop local BOs?
    3. What are the advantages / disadvantages regarding the reusability of the services (in option a and b)?
    Note: We are developing on NetWeaver 2004s.
    Please let me know, if you need more information to answer the questions!
    Thanks for your advice in advance,
    Regards,
    Ivonne

    Hi Ivonne,
    first of all, the CAF Business Objects (BOs) itself don't contain any business logic, they're basically just local database tables (with some CRUD services on top).
    Business logic is implemented in Application Services (AS).
    Now, regarding local BO's vs. external services, it depends on your use case. If the data is already available somewhere in your backend system it makes sense to use external services. For instance you wouldn't want to store business partners all over different composites. For data that is specific to your composite (in particular configuration, customizing etc.) and not likely to be reused by other applications you should use local BOs.
    Accessing local BO's is also much faster than calling external services.
    You can do reuse in both scenarios, since the CAF services can be exposed as web services.
    Regards,
    Christian
    Edited by: Christian Loos  on Apr 8, 2008 6:11 PM

  • Parameter's name of Composite Application Service's operation

    Hi All,
        When we define a operation of Composite Application Service, we just simply add it from operation tag, and add the input & output parameters by choosing the attribute type and click the add-as-input button. The added parameter would be something like arg0, arg1, etc.
         Is it possible possible to change these parameter's name into semantic word instead of these meaningless ones?
    Thanks

    Hi,
    Select the operation parameters and open the properties view below. There you can change the name of the parameters.
    Thanks,
    Dipankar

Maybe you are looking for

  • HP ps 2115 - doesn't print correctly from internet

    I previously used AOL as my internet provider, and had no problems with printing stuff from the net. Ever since I changed to SKY Broadband (whih uses Internet Explorer 7), my HP psc 2115 will not print straight from an internet screen. It prints ever

  • Error while sending mails from SAP

    Hello Experts, I am facing the below problem: If an error occurs during the processing of a Z SAP transaction, an email needs to be sent to the user who is executing the transaction. So, in this case the sender and receiver is the same user. But the

  • Unable to view Catalog in PSE9 trial version

    Having used PSE6 for some time now, I decided to give PSE9  a try out.  After downloading & installing, I tried to import my photos into the catalog, but I keep getting the message 'nothing was imported; the files selected did not contain any support

  • Radio Button and Redirect

    Hi, I have a simple Yes/No radio button. When you user clicks on Yes, I would like to forward the user to one page. If the user clicks on No I would like the user to go to another page. Can this be done without a submit? Thanks in advance. VC

  • Premiere Pro CS5 Crashing When Cutting Unlinked Audio

    Premiere crashes often when I attempt to cut an unlinked audio track.  Message appears "A serious error has occurred and Premiere must close".  Timeline has only 1 video and 2 mono audio tracks from 30p miniDV source material.  Running version 5.0.3