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

current date?

Former Member
0 Likes
2,286

Hi guys.

Im creating a table with se11.

i have a date field(date of birth). Is it possible to make a value range on the domain, so there cant be choosed a date lower then todaysDate?

16 REPLIES 16
Read only

Former Member
0 Likes
2,042

Hi,

You have to achieve this on your program level. if you have a program to update this table then write a small code there to prevent user from entering date greater than SY-DATUM. I think on domain level you can not achive this.

Regards,

Read only

AnjaneyaBhardwaj
Contributor
0 Likes
2,042

Just to add...

The program will be the event of table maintenace in case of update happening via the Table maintenace generator ..and PAI if you have written a program for this ...

Thanks,

Anjaneya.

Read only

Former Member
0 Likes
2,042

yes u can have a range of date from low to high but then the feasible.pper limit needs to be then tweaked thats not done ryt.

so better u fit datum as DE then code in the event of tabl maintan. gen.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,042

Hello,

You cannot define intervals for "date" type domains(kind of makes sense).

Alternatively your requirement can achieved easily using the [Table Maintenance Event 01|http://help.sap.com/saphelp_nw04s/helpdata/en/91/ca9f0ba9d111d1a5690000e82deaaa/content.htm].

There are many threads on this topic. Try to implement the solutions & get back in case you have any specific issues.

BR,

Suhas

Read only

former_member209703
Active Contributor
0 Likes
2,042

Hi

Actually you can define this restriction at domain level using a Conversion Routine.

Just check GBDAT Data Element (Date of Birth), if you try to enter a date that is greater than SY-DATUM an error message is fired, this data element has this restriction built in at domain level.

Regards

Read only

Former Member
0 Likes
2,042

Hi,

Go to Table Maintenance Generator and give the required details.

Now click on Environment -> Modification -> Events

in the given screen in coloumn T, select event 05-creating a new entry.

write your code in sub routine.

Save and activate.

Now you can check how this works using sm30.

Regards,

Ramya

Read only

madhu_vadlamani
Active Contributor
0 Likes
2,042

Hi Egemen,

Check as Suhas told. That will resolve the issue. Post if still is there any issue.

Regards,

Madhu.

Read only

0 Likes
2,042

If there's an standard data element (GBDAT) with that restriction built-in, what's the point of doing all those things? Just use that data element and forget about anything else.

Read only

Venkat_Sesha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,042

Hi, Go to SE11, and open the Table Maintenance generator ,

Now from the menu -> Environment -> Modification -> Events

Now select a event which is relevant for your requirement.

write the code as you which.

Hope this helps

Read only

Former Member
0 Likes
2,042

Hi guys.

>

> Im creating a table with se11.

> i have a date field(date of birth). Is it possible to make a value range on the domain, so there cant be choosed a date lower then todaysDate?

So you can only enter a date of birth that is in the future?

Read only

0 Likes
2,042

Maybe a special feature of IS-H for planned sectio caesarea?

Thomas

Read only

former_member193284
Active Participant
0 Likes
2,042

Hello,

You can do this by creating a table maintenance generator for the custom table and then add events where you can specify not to allow user to enter date less than sy-datum.

Here is how this can be achieved.

Go to Table Maintenance Generator:

click on Environment -> Modification -> Events

Here you can observe that there are different types of events available like before saving the data, after saving the data, before deleting, after deleting and others. Based on the requirement you can select the event

Click on the button in the Editor column and enter the following code: (Please note that you should also code FORM and ENDFORM as well).

assign the values in this form and endform and Save and activate the table.

Hope this helps.

Read only

Former Member
0 Likes
2,042

Hi,

You can enter fixed values from domain settings. Range cannot be entered.

If you have a large number of fixed values, you should create a table containing those entries as mention the table name as the value table in domain maintenance settings.

Regards,

Rahul

Read only

Former Member
0 Likes
2,042

Hi ,

You can use the SE11 events ,which is available in table maintainance generator.

event id is 05.

you can write your own logic over there.

Regards,

S.Anandabalan

Read only

0 Likes
2,042

With all these new replies: you guys and girls really think it's logical to NOT enter a date of birth that lies before TODAY? So i can't enter the date of birth of my son (19th of august 2000).

Read only

0 Likes
2,042

Particularly since the OP hasn't replied and has gone on with another question.

Rob