Skip to Content

new to CAF

Hello all,

I'm new to CAF, I have read documentation but I have some doubts that I would like to solve...

From my knowledge, an Entity service is a business object used to save and permit access to application data. So, I use entity services to define attributes and data types to generate database tables.

1. In the Entity service, I can define Local persistency. So, I can define a locally persistency or a back-end SAP system persistency. Does it mean that I can get data from the back-end SAP system (not local persistency) or from the test tool application (local persistency)? The way to access to data from a back-end system is using Web Services, RFCs.. etc as an external service?

2. The idea of CAF is to build composite business applications on top of other applications without writing a single line of code... I don't know if this idea refers to the Entity Service.

As I can see in the documentation, I can add a new operation (for instance, in Customer entity service a operation called "readByLastName"), choose the input type (LastName), and CAF automatically generates the code to search customers by its last name. How does it work exactly? how many types of operations we can generate automatically? Is it possible without a local persistency? How can I use it, maybe in the application service?

3. Can I create a new operation in the entity service (for instance, createCustomer), to create its attibutes, to map this attributes with the web service (external service) and finally add the business logic in the application service? It means, not to use the auto-code generated in the entity service...

As you can see a lot of concepts of CAF are flying wrongly in my head... I will be very greatful to your answers..

Thanks a lot,

Samantha.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 24, 2007 at 02:59 PM

    Hi Samantha,

    1) Yes

    2) Idea refers to GP using pre-defined Callable Objects

    You can create as many operations as you want, create an operation on entity service and use it in Application service..

    PartRequest is the entity service

    findByStatus is the operation defined on entity service.

    use the below code in an operation defined in AppService

    java.util.List retValue;

    PartRequestServiceLocal partSrvLocal = this.getPartRequestService();

    retValue = partSrvLocal.findByStatus(new QueryFilter(status));

    3) No, It has to be done through NWDS so that metadata can be generated..

    Som

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 24, 2007 at 02:58 PM

    Here's some insights to your questions:

    1. CAF Entity Service can be defined as local or remote persistence. Local persistence means that the CRUD operations for that entity will be done from CAF's local database. Remote persistence means the CRUD operations will happen wrt backend SAP system. But once an entity is defined remote, its a wrapper for an External Service (which is a service representation for a backend function module).

    2. For very simple process, you can build Guided Procedure without writing a single line of code. But for complex processes, you'd need to code the CAF Core (for Objects like Entity Service, Business logic in Application Service), Web Dynpro or Visual Composer (for UI) and CAF GP (for workflow).

    The persistence framework in CAF works on JDO concept. So any custom operation (findBy methods) created on Entity service is similar to SELECT SQL query. CAF generates the sql in the background for every operation. You can create custom operations on remote objects also. Any operations created on Application Service is for doing any business logic. Its like using Session beans in EJB as all the Entity Service can be exposed to Application Service

    3. Yes, you can do it. The code will be auto generated for the Entity Service, but you can customize your methods in Application Service for your business logic.

    Hope this helps.

    Thanx,

    Mahesh

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.