Entity an application service Operation!!

Hi Experts,
A small question!!! Can I create an Entity service operation without any custome key and without giving any inpu parameter and the corresponding Application service operation in the same way??
This is so that someone can directly get access to all the data stored in the local persistency in the Entity service without giving any input parameters to access them???
Thanks,
vikram..

Hi Vikram,
You can create it. Create an operation within entity service, do not set any input parameter. Within your application service go to dependency tab page and set the dependeny with your entity service. Then within the operation tab page of your application service create an operation of type "Query" abd within data source select your entity service. Now within inplementation tab page of your application service select the operation which you have created. Now put the following code within the custom codding area of your operation.
retValue = null;
<Name of Entity>ServiceLocal cs = this.get<Name of Entity>Service();
retValue = cs.<Name of Operation of Entity service>;
I think this will solve your problem.
Thanks
Chandan

Similar Messages

  • 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

  • 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

  • CAF  entity and application service

    hi
              when we are importing RFC or Webservice  for  external service 
               can we use application service directly  instead of  entity service
                   is it possible to use only  external service and  without entity  service  .

    Hi
    Yes you can do that.
    Entity Service is Used to Store the Persisitant data relavent to the Business Object.
    Application Service is used to Manipulate the Entity Service.
    Regards,
    Rajendra

  • Problems updating Entity services or application services

    Hello all,
    I'm working with SAP Netweaver Developer Studio creating a new CAF application.
    First all, I import the SAP Entreprise Service, then I model the entity service, I expose my application Service as a Web Service and finally I deploy it and test it.
    However, when I try to edit my entity service (for instance, including a new attribute) or application service (for instance, changing the bussiness logic code) and I redeploy it, the Web Service Navigator doesn't update the changes.
    So, sadly I must start again configuring the entity and application service.
    Any idea??
    Thanks,

    everytime you change the signature (structure of input/output) of the entity or application service, the change is not automatically propagated to the web service definition. you have to delete manually the web service configuration for the entity or application service or recreate it. you can call it a bug or a feature. it's up to you.

  • How to expose a application service as web service?

    <UL>Hi Experts,
       <LI>I have created a business component and application service. i have also built and deployed it,
       <LI>Now I want to expose the application service operation as web service so that I can call the application service from XI or any webservice testing tool like SOAPUI or SOAPSONAR?
       <LI>What are the steps involved in doing this?
       <LI>I have selected application service then right clicked and selected "Expose service as web service".
       <LI>This has generated the WSDL file. After this I don't know what to do.
       <LI>In the WSDL file the soap address location is pointing to a default link (<soap:address location="http://www.example.org/"/>).
       <LI>What will be the actual location look like?
       <LI>For example: http://<CE server>:<Port>/?  <--- what will I have to put here so as to give the exact location?
    <LI>Thanks & Regards
    <LI>Gopal
    </UL>

    Hi Gopal,
    If I am not wrong, you need not do anything to the WSDL.
    If you carefully look at your WSDL in your NWDS, the soap:address attribute will point to the default location. However, the 'location' attribute will be 'Empty'. When you Deploy the Composite Application on the server, the location attribute value will be replaced by http://<server host name>:<port>/<WebService Name>/<Application  Service Name> in the WSDL on the server. The WSDL URL  is generated using the same format, and that is how it recognizes the service.
    You can deploy your application on the server and go to the Web Service Navigator and check the WDSL.
    Regards,
    Ajay

  • Calling Web Dynpro-Model of Application-Service doesnu00B4t work.

    Hello!
    I have created a Composite Application with Entity- and Application-Services. I have also created the WebDynpro-Model and use it in another WebDynpro application to call the services.
    I have a Entity-Service 'PollCatalogue' and an Application Service 'PollCatalogueApp'.
    When I call an Entity-Service to create an entity, it works:
    APollCatalogue pollcat =
                        PollCatalogueServiceProxy.createPollCatalogue();
                   pollcat.setName(name);
                   pollcat.getAspect().sendChanges();
                   IServiceFacade serviceFacade;
                   serviceFacade =
                        CAFServiceFactory.getServiceFacade(diplDefinition.class);
                   serviceFacade.save();
    But when I call the create-Method of the Application service nothing is created:
    the call is similar to above except that
    PollCatalogueServiceProxy.createPollCatalogue();
    is replaced by
    PollCatalogueAppProxy.createPollCatalogue();
    Anyway I don´t understand what is done behind the scenes. My create-Methode has one parameter name, because it is a business key. But the ServiceProxy-create-Methods do not provide a name parameter. What service-methods are called when service-facade.save() is called? In case of Entity-Service-Proxy seems to be the create method. But what if I change more than the key-parameter, what else is called? update? And in case of AppServiceProxy? ???
    Does anyone understand what is going on here?
    Thank you for your help.
    Best regards,
    Jörg

    Hi Jorg,
    About getting an exception:
    IQuery query =... ;
    query.execute() ;
    IMessageList mList = query.getResultAspect().getMessages()
    if (mList.size() > 0) {
         for (int i = 0; i < mList.size(); i++) {
             IMessage mes = (IMessage) mList.getMessage(i);
          Throwable ex = (Throwable) mes.getExtension();
         ByteArrayOutputStream bAOStream = new ByteArrayOutputStream();
         PrintStream pStream = new PrintStream( bAOStream);
         ex.printStackTrace(pStream);
            //use bAOStream in order to show stacktrace
    Regarding conceptual background about Models and Proxys:
    You can find some infomation about wd model:
    <a href="/people/valery.silaev/blog/2005/09/09/common-model-interface Model Interface</a>
    <a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cef4f43e-0d01-0010-db84-ede25c874115">WQhy to use webdynpro common model interface ?</a>
    I don't know about some proxies documentation. Possible it does not exist. So, there is brief information about it:
    CAF data access services - comcafruntime~uicoupling DC. There is an implementation of com.sap.tc.col.client.generic.api api. These interfaces extends generic CMI interfaces. On top of CAF data access services implementation CAF designer generates typed CMI models which you finally use. For supporting of typed CMI models CAF provides additional build-in functionality GCP(generic client proxy) which directly operates over com.sap.tc.col.client.generic.api generic implementation.
    I recommend you to learn CAF data access implementation and read information about CMI model. That's not huge area and it gives you necessary understanding.
    Best regards,
    Aliaksei
    P.S. I don't recommend to learn and investigate the GCP implementation. That's just loss of time. The only thing that you need to know there is a black box layer which converts generic CMI model to typed model. Actually you can use generic model directly without typed. To do this use the following method for service facade getting:
    com.sap.caf.ui.utils.cool.CAFServiceFactory.getServiceFacade() ;
    but not this one:
    com.sap.caf.ui.utils.cool.CAFServiceFactory.getServiceFacade(final Class modelDefinition) ;
    and also do not use generated proxies at all, just use CMI api for model info setup for model nodes and other generic CMI api.

  • Custom method in application service

    Hi All,
    i have created a custom method in an application service.But It is not being shown in service browser.
    Can you  plz tell me what is the reason?.
    Thanks
    Sampath.G

    Hi Sampath,
    I think you haven't checkied the thread I mentioned carefully. As I mentioned in my previous reply the CAF Service Browser is based on CAF Web Dynpro model which has lot of limitations. You can refer the <a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_caf/~form/handler">SAP Note 1030595</a> and <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/20063659-4f03-2a10-6a8a-d88786c39b71">this document</a>. After refering these documents you'll understand that CAF Service browser don't support all types of custom application service operations. To test the application service create web service out of it and test it from wsnavigator.
    Thanks,
    Dipankar

  • Problem in Viewing Application service methods through Service Browser.

    Hi All,
    I have an Application Service (ReadFundDetails) which contains some Operations
    1> createFundAtSA
    2> updateFundAtSA
    But I can’t see the operations under the Application Service through service browser.
    I have deployed the project in two diff server. But the same problem persists in both the server. All the class files under the jar file have been generated successfully. There is no build issue. I have undeployed the project then build and redeploy but still the problem comes.
    I have another project for which i can see the Application Service operations successfully.
    Regards,
    Mithu

    Hi Mithu,
    CAF service browser is based on CAF Web Dynpro model which has several limilations. Check the SAP note <a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_caf/~form/handler">1030595</a> and <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/20063659-4f03-2a10-6a8a-d88786c39b71">this</a> document for more details on the limitations of CAF Web Dynpro model. To check the operations working properly create a web service for the app service test from the wsnavigator.
    Thanks,
    Dipankar

  • In application services i am using entity services

    hi all
    i have created application services in entity services i have created findAll ()method that method i have accessed in application services by
    getEntityServices.findAll .and i have made application service as a webservices but when i am testing this method in wsnavigator
    this method gives error.please reply soon
    com.sap.engine.services.webservices.wsnavigator.WSNavigatorException: null
    Exception id: [02004C4F4F50004E000006FA00000E4000042DBF06435C4C]

    Hi, I tested the application using the CAF Runtime Configuration service test and it was an authorization Issue. The entity was set to check permissions. I disabled this in NWDS and it works fine now

  • 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

  • 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

  • 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

  • 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;

Maybe you are looking for