cancel
Showing results for 
Search instead for 
Did you mean: 

Refreshing current date in sapui5 application while screen is not refreshed

0 Kudos

Hello Experts,

I have an sapui5 application in launchpad where posting of data happens for days without refreshing the session or application. But the problem I am facing here is that even after setting the current date in the model every time the date is not refreshed, like it takes the date when first session login happens after that it continues to take the same date. But if I refresh the browser screen the model again takes the current date and same thing goes on if I do not refresh.

Can anyone please tell me how do I deal with this problem.

Below is the local model in model.js and setting of the date in controller.

localModel.setProperty("/processData/PostingDate", new Date());
localModel.setProperty("/processData/DocumentDate", new Date());
Header.PostingDate = localModel.getProperty("/processData/PostingDate");
Header.DocumentDate = localModel.getProperty("/processData/DocumentDate");
"processData": {
					"Purchaseordernumber": null,
					"Deliverynumber": null,
					"PostingDate": null,
					"DocumentDate": null,
					"productionOrderNumber": null,
					"processOrdernumber": null
				},
View Entire Topic
duncanbarre
Participant
0 Kudos

have you tried: localModel.refresh() or localModel.updateBindings()

0 Kudos

Yes I have used model.refresh()