How to validate input fields in a popup?

Hi guys,
i have a popup containing some input fields which i have to validate before closing the popup (if the validation fails, the popup should stay opened and print some error messages).
But since my view (inside the popup) doesn't has any events, because i use the popup buttons like recommended in other postings, i don't know where to apply the validation.
Any tips are very welcome.
Best regards
Philipp

Thanks for the tip!
I think you mean something like
  lr_view_controller = wd_this->wd_get_api( ).
  lo_window->subscribe_to_button_event(
  button = if_wd_window=>co_button_ok
  button_text = 'Person anlegen'
  action_name = 'PERFORMCREATE_PERS'
  action_view = lr_view_controller ).
But this binds methods of the "parent" (in my case the MAIN view) to the button, which gets applied after the view got closed!?
How can i bind methods IN the called popup view and perfom them BEFORE the close.
I'm sorry if i don't see obvious things.
Best regards
Philipp

Similar Messages

  • How to validate input fields as the user is filling up a form with jQuery?

    Hello EA friends.
    Someone has experimented on how to validate input fields as the user is filling up a form with jQuery?, if the field is numeric and insert an A for example, an alert appears showing "insert a number" or not allowed to enter anything until a number is entered.
    Thanks and regards.
    Fer

    Hi Sudeshna.
    Sorry for not responding on time, how can I be included in this code?
    sym.setVariable("typeActivity", "input")
    var Element_1=document.createElement(typeActivity);
    $(Element_1).css({"text-align": "center"});
    //Answer
    sym.setVariable("Answer_1", "4");
    sym.$("box_1").append(Element_1)
    This code is on my creationComplete and it works fine.
    Would greatly appreciate your help.
    Regards.
    Fer García

  • How do we validate input fields on the selection screen

    How do we validate input fields on the selection screen

    hi balram,
    u can validate input fields using <b>AT SELECTION-SCREEN</b>  Event.
    PARAMETERS : p_werks TYPE marc-werks.
    AT SELECTION-SCREEN ON p_werks.
    SELECT SINGLE *
    FROM t001w
    WHERE werks = p_werks.
    IF sy-subrc <> 0.
    MESSAGE 'Invalid Plant' TYPE 'I'.
    ENDIF.
    Like this, we can validate user input for plant.
    check this link:
    http://help.sap.com/saphelp_nw04s/helpdata/en/9f/db9a2e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm
    Reware me if useful......
    Harimanjesh AN

  • How to validate the field when i am populating the data cursor to block

    Hi,
    I am populating data cursor to multi record block.
    Block contain 5 items. I am populating data cursor to block for 4 items. User will enter one item value that is quantity field.
    If user enter negative values and decimal points in quantity filed i need to display message to user item level.
    Please do the needful how to do it.

    902434 wrote:
    Hi,
    I am populating data cursor to multi record block.
    Block contain 5 items. I am populating data cursor to block for 4 items. User will enter one item value that is quantity field.
    If user enter negative values and decimal points in quantity filed i need to display message to user item level.
    Please do the needful how to do it.If you want to validate at entry level then use When-Validate-Item trigger and check the input and show message. Like
    If :quentity <0 then
    message('do not enter negative value');
    message('do not enter negative value');
    raise form_trigger_failure;
    end if;Why u open same thread again ? not closing one.. check this one
    </a>
    How to validate the field when i am populating the data cursor to block
    Hopes this helps
    If someone's response is helpful or correct, please mark it accordingly.

  • How to validate input's in selection-screen

    Hi ,
    can any one how to validate input's field's  in selection-screen and each field has diffirent tables and what is the table name which has all the validating fields??
    Thank's in advance..

    hi,
      You can use validate selct-options using select query by obtaining the realtionship from table .Using the selection-screen events You can write code for validation as follows.
    tables:
      kna1.                                " General Customer data
    *"Selection screen elements............................................
    select-options:
      s_kunnr for kna1-kunnr.              " Customer number
    *"Data declarations...................................................
    Data declaration of the structure to hold kna1 details              *
    data:
      begin of fs_customer,
        kunnr type kna1-kunnr,             " Customer number
        adrnr type kna1-adrnr,             " Address
        anred type kna1-anred,             " Title
        erdat type kna1-erdat,             " Created on
        ernam type kna1-ernam,             " Created by
      end of fs_customer.
    *"Constants declarations..............................................
    constants
      w_path type string value 'D:\DOWNLOAD\CUSTOMER'.
    Internal table to hold customer details                             *
    data:
      t_customer like
        standard table
              of fs_customer.
                          AT SELECTION SCREEN OUTPUT                    *
    at selection-screen.
      perform retrieve.
    Form  RETRIEVE                                                     *
    This subroutine retrieve customer data from table kna1             *
    There are no interface parameters to be passed to this subroutine. *
    form retrieve .
      select kunnr                         " Customer number
             adrnr                         " Address
             anred                         " Title
             erdat                         " Created on
             ernam                         " Created by
        into corresponding fields of table t_customer
        from kna1
       where kunnr in s_kunnr.             " END SELECT
      if sy-subrc ne 0.
        message text-001 type 'E'.
        exit.
      endif.                               " IF SY-SUBRC NE 0
    endform.                               " RETRIEVE
    regards,
    veeresh

  • How to validate the fields  and how to display the error messagein presenta

    Hi,
    I am new to OBPM 10g, pls tell me how to validate the fields in a presentation.
    for example if we take login presentation if user enters his user name and password wrongle and submit the form. Then we need to display error message right side of the each field i.e user name and passowrd is wrong and try again.
    Regards
    jaya
    Edited by: 12345 on Aug 12, 2010 10:38 PM

    Hi Jaya,
    You can initially set the validation for empty values.. that is when the user dint enters any value and clicks on submit.
    for these vadliations you need to write a method and call it on submit button click!!
    secondly, you can validate for the format if required.
    thirdly, you can validate against a database for the credentials. For this you need to fetch list of usernames from database and search for user entered value in that list.
    Optimal query would be : if user name not null, query for pwd of the entered user name from database or file storage. if you dont get any value for pwd of given username, its incorrect user name. if you get some pwd value for username, then check against the one user entered in pwd field..
    Write all this logic in a method and call on submit button click event of the login form!!
    HTH
    Sharma

  • How to validate ch field in selection screen

    hi experts.......
    how to validate ch field selection screen......... and which function module is used to validate parameter field i.e character

    Hello,
                Is your requirement to Validate the Character Field? This is what I understand. If it is right, then do you want to Validate whether a Character Value is entered?
                Check the below Sample Code.
    At Selection-Screen on P_CHARFIELD.
        IF P_CHARFIELD CA '1234567890'.
            Message 'Enter an Alpha Character only' Type 'E'.
        Endif.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • How to hide input fields on selection screen using variant attribute

    Hello all,
    I want to know how to hide input fields on selection screen using variant attribute conpletely.
    As you know, when setting the attribute of variant "Hide field" checked, the field is temporarily hidden, but when clicking "All Selections(F7)" button on the selection screen, the fileds become appeared.
    I want to hide the field completely. Di you know how to do ?
    Thank you for your support.
    Regards,
    Hideki Kozai

    Use this attribute hide field and save the variant. Then create transaction for this program setting default variant for parameter Start with variant . The user who runs it will have it by defualt set.
    Otherwise
    in PBO simply use LOOP at screen and output = 0 for this field. This will ensure that field is invisible in any case.
    Regards
    Marcin

  • How to validate text fields in popup window

    Hi All,
    I need showing empty string validation  as tool tip for the text fields (RichInputText) on popup window when clicking submit button. kindly advice on this.

    Hi
    Below link me help u in implementing validation messages
    http://andrejusb.blogspot.in/2008/04/adf-faces-rich-client-complex.html
    Thanks
    Nitesh

  • How to validate Quantity field in TV - Inputfield ?

    Hello All,
            I'm using a table view to show the output .
    IN this table view I made 2 fields as Input fields.
    Both the fields are Quantity fields.
    Now when the user enters a value in this Quantity field I want to validate it with respect to it's units .
    How can I do that ?
    In my case if the user enters correct value it works but when he enters a wrong value my BSP is going for a dump.
    I tried to debug the<b> LIPS table</b> to verify how SAP was handling this checking for the field <b>LFIMG</b>. But there there is a statement called chain --endchain.
    SO there is no chance for debugging.
    My code is as follows :-
            LOOP AT gt_final INTO wa_final.
              CLEAR: gv_row,lv_qty,lv_string,gv_len,gv_cell_id1.
              gv_row = sy-tabix.
              gv_len = STRLEN( gv_row ).
              gv_len = gv_len - 1.
    * Modify the Third Column
              CONCATENATE 'INB01_TV_ID' '_' gv_row(gv_len) '_' '3' INTO gv_cell_id1 .
              lv_string = request->get_form_field( name = gv_cell_id1 ).
              WRITE lv_string TO lv_qty  UNIT wa_final-units.
              CLEAR :wa_final-del_quantity.
              wa_final-del_quantity = lv_qty.
              MODIFY gt_final FROM wa_final TRANSPORTING del_quantity.
            ENDLOOP.
    Can anyone tell me how to validate the entry for the Quantity filed ?
    Regards,
    Deepu.K
    I have one more Question .
    Whenever BSP goes for a dump in this case I want to handle this by a message .
    Is it possible ?
    Message was edited by:
            deepu k

    Hello Raja,
           I want to validate the entry in the QUantity field with respect to the Unit of the Quantity.
    I.e say for example I have a unit as PC (pieces) then the quantity must be only of thousands,lakks and so..on......but not in points i.e a piece quantity must be full either 200 ,2 lakhs or 2 pieces but not 2.5 pieces.
    SO now if the user enters 2.5 it's a wrong value as the quantity for the Unit PIECES can't have half-piece. (2.5 = 2 + 0.5) .SO i want to validate this .
    I hope I'm clear.
    How should I do ?
    Regards,
    Deepu.k

  • JSpinner editable, how to validate input??

    Hi everybody,
    i've a spinner made like this:
    spinner_ora_inizio = new JSpinner();
    spinner_ora_inizio.setModel(new SpinnerDateModel());
    spinner_ora_inizio.setEditor(new JSpinner.DateEditor(spinner_ora_inizio, "dd/MM/yyyy HH.mm"));
    i'm having trouble to find out when the the user inputs invald values.
    Example: if my user inputs "kfdkjghdfjkghd" and press "Save" the getValue methods returns the last valid value and i dont know how to make input validation..
    Thank you

    Sure seems like there should be SOME way to make this work.
    I've tried a FocusListener on the JSpinner, and on it's Editor. Never gets called.
    I've tried an InputVerifier on JSpinner, never gets called.
    I've tried setting the FocusPolicy to COMMIT. That commits the value, but the inputVerifier never gets called.
    Does anyone have a Known WORKING technique to do value validation on a JSpinner using the NumberModel?
    When you click or tab away from a JSpinner that you just typed a number into, I would like to validate that value. If it's over the max, I'll set it to the max, if it's under the min, I'll set it to the min.
    And note, I'm talking about the user TYPING into the field, not using the spinner buttons.
    It seems like SOMEBODY will have figured out how to do this.

  • Validate input field

    Hi team,
    I have some doubts on how do i validate a particular field for character or numeric in web dynpro. Can anybody please help me with the step by step solution for the same.
    Thanks and Regards

    hi sabyasachi ,
    in the event handler , or any other method where u wish to do validations ,  u may proceed like this :
    1 Read the context attribute of ur input field , let us say the context attribute is lv_att , under the context node node
    u can do it using get_attribute method , with the help of codewizard ( CNTRL + F7 ).
    select the radio button read context node /attribute there to read the attribute under particualar node
       DATA lo_nd_node TYPE REF TO if_wd_context_node.
        DATA lo_el_node TYPE REF TO if_wd_context_element.
        DATA ls_node TYPE wd_this->element_node.
        DATA lv_att LIKE ls_node-att.
    *   navigate from <CONTEXT> to <NODE> via lead selection
        lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_node ).
    *   get element via lead selection
        lo_el_node = lo_nd_node->get_element(  ).
    *   get single attribute
        lo_el_node->get_attribute(
          EXPORTING
            name =  `ATT`
          IMPORTING
            value = lv_att ).
    2 now lv_att contains the value which user has entered . u need to validate this entered value , with the value in the parent table
    3 now using the simple ABAP syntax , u can validate whether the parent master table contains the value lv_att
    I hope it wud help
    regards,
    amit

  • How to get Input field value?

    Hi All,
    I have some problem in getting of input value from View to customcontroller.
    My problem is I have created a Input field in the view and if Iam giving the value to that field I can capture the value from View to customcontroller and send it as BAPI input.But My input filed is in the view Context.
    How can i capture InputFiled value from View to CustomController.
    Advance thanks
    Nageswara.
    Message was edited by: nageswar mandapati

    Thanks for your response Patrick,
    In my customcontrollerView all my BAPI mathods instances and execute methods are declared.All the attributes directly getting from model class.
    But I have two views , in first view I created a input field(for that i created valueAttribute in that context).
    Here I want give the conditions If  the input field is empty then directly call the execute method of BAPI.
    Otherwise give any input to the inputfiled then capture that value and send it input to BAPI from view to BAPI.
    In my customcontroller
    BAPI b = new BAPI();
    b.Param1();
    b.param2();
    and
    execute BAPI()
    I done like this.
    How can i capture the view input value how to send as a b.parama();
    Please guide me .
    Any snippests appriciate.
    Thanks
    nageswara.

  • How to clear input field value on back

    Hi All,
    I have developed an application, in which user put sales order on first page and press a button then its detail display on second page using restAPI. Now when I press back button on second page then it takes me to first page with holding previous sales order value in input field. And when I change its value and press that button again then it shows me previous sales order detail.
    Please suggest me, how to refresh cache and input fields value on back button?
    Thanks & Regards
    Shubhanshu

    Hi Viren,
    My code is,
    First view
    sap.ui.jsview("uitest2.first", {
      getControllerName : function() {
      return "uitest2.first";
      createContent : function(oController) {
      var text = new sap.m.Label({
            text: 'Dealer Code',
           layoutData: new sap.m.FlexItemData({alignSelf: sap.m.FlexAlignSelf.Center })
      var input =  new sap.m.Input("CUSTOMER",{
            type: sap.m.InputType.Text,
          placeholder: 'Enter Dealer code...',
          layoutData: new sap.m.FlexItemData({growFactor: 1, alignSelf: sap.m.FlexAlignSelf.Center}) 
      var Dealer = new sap.m.HBox({ 
                items:[  text,input
    //                   new sap.m.Label({
    //                   text: 'Dealer Code'
    //                   new sap.m.Input("CUSTOMER",{
    //                   type: sap.m.InputType.Text,
    //                   placeholder: 'Enter Dealer code...'
                       height : "6em"
          var button = new sap.m.Button({
               text: "Submit",
               press: function(oEvent) {
                  oController.loadData();
                  app = sap.ui.getCore().byId("myApp");
                  app.to("idsecond1");//, sap.ui.getCore().byId("CUSTOMER").getValue());
               layoutData: new sap.m.FlexItemData({alignSelf: sap.m.FlexAlignSelf.Center}) 
          return new sap.m.Page({
         title: "Sales Dealer Info",
         content: [ Dealer,button
    First controller
    sap.ui.controller("uitest2.first", {
        loadData: function() {      
            var oParameters = ({
            "CUSTOMER" : sap.ui.getCore().getElementById('CUSTOMER').getValue(),    
             console.log(oParameters);
             var url = "http://###########:8000/sap/bc/zrst_customer?sap-client=800/";
             var oModel = new sap.ui.model.json.JSONModel();
             $.ajax({             
             url : url ,
             dataType : "jsonp",
             type : "POST",
             data: oParameters,
             success: function(data,textStatus,jqXHR) {
             data = JSON.parse(data);
                     console.log(data);   
                     oModel.setData(data);
             sap.ui.getCore().setModel(oModel);
    Second View
    sap.ui.jsview("uitest2.second", {
      getControllerName : function() {
      return "uitest2.second";
      createContent : function(oController) {
      var oTable = new sap.m.Table("table",{
           headerText: "Dealer data",
           columns: [
             new sap.m.Column({
               header: new sap.m.Label({text: "NAME"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
               header: new sap.m.Label({text: "CITY"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
               header: new sap.m.Label({text: "COUNTRY"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
               header: new sap.m.Label({text: "COUNTRYISO"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
              header: new sap.m.Label({text: "STREET"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
              header: new sap.m.Label({text: "PST_CODE"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
              header: new sap.m.Label({text: "TELEPHONE"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
             new sap.m.Column({
              header: new sap.m.Label({text: "EMAIL"}),
      demandPopin  : true,
      minScreenWidth : "Tablet",
           items: {
           path: "/KEY",
           template: new sap.m.ColumnListItem({
           cells: [
                   new sap.m.Text({                              //new sap.m.ObjectIdentifier
                   text: "{NAME}"
                   new sap.m.Text({
                   text: "{CITY}"
                   new sap.m.Text({
                   text: "{COUNTRY}"
                   new sap.m.Text({
                   text: "{COUNTRYISO}"
                   new sap.m.Text({
                   text: "{STREET}"
                   new sap.m.Text({
                   text: "{PST_CODE}"
                   new sap.m.Text({
                   text: "{TELPHONE}"
                   new sap.m.Text({
                   text: "{EMAIL}"
      return new sap.m.Page({
      title: "Dealer Info",
      showNavButton: true, 
      navButtonTap:function(){ 
      app = sap.ui.getCore().byId("myApp"); 
      app.to("idfirst1"); 
      sap.ui.getCore().getElementById('CUSTOMER').setValue("");
      oModel.refresh();
      content: [ oTable
    Index.htm
    <!DOCTYPE HTML>
    <html>
      <head>
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <script src="resources/sap-ui-core.js"
      id="sap-ui-bootstrap"
      data-sap-ui-libs="sap.m,sap.ui.commons"
      data-sap-ui-theme="sap_bluecrystal">
      </script>
      <!-- only load the mobile lib "sap.m" and the "sap_mvi" theme -->
      <script>
      sap.ui.localResources("uitest2");
      var app = new sap.m.App("myApp",{initialPage:"idfirst1"});
      var page = sap.ui.view({id:"idfirst1", viewName:"uitest2.first", type:sap.ui.core.mvc.ViewType.JS});
      var page1 = sap.ui.view({id:"idsecond1", viewName:"uitest2.second", type:sap.ui.core.mvc.ViewType.JS});
      app.addPage(page).addPage(page1);
      app.placeAt("content");
      </script>
      </head>
      <body class="sapUiBody" role="application">
      <div id="content"></div>
      </body>
    </html>
    Thanks
    Shubhanshu

  • How to validate the field values in module pool program?

    Hi Guys
         I am working with module pool programming.
         Here I want to validate the fields like below.
         with out filling all the fields if I click SAVE option it has to show a message that all fields has to be filled.  This can be done by checking all the fields individually.
         I think it can be done through <b>LOOP AT SCREEN ......ENDLOOP</b>. sequence.
         If it is possible, can anyone help me?

    You need to write the Module in between the CHAIN and ENDCHAIN statment in SE51
    If you send a warning or error message from a module <mod> that you called using a FIELD statement as follows:
    CHAIN.
    FIELD: <f1>, <f 2>,...
    MODULE <mod1>.
    FIELD: <g1>, <g 2>,...
    MODULE <mod2>.
    ENDCHAIN.
    all of the fields on the screen that belong to the processing chain (all of the fields listed in the field statements) are made ready for input again. Other fields are not ready for input. Whenever the MODULE statement appears within a processing chain, even if there is only one FIELD attached to it, all of the fields in the chain (not only the affected field) are made ready for input again, allowing the user to enter new values. If the fields in the processing chain are only checked once, the PAI processing continues directly after the FIELD statement, and the preceding modules are not called again.
    Look at the DEMO program DEMO_DYNPRO_FIELD_CHAIN.
    ashish

Maybe you are looking for

  • I moved My Music from C drive to E drive and then all my problems started

    My C drive was very full, so I moved My Music to E drive which had lots of spare capacity. Unfortunately after the move itunes opened but my library was empty. I discovered from the itunes help that I should not move the library file. I reversed the

  • Analog output to the DAQ that changes when controls on the front panel change

    I'm using the PCI-6024E, and trying to output an analog waveform that can change when one of the two controls on the front panel change. It outputs fine setting it to continuous output and using a simple while loop around the "Is Task Done" VI, but i

  • A simple question: do i have to close the stream?

    do i have to close such input/output stream: HttpServletRequest.getInputStream() HttpServletRequest.getReader() HttpServletResponse.getOutputStream() HttpServletResponse.getWriter() and why? thanks!

  • I want recover in ABAP program a "Long Text"

    Hi,  In FB01 transaction when you go to "Enter Fixed Asset posting: Correct G/L account item", there are a button with a label: "Long Text". When you push this button appear a little window with name "Long Text for Document Line Item" and you can wri

  • Adobe_air installation for htc evo v android

    i am experiencing difficulty in  unlocking/opening the adobe_air application. i have a htc evo v 4g android. i downloaded the spplication from google play store, i believe the application succrssfully downloaded but i cannot unlock/open it for it to