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

Table field problem

Former Member
0 Likes
1,153

Dear Experts,

I have defined a date field in my user defined table as a CHAR10 field.


When I made a selection as follows to this table in SE11, with the field I mentioned above:
25.10.2012 - 10.11.2012,

I get an errot that the "lower limit is greater than upper limit".

It is understood why this error comes up ,but due to some restrictions I need to maintain it as a  character field.Do I have any other options to make such a selection to the table.

Please see the attached file.

Thanks
P

6 REPLIES 6
Read only

PeterJonker
Active Contributor
0 Likes
1,062

Why you don't use the SAP date type and then after you leave the selection screen you place them in internal variables in your program. These variables can be defined as Char 10 long

Read only

0 Likes
1,062

The image I posted is a selection from SE11 table selection.

Read only

0 Likes
1,062

I now realize it is SE11 you are talking about. then the previous mentioned solution won't work.

The only thing I can think of is to write a wrapper program with your own transaction code (ZSE16_TABLENAME or something) where you define the selection parameters as dats type and in your program you translate these to the char 10 data type and then do a select on the table and return the result.

A lot of complicated and tedious work, just to hide what is basically a design error. The best solution is to change the table definiton and change the data type of the field from char10 to dats.

Read only

Former Member
0 Likes
1,062

hi,

I think it is taking format MM.DD.YYYY and you are giving input in format DD.MM.YYYY so the issue is coming.If you enter in correct format will be fine.

Read only

0 Likes
1,062

Read only

Former Member
0 Likes
1,062

When is a date not a date...?

You can't define a character 10 field and expect it to behave like a date field.  If you have to define this as character (you don't explain why) you could to define it as character 8 and populate it YYYYMMDD.  This way the character field will hold the dates in chronological order.

Keep in mind that there's no validation on a character field to stop it being populated with junk even with the above structure you could end up with dates that aren't valid.

regards,

Nick