Validation of login screen in WebDynpro ABAP

Dear All,
I have created a login screen using WebDynpro ABAP, but am not able to validate user name and password.
Please help in this with coding and if possible with samll example.
Thanks & Regards,
Tazeer KS.

Hi Tazeer, i have posted on scribd this document, step by step webdynpro login application,
pls go through the following link
http://www.scribd.com/doc/50261280/Login-Application-in-webdynpro
Step1:
Create 1 node in component controller and bind the attributes of dictionary structure USR02
Step 2: Select the required fields, bname and bcode,
Step3: Create Main View as shown, and bind the context view and component  node and bind the input fields. 
Step4:
Create second view for navigation.
Note:
First main view is outbound.
Second view is inbound.
method ONACTIONLOGIN .
  TYPES : BEGIN OF ty_usr02,
            bname TYPE USR02-bname,
            bcode TYPE USR02-BCODE,
          END OF ty_usr02.
  DATA it_usr02 TYPE TABLE OF ty_usr02.
  DATA lo_nd_login TYPE REF TO if_wd_context_node.
  DATA lo_el_login TYPE REF TO if_wd_context_element.
  DATA ls_login TYPE wd_this->Element_login.
  DATA lv_bname TYPE wd_this->Element_login-bname.
  DATA lv_bcode TYPE wd_this->Element_login-bcode.
navigate from <CONTEXT> to <LOGIN> via lead selection
  lo_nd_login = wd_context->get_child_node( name = wd_this->wdctx_login ).
@TODO handle non existant child
IF lo_nd_login IS INITIAL.
ENDIF.
get element via lead selection
  lo_el_login = lo_nd_login->get_element( ).
alternative access  via index
lo_el_login = lo_nd_login->get_element( index = 1 ).
@TODO handle not set lead selection
  IF lo_el_login IS INITIAL.
  ENDIF.
get single attribute
  lo_el_login->get_attribute(
    EXPORTING
      name =  `BNAME`
    IMPORTING
      value = lv_bname ).
get single attribute
  lo_el_login->get_attribute(
    EXPORTING
      name =  `BCODE`
    IMPORTING
      value = lv_bcode ).
IF lv_bname is INITIAL and lv_bcode is INITIAL.
  else.
SELECT bname bcode from usr02 INTO TABLE it_usr02 WHERE bname = lv_bname
                                                  and bcode = lv_bcode.
