2009 Mar 26 6:15 AM
Hi Experts,
I have a view. Now i want to control the data that is selected using 'Selection Conditions'.
here i want to use system field SY-DATUM.
My requirement is i want to control the output like
Valid_From_Date GE SY-DATUM and
Valid_To_Date LE SY-DATUM
which means that i would be showing only active users in this view.
How can i go about this? System is not allowing system fields in comparision value.
Any help on this is highly appreciated. Thanks.
regards,
Simha
2009 Mar 26 6:17 AM
Assign this system field value to a variable before the condition and use that variable in the condition.
2009 Mar 26 6:34 AM
2009 Mar 26 6:42 AM
Hi Simha,
Change your condition to :
Valid_From_Date LE SY-DATUM and
Valid_To_Date GE SY-DATUM.This should work.
Regards,
Swapna.
2009 Mar 26 6:46 AM
Hi,
Could you please tell me what error you are facing?
I could use the condition GE SY-DATUM in SE11. Also, make sure that you are joining both conditions using AND.
Regards,
Arun
2009 Mar 26 6:59 AM
Hi,
I am getting a warning first 'enter constant as comparision value'
when i trying to activate the view i am getting the below error.
---
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
-
Have tried to activate the view you created?
How to go about this?
Regards,
Simha
2009 Mar 26 9:16 AM
Are you using Oracle ?
TO_DATE(SYSDATE,'YYYYMMDD') on comparation value.
I'm not sure if it will work, but on oracle database it's equivalent to SY-DATUM result on ABAP.
Regards, Fernando Da Ros
2009 Mar 26 9:41 AM
Hi Fernando Da Ros,
Well View is same whether its Oracle / DB2 / any DB.
As far as DDIC is concerned its database independant right!
I am not able to use sys fields in Database view Selection Conditions and that is my problem.
regards,
Simha
2009 Mar 26 10:47 AM
You cannot Use System field in Database View it will always give you error and the view will not be activated.
But if you try same in Maintenance View it will work.SO try creating MAINTENANCE VIEW.
Regards,
Gurpreet