CAF Entity locking HELP

hello
I am doing some tests in WebDynpro and CAF Core services.
I have a piece of code as below that retrieves an entity from CAF Core for update. I need this entity to be locked during the update but the two methods lock() and unlock() do nothing. I can still access for update the same entity instance from another user.
This probably works if the transaction is happening within CAF service but I also need to lock entities from webdynpro when doing complex updates. In other words I am not willing to create a custom method in CAF service for each update I need to implement in webdynpro.
Any advice ? How are we supposed to use the class com.sap.tc.col.client.generic.api.LockStrategy ? I did not find much about this api.
Thanks in advance
Vitaliano
  public void UpdateKAMInTransaction( )
    //@@begin UpdateKAMInTransaction()
     IServiceFacade serviceFacade = CAFServiceFactory.getServiceFacade(cplxmdlDefinition.class);
    String guid = wdContext.currentAKamElement().getGuid();
     AKam akam = MyAppProxy.readKam(guid);
     //locking is not working at all. concurrent changes are lost
     akam.lock(LockStrategy.EXCLUSIVE);
     //update a value here
     akam.setVersion(akam.getVersion() + 1);
     akam.getAspect().sendChanges();
     serviceFacade.save();
     //locking is not working at all. concurrent changes are lost
     akam.unlock();
     wdThis.wdGetAPI().getMessageManager().reportSuccess("done update AKAM=" + akam);
    //@@end

Now I feel lost. Please keep helping a newby.
I have implemented my custom method in CAF Services. Here I lock the entity, make all my chanegs, then update and return. I call this custom CAF Application Service method from WebDynpro.
Nevertheless I noticed that concurrency can still happen. If more than one user updates the same entity at the same time, and exception is thrown in the log files but no exception is thrown. I.e. I cannot intercept the collision.
in the log file a huge stacktrace is written, while the most interesting message is "javax.jdo.JDOUserException: optimistic transaction failed".
So... what am I doing wrong here? Should'nt new locking just hold until the existing one is released?
HELP!
Vitaliano
     public java.lang.String myUpdateKam(java.lang.String guid, long newVersion) throws com.sap.caf.rt.exception.ServiceException
          // logging
          java.lang.String CAF_user = sessionContext.getCallerPrincipal().getName();
          java.lang.String CAF_methodHeader = MyAppBean.JARM_REQUEST + ":" + "myUpdateKam(java.lang.String, long)";
          Object[] CAF_parameters = new Object[] { guid, new java.lang.Long(newVersion)};
          com.sap.caf.rt.util.CAFPublicLogger.entering(CAF_user, MyAppBean.JARM_REQUEST, CAF_methodHeader, MyAppBean.location, CAF_parameters);
          java.lang.String retValue;
          try
               //@@custom code start - myUpdateKam(java.lang.String, long)
               //Read the BO and prepare for changes
               retValue = "";
               Kam kam = getKamService().read(guid);
               char modeLock = IBusinessEntityService.MODE_WRITE;
               try
                    //Lock BO before updating
                    try
                         getKamService().lock(kam.getKey(), modeLock, 3000);
                         retValue += "-lock-";
                    catch (CAFLockException e)
                         retValue += e.getMessage();
                    //Now do the update and commit
                    // =====> NOTE: regardelss if there is another update in progress,
                    // a concurrent update still gets down to here. WHY ?
                    long counter = kam.getVersion();
                    kam.setVersion(++counter);
                    getKamService().update(kam);
                    retValue += "-update-";
               catch (CAFUpdateException e)
                    //This case is when concurrent update occurs
                    retValue += e.getMessage();
               catch (Exception e)
                    //any other exception thrown?
                    retValue += e.getMessage();
               finally
                    //Make sure we always leave our BO unlocked
                    try
                         getKamService().unlock(kam.getKey(), modeLock);
                         retValue += "-unlock-";
                    catch (CAFLockException e)
                         retValue += e.getMessage();
               //@@custom code end - myUpdateKam(java.lang.String, long)
               return retValue;
          finally
               com.sap.caf.rt.util.CAFPublicLogger.exiting(CAF_user, MyAppBean.JARM_REQUEST, CAF_methodHeader, MyAppBean.location, CAF_parameters);
This is the code in WebDynpro to invoke CAF custom method.
  public void UpdateKAMRemotely( )
    //@@begin UpdateKAMRemotely()
     IServiceFacade serviceFacade = CAFServiceFactory.getServiceFacade(cplxmdlDefinition.class);
     IAspect retValue = null;
     for (int i = 1; i < 101; i++)
          long newLong = wdContext.currentAKamElement().getVersion() +i;
          retValue = MyAppProxy.myUpdateKam(wdContext.currentAKamElement().getGuid(),newLong);
          IAspectRow row = retValue.getAspectRow(0);
          String retMsg = row.getAttributeAsString("value");
          wdThis.wdGetAPI().getMessageManager().reportSuccess("IAspectRow=" + row + "index="+i);
          serviceFacade.save();
    //@@end
Message was edited by:
        Vitaliano Trecca

Similar Messages

  • How to design CAF Entity service?

    hello,
    here is my question.
    how to design CAF Entity service?
    i got employees data and departments data.
    an employee can join over one department, and of course, a department had many employee.
    in tradition RDBMS(relational database management system), i'll create three tables and named "Employee", "Department" and "DepEmp". the table "DepEmp" is a kind of table for N to N relaction.
    but when i use CAF's entity service, i can't do like RDBMS.
    i can create three entity services, named "Employee", "Department" and "DepEmp". i can make service refence(pull service from left side of windows), but the information about Key(in properties) cannot be "true".
    how can i do?
    is there a different normalization way i have to learn.

    thank you so much, it really help.
    but when the issue more complicated.
    a employee can join multiple departments, and he/she got different job title in each department. case will like fallow.
    Vic is a software engineer in XX company's IT department, and he is a MIS engineer in XX company's HR department.
    the db( i'm sorry for take this for example) structure will like..
    =======================================
    table:employee
    column:
    employeeCode PK
    name
    phone
    table:department
    column:
    departmentCode PK
    name
    location
    table:jobTitle
    column:
    titleCode PK
    name
    description
    table:deptEmployee
    column:
    employeeCode PK FK
    departmentCode PK FK
    titleCode PK FK
    =======================================
    my SAP NetWeaver Developer Studio is version 7.0
    1. how i make sure that three keys be mapped each other?(empCode,deptCode,titleCode)
    2. is there have any "IUD abnormality" risk?
    3. if there have, how can i avoid it?
    thank you again, i'm sorry for ask much, because the way to design CAF Entity Service is that i didn't learn before. it really make me confused.
    have a nice day

  • Removing/updating data through CAF entity service

    Does anyone know a way to remove/update data through a CAF entity service from a web dynpro which uses the webdynpro model of the CAF project ?

    Hi Nicolaij,
    This example describes how UPDATE and DELETE works under SP8.
    Hopefully it helps.
    Regards
    Kamil
    UPDATE of entity called "Bank"
    =======================
    ABank recordBank;
    recordBank = BankServiceProxy.read(“000000024”);
    recordBank.setCountryId(„Germany“);
    IAspect aspectList = recordBank.getAspect();
    aspectList.sendChanges();
    DELETE from entity called "TransferID"
    ============================
    ATransferID recordTransferID;
    recordTransferID = TransferIDServiceProxy.read(„123115651“);
    IAspect aspectList = recordTransferID.getAspect();
    IAspectRow aspectRow = aspectList.getAspectRow(0);
    aspectList.removeAspectRow(aspectRow);
    aspectList.sendChanges();

  • Sharing CAF Entity/Application Service to Other CAF Project ?

    Hello,
    Currently we don't have NWDI in place and only doing local development;
    ie, using local DC's. Now we'd like to contain all CAF Entity Services
    and related Application Services in one CAF Project (CAF_BASE) and
    create other CAF Project (CAF_APP) to refer to these exposed
    Entity/App Services.
    I tried to add all entities of types [Common Model] and [Java Package Tree]
    to one Public Part  (PP01) in DC of Project CAF_BASE. In DC of Project
    CAF_APP, I included PP01 as a used DC.
    Still those Entity/App Services in CAF_BASE are not shown in CAF_APP.
    Is this by design or I did it the wrong way ?
    Ying-Jie Chen

    Hi Francesco,
    From SAP Help (see URL below),
    http://help.sap.com/saphelp_nw2004s/helpdata/en/32/07c93f26903a1ce10000000a114084/content.htm
    A statement is specified :
    >>> Start-of-SAP-Help
    Restrictions for Relations
    The following restrictions apply for relations between entity services:
         Relations between entity services can only be unidirectional. A bidirectional relation has to be modeled as two unidirectional relations.
         Entity services can only refer to (relations and inheritance):
          Other entity services of the same project
          Core entity services
         Entity services can only reference other entity services.
    <<< End-of-SAP-Help
    It says that a entity service can only refer to other entity services in the
    same project so there is no way for us to share entity services between
    projects.
    FYI,
    Ying-Jie Chen

  • How to sort web dynpro table wich data bind to CAF Entity Service

    Hi
    I created UI Table based on Model Node (CAF Entity).
    When I try to sort this Table with using TableSorter, I  get following in the trace log:
    The error is: com.sap.caf.rt.exception.CAFBaseRuntimeException: Aspect does not support changing rows via its list interface
    Have I met CAF limitation, or do I do something wrong?

    Hi Nikolai,
    if you use the implementation
    <code>
    IServiceFacade serviceFacade = CAFServiceFactory.getServiceFacade(ts2Definition.class);
    </code>
    it means you use the typed access.
    Possible in this sneak the
    <code>
         IServiceFacade serviceFacade = CAFServiceFactory.getServiceFacade();
    </code>
    does not work.
    Try the following way - it must work.
    <code>
         private IServiceFacade getServiceFacade()  {
              final String method = "getServiceFacade()";
              entering(method);
              if (m_serviceFacade==null) {
                   try {
              CoolConnectionProperties properties = new CoolConnectionProperties()
                   public String getCoolHost()
                        return "caf";
                         m_serviceFacade = CoolUtils.getServiceFacade(properties);
                   } catch (CoolConnectionPropertiesException e) {
                        wdComponentAPI.getMessageManager().reportException(e.getMessage(),false);
                        CAFUIPublicLogger.traceThrowable(Severity.ERROR, method, e) ;
                   } catch (CoolUtilsException e) {
                        wdComponentAPI.getMessageManager().reportException(e.getMessage(),false);
                        CAFUIPublicLogger.traceThrowable(Severity.ERROR, method, e) ;
              exiting(method) ;
              return  m_serviceFacade;
    </code>
    Also do not sort in query. Sort the model node after you aspect binded. Use the method
    node.sort(your_comparator) ;
    the comparator like this:
    <code>
         public class YourComparator implements Comparator
           public int compare(Object o1, Object o2)
              IWDNodeElement nodeElement1 = (IWDNodeElement) o1 ;
              IWDNodeElement nodeElement2 = (IWDNodeElement) o2 ;
              String name1 = nodeElement1.getAttributeAsText(_attrName) ;
              String name2 = nodeElement2.getAttributeAsText(_attrName) ;
              if (name1 == null)
                   return -1 ;     
              if (name2 == null)
                   return 1 ;     
              if (_direction == "up")
                   return name1.compareToIgnoreCase(name2) ; 
              else if (_direction == "down")
                   return -name1.compareToIgnoreCase(name2) ;
              return 0 ;
           public void initilize(String attrName, String direction)
              _attrName = attrName ;
              _direction = direction ;
           private String _attrName ;
           private String _direction ;
    </code>
    Best regards,
    Aliaksei.

  • CAF entity coupled with application service activation problem

    Hi Experts,
    I have an existing CAF entity service to which i had added an additional attribute.
    I have the assosiated application application setdataservice,which has a custom method to add data to the entity service (mass upload).
    In the custom method i have added the code to set data for the addtional attribute.
    I had generated the project and build the dc locally,
    The buid is fine with no error's .
    But when I activate the request the activity fails with "cannot resolve symbol" for the new method even though the local build is sucessful.
    Any idea why this is occuring,
    ERROR: /NWDI/usr/sap/DIP/JC37/j2ee/cluster/server0/temp/CBS/c6/.B/28783/DCs/spe.com/portal/prc_core/ejbmodule/_comp/ejbModule/com/spe/portal/prc_core/appsrv/setdataservice/SetDataServiceBean.java:3434: cannot resolve symbol [javac] ERROR: symbol : method setFixPromvalue (double) [javac] ERROR: location: class com.spe.portal.prc_core.besrv.int_promocodes.Int_PromoCodes [javac] ERROR: promoCode.setFixPromvalue(fixPromValue); [javac] ERROR: ^ [javac] 1 error Error: /NWDI/usr/sap/DIP/JC37/j2ee/cluster/server0/temp/CBS/c6/.B/28783/DCs/spe.com/portal/prc_core/ejbmodule/_comp/gen/default/logs/build.xml:111: Compile failed; see the compiler error output for details. at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:938) at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:341) at org.apache.tools.ant.Target.performTasks(Target.java:369) at org.apache.tools.ant.Project.executeTarget(Project.java:1214) at com.sap.tc.buildplugin.techdev.ant.util.AntRunner.run(AntRunner.java:112) at com.sap.tc.buildplugin.DefaultAntBuildAction.execute(DefaultAntBuildAction.java:61) at com.sap.tc.buildplugin.DefaultPlugin.handleBuildStepSequence(DefaultPlugin.java:213) at com.sap.tc.buildplugin.DefaultPlugin.performBuild(DefaultPlugin.java:190) at com.sap.tc.buildplugin.DefaultPluginV3Delegate$BuildRequestHandler.handle(DefaultPluginV3Delegate.java:66) at com.sap.tc.buildplugin.DefaultPluginV3Delegate.requestV3(DefaultPluginV3Delegate.java:48) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.sap.tc.buildtool.v2.impl.PluginHandler2.maybeInvoke(PluginHandler2.java:350) at com.sap.tc.buildtool.v2.impl.PluginHandler2.request(PluginHandler2.java:102) at com.sap.tc.buildtool.v2.impl.PluginHandler2.build(PluginHandler2.java:76) at com.sap.tc.buildtool.PluginHandler2Wrapper.execute(PluginHandler2Wrapper.java:58) at com.sap.tc.devconf.impl.DCProxy.make(DCProxy.java:1723) at com.sap.tc.devconf.impl.DCProxy.make

    Hi again,
    I've deleted the two methods (or just commented them) I had and have readded them by choosing the Override Method option in the Source menu of JDeveloper 10.1.3. I've addet the methods prepareForActivation and prepareForPassivation too.
    When I execute the application, with breakpoints into the four methods (I attach the code below), I see that it prepares for pasivation and pasivates. When I do any action, I see it prepares for activation, but the method activateState is never reached.
    I have no other overriden methods in the class. Any idea of why the activateState doesn't execute?
    Thanks,
    Carles Biosca
    BBR Ingeniería de Servicios
       protected void activateState(Element element) {
           super.activateState(element);
       protected void passivateState(Document document, Element element) {
           super.passivateState(document, element);
       protected void prepareForActivation(Element element) {
           super.prepareForActivation(element);
       protected void prepareForPassivation(Document document, Element element) {
           super.prepareForPassivation(document, element);
       }Message was edited by:
    cbios

  • How to use a structure in CAF entity service

    Hi All
    I want to use a structure as datatype of a complex attribute in a CAF entity service. I tried to use a dictionary structure created in the dictionary part
    of the CAF project and added it to the public part of this DC.But I can't find it in the list of data structures while trying to mention datatype for a complex attribute in an entity service. Can any body suggest how to do it.
    Cheers
    Sudip

    Hello Sudip,
    You can create a complex structure by doing the following:
    1.  From the Attributes Tab, right click on your Entity and select "Create Attribute"
    -  Enter an attribute name and description
    -  select "Complex Attribute" checkbox
    -  select "Finish"
    2.  Right click on the newly created complex attribute and select "Create Sub Attribute".  Do this for each attribute in your structure.
    This complex structure can now be used in your CAF application and also CAF UI patterns.
    Creating complex attributes from the data dictionary is only usually used for creating enumeration types.  When doing this, you have to use the CAF enumeration editor to populate the values.  The "How to guide" that Jan refers to describes this.
    Regards,
    Austin.

  • CAF entity proxies provide Transactional support???

    Hi All,
    We have created entity services, generated proxies so that we can use them in our webdynpro component's. Question here is, does the Generated Proxies of entity services provide Transaction support? or do we need to move all the business logic from webdynpro to CAF Application service?
    Appreciate your time
    Som

    Hi Aliksei,
    Thank you for the reply back.
    Here is the situation:
    We are generating proxy classes for CAF entity objects and using them in WebDynpro for all our custom CRUD operations.
    Is this a good design or move all the CRUD operations to App Service and call it in the webdynpro. What is the exact difference in Updating the CAF Database from WebDynpro (Component controller) and from App Service.
    In what scenario's you use App Service and WebDynpro Component controller with respect to Updating CAF Database.
    Thank you for your time.
    Thanks
    Som

  • Hi. Does using the cover lock help battery life?

    Hi. Does using the cover lock help battery life?

    The quickest way (and really the only way) to charge your iPad is with the included 10W USB Power Adapter. iPad will also charge, although more slowly, when attached to a computer with a high-power USB port (many recent Mac computers) or with an iPhone Power Adapter (5W). When attached to a computer via a standard USB port (most PCs or older Mac computers) iPad will charge very slowly (but iPad indicates not charging). Make sure your computer is on while charging iPad via USB. If iPad is connected to a computer that’s turned off or is in sleep or standby mode, the iPad battery will continue to drain.
    Apple recommends that once a month you let the iPad fully discharge & then recharge to 100%.
    How to Calibrate Your Mac, iPhone, or iPad Battery
    http://www.macblend.com/how-to-calibrate-your-mac-iphone-or-ipad-battery/
    At this link http://www.tomshardware.com/reviews/galaxy-tab-android-tablet,3014-11.html , tests show that the iPad 2 battery (25 watt-hours) will charge to 90% in 3 hours 1 minute. It will charge to 100% in 4 hours 2 minutes. The new iPad has a larger capacity battery (42 watt-hours), so using the 10W charger will obviously take longer. If you are using your iPad while charging, it will take even longer. It's best to turn your new iPad OFF and charge over night. Also look at The iPad's charging challenge explained http://www.macworld.com/article/1150356/ipadcharging.html
    Also, if you have a 3rd generation iPad, look at
    Apple: iPad Battery Nothing to Get Charged Up About
    http://allthingsd.com/20120327/apple-ipad-battery-nothing-to-get-charged-up-abou t/
    Apple Explains New iPad's Continued Charging Beyond 100% Battery Level
    http://www.macrumors.com/2012/03/27/apple-explains-new-ipads-continued-charging- beyond-100-battery-level/
    New iPad Takes Much Longer to Charge Than iPad 2
    http://www.iphonehacks.com/2012/03/new-ipad-takes-much-longer-to-charge-than-ipa d-2.html
    Apple Batteries - iPad http://www.apple.com/batteries/ipad.html
    Extend iPad Battery Life (Look at pjl123 comment)
    https://discussions.apple.com/thread/3921324?tstart=30
    New iPad Slow to Recharge, Barely Charges During Use
    http://www.pcworld.com/article/252326/new_ipad_slow_to_recharge_barely_charges_d uring_use.html
    Tips About Charging for New iPad 3
    http://goodscool-electronics.blogspot.com/2012/04/tips-about-charging-for-new-ip ad-3.html
    Prolong battery lifespan for iPad / iPad 2 / iPad 3: charging tips
    http://thehowto.wikidot.com/prolong-battery-lifespan-for-ipad
    iPhone, iPod, Using the iPad Charger
    http://support.apple.com/kb/HT4327
    Install and use Battery Doctor HD
    http://itunes.apple.com/tw/app/battery-doctor-hd/id459702901?mt=8
    In rare instances when using the Camera Connection Kit, you may notice that iPad does not charge after using the Camera Connection Kit. Disconnecting and reconnecting the iPad from the charger will resolve this issue.
     Cheers, Tom

  • Our students have entered passcodes when downloading ios 7 update and now ipads are locked, help!

    Our students have entered passcodes when downloading ios 7 update and now ipads are locked, help!

    If the iPad is running iOS 7 and the kid set up Find My IPad, then you can't restore it without the kid's Apple ID and password. The Activation Lock is a feature that people whined and whined to get, and is causing exactly the sort of problems many of us predicted when people were clamoring for it. If you can't get the kid's Apple ID, you'll have to call Apple Support and ask if they have any sort of workaround. My guess is that they'll have to replace the iPad, but they may have a solution they don't talk about publicly.
    This won't help for iPads currently locked for which you can't get the Apple ID, but if before you give out iPads to your students you go into the Restrictions and disallow changes to the accounts, they can't then turn in Find My iPad. Or you can set up Find My iPad yourselves to your own accounts and then lock the Restrictions so they can't set iCloud up to an account to which you don't have the Apple ID.
    Regards.

  • Error while building the DC for CAF entity services

    Hi all,
    I am trying to create entity services in CAS and following the following help document from help.
    http://help.sap.com/saphelp_nw04s/helpdata/en/05/3a0741b5b7ee6fe10000000a1550b0/frameset.htm
    But While building  I am getting following imports errors:
    Error:
    com.sap.caf.rt.bol.IPersistentBusinessObject cannot be resolved or is not a valid superinterface     
    com.sap.caf.rt.services.eventing cannot be resolved (or is not a valid type) for the field CarJDO
    com.sap.caf.rt.bol.da.jdo.JDODADataAccessService cannot be resolved or is not a type
    changedData cannot be resolved     ,CarJDO.java
    com.sap.caf.rt.bol.da.DataAccessFactory.DATASOURCE_LOCAL_DA cannot be resolved     CarJDO.java     
    The method removeACL(String, String) is undefined for the type CAFPermission     CarServiceBean.java     
    loadByCustomKeys(Car) is undefined for the type IDataAccessService     CarServiceBean.java     
    Can anyone help.

    Hi all,
    I am trying to create entity services in CAS and following the following help document from help.
    http://help.sap.com/saphelp_nw04s/helpdata/en/05/3a0741b5b7ee6fe10000000a1550b0/frameset.htm
    But While building  I am getting following imports errors:
    Error:
    com.sap.caf.rt.bol.IPersistentBusinessObject cannot be resolved or is not a valid superinterface     
    com.sap.caf.rt.services.eventing cannot be resolved (or is not a valid type) for the field CarJDO
    com.sap.caf.rt.bol.da.jdo.JDODADataAccessService cannot be resolved or is not a type
    changedData cannot be resolved     ,CarJDO.java
    com.sap.caf.rt.bol.da.DataAccessFactory.DATASOURCE_LOCAL_DA cannot be resolved     CarJDO.java     
    The method removeACL(String, String) is undefined for the type CAFPermission     CarServiceBean.java     
    loadByCustomKeys(Car) is undefined for the type IDataAccessService     CarServiceBean.java     
    Can anyone help.

  • CAF Entity date mapping

    Hi Experts,
    I have created an entity service with remote persistensy(web service).I am mapping a data field from entity service to a date filed in external service(web service).In web service, date is declared as java.sql.date. i mapped to minimum value in entity service.But I am getting an exception.
    Can you plz tell me what is the roblem?.
    Thanks
    Sampath.G

    Hi Sampath,
    please try to use timestamp in CAF. In this case you have all issues related to a date datatype. This works for me...
    Hope this helps,
    regards,
    Rene

  • Error when Building DC Project for CAF Entity Service

    Hi All,
    I got the following error message when Im building my CAF DC Project for Entity Services:
    01.02.2008 12:09:10 /userOut/Development Component (com.sap.ide.eclipse.component.provider.listener.DevConfListener) [Thread[ModalContext,5,main]] ERROR: ewrdata/metadata: Failed to read component definition from local file MyComponents:com.cas.elisa.gp/ewrdata/metadata : Cannot read component definition. File does not exist: C:\Documents and Settings\tfelp4\.dtc\LocalDevelopment\DCs\com.cas.elisa.gp\ewrdata\metadata\_comp\.dcdef (Cannot read component definition. File does not exist: C:\Documents and Settings\tfelp4\.dtc\LocalDevelopment\DCs\com.cas.elisa.gp\ewrdata\metadata\_comp\.dcdef)
    But  ".dcdef" file exists, its an XML file.
    My NWDS environment is 7.0.13.
    I used the tutorial exactly how it was written in the tutorial from SAP:
    http://help.sap.com/saphelp_nw04s/helpdata/en/05/3a0741b5b7ee6fe10000000a1550b0/frameset.htm
    What could be the problem?
    Thanks for helping me...
    Steve

    Hi Chandan,
    Can you do person.getRelatedModelObjects() and get the contact object, to check whether it is null, also check in the CAF DB whether the data you entered is present.
      I am not sure the code is actually adding the contact model object to person.
    Go thru this SDN Blog on usage of the CMI API's, there is a link for CMI documentation in it which might help you get the right code for adding the contact object.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cef4f43e-0d01-0010-db84-ede25c874115.
    award points if  info is helpful
    Regards,
    Anish

  • CAF DB Update for CAF Entity Service from Web Dynpro

    Hi all,
    I have created an entity service in CAF called “Contacts’ which contains the following attributes.
    phoneNo
    cellNo
    emailID.
    Another entity service called "Person" is created. This contains the following attributes.
    personId
    personName
    personAddr
    contactsRef. (Cardinality -> 0..n , Relational Type -> Composition)
    That means Contacts entity service is used within Person entity service. Now it is working fine within CAF service browser. Now the Web Dynpro DC of CAF application is used within another custom Web Dynpro DC project. I want to store data from Web Dynpro.
    Within the context of component controller of  Web Dynpro the structure is like
    APerson
         |_ personId
         |_ personName
         |_ personAddr
         |_ contactsRef       
                    |_ phoneNo (Under contactsRef)
                    |_ cellNo (Under contactsRef)
                    |_ emailID (Under contactsRef)
    So I have written the following code within web dynpro custom method.
    APerson person = PersonServiceProxy.create();
    java.util.List ls = new ArrayList();
    for(int i=0; i<4;i++)
    AContacts contact = ContactsServiceProxy.create();
    contact.setCellNo("9092130156");
    contact.setEmailID("[email protected]");
    contact.setPhoneNo("432258");
    contact.getAspect().sendChanges();
    ls.add(contact);
    person.setRelatedModelObjects("contactsRef",ls);
    person.setPersonID("9999");
    person.setPersonName("xyz");
    person.setPersonAddr("ABC, KOL");
    wdContext.nodeAPerson().bind(person);
    person.getAspect().sendChanges();
    CAFServiceFactory.getServiceFacade(idendityDefinition.class);
    After saving the data from Web Dynpro I am trying to test it from CAF service browser. But I am getting only the parent row. I mean only the value of personId, personName and personAddr fields which I have stored from Web Dynpro. But no value is coming within the table for Contacts entity service for composition relation.
    Could anybody help me how can I solve my problem?
    Thanks & Regards
    Chandan
    Message was edited by:
            Chandan Jash

    Hi Chandan,
    Can you do person.getRelatedModelObjects() and get the contact object, to check whether it is null, also check in the CAF DB whether the data you entered is present.
      I am not sure the code is actually adding the contact model object to person.
    Go thru this SDN Blog on usage of the CMI API's, there is a link for CMI documentation in it which might help you get the right code for adding the contact object.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cef4f43e-0d01-0010-db84-ede25c874115.
    award points if  info is helpful
    Regards,
    Anish

  • Deleting CAF-Entity-Tables

    Hello!
    In a former  I already asked how to delete the database tables that are generated by CAF for entity-services.
    There are got some answers for maxDB. The problem is, we use Oracle. It version is 10.1.0.4.0, I think, I can see it in db13-transaction in SAP-logon, or is that database a totally different?
    Can anyone suggest a oracle-client and give a short hint how to use it?
    Thank you in advance for your help.
    Jörg

    Hi Jorg,
    You can download the client from Oracle.
    http://www.oracle.com/technology/tech/oci/instantclient/index.html
    Best Regards,
    Austin.

Maybe you are looking for

  • Error while creating a  Document  in CV01N

    Hi Gurus, I am trying to  create  a document through CV01N and  i wnat to attach it to material . We have created some Z- Document types and  the  origin for  the  file(source) is picked up from another system. Suddenly iam creating an error  File ex

  • Boris Title 3D in FCE

    I'm using FCE 4.0.1 and Boris Title 3D version 2.1.0.060120 I'm finding that text justification doesn't work correctly. Also, it doesn't allow me to set it differently in different sections the way you can change size or color & stuff. This is the on

  • Command-Line question. Delete all but particular folders

    Hello. I need to create a batch file that will delete all folders within the "Users" folder except for the Administrator and Administrator.domainname. Can anyone help? Thanks

  • Incompatible Security and Connection time out

    Ok, since installing leopard, I have not been able to connect to the stronger of my two wireless connections. The weak on, which is WPA connects fine, when I can get a strong enough signal. The second, WEP (I know, people say it's weak, but thats wha

  • Photoshop Elements 11 Slide Show

    I created a slide show (actually 3) with audio and saved it. Now I can't locate it. I have tried everything. I must be overlooking some setting. I thought it would appear in it's own folder. Any help will be greatly appreciated.