Skip to Content
CAF projects can be built using the CAS perspective of the NWDS. A CAS project provides user with three types of services Application Services, Entity Services and External Services.   Now, Basic idea for CAF projects is to build new applications utilizing the existing functionality in SAP or Non-SAP systems. Functionality from these systems can be exposed through BAPI or RFC as in SAP systems or web service as in other Non-SAP systems. This functionality can be brought in to a CAF project through external services. Even Enterprise services can be imported as an external service in a CAS Project.   Then since you are creating your own custom application you will probably need to store some application specific data or object that makes sense in your application. Now here you feel the need of persistence. To cater this need CAF provides its Entity services. You can choose to persist your Business objects (each one mapped to one entity service) in local storage. CAS provides option to persist this data on a remote database if you do not wish to use local persistence.   Now at this point you have imported all your external services and you have all your objects ready with you. But that’s not all you still feel need of some place to put business logic that would perform your application specific processing over you business objects and external services. You need the operations that would process your local objects after validation and modify them based on certain criteria over and above the basic system generated CRUD (Create, Read, Update, and Delete) methods of entity services. Did I tell you about them? Oh yes, that’s true CAS generates all CRUD methods for you. Also you would need operations which will access the external services and use them together with business objects and application specific logic. Here fits the application services that provide single interface to the user to access your composite application.   External services in CAF project can be either wrapped in entity services or can directly be used through application services. This design decision is based on the scenario. When you are exposing business objects in SAP or Non-SAP systems through external services for CRUD kind of operations or even a subset or superset, then it makes sense to wrap these services in an entity service and map the corresponding methods. Else you should directly use application service to access the external services.  At the end, I would just like to state for Java guys, that Entity services are some what analogous to EJB’s Entity Beans and application service is analogous to EJB’s Session Beans. All this is just with flavor of SAP.
To report this post you need to login first.


You must be Logged on to comment or reply to a post.

      1. Richard Hirsch
        Hi Ashutosh,

        This document refers to the use of an RFC to access a remote database.  But what about if you had an existing database (Informix, for example) that exists outside of a SAP-based environment that you want to access?



        1. Ashutosh Rastogi Post author
          Hi Richard,

          I am not able to understand your question clearly as you dont really access some database. What you access is some external service.

          Local Persistence – CAF will have local tables to store your data.
          Remote Persistence – CAF will use some external service to create/read/update/delete your data.

          Now to create an external service, if you have ABAP code then you can use RFC and if you have non-ABAP code then you have to expose the functionality as web service.

          Since you wish to use an informix database. Then write a webservice in any language u wish (Ex java) to perform required operation on database.
          After this is done, import it as external service in your CAF project. And you can proceed in the same way mapping the entity service functions to imported external service.

          I hope it helps.

          Ashutosh Rastogi

    1. Former Member
      I’m unable to map the result of a findAll operation. The problem is with the custom key: I get an error saying that the “minOccurs/maxOccurs of the source attribute is incompatible with that of the target attribute”. Actually the cardinality of the target is 1..1 and it can’t be changed because it is the custom key; on the contrary, the cardinality of the source is 0..1. The source operation is a standard BAPI named BAPI_COMPANY_GETLIST. Where am I wrong?



Leave a Reply