Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to show view based on condition

Hi,

I have a scenario with login screen with a submit button and two views(success and error).

Now I want to show

a)a successful view if user enters a correct login name and password(which will be validated with static values in action method of submit button)

b)a Error view if user enters wrong username and password.

I am struck at action code to write a condition to show respective views.

Some thing like (In Java)

If (login.id=='abc' && login.password='xyz')

show.view1

else

show.view2

I am not familar to ABAP coding as I just started to know.

If anyone know action code, Please help on this.

Thanks in advance

Praveen

Former Member replied

Hi Praveen,

You have declared correct context node and attributes.

In the previous answer i pasted my code.you have to make some little changes..

You no need to write the code by yourself.you have a code wizard button in the application tool bar,click on that and then select Read from context.Select your context node from value help.thats all it will give you ready made code.

then implement your logic.

Thanks

Suman

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question