How to do the feild validations in web dynpro abap

dear all,
how to do the feild validations for the screen in web dynpro abap.
thanks,
jyothi.

hi jyothi,
There are diffrent ways of doing validations for fields of screen in webdynpro abap depending on the requirements.
I am giving simplest way of doing this validation(it may fullfil your requirement also)
For e.g you want that without entering value in particular field user should not proceed to submit the data in screen.
  DATA lo_message_manager    TYPE REF TO if_wd_message_manager.
  DATA lo_api_controller     TYPE REF TO if_wd_controller.
  lo_api_controller ?= wd_this->wd_get_api( ).
  lo_message_manager = lo_api_controller->get_message_manager( ).
  DATA var1 type string.
  DATA: node TYPE REF TO if_wd_context_node.
  node = wd_context->get_child_node( 'DATA' ).
  node->get_attribute( EXPORTING name = ' VALUE'
                         IMPORTING value =     var1 ).
IF var1  IS INITIAL.
    CALL METHOD lo_message_manager->report_error_message
      EXPORTING
        message_text = 'Please enter the value'.
      EXIT.
  ENDIF.
Now in above code VALUE is the attribute with whome your input field is bound .So if user doesnt enter any value into it he will get above msg (u have to use message are ui element to use this method)
If you have any other doubt feel free to ask.
regards
Panky

