How to show view based on condition
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')
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
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.