‎2009 Feb 06 2:19 PM
Hi.
We have a very simple database view. We need to be able to have a condition where TO_DATE >= SY-DATUM.
Seems simple enough but when I add this selection condition I get the following error message in the activation log :
"
Join for field AGR_USERS-TO_DAT uses an SY field
Message no. MC 759
Diagnosis
A join condition on a field of the system table SY (or SYST) was defined. This is not permitted for database views because the system table is not known to the database.
"
Ok, so the database does not have visibility on the sy structure, fair enough.
So my question to you gurus is : Is there a workaround for this?
Thanks for your help.
‎2009 Feb 06 2:34 PM
Not possible for database views, maybe you can use a maintenance view for your purposes? There you can use SY-fields in the conditions.
Thomas
‎2009 Feb 06 2:34 PM
Not possible for database views, maybe you can use a maintenance view for your purposes? There you can use SY-fields in the conditions.
Thomas
‎2009 Feb 06 2:35 PM
Rather than a JOIN condition, try making it a SELECTion condition.
Rob
‎2009 Feb 06 2:42 PM
Thanks for the quick replies guys.
Thomas, I was hoping that maybe there was a database table somewhere where we could find the current date so I could link to that table.
Rob, that is what I do but SAP takes my selection condition and moves it to the Tables/Join Conditions. Really...
‎2009 Feb 06 2:50 PM
It allowed me to put it in the selection conditions and activate it.
What type of view is this?
Rob
‎2009 Feb 06 2:53 PM
‎2009 Feb 06 2:59 PM
‎2009 Feb 06 3:04 PM
Rob, thanks for trying to help me out...
Excerpt from SAP help :
"
System variables, i.e. fields of structure SYST, can also be defined for maintenance and help views. You can also use the prefix SY- instead of the prefix SYST-, that is SYST-LANGU and SY-LANGU are the same.
"
So yes, I assume it does work for maintenance views. But I do not think using a maintenance view is an option. Although to be honest, I do not even know what this view is used for. They just asked me to add a condition to it.
It looks like we are going to have to look at the bigger picture and figure out an alternative solution. A maintenance view might be a possible solution, will have to look into it.
Thanks again Rob and you too Thomas.
‎2009 Feb 06 3:17 PM
Well, be careful with a maintenace view. You won't be able to SELECT data from it in a program.
Rob