Similar Messages

  • How to find the BADI'S in Web Dynpro ABAP

    Hi Experts,
    I'm new to Web Dynpro ABAP. Can any one tell me, how to find the BADI'S for standarad components like i.e DEMO_ROADMAP .Please tell me, steps/procedure to find the BADI'S in WDA.
    Thanks ,
    Chaitanya
    Moderator message: wrong forum, please have a look in the "Web Dynpro ABAP" forum.
    Edited by: Thomas Zloch on Jun 18, 2011 4:30 PM

    Hi Nagaraju,
    There is another fool-proof method to find BADIs while executing a transaction -
    1. Goto transaction SE80
    2. Select "Class / Interface", type in the class name CL_EXITHANDLER and 'Enter"
    3. On the method GET_INSTANCE, create a Breakpoint just after the call to cl_exithandler=>get_class_name_by_interface at the following line - 
    <i>CASE sy-subrc.</i>
    Once the breakpoint has been set, call the transaction you wish to find the BADI for and you will notice that the debugger opens everytime a BADI is about to be called. You could get the name of the BADI from the the value of the variable "EXIT_NAME".
    CL_EXITHANDLER is a service class that is called by standard SAP code everytime a BADI is about to be called. So, setting a breakpoint here should let you know exactly which BADIs are called.
    Hope this helps!
    Thanks,
    Rohini.

  • Error «The entered value is not on the list of valid values» in the hierarchy of mss web dynpro abap

    Hello Experts
    The error «The entered value is not on the list of valid values» in the hierarchy of mss web dynpro abap occurs after manager’s following actions:
    selected detailed Team View ;
    selected hierarchy;
    changed style of the hierarchy to any other (for example, the vertical);
    the error occurs after attempting to do any action.
    Our system is EHP7.
    If someone faced with this error, please give me advice how can i resolve this problem.

    Hi John,
    Sorry for the delay in replying. No, we do not have the same problem if we understand you correctly.
    "We have bypassed the MSS Home Page and just embedded the Detailed Team View as a standalone application in our MSS portal role" - we also made for the our customer. BUT we have error «The entered value is not on the list of valid values» in our standard system.
    Regards,
    Andrey

  • How to put dynamic search help in web dynpro ABAP.

    Hi,
    I have a table element with two columns in my web dynpro ABAP.Both the columns are F4 helps.
    Based on the value of the first column,the F4 help of second column must change dynamically.Kindly tell me how to do this.
    Thanks & Regards,
    Raji.

    Hi ,
    Use this code to dynamically assign search help and to deactivate search helps.
    data lo_nd_info type if_wd_context_node_info.
    lo_nd_info = lo_nd->get_node_info( ).
    CALL METHOD lo_nd_info->set_attribute_value_help
    EXPORTING
    name = 'ATTR1' " Your attribute Name
    value_help_mode = '121' " Valid value help mode
    value_help = 'Z187442'. " Search help name
    The various possible values that you can pass to value_help_mode are as shown below.
    deactivated 101
    automatic 111
    ddic 121
    ovs 131

  • How to save file in km using web dynpro abap

    Hi Experts,
    We have a requirement that file should be saved in a folder in km, the name of the folder should be the employee number.
    Could you please tell me how to create folder with employee number in KM and store file in it using web dynpro abap.
    Thanks and Regards,
    Santhoshi.

    Thanks Naga Raju Meesala.
    How come all these methods are deprecated...getEP5User
    Also, since I am building a weddynpro DC, what is the proper way to include these jar files as Used DCs?
    Now proceed in the same way with the variable PORTAL_HOME and add the following .jar files:
    u2022 \lib\prtapi.jar The portal runtime APIs
    u2022 \portalapps\com.sap.portal.usermanagement\lib\com.sap.security.api.ep5.jar The user management APIs of the Enterprise Portal 5.0 are deprecated, but still in use in SAP NetWeaver 04
    u2022 \portalapps\com.sap.netweaver.bc.rf\lib\bc.rf.framework_api.jar KM Repository Framework APIs
    u2022 \portalapps\com.sap.netweaver.bc.rf.service\lib\bc.rf.global.service.urlgenerator_api.jar Repository Framework Utility: URL Generator
    u2022 \portalapps\com.sap.netweaver.bc.sf\lib\bc.sf.framework_api.jar Repository Framework: Repository Services
    u2022 \portalapps\com.sap.netweaver.bc.util\lib\bc.util.public_api.jar Repository Framework Utilities

  • Problem in calling abap editor with the program name in Web Dynpro ABAP

    Hi,
    I have to caal ABAP Editor screen with the display of program after clicking a button from web dynpro abap application.
    I am able to call the ABAP Editor initial screen, but i want the editor display screen with a program.
    How to do that?
    Please find my code below:
      DATA : FINAL_URL TYPE STRING,
             URL TYPE STRING.
      DATA: LV_HOST TYPE STRING,
            LV_PORT TYPE STRING.
    DATA V_TCODE TYPE TCODE.
      DATA:  LO_WINDOW_MANAGER TYPE REF TO IF_WD_WINDOW_MANAGER.
      DATA:  LO_API_COMPONENT  TYPE REF TO IF_WD_COMPONENT.
      DATA:  LO_WINDOW         TYPE REF TO IF_WD_WINDOW.
      DATA:  LD_URL TYPE STRING.
    V_TCODE = 'SE38'.
    *Call below method to get host and port
      CL_HTTP_SERVER=>IF_HTTP_SERVER~GET_LOCATION(
         IMPORTING
           HOST = LV_HOST
           PORT = LV_PORT ).
      CONCATENATE 'http'
      '://' LV_HOST ':' LV_PORT '/sap/bc/gui/sap/its/webgui/?sap-client=&transaction=' V_TCODE '&OKCODE=SHOW'
      INTO URL.
      LO_API_COMPONENT  = WD_COMP_CONTROLLER->WD_GET_API( ).
      LO_WINDOW_MANAGER = LO_API_COMPONENT->GET_WINDOW_MANAGER( ).
      LD_URL = URL.
      CALL METHOD LO_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW
        EXPORTING
          URL    = LD_URL
        RECEIVING
          WINDOW = LO_WINDOW.
      LO_WINDOW->OPEN( ).
    Now, how to pass my Zprogram name into the URL.
    I need to get the editor screen with the display of the program.
    Thanks,
    Radhika

    Hi Kiran,
    Please find my code below:
    DATA :   URL TYPE STRING.
      DATA: LV_HOST TYPE STRING,
            LV_PORT TYPE STRING.
      DATA:  LO_WINDOW_MANAGER TYPE REF TO IF_WD_WINDOW_MANAGER.
      DATA:  LO_API_COMPONENT  TYPE REF TO IF_WD_COMPONENT.
      DATA:  LO_WINDOW         TYPE REF TO IF_WD_WINDOW.
      DATA:  LD_URL TYPE STRING.
    *Call below method to get host and port
      CL_HTTP_SERVER=>IF_HTTP_SERVER~GET_LOCATION(
         IMPORTING
           HOST = LV_HOST
           PORT = LV_PORT ).
      CONCATENATE 'http'
    '://' LV_HOST ':' LV_PORT '/sap/bc/gui/sap/its/webgui/?&transaction=se38&RS38M-PROGRAMM=Y2PSOLTREE&~okcode=shop'
      INTO URL.
      LO_API_COMPONENT  = WD_COMP_CONTROLLER->WD_GET_API( ).
      LO_WINDOW_MANAGER = LO_API_COMPONENT->GET_WINDOW_MANAGER( ).
      LD_URL = URL.
      CALL METHOD LO_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW
        EXPORTING
          URL    = LD_URL
        RECEIVING
          WINDOW = LO_WINDOW.
      LO_WINDOW->OPEN( ).
    Here,, Y2PSOLTREE is the program, that should show in SE38 screen.
    I used the above code, but still it is showing the SE38 initial screen.
    Thanks,
    Radhika

  • How we can done background job in web dynpro abap

    Hi expert,
    my requriment is how i can set background job in web dynpro .
    regard's
    vikash

    The same way you do it in normal ABAP. There is nothing Web Dynpro ABAP specific about starting a background job.
    There are API Function modules that begin with the name JOB_*.  Have a look at the online help for samples:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/fa/096d40543b11d1898e0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/fa/096d4d543b11d1898e0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/fa/096d67543b11d1898e0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/fa/096d74543b11d1898e0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/fa/096d8e543b11d1898e0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/fa/096ce5543b11d1898e0000e8322d00/frameset.htm

  • Need I the JAVA Addin for Web dynpro ABAP

    Hello Experts,
    have I to install the JAVA-Addin for using Web dynpro ABAP?
    Best regards
    Heike

    No you don't, but when you want to use your application in Portal, you. Or if you want to use Adobe Interactive Forms, than too you need java.

  • How to check the visibility of a Web Dynpro input field

    Hi,
    In my application, one input field could be set as invisible by
    1, Component Configuration: The 3rd tab "Web Dynpro Built-in" -> Views and There Elements -> Visibility (Check the radio: No)
    2, Administrator configuration: While the Web Dynpro is accessed through URL with parameter "sap-config-mode=X", the administrator can configure the visibility of the UI element through right click menu "Settings for Current Configuration".
    Could any one tell me how could I know whether the input field is visible or not?
    I have tried that in the WDDOMODIFYVIEW method of the view, the method CL_WD_UIELEMENT->get_visible( ) always returns '02' even if the input field is invisible.
    Thanks in advance!
    Cheers,
    David

    Hello,
    See this: [Component and Application Configuration|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b52e13c3-0901-0010-8fa6-d11a51821b7c].
    Regards.

  • How to show the detail information of web dynpro runtime error

    hi,
    I'm a java developer,During i 'deploy and run ' a web dynpro application on server-1,if the application have some runtime errors. there are displayed many infomation about the runtime error,such as exception track,etc.
    But when i do the same on server-2,there just show something like:
    500 Internal Server Error
    SAP NetWeaver Application Server 7.00/Java AS 7.00
    Failed to process request. Please contact your system administrator.
    but the server-1 will stop the j2ee engine.
    how can do i make server-2 show detail error message as server-1. when i debug web dynpro application need these infomation.
    Appreciate your inputs...
    (Note:server-1 and server-2 have same software version, i have setup the 'developmode' value is 'true' in VA)
    Edited by: BingLin Zhong on Feb 18, 2008 2:22 AM

    Follow SAP note - Note 962319 - Detailed error messages with stack trace in Web Dynpro
    Thanks,
    Praveen
    PS.Dont forget to reward points

  • How to display the rows dynamically in the table display in web dynpro abap

    Hi experts,
                   There is a visible row count tab where you can give the no of rows to be displayed in the output table, but i want it to be done dynamically as the row count of my table may change dynamically at runtime.
    And i want to know how to reduce the width of a column as my table display is taking the length as per the binded table specifications.Can anyone please help me out in this issue.
    Thanks in advance,
    Anita.

    Hi Anita
    You can bind the visiblerowcount property to the a context attribute. and at runtime you can set the context attribute to the no of rows you want in your table,
    Regards
    Naresh

  • How to find the current state in web dynpro

    Hi,
       Can any one tell me how to find the current state of system (idle /not idle).
    Thanks,
    Krishna..

    Please explain further.  I don't understand how you are expecting to test for idle.  If ABAP code is being executed, then you know that the application is not idle. Only a server event could trigger code execution. Only a timedTrigger would be able to tell you that a certain amount of time has passed without activitity - although the event of the timer itself will be a server event that constitutes activity.

  • How to use the date picker in Web dynpro java

    Hi,
    I want to add date picker to enter a date while developing webdynpro application.
    How can i do that.
    Regards,
    H.V.Swathi

    Hi,
    its very simple...
    take a input field and map it to the attribute which data type is of "date". thats it at runtime you will see a input filed with date picker.
    i.e. Add an inputField and bind the context attribute of Type Date to it
    this will show the date picker on screen.
    PradeeP

  • Drop down in dynamic table in the Adobe Interactive Form (Web dynpro ABAP)

    Hi All,
    I have scenario use drop down in dynamic table in the adobe interactive form (Using the button the dynamic table row will be increasing and decreasing).
    Assume I Add five rows dynamically in the dynamic table. The Last column contains Drop down.
    I have button in the adobe form.
    Button Name = u201CSAVEu201D
    Button type    = SAP Submit button (Native type u2013 I am Using ZCI).
    While clicking save button, I need to store the dynamic table datau2019s to back end system. I can able to store the data to back end system. After form data getting saved those particular values need to display in the adobe form. 
    Here I am facing a problem.
    I cannot able to view as a default value in the drop down, which I have selected some values after save operation I am not getting any values in the drop down as a default.
    Example:
    The dynamic table contains 5 rows (Each and every row Drop down contains one to ten values).
    1)     I have selected second value in the Drop down (ROW1)
    2)     I have selected fourth value in the Drop down (ROW2)
    3)     I have selected fifth value in the Drop down (ROW3)
    4)     I have selected seventh value in the Drop down (ROW4)
    5)     I have selected third value in the Drop down (ROW5)
    I press the save button that particular Drop down value gets saved in back end system and that particular values want display in the Drop down as a default value.
    How to resolve this problem.
    Regards,
    Boopathi M

    Hi,
    Solve the problem .
    I have created the New node for dropdown. also i have one node already for table.
    The new node i bind to dropdown, the table same for table.
    Its working fine
    Boopathi M

  • Input field validation in web dynpro abap

    Hi....i have a input field in a view, which is bound with dictionary object of char type ,through context.for this input field, i have to allow the end users to enter the numeric and float values only,but in my condition it accepting everything and returns runtime error.for this how to validate inputs other than numerics.
    Thanks & regards,
    pavan maganti.

      DATA lo_nd_itab2 TYPE REF TO if_wd_context_node.
      DATA lo_el_itab2 TYPE REF TO if_wd_context_element.
      DATA ls_itab2 TYPE wd_this->element_itab2.
      DATA lv_non_numeric TYPE wd_this->element_itab2-non_numeric.
    *     get message manager
      DATA lo_api_controller     TYPE REF TO if_wd_controller.
      DATA lo_message_manager    TYPE REF TO if_wd_message_manager.
    * navigate from <CONTEXT> to <ITAB2> via lead selection
      lo_nd_itab2 = wd_context->get_child_node( name = wd_this->wdctx_itab2 ).
    * get element via lead selection
      lo_el_itab2 = lo_nd_itab2->get_element( ).
    * get single attribute
      lo_el_itab2->get_attribute(
        EXPORTING
          name =  `NON_NUMERIC`
        IMPORTING
          value = lv_non_numeric ).
      IF lv_non_numeric CO '1234567890'.
        lo_api_controller ?= wd_this->wd_get_api( ).
        CALL METHOD lo_api_controller->get_message_manager
          RECEIVING
            message_manager = lo_message_manager.
    *     report message
        CALL METHOD lo_message_manager->report_success
          EXPORTING
            message_text = 'All numeric'.
      ELSE.
        lo_api_controller ?= wd_this->wd_get_api( ).
        CALL METHOD lo_api_controller->get_message_manager
          RECEIVING
            message_manager = lo_message_manager.
    * report message
        CALL METHOD lo_message_manager->report_warning
          EXPORTING
            message_text = 'Contains characters'.
      ENDIF.

Maybe you are looking for

  • How to use a formula for dynamic New Page After?

    There is a formula for dynamic New Page After. How do I get value of formula? I am using RAS and the ReportClientDocument.

  • Output determination in Create/Change.

    HI Gurus,           How can I diifrentiate whether Sales order is created or changed in output determination, I'm sending data to XI through a custom IDOC. I want to send different data for creation of order and Change of Order how can I handle this.

  • A window doesn't know the window which has createdit.

     

  • 2 invoices in different currencies

    HI for my export sales my client requirement is that they should have 2 invoices 1 proforma in indian currency 1 commercial invoice in export country currency i am getting the customer currency in commercila invoice but how to get proforma invoice in

  • Scanner not found

    My computer can print, but not scan.  I've updated print and scan drivers, restarted the computer, and Googled to no avail.  Any help would be appreciated as I am so frustarted right now! The OS is X 10.6.3 and the printer/scanner is Canon Pixma 780.