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

Hi Suman,
Thanks for the code. my issue is still not solved
I have to change the code with respect to context node info.
My context looks like
Root
   ->Person
         -->Name
         -->Address  (which is designted as password)
Now how to do modify your code with respect to the context. I'm sorry I m new to ABAP coding.I tried with below changed code.it gave me an error as shown in below.(type if_first=>element_name is unknown)
method ONACTIONACTION_GO .
data:
    node_input_data  type ref to if_wd_context_node,
    elem_input_data  type ref to if_wd_context_element,
    stru_input_data  type iffirst=>element_name._
navigate from <CONTEXT> to <INPUT_DATA> via lead selection
  node_input_data = wd_context->get_child_node( name = 'PERSON' ).
get element via lead selection
  elem_input_data = node_input_data->get_element(  ).
get all declared attributes
  elem_input_data->get_static_attributes(
    importing
      static_attributes = stru_input_data ).
if stru_input_data-name = 'praveen ' and
  stru_input_data-address = 'ilkal'.
Navigate to view1
  wd_This->Fire_Outtov2_Plg(
else.
Navigate to View2
wd_this->fire_<plugname>_plg(
  wd_This->Fire_Outtov2_Plg(
endif.
endmethod.
Error:
type if_first=>element_name is unknown  (why this error..?)
Thanks
Praveen
Edited by: Praveen kumar Kadi on Sep 12, 2008 9:38 AM

Similar Messages

  • How to show view tab Main Report and all of Sub Report in one action through Visual FoxPro

    How to show all view tab (Main Report and all of Sub Report) in one action.
    I already know how to show Main Report with this code sample:
    oRptRun=createobject("CrystalRuntime.Application")
    oRptView=this.Parent.oleRptViewer
    oRptOpen=oRptRun.OpenReport('MyReport.rpt')
    oRptView.ReportSource=oRptOpen
    oRptView.ViewReport
    Inside the 'MyReport.rpt' it has 2 subreports:
    1. MySubReport_1
    2. MySubReport_2
    I try to show MySubReport_1 and MySubReport_2 together with their own Main Report with this code sample:
    oRptRun=createobject("CrystalRuntime.Application")
    oRptView=this.Parent.oleRptViewer
    oRptOpen=oRptRun.OpenReport('MyReport.rpt')
    oRptSub1=oRptOpen.OpenSubreport('MySubReport_1')
    oRptSub2=oRptOpen.OpenSubreport('MySubReport_2')
    oRptView.ReportSource=oRptOpen
    oRptView.ViewReport
    Did I miss something because there was only view tab 'Preview' (Main Report) shown without view tab MySubReport_1 and MySubReport_2.
    Thank you.

    Your right, there is only one tab to view the report.
    To open the subreports you will need to click on them in the main report. I don't know of a way to open them programmatically like you are doing here
    http://diamond.businessobjects.com/robhorne</a>

  • How to disable Buttons based on condition.

    Hi
    Need your help to disable button based on condition.
    Please refer the application:
    http://apex.oracle.com/pls/otn/f?p=34797:5:110582943383419::NO:::
    login credentials:
    workspace: vsanthanam
    user: vijay
    pswd: apex_demo
    In the above application, i have 2 buttons in page 5, (Report1 and Report2)
    Where i have to disable button based on the following conditon:
    i) USER whoever has Admin value 'Y' in my table can access the button.
    for this i've written a Button Condition : Type (EXISTS)
    select 1 from apex_extra_values where rtrim(lower(empname)) like decode((select Admin from apex_extra_values
    where rtrim(lower(empname))=rtrim(lower(V('APP_USER')))),'Y',rtrim(lower(V('APP_USER'))))
    note: i have empname same as my APEx user name. with Admin access 'Y'.
    By using this code i can able to hide the button for users who has no Admin access.
    But my requirement is : i have to show the button even if the user is not Admin, but to grey out (disable the button - no action)
    I tried using javascript function:
    function disableButton(pThis)
    pThis.disabled=true;
    But either of this (exists condtion or JAvascript function) works in my case and not both.
    Any pointer on this would be highlt appreciated.
    Thanks
    Vijay

    Couple of things:
    1. I would never use v('APP_ITEM') but :APP_ITEM - it is faster and there is no need to use this function within an application
    2. The way you are doing this check is not the best approach. You should create an authorization schema and run this once per session. Whatever this authorization is returning as a result you can check using the following Function returning boolean:
    IF apex_util.public_check_authorization ('MY_AUTH') THEN RETURN TRUE; ELSE RETURN FALSE; END IF;
    See this example on authorization issues:
    http://apex.oracle.com/pls/otn/f?p=31517:148
    3. As far as disabling a button is concerned I think I explained the options. I also have an example on that here:
    http://apex.oracle.com/pls/otn/f?p=31517:143
    whereby it is not disabling but hiding a button.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How to show pages based on user logged in adf security ?

    Hi All,
    JDev ver : 11.1.1.4.0
    I have three Roles MANAGERS, ADMIN, ANALYST with users in each role.
    And i used form based authentication. There are seperate screens for each user, i want to show according to the user entered with Roles.
    How to Configure these roles in Resource Grants and what should be done in login action..
    For me the page now going forward, it remains in the login page itself
    How to do that ?
    thanks,
    Gopinath

    Hi..
    try out following sample
    http://andrejusb.blogspot.com/2011/05/oracle-webcenter-11g-ps3-adf-security.htmlalso check this >http://andrejusb.blogspot.com/2009/01/practical-adf-security-deployment-on.html

  • How to show field based on query

    Hi all,
    I have a field in JSP Customers -> Tax Registration Num. My task is when a customer being queried that field to be shown in Customer Information tab. I create a new field via personalization but where to specify what result it will show? Thanks in advance.
    BR,
    Konska.

    Hi Gyan,
    Thanks for reply. Can you provide me the way i have to do this. I saw in "About page" under the field i need:
    VO - HzPuiOrganizationProfileQuickVO
    View Attribute - TaxReference;
    When i go to the field which i want to display, via personalization i have to set View Instance and Attribute Name to what value? I guess Attribute Name must be - TaxReference? But the other one(View Instance)?
    BR,
    Konska.

  • How to Hide Columns Based on Condition

    Hi All,
    i have an SSRS Report with below four columns.
    Product_Name , Year , Credit_Amount , Debt_Amount
    I want to hide the Credit_Amount Column if that column all values are Zero.
    In the same way needs to hide Debt_Amount Column if that column all values are Zero.
    Thanks in advance.
    bala krishna

    Step 1- Right click on your required Column here in below example: I wanted to hide
    Name column
    and select Column Visibility
    Step 2- From the
     Column Visibility window , select Show or hide based on an expression and
    then click on fx button as shown in below screenshot
    Step 3- Write Your expression in expression windows as below
    =IIF(Fields!Credit_Amount.Value = 0, True, False)
    Repeat step 1 to Step 3  for Debt_Amount column .
    Sandip Pani http://SQLCommitted.com

  • How to edit View based field in forms

    Hi All,
    I developed a Query-Find Form for Customer details.In main form(after querying) I have some fields where the data is coming from a View.All are non -editable fields,But I need to make one Particular field as editable.How can I make that field as editable?
    could anyone please give me any solution.
    Thank you in Advance.

    Hi;
    Please check Re: Field is not editable and see its helpful
    Regards
    Helios

  • How get changed view based on selected tabBarItem

    Hi All,
    i have used UINavigationController and used UITabBar from IB.
    I have added 3 UITabBarItem named 1. search 2. Recents and 3 .Favorites.
    Now when i clicked on search item it should be open serachViewController and same as remaining two items,
    But i can;t understand that how can i get that which items are selected ....
    pls help me again....buddy
    Thanks.

    I think this is what you are asking for-
    In IB, click on each tab bar button and set the NIB name of the tab controller buttons to the NIB name of your other views, and set the Class of the of each button to the Class files that control those views. Then clicking on each button will load separate NIB files.
    Also, working in tree-view in IB makes it easier to understand what's connected to what when working with controllers like Navigation and TabBar.
    Hope that helps-

  • How to skip page1 based on condition

    Hi Experts,
    I have one issue in adobe form,in that form two master pages there.  If the invoice no having only one line item in this case the first page should be hide that means the one line item should be displaying in second page. in this case should be visible only the second page need to display.
    If any one aware of this please help me.
    Now i am able to display the line item in second page but first page still visible(I need not to display page one how to hide using java script).

    Is this issue resolved ?
    Close the thread with correct and helpful answers.
    How to close a discussion and why
    Regards
    Sandy

  • Filter List View Based on Condition

    HI All,
    I have SharePoint List with dropdown column name "Link Level" and it's holding values "Access" "Rejected" .
    And I had created view with name "Access" and had set the filter scetion options as below.But I don't find any result,Can any me help me what's the right way to filter the view only with "Access" list item value
    "Link Level"->
    equals to ->
    =[Access] 
    Thanks,
    Quality Communication Provides
    Quality Work.
    MSA

    Hi,
    According to your description, my understand is that you want to filter list items by “Access” but it displayed nothing.
    Did you set the “Access” view as below figure?
    Please cancel the filter in the “Access” view (choose none in filter field) and test whether it displays list items.
    Please check whether there is any other configuration in the “Access” view.
    Thanks,

  • How to blink TreeView Nodes based on condition c#

    suppose i am populating my tree view with data from database and i want to blink those nodes which has a specific data. now guide me with code how can i efficiently blink multiple tree view nodes  based on condition in winform application.

    Hi Mou_kolkata,
    >> anyone can give me small working code for tree node blinking
    Thank Armin for the details about blinking TreeView Nodes.
    For a simple demo to blink TreeView nodes, you could refer the link below:
    # Treeview control - How to make a node blink?
    https://social.msdn.microsoft.com/Forums/en-US/64e7a4d7-3098-4370-990f-390cb3a640a1/treeview-control-how-to-make-a-node-blink
    If you have issues when you blink Treeview nodes, please feel free to post a new thread in this forum, then you would get more help.
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create a view based on Lookup Column?

    Hi All,
    I am working as a SharePoint developer 2013.
    When i tried to create a view based on look up column it is not showing lookup column.
    How to fix this problem?
    Please help me out here.
    Thanks & Regards,
    Santhoshi

    can you elaborate the issue? Do you mean you cannot view the column name in the filter section when creating a new view for the list or the column is not getting displayed in the view created?
    --Cheers

  • How to stop workitem complete or how to keep work item in inbox based on conditions even if it completed

    Hi,
    my requirement is to call webdyn pro screen from workflow..
    i am calling webdynpro screen by using FM :CALL_BROWSER from workflow.
    when webdyn pro screen is called user will enter some values . if user closed webdyn pro screen with out entering any values we need show this workitem in his inbox. so that user can again open it and enter values in the webdyn pro screen.
    Please help how to stop work item complete based on conditions.
    Thanks,
    phani

    Hi,
    As per my understanding, this is not a proper approach toy call web dynpro using FM CALL_BROWSER. is the web dynpro screen being called when user clicks on the work item from portal UWL OR from SAP SBWP ?
    if you are calling web dynpro screen from portal UWL when user clicks on work item link, better you achieve it using SWFVISU tcode. in SWFVISU tcode you can maintain which web dynpro. application to call when particualr work item task come in user's inbox. in your web dynpro code, then you can write your buisiness logic when user clicks for example SUBMIT/SAVE button. on action submit/save button you can use FM SAP_WAPI_WORKITEM_COMPLETE to complete the worktiem once the user clicks on final submit/save button. in this way the workitem will get removed from user inbox only upon clicking on submit/save button.
    You can refer below link for web dynpro for workitem:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70648e99-4cc1-2c10-879d-9c61003c69d6?QuickLink=index&…

  • How to restrict VK11 access based on condition class D (Tax)

    hi ,
    I have a requirement to restrict VK11 access based on condition class D (Tax). Because all users should not have access to maintain tax data in VK11 while general pricing data they can maintain. when condition class is D then we should have control.
    Thanks
    Akhilesh

    Hi Akhilesh,
    Please find the below link and click on View article.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a92195a9-0b01-0010-909c-f330ea4a585c
    how to create authorization object?
    Thanks
    Dasaradha

  • How to show all view tab (Main Report and all Sub Report) in Visual FoxPro 9

    I use ActiveX from Crystal Report Developer XI for viewer in Visual FoxPro 9 and I already know how to show Main Report by using command:
    oRptRun=createobject("CrystalRuntime.Application")
    oRptView=thisform.oleRptViewer
    oRptOpen=oRptRun.OpenReport('MyReport.rpt')
    oRptView.ReportSource=oRptOpen
    oRptView.ViewReport
    Inside the MyReport.rpt there is two subreport name :
    1. MySubReport1
    2. MySubReport2
    My Question is :
    How to show all view tab (Main Report and all Sub Report) at the 1st time we call ViewReport?
    I try to using command :
    oRptRun=createobject("CrystalRuntime.Application")
    oRptView=thisform.oleRptViewer
    oRptOpen=oRptRun.OpenReport('MyReport.rpt')
    oRptSub=oRptOpen.OpenSubreport("MySubReport1")
    oRptSub=oRptOpen.OpenSubreport("MySubReport2")
    oRptView.ReportSource=oRptOpen
    oRptView.ViewReport
    but only show Main Report (view tab name : Preview)?
    Did I miss any command before I call oRptView.ViewReport?

    Your right, there is only one tab to view the report.
    To open the subreports you will need to click on them in the main report. I don't know of a way to open them programmatically like you are doing here
    http://diamond.businessobjects.com/robhorne</a>

Maybe you are looking for

  • Smartband and Walkman favorite songs.

    Hi, I was wondering is there a way to mark favorite songs while listening music on Walkman by pressing a button. Sorta as memorising thing for lifelog.

  • Behavior on subreport totals in the main report

    I have a grouped report which receives two totals from each grouping's subreport via shared variables.  In the main report I show the subreport totals for each group but cannot find a way, in the main report, to add the subreport totals together to b

  • Facetime no longer works on my iphone 4s,

    im sure it started after the update, how do i fix it?

  • Latitude D810 v Macbook Pro 15.4

    Hello all. I'm attending college this fall and am in need of a laptop. I am not a hardcore gamer but World of Wacraft and Star Wars Empire at War are my favorites now. I currently have a 3.2GHZ Dell desktop with 1GB RAM, 120GB HD, 128MB ATI Radeon 98

  • How to install smugmug plugin in lr5.2

    i don't have a publish menu anywhere that i can see nor a modules folder. so how do i add plugin?? Please help it would make life easier. i have downloaded file for file zip file for smugmug. thank you.