ENDIF.
  wd_this->fire_out1_plg(
endmethod.
Hope it might help you,
Get back to me if your issue is not solved.
Thank you

Similar Messages

  • Saving Selection Screens in Webdynpro Abap

    Hi ,
    Could you please throw some light on how to save the selection screens in Webdynpro Abap ?? Just like variants in normal Abap?
    Thanks and Regards
    Alok Sharma

    HI,
    I dont think there is automatic saving of varients in web dynpros  just like normal selection-screen.
    Just check this link you might get some idea.
    Link[Save Varient|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f028c2b9-1730-2d10-71ae-ce300ea00573?quicklink=index&overridelayout=true]
    Regards and Best wishes.

  • Varient for selection screen in Webdynpro ABAP

    Dear Experts,
    We all know that in abap editor selection screen we can save the selection criteria in form of 'Variants'.
    I need to something similar in webdynpro. And I was requested not to use the database tables for saving the data.
    Is it possible? If Yes then please let me know.
    Thanks Supriyo

    POWL - Power Work List
    Isn't POWL - "Personal Object Work List" ? Although often interchangeable referred to as "Power Lists".
    However, if Thomas says "Power Work List" I think we're going to have new variant out there to search on!
    NB the POWL is very "Powerful" (sic) in this respect as you can even add your own OVS to the selection criteria. Unfortunately I have found that the POWL selections and selection process are perceived as less than obvious by end users. So much so that where we are looking at pure reporting functionality we are instead looking to BW to provide a web reporting interface.
    For some reason (perhaps they've been using SAP backend reports too long) users seem to want to do their selection and then see the results - unless it's in the form of a dashboard - in which case they are happy to drill down into the results. It is like they don't trust the system to have used the correct selection criteria.

  • Urgent: how to Logoff and redirect to the login screen from WebDynpro appli

    Hi,
    i want to logoff and redirect to to the login page.
    i use WDClientUser.forceLogoffClientUser([_"what should be the code here"_]);
    If i pass null as the url, it will terminate and default message will be shown (it will not go to logon screen)
    I want to logoff and navigate to customize login page.
    I don't know from which server the request is from dev, Qa or some other system.
    I can use WDClientUser.forceLogoffClientUser("http://dev"); but it doesn't work with QA.
    i will be really appriciate we suggest me regarding this. Its urgent please send for responce ASAP.
    Thanks
    NSM

    Hi,
    use the following code to get the url
    String hostName = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getServerName();
              int port = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getServerPort();
              StringBuffer url = new StringBuffer("http://");
              url.append( hostName );
              url.append(":");
              url.append(port);
    WDClientUser.forceLogoffClientUser(url.toString());
    Regards
    Ayyapparaj

  • Webdynpro abap validations

    Hi
    all i am new for webdynpro, i have one doubt "how to do validations in webdynpro abap for a perticular report"
    thanx in advance
    karuna

    Hi Karuna,
    Below excerpt is taken from the SAP standard training material, "The view controller is concerned with displaying pre-generated data and then handling the resulting user interaction (validation, error handling, and so on). It is the custom controller’s job to interact with back-end logic to generate the required data."
    So if you want to do any validations then you need to code them in your view controller level. Say suppose
    the validation is only to be performed for a certain user action, it can be placed in the corresponding action handler method (onaction<action>). However, if multiple action handler methods exist, some validations may have to be performed in more than one of the action handler methods. In this case, it is a good idea to put the coding in an extra method in order to have it written only once.For this reason, a special hook method exists for each view, which is processed before any of the action handler methods is called. The name of this hook method is wddobeforeaction( ). If a screen is composed of multiple views (nested views), then all wddobeforeaction( ) methods are processed before any action handler method is called.
    Hope this helps resolve your problem. If you need to validate your input data for just 1 action then you directly write in the corresponding action handler method. If your view can have multiple actions triggered then you can put your validation logic inside the  wddobeforeaction( ) method.
    Regards,
    Uday
    And I guess that you are new to the SDN forum. Please create a new thread if you want to raise your doubts. Also try searching the forum for any previous similar threads.

  • Login pop-up when launching Webdynpro ABAP application from SAP Inbox

    Hello All,
    We have configured our workflow to trigger WD ABAP application from SAP Inbox.
    However when we launch the workitem from SAP Inbox, we are getting a login pop-up screen in IE which prompts us to enter SAP password.
    Can you please help how can we avoid getting that login screen and how the WD ABAP application can single sign on from SAP GUI to IE for that user-id.
    Appreciate all your help.
    Regards,
    Samta.

    Hi Samta,
    You can configure User(RFC) and password for your webdynpro appl'n using SICF tcode.
    Path : /default_host/sap/bc/webdynpro/sap/(your wdp appln)
    Thanks
    Katrice

  • Webdynpro ABAP & JAVA step by step example with screen shots

    hi experts,
    i am new in webdynpro. i want to learn webdynpro so any one plz help me how to create,how to install,connect,and how to execute plz send any documents for webdynpro ABAP & JAVA step by step examples with screen shots.it's really helpful for my carrier.
    thanks and regards,
    sapbbm.

    hi bala,
      check out this URL you have 41 sample codes and PDF of Webdynpro for JAVA.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d
    Thanks
    Gopi

  • Webdynpro ABAP application on MSS Overview screen

    Hi Guru's,
    We are having a customized Overview screen in MSS which is all Webdynpro Java application.I am trying to add Webdynpro ABAP custom application link on the overview page.I created a IVEW ,then PAGE, assigned to Workset and then to role .
    Copied the PCD location and assigned in the Resources of Homepage framework.
    When I do preview it is fine but when I run it through Overview..I am getting 404 page error.
    Again its webdynpro ABAP application in the Overview page..What are the steps for it ..I created Area,Subarea ,Services and assigned Resources which has the PCD location with ROLES:// ...
    Also in Services I mentioned it as WEBDYNPRO ABAP application.
    Please suggest me ay steps I may be missing.
    Thanks,
    ST

    Also I was comparing the links through HTTP WATCH that was trying to read:
    The first one is from direct page assignment under ROLE in Portal:
    http://DEV SYSTEM/sap/bc/webdynpro/SAP/zhr_associate_form/;sap-ext-sid=bNrjr3FDhSA9HxracqUNhQ9H0Rpx1m12qVv5aAWcHbEw
    The Second one is referred under overview from Homepage Framework:
    http://DEV SYSTEM/sap/bc/webdynpro/sap.com/pcui_gp~xssutils/XssMenuArea/;sap-ext-sid=bNrjr3FDhSA9HxracqUNhQE37DBLWEEK_COBmuSIHeeA
    I am for sure missing something ..can you please suggest.
    Thanks,
    ST

  • Enable screen field in WebDynpro ABAP

    i,
    I have WebDynpro ABAP screen where I have defined a read-only input field. Now I want to make this field input enable based on certain logic during run time.
      CALL METHOD lo_el->set_attribute_property
        EXPORTING
          attribute_name = 'SP'
          property       = lo_el->e_property-read_only
          value          = ''.
    I have written following code in method "WDDOMODIFYVIEW",
    but somehow this is not working. Any Idea what is going wrong.
    Regards,,,
    Sunil Joyous

    Manas,
    You said,
    You need to bind the read only poperty of input field with an attribute of type WDY_BOOLEAN, then based on your logic you can set the bound attribute to true or false in any method.
    how do I do this ? Now I have done following
      DATA : lv_wdy_boolean TYPE wdy_boolean.
      lv_wdy_boolean = ''.
      CALL METHOD lo_el->set_attribute_property
        EXPORTING
          attribute_name = 'SP'
          property       = lo_el_credit_note->e_property-read_only
          value          = lv_wdy_boolean.
    but still it is not working.

  • Upload from clipboard option in webdynpro abap selection screen

    Hello Gurus,
    We have a requirement in select-options in webdynpro.i have implimented select-options successfully using
    WDR_SELECT_OPTIONS used component.now i need to impliment 'upload from clipboard' option when ever i click on advance options arrow mark. this option we can get in normal abp from selection screen.in selection screen against select-option field we have multiple options arrow mark.when ever we click this arrow mark we can able to see the upload from clipboard button at lowe level.exact same option how can we impliment in webdynpro abap selection screen.
    Could anyone please suggest solutions?
    if possible could you send me the sample code or relevent links for the same.
    Thanks in Advance for your replies.
    Regards,
    babu

    Hi,
    Which server version are you working on...Is it ECC6 or nwetweaver 7..
    I guess that option is avaialbel in Netweaver 7.0..Need to check there is an option for Clipboard in select-options..
    Regards,
    Lekha.

  • Non-sap screen look and feel in webdynpro abap

    Dear Experts,
    I have a Webdynpro ABAP application which is fetching data from LFA1 and LFB1.
    My client wants a non-sap look and feel onto the screen, he doesnt want the SAP Color and all.
    How can i achieve this to look it commercial ??
    Please suggest.
    Regards,
    Mamai.

    Hi Mamai,
    WDA,maintain two parameters WDFORCEEXTERNALSTYLESHEET = 'X' and WDTHEMEROOT = 'CustomerThemes".
    for ur application , add the parameter sap-ep-themeroot=/SAP/PUBLIC/BC/UR/NW5/THEMES/MYCUSTOMTHEME to ur application URL , where MYCUSTOMTHEME is the theme u have created under the path /SAP/PUBLIC/BC/UR/NW5/THEMES/ in ur system.
    Please go through this..
    http://help.sap.com/saphelp_nw70/helpdata/en/7b/fb57412df8091de10000000a155106/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/46/89af7fbe4d429ee10000000a1553f7/content.htm
    and for custome theme..
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/7015b1f9-535c-2910-c8b7-e681fe75aaf8?quicklink=index&overridelayout=true
    Re: Custome theme or stylesheet for one WD Application
    stylesheets..
    http://help.sap.com/SAPhelp_nw73/helpdata/en/47/af752005c92fe1e10000000a42189d/content.htm
    Cheers,
    Kris.
    Edited by: kissnas on Apr 21, 2011 6:44 AM

  • Validations in Webdynpro ABAP ....

    Hi All,
    Any body tell me whether client side validation is possible in Webdynpro ABAP ?
    Will I need to write Javascript code in WDA ? Please shade some light. Any help in this regards would be highly appreciated.
    Thanks,
    Anil Kumar

    Hi Roger,
    There no automatic required field check within Web Dynpro ABAP. If you set the state to "required" only the asterix is displayed. You should implement the check in WDDDOBEFOREACTION. I assume that the value should not only be checked for "not empty", but there should also be a validation whether the field is correct.
    Somethimes it is not too easy to check whether all mandatory fields are filled, because there may be customizing or personalization for the view. Therefore there is a method, which can be used for it: CL_WD_DYNAMIC_TOOL=>CHECK_MANDATORY_ATTR_ON_VIEW. This method will take the personalization and customizing into account, especially if the admin has set some fields to required. But an additional check in the business logic should also be executed.
    regards, Regina

  • Dynamic screen field layout - ABAP webdynpro

    Hi,
    I am rather quite new to ABAP webdynpro - one of my requirements is that based on a Custom table (so to say a custom built customizing table) I need to display fields - the Customizing table could say that for region America - we need the following fields to be supressed, the same set of fields for Japan could be Mandatory, and for Latin America could just be display only.
    Is there anyway this could be acheived in Webdynpro (ABAP) - I presume that the supressed fields for America region will not be displayed but instead the common fields for America and Japan would be out of sync as far as screen layout is concerned. An ideas or guidance on how to accomplish this would be greatly appreciated.
    Regards....

    Hi,
    you can loop on your table which gathers all the fields in it, add an attribute to your
    table stating the required or not parameter and adding it to the 'state' parameter in
    the new_inputfield method.
    In the Wiki I added a page for dynamic UIelement creation based on DDIC properties
    (wiki is down, so i don't have a link to it)
    or you can visit these logs by Thomas Szues:
    <a href="/people/thomas.szcs/blog/2005/12/28/dynamic-programming-in-web-dynpro-abap--introduction-and-part-i-understanding-ui-elements:///people/thomas.szcs/blog/2005/12/28/dynamic-programming-in-web-dynpro-abap--introduction-and-part-i-understanding-ui-elements
    <a href="/people/thomas.szcs/blog/2006/01/03/dynamic-programming-in-web-dynpro-abap--part-ii-handling-viewelements:///people/thomas.szcs/blog/2006/01/03/dynamic-programming-in-web-dynpro-abap--part-ii-handling-viewelements
    grtz
    Koen

  • How to Download a PDF file from Webdynpro ABAP Screen

    Hi,
    I have developed a input form in webdynpro - ABAP(Not Adobe),
    As I am not using above services here, but would like to download the information I am capturing into a PDF file.
    can I do it without using adobe interactive forms ?
    thanks
    Siddharth

    Hi siddharth,
    My suggestion would be to create your output as a Smartform and call your Smartform in your View.
    For more Click this link.
    [HOW TO DISPLAY A SMARTFORM AS PDF DOCUMENT IN WEB DYNPRO FOR ABAP|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785]
    Regards
    Bulent

  • Urgent -Confirmation screen links in ESS in Webdynpro -ABAP

    Hi,
    This is very urgent. I am doing one custome service in ESS in WEBDYNPRO ABAP.
    In my custome service, I need to put ESS Links in confirmation page .
    as GO TO ESS Home page
        GO PERSONAL INFORMATION HOME PAGE
        GO TO WORKLOCATION DETAILS
    For this i created URL links but this is not working fine.
    Can you provide any setting needs to be done in Webdynpro abap to place these confirmation links.

    Hi Chidipotu,
    You can consider:
    1. Using portal eventing (object based navigation/absolute/relative navigation) as this appears (to me) as you want to navigate to entirely different i-Views.
    2. If you are not portal integrated, you can consider placing LinktoAction UI elements in whose action handlers you can fire custom (outbound) plugs to load different views.
    HTH,
    Adithya
    PS:
    IMO you can consider leaving out the "urgent" in the subject next time round, as the average response time on SDN is less than 30 mins anyway! (and has a miniscule probability of changing with such intended psychological expeditors!!)

Maybe you are looking for