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

View with selection conditions with system fields.

Former Member
0 Likes
4,039

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

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

8 REPLIES 8
Read only

amit_khare
Active Contributor
0 Likes
2,111

Assign this system field value to a variable before the condition and use that variable in the condition.

Read only

0 Likes
2,111

I meant view in SE11 and not in program.

Read only

Former Member
0 Likes
2,111

Hi Simha,

Change your condition to :

Valid_From_Date LE SY-DATUM and
Valid_To_Date GE SY-DATUM.

This should work.

Regards,

Swapna.

Read only

Former Member
0 Likes
2,111

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

Read only

0 Likes
2,111

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

Read only

0 Likes
2,111

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

Read only

0 Likes
2,111

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

Read only

0 Likes
2,111

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