cancel
Showing results for 
Search instead for 
Did you mean: 

How to update an entity service from web dynpro

Former Member
0 Kudos
91

Hi Folks

I have already searched the forum for help with my problem, but couldn't get the program working.

My issue:

There is a CAF Service (called MyService). It contains several Entity Services, one of which is "MyEntityService". The entities are imported as a web dynpro model, it is possible to read the data into a Web Dynpro Model node and it is also possible to create a new instance of MyEntityService using the create function (MyEntityServiceProxy.create())

What isn't working is using the update methode. First of all, I am not able to call MyEntityServiceProxy.update. Why not? Why can I call "create", "read", "callByIsSummary", buit not "update"? It is one of the CRUD-methods.

Secondly, I was trying to update my data by using the code below. But the data in the backend isn't updated. What am I doing wrong?

Hope you can help me! Points will be awarded for any helpful answer.

Kind regards

Bettina


		AMyEntityService att= wdContext.current<context model node bound to AMyEntityService>Element().modelObject();
		att.setDescription("test"); //iAttElem.getDescription());
		att.getAspect().sendChanges();
		IServiceFacade serviceFacade;
		serviceFacade= CAFServiceFactory.getServiceFacade(MyServiceDefinition.class);
		serviceFacade.save();

View Entire Topic
0 Kudos

Hi Bettina,

Could you please use the static method "

serviceFacade()

" of the generated xxDefinitions file of your WebDynpro model and try to use only one isntance of the facade. If this doesn't help you don't hesitate to write me again.

Best regards, Daniel.