cancel
Showing results for 
Search instead for 
Did you mean: 

how to set system date (sy-datum) value directly in the context of an attribute ?

Former Member
0 Kudos

how to set system date (sy-datum) value directly in the context of an attribute ?I used the wd_context->setattribute option,but I want to set it in the context attribute itself as the default value.

Accepted Solutions (1)

Accepted Solutions (1)

former_member199125
Active Contributor
0 Kudos

In General we will use set_Attribute method to set the value.

But by default if you want to achieve the value... in attibute properties you will find default value... there you can pass..

But i dont think you can pass sy-datum variable there..

Regards

Srinivas    

Former Member
0 Kudos

I tried using sy-datum in attribute properties but it is not possible.

Former Member
0 Kudos

Hi Vanaja,

   

The values of all system fields in this table are implicitly set when the program is started, The GET TIME command explicitly updates the system fields, except for sy-dayst, sy-fdayw and sy-tzone.

In context if can have attribute of type ( SYDATUM / SYST-DATUM ) . In case of default value property the attribute can have a preconfigured value. I dont think you can pass any variable there.

However you can achieve your goal by creating context attribute in component controller & in the WDDOINT method set the current date. This will be available throughout the life time of the component & visible to every controller.

Regards,

Monishankar Chatterjee

Answers (0)