cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to access current system date???

Former Member
0 Likes
918

Hi Experts,

I am working on a process wherein a user creates a proposal and a notification is sent to the manager for approval.

Now i need to send the date of creation as a attribute to the manager.

Can anyone guide me as to how to get the current system date???

Thanks a lot.

Cheers

Gaurav Raghav

View Entire Topic
Former Member
0 Likes

Hi,

You use "Current State Information" CO to find the data and time

Thanks

Gopal

Former Member
0 Likes

Hi Gopal,

I guess the Current State Information Co can be used in GP.

I want obtain the current system date in Web Dynpro project.

Any idea how to go about it??

Thanks.

Cheers

Gaurav Raghav

Former Member
0 Likes

try to use system field SY-DATUM

Former Member
0 Likes

Hi Wojciech Matulewicz ,

I am using Web Dynpro Java in SAP NW Developer studio.

that code is for Web Dynpro ABAP and i know that as i am a ABAP Consultant..

But i need the code to get the current system date to send the day of creation of proposal request in Web Dynpro Java.

Any clues???

Cheers

Gaurav Raghav

Former Member
0 Likes

//You can get current date

Date currDate = new Date(System.currentTimeMillis());

Former Member
0 Likes

Hi Wojciech Matulewicz,

I have tried using this before and i faced this problem.

When i click on create proposal, the screen just refreshes and the CO execution doesnt ends.

Without ending this field, however things work fine.

here is the code:

Method technicalDescription()

IGPAttributeInfo date = output.addAttribute("DATE", IGPAttributeInfo.BASE_DATE);

date.setMultiplicity(IGPAttributeInfo.MULITIPLICITY_1_1);

Method execute()

Date currDate = new Date(System.currentTimeMillis());

contextElement.setDate(currDate);

Method complete()

output.setAttributeValue("Date", wdContext.currentContextElement().getDate());

If i comment out this code, the CO execution works out fine, but on addition of this code the screen refreshes and CO execution doesnt end.

Am i doing something wrong???

please help me out with this.

Thanks.

Cheers

Gaurav Raghav