Wrapping BAPI in Entity Service - good or bad ?

Hi all,
I have a confusion here regarding the usage of BAPI in CAF.
We have two possiblities.
1) directly use BAPI classes in Application service and use it.
2) wrap the BAPI in an Entity service and further use this Entity service in Application service.
Is BAPI -- Entity Service relation a 1 to 1 relation ???
which is the best way and efficient way ??
Thanks & Regards,
Sudheer.
Edited by: Sudheer Kareti on Jun 26, 2008 1:10 PM

Hi,
In the architechtural guidlines, reasons are given.I am just copying those:
Regarding persistency, there are two options: remote and local:
Remote persistency means the actual Business Object instances reside in an external system, which
has to be accessed by means of so-called External Services mapped to the CRUD and query
methods of the SAP CAF BO (hence, such SAP CAF BOs are called u201CRemote Business Objectsu201D).
SAP CAF offers the possibility to either connect to RFCs or to document-style Web Services via External Services.
Local persistency means SAP CAF will create an own database model for you that reflects the
structure of your BO, which is therefore called u201CLocal Business Objectu201D (e.g. simple attributes with
cardinality 0..1 or 1..1 will be reflected by database table columns, whereas cardinality 0..n or 1..n,
as well as a reference to another Business Object will lead to an additional table linked via foreign
key relationship).
Moreover, there is a special persistency type u201CCustomu201D, which basically allows you to redefine the out-of-thebox
CRUD methods, i.e. you can implement your own persistency logic that way.
Remote Business Objects have the following disadvantages:
1. only query and CRUD operations with quite strict signatures allowed, which makes mapping to complex signatures of Enterprise Services difficult/impossible
2. local persistency footprint for each data record read from the remote/backend system via the mapped service, which means sub-optimal performance
3. at this time, there seems to be no clear benefit over an application service operation mapped to an External Service, therefore they are a somewhat redundant concept.
Sampath

Similar Messages

  • Entity service date input problem

    Hi
    I have wrapped  BAPI Holiday_Get as an external service
    its input parameter DATE_FROM and DATE_TO have been imported as caf.base.string type
    When i run along with others inputs in ECC/R3
    DATE_FROM   = 15.05.2006
    and DATE_TO  = 15.05.2007
    i get the required output
    when i call it using an Entity service and input data as above - i get the error --
    ERROR. For input string: "15.0":
    I have used the caf.core.shorttext type for my data_ to and date_from attribute
    I have also tried to pass them as default but still it is not working
    What is to be done for passing this as input to entity service?
    Help me in this issue .
    Points assured for help

    Hi Srivastava,
    I got the same problem for date mapping.
    I have wrapped BAPI_FLIGHT_GET_DATA as external service its input parameters are ARline ID,ConfigID and Date
    In R3 when i give AA,0017,  04.07.2007 date iam able to get the output correctly.
    when iam trying to get the data from the CAF UI. with the above given data iam getting  "com.sap.caf.rt.exception.CAFFindException"
    i have bind the date attribute to caf.base.date/caf.core.date and checked got the same exception.
    As,you also got the same problem.
    Can you help me regarding this if you have any idea.
    Thanks,
    Kiranmai.S

  • Using different RFC's in one Application / Entity Service?

    Hello *,
    I just want to create my first Composite Application Service but before I begin I have some questions.
    The service will read out material master data from PLM. For that it has some findBy-operations with full-text search (creationDate, MatNr. ...) which return a result list and one operation which returns the material object for a given MatNr.
    For this operations I need to call different RFC's which are imported by external services.
    Now my questions:
    1. What kind of service should wrap my external services and provide the operations? Should I use one or more entity service to wrap external services and then realize the operations in an application service? Or should I just take an application service without entity services?
    2. The created service should not only be an internal CAF  service but also a Web service? How can I realize this?
    Thanks for your answers.
    Best regards
    Joschi

    Ok, thanks a lot. So nearly everything's clear now. Only one question remains:
    > 6. mark the entity service as "remote" and create a
    > web service from it
    > (note: this requires NW04s SP8)
    Is this possible? I can't find any checkbox to mark an entity service as "remote" like in an application service (NWDS 7.0.07 and NW04s SP8).
    So I have to map the findBy operations to an application service and create a web service from it!?
    Regards
    Joschi

  • Problem in data source mapping - CAF entity service.

    Hi,
    I created an external service for the bapi given below.
    It has 2 tables as input parameters.
    In entity service I created attributes(for input parameters) for table1 and table2. but in data source i couldn't map more than one attribute to the MATNRSELECTION and PLANTSELECTION.The attributes of the bapi are under the same collection.
    I'm using NWDS version 7.0.06.
    BAPI_MATERIAL_GETLIST (To List all Materials for a Particular Plant)
    Input Parameters:
    Table1: MATNRSELECTION
    MATNRSELECTION-SIGN
    MATNRSELECTION-OPTION
    MATNRSELECTION-MATNR_LOW
    Table 2: PLANTSELECTION
    PLANTSELECTION-SIGN
    PLANTSELECTION-OPTION
    PLANTSELECTION-PLANT_LOW
    Regards,
    Shobhendra

    in your entity if you did create 2 attributes for one material number and one for plant, you can map them to the corresponding MATNRSELECTION-MATNR_LOW and PLANTSELECTION-PLANT_LOW.
    For the sign and option, you should uncheck the IsNull parameter in the "Entity to External Operation parameters" mapping window of the Datasource Tab of your entity. And you should set default values like sign = I and option = EQ or something like that.
    But if you want to pass a list of material numbers or plants, I do have a recollection from last year experiments of some limitation using collections as input parameters. maybe somebody else had better success with that

  • Using application or entity services as model?

    Hello,
    is it a bad decision to access the CRUD and findBy operations of my entity services with UI patterns?
    The book "SAP xApps and the Composite Application Framework" says, only application services should be used to handle with the UI, according to the MVC principles. But in carpool examples also entity services are used. So why should I map the needed entity service operations to application services?
    What is the pro and contra?
    Thanks and regards
    Joschi

    Hello Joachim,
    I would also add that when the book states that "only application services should be used to handle the UI", the main point is that no business logic should be put in the UI and it should only be put in the application service.  Once business logic is put in the UI, then you can not web service enable this logic.  So in general, all business logic should be put in the Application Service.
    If there is no business logic between the UI and the Entity (like in the carpool example), then there is no need to create a redundant application service.  Since it is impossible to put business logic in the CAF UI Patterns, they can always directly call Entity Services without violating this design principle.
    Regards,
    Austin.

  • Entity Services: readByCustomKeys operation mapped to External Service

    Hello *,
    in my CAF application I'd like to read a product from SAP PLM. Within my Entity Service materialNumber is my custom key and therefore a corresponding operation exists: readByCustomKeys.
    I map this operation to my External Service (Web service provided by XI).
    As I can't test this operation directly with the Service Browser (deosn't appear there), I wrap  my Entity Service with an Application Service where I use the readByCustomKeys operation from Entity Service.
    Now when I test the Application Service operation I get the following error message in Service Browser:
    ERROR. Invalid type value :
    In XI I can see that there was no error and I got well defined XML data as response. So the problem must occur anywhere in the mapping back from External Service data to Entity Service attributes.
    Wrong data type mapping can be excluded as I already tested this possibility.
    Does anyone know what could be the reason?
    Thanks for your answers and best regards
    Joschi

    Hello Joachim,
    I dont have a lot of experience with readByCustomKeys (one experience which failed) but uou can also use read itself. If you have defined materialNumber as a key in your entity service, then this field can be used in read operations as well (I have a lot of positve experiences with this approach). You will find materialNumber while mapping read with your external service and you need not map the key field generated by Entity Service.
    For testing entity services, we have had several positive experiences with the config browser, specially for a findBy, read and even update operation. It was very easy to have a prototype UI to check the entity services.
    I know this isnt the answer to your question, but just sharing my experiences.
    All the best!!!
    Regards,
    Parag.

  • Selecting Key for Entity Services in CAF

    Hello All,
    I have a question. While creating attributes for an entity service, we have an option to select it as key or complex. Suppose if we choose many attributes as key , then will it be a composite key ?
    Like if we created Entity "project", and then create following attributes
    Dept (Key)
    ProjectName (Key)
    Description
    Then will Dept and ProjectName together form a composite key ? or they will be individual keys for the project?
    Thanks
    Ashutosh Rastogi

    Hi Ashutosh,
    I think they would form a composite key.
    In fact the other day we were developing a PurchaseOrder entity service and by mistake chose poNo and vendorNo both as keys. Now we had a findByVendorNo operation which was returning a list of POs and we had only mapped the po from the BAPI to the attribute. Everything was hunky-dory during design time, we were able to build and deploy but while testing it using the service browser, on "execute query" CAF returned us an error. This was even though poNo was unique for every record.
    Regards,
    Parag.

  • "Entity Service" update function - response possible?

    Hello,
    I have created a WSDL file in XI and imported it into my CAF application as External Service. The External Service is wrapped by an update operation from an Entity Service.
    As my External Service is a synchronous WebService, I also get a response if the update was successful or not. But in update function there is no possibility to map this response for return (same with delete).
    Do I have to create my own update funtion to be able to get information in my application services if update was successful or not? Or is it anyhow possible to expand the standard update operation?
    Thanks for your answers
    Joschi

    As I know it's possible to create additional custom method for business entity wrapper and map it to external service operation. For example: "Collection updateMyEntity(params)".
    The question is the following: why do you need to use standart update method if it does not satisfy your requirements ?
    The only reason is to use CAF runtime service access functionality in order to access your business entity in generic way. CRUDs operations are designed for this purpose (create, read, update, delete standart operations). These standart methods are required for all business entites and can not be removed. From architectural point of view "update" method wrapping does not make sense without wrapping of others: "create", "read", "delete". If all these methods are implemented properly, in this case business entity service is consitent in the CAF context and  you can use additional powerfull CAF features.
    If you just need to execute some query for updating your data using external service I recommend you to create new custom method in your business entity according to your requirements. Also, it will not probably confuse another developer who touched this entity design.
    Best regards,
    Aliaksei

  • Locking Entity Service

    Any one can provide me some good doc regarding Locking Entity Service apart from that is in help.sap.com?

    Entity in CAF is implemented as a Java Data Object (JDO). So the concurrency control is probably implemeted at that level. So if Transaction 1 is updating a record and Transaction 2 tries to update it at the same time, then it might be locked pessimistically (and hence you get the error). Here's the link that provides some insights. If you notice, the isOptimistic is set to false.
    http://help.sap.com/saphelp_nw04s/helpdata/en/3a/d60a00803111d5992f00508b6b8b11/frameset.htm
    Thanx,
    Mahesh

  • Create Entity Service as Web Service wrapper for Netweaver dev studio 7.1

    Hi,
    I am totally new to Netweaver.
    I was trying to create a CAF service that wraps my own service.On searching i found this document
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/11669cea-0c01-0010-63b2-b98c35b1b370] where the process was mentioned.But this document is on netweaver 7.0 and i am working on 7.1 .
    Here while trying to create a entity service, its mentioned in the doc to right click on the entity service node..but in my netweaver i dont find that node anywhere..the only nodes i see are external and modeled..I am assuming the components must have chaged for version 7.1..
    Can anyone tell me where i can find the updated documentation for Netweaver 7.1 to create a entity service as a webservice wrapper.
    Thanks in advance.
    Regards
    Siri

    Thank you Dipankar..that solved my problem.
    Regards
    Siri

  • Wanting to buy a refurbished Ipod Nano 3rd generation....Good or Bad

    I had purchased the 2nd generation Ipod Nano (display unit) though never played, but when I got it home and synced music onto it the music showed up in the Ipod when connected to the computer thru the USB cable, but once I would unplug the unit from the computer, the Ipod wouldn't even power up. So, I took it back - now I need to replace that one for my daughter. I can't seem to find the 2nd generation Nano's anywhere, but on the Apple website, they have the 3rd generation Ipod Nano silver on clearance but like title states it is REFURBISHED, is this good or bad? I need to know asap, so that other arrangements can be made, just in case I need to look further on Ebay or other forums that list items for sale. Thanks, And I hope to hear from someone real soon. Melissa

    Apple's refurbished stuff is supposed to be very good.
    Although I have not purchased any of it myself, I know people who have who have all been very happy with it.
    Question. Is your iPod still under the 1 year warranty? If so, you can send it in for service.
    Check this out:
    iPod Service Request
    I hope this helps!

  • I got my battery replace today and must know is the battery health good or bad!

    I got my battery replace today and must know is the battery health good or bad!
    Here are the datails direct from the ibackupbot Programm
    Battery
    CycleCount: 231
    DesignCapacity: 1420
    FullChargeCapacity: 1258
    Status: Success
    BatteryCurrentCapacity: 78
    BatteryIsCharging: false
    ExternalChargeCapable: false
    ExternalConnected: false
    FullyCharged: false
    GasGaugeCapability: true
    My Phone info
    iPhone 5 64GB
    iOS 7.1.2
    Please I really have to know it!
    Thanks in advance!

    sorry but I get my battery replaced by another local Service store called "http://handy-doktor.info"!
    So accourding your answer is my battery not a new one, right??
    Thanks in advance!

  • Confirm performance of Service/Goods Receipt

    We are using SRM 4.0 SRM Server 5.0 in extended classic scenario.  Our backend is a R/3 system version 4.70. 
    When changing a purchase order via transaction BBP_POC on the header data tab, go to the follow-on documents.  At the top of this screen is a Document Ctrl section.  There is a box titled "Confirm Performance of Service/Goods Receipt".  We understand that removing the check mark from this box is essentially telling the system that you do not want to perform a goods receipt for this purchase order.  When the invoice is received in R/3, the system will pay the invoice and not put it in a block status.  The business is asking for this ability at a line item level.  In essence they want to tell the system that a goods receipt is not required by line item.  Apparently this capability exists in a purchase requisition in R/3.  Does anyone know if this is possible in SRM?
    Best regards,
    Shawn O'Connor

    Hello Shawn,
    I don't understand your request, because document control in BBP_POC transaction ("Process Purchase Order") is done at item level...
    Could you clarify ?
    EDIT:
    Sorry, i did not see your are in SRM 4.0...
    In SRM 5.0, document control for follow-on document is done at item level.
    EDIT:
    Regards.
    Laurent.
    Edited by: Laurent Burtaire on Mar 14, 2008 3:54 PM

  • Access to Entity Service from Portal Application

    Hi Experts,
    I have a hybrid application which will be making use of both Web Dynpro and Portal Applications. I decided to use Entity Services to store my back-end data and can access it fine from the Web Dynpro project. I have included the public part of my CAF project into the Used DCs of my Portal project and while I am able to call the methods of the Entity Service at compile time, at runtime I receive an error message on the page:
    An exception occurred while processing a request
    I know in order to get this to work for Web Dynpro I had to include sap.com/tccolapi.sap.com/cafruntimeuicouplingapilib as a Library Reference and a few Used DCs, but while I have added the Used DCs to the Portal project, I am unsure of how to add the Library Reference. I assume this has to be added to portalapp.xml, but I don't know the syntax.
    Could somehow please reply with how to do this and whether this is all that is required in order to call Entity Service methods from Portal applications?
    Thanks,
    JP

    Hi Smith,
    Write click on the Project then goto the Properties=>Webdynpro References=>Library references
    add
    caf/eu/gp/api
    sap.com/cafruntimeuicouplingapilib
    And add the following DC in your project.
    1> External in caf/eu/gp/api (CAF domain)
    2> caf/eu/gp/api/wd (CAF domain)
    3> com.sap.security.api.sda (SAP-JEE)
    portalapp.xml
    <?xml version="1.0" encoding="utf-8"?>
    <application>
    <application-config>
    <property name="SharingReference" value="usermanagement, knowledgemanagement, landscape, htmlb, exportalJCOclient, exportal, SAPJ2EE::library:cafeugp~api"/>
    </application-config>
    <components/>
    Check this thread .
    Using CAF GP API in Portal Application project
    Regards,
    Mithu

  • Placing a PDF file in an InDesign Doc and PDF again for a vendor- Good or Bad?

    Current debate in the graphics department is
    Is it good or bad to place a PDF (general Press Quality) into an InDesign document and then creating a new PDF file with print vendor settings from that document?
    My thought is that you in some cases are double compressing, lower dpi images getting compressed, RGB color mode images okay on layout but now are converted to CMYK and shift in the PDF.
    Are there other issues and if so what are they.
    Also is there an easy way to check ppi, color mode and compression of an acrobat PDF? I mean other than doing a preflight and searching into each image folder twenty levels deep. FlightCheck and Enfocus are not options,
    too many vendors and not enough time.
    Thank you all in advance for your words of wisdom.

    Dov, I just got off the phone with a trusted professional in the Prepress field at a quite reputable print house, and he said "Dov is the guru of PDFs, ask him this...Will the InDesign CS3 preflight see the characteristics of a PDF (color mode, dpi(ppi), compression) if the original placed PDF is created as a pdf .X4 (1.7)? Ask him also if you were to use one form of compression (say lossless) in the original PDF, and then another form(say lossy) in the vendor PDF would it hold both or convert the first PDF compression to the second form?"
    Any other responses are also welcomed.

Maybe you are looking for