Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Program to change date

massimiliano_riva
Active Participant
0 Likes
878

Hi guys,

I have to write a program in which I have to tell to system:' If these date fields don't have the current date (that is the today date) put the current date'..How can I do?I will give 10 points to everybody will help me as soon as possible..

Thanks in advance, bye

Maximilian

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
801

Hi,

IF filed1 <> sy-datum----


> sy-datum is current date

field1 = Sy-datum.

Endif.

Reward if helpful,

Regards,

Naveen

7 REPLIES 7
Read only

Former Member
0 Likes
802

Hi,

IF filed1 <> sy-datum----


> sy-datum is current date

field1 = Sy-datum.

Endif.

Reward if helpful,

Regards,

Naveen

Read only

0 Likes
801

Thank you Naveen..goodbye

Maximilian

Read only

Former Member
0 Likes
801

Hi,

Parameters p_date type sy-datum.

If p_date ne sy-datum.

p_date = sy-datum.

endif.

Regards,

Atish

Read only

Former Member
0 Likes
801

compare the entered date value with sy-datum

if yes

ok

else

message ---may b informative kind of message or warning.

endif.

kiran

Read only

Former Member
0 Likes
801

Hi,

data: f1 type sy-datum.

select-options: field for f1.

at selction-screen output.

loop at screen.

if screen-name EQ field.

if sy-datum not in field.

field-low = sy-datum.

endif.

endif.

endloop.

regards,

Ruchika

Reward if useful.

Read only

Former Member
0 Likes
801

Hi

SY-DATUM is the system variable which stores the current date. So according to your requirment you can use it in the correct place.

For Eg: If f1 <> sy-datum

Do whatever you want to do.

endif..

Hope this will help u If still error plz get back....

Reward All Helpfull Answers...

Read only

Former Member
0 Likes
801

hi,

Equate it with the system field SY-DATUM.