Date validation in ABAP Webdynpro.

Hi,
    I have created a field for date in my table and binded it with a field of a data dictionary table . The problem is when the user enters the year , whether one , two or three digits it automatically sets the remaining digits and the year is a four digit value . This happens even before reading the value of the date field attribute , so I m not able to find a way to validate that user enters the four digits of the year accurately.

Hi,
Pls check out this thread on date validation in detail-
How can I check these data whether valid ?
Validation code
date format in application
Regards
Lekha

Similar Messages

  • Validations in ABAP webdynpro

    Dear friends,
       I am trying to find out what is the simplest and best way to have validations in an ABAP webdynpro. There are a bunch of fields in a view in one of the webdynpros that iam working on. I would like to set up validations to some of the fields. I am trying to find out if there is a standard action or method that will help me achieve this; or would i have to create a new class for this.
    Any help is greatly appreciated.
    Thanks
    -Neha.

    closed

  • TABLE DATA in PDF FORM  Through ABAP WEBDYNPRO

    Hi Friends,
    I have to Populate  SAP TABLE like MARA,VBRK table into PDF form throught ABAP Webdynpro.
    Can you send STEP by STEP Example Doc.
    Thanks In Advance.
    Gautam.

    Hi,
    To display the Table in the Adobe Form you must create a WebDynpro Context.
    In WebDynpro Context, in the main node create another node like A1 with cardinality 0..n and in this node create attributes FIELD1 and FIELD2 and so on.
    Now goto method and in that method using code wizard read the node A1.
    And use the below code snippet sample in your program, i.e. code this under respective method of the webdynpro.
    *Declare the TYPES
    TYPES : BEGIN OF TY_TABLE,
    FIELD1 TYPE SOMETYPE,
    FIELD2 TYPE SOMETYPE,
    END OF TY_TABLE.
    *Define Internal Table and work area.
    DATA : IT_TABLE TYPE STANDARD TABLE OF TY_TABLE INITIAL SIZE 0.
    SELECT FIELD1 FIELD2 FROM TABLENAME INTO TABLE IT_TABLE.
    lr_node_info->bind_table( IT_TABLE ).
    And now goto Layout and give the TemplateSource and after that it asks for the interface name fill on that and select the relevant context. Now the LiveCycle Designer opens. There goto DataView pallette, there you can see the context of the webdynpro, now you simply drag and drop that table, a table is being created in the Layout Designer.
    Regards
    Pradeep Goli

  • ABAP Webdynpro - Populating second table based on data selected on first

    Hi Experts,
      I am new to ABAP Webdynpro. I have a requirement to show a search area, one table for header info, and second table for populating item level information.
      I was successful building a search area and populating first table when the 'Search' button is pressed.
      Now, I like to populate the second table with item details if a row on first table is selected. I tried to bind the OnSelect Event of first table to a method and try to get the results and bind to second table.. However, I am unsuccessful in this attempt.
      Here are my questions/challenges.
      1. When I select a row on first table, how can I extract the key information?
      2. Is it sufficient to create a context attribute and populate it with FM and bind that with second table? 
    I appreciate your help in answering this question.
    Thanks,
    SG

    Hi,
    Regarding...
    1. When I select a row on first table, how can I extract the key information?
    When you select any row in table, a lead selection will be set in the node which bound to the table.
    To read this selected record you need to use the following code. Here the name of context node is "FLAGS". And the structure ls_flags contains all the attributes defined in the node.
    DATA lo_nd_flags TYPE REF TO if_wd_context_node.
      DATA ls_flags TYPE wd_this->element_flags.
      lo_nd_flags = wd_context->get_child_node( name = wd_this->wdctx_flags ).
      CALL METHOD lo_nd_flags->get_static_attributes
        IMPORTING
          static_attributes = ls_flags.
    Regarding....
    2. Is it sufficient to create a context attribute and populate it with FM and bind that with second table?
    Based on the data that you got in the first step, you can fill an internal table with data that needs to be displayed in 2nd table.
    To bind the internal table you need to define the internal table of type context node. Use the following code to bind the internal table to context node which bound to 2nd table. Here name of  the context node is "OVERVIEW".
    DATA: lo_nd_overview TYPE REF TO if_wd_context_node,
                lt_overview TYPE wd_this->elements_overview.
    <<<< Fill lt_overview with data >>>>>
            lo_nd_overview = wd_context->get_child_node( name = wd_this->wdctx_overview ).
            CALL METHOD lo_nd_overview->bind_table
              EXPORTING
                new_items            = lt_overview.
    Alternatively you can use the Supply Function Method.
    Vikrant Trivedi

  • Passing data from report to abap webdynpro

    Hello,
    I'm calling an abap webdynpro from an abap report through CALL_BROWSER MF.
    I need to pass data from a report to a webdynpro. It is a table that I want to pass. I've tried to user memory ids, but as I was suspecting, it doesn't work.
    Is there a way of doing it?
    Thanks and best regards,
    Vasco Brandã

    Hi,
    Please read this thread : Is it possible to pass a table as input parameter to a web dynpro app?
    Regards,
    Pierre

  • Data validations in XI or ABAP report

    Hi All,
              What kind of data validations should be done in XI and what kinds should be left for ABAP team to handle in the report or proxies?
    Regards,
    XIer

    It depends on your message definitions.
    For example, if you have external .xsd definitions and you basically want to check if the input XML is valid for that schema, you can easily achieve that in java coding (within a java mapping or a module).
    Other than that, if you want to really validate the field values (validation against some possible values, expected formats, etc.) you have some alternatives. If it is only in a few fields and the logic is really simple, you could do it in mapping. But the recomendation would really to code the validation in the sender system itself (or create an application specific for that).
    Regards,
    Henrique.

  • Data validation for Date Field in Web Dynpro ABAP

    Hi ,
    In my WDA i want to perform data validation for date filed. (i.e. While creating a new record i have to check the Start Date should be always lesser than End Date.)
    If u ll enter the wrong date it should validate the Date and throw an error message.
    Please Reply soon its urgent.
    Thanks,
    Deepika

    Hi,
    First read the two attributes start date and end date.
    Then write the following condition.
    IF item_start_date > item_end_date.
    Error message.
    Endif.
    For pop up error message you need to use Create_window method of the Interface if_wd_window.
    Thanks.

  • ABAP WEBDYNPRO Application Administrative DATA URL HOST & PORT empty/blank

    My ABAP Webdynpro applications do not display the preview layout in SE80 just white page - no errors ANYWHERE.
    Also in SE80 the properties on the application look like: https://:/sap/bc/webdynpro/sap/z_rep_text.  Don't know why https, but I think if I could figure that out I may resolve the issue.  Can't see why trying to run HTTPS, then the host & port are empty.
    I have been reading SDN posts & notes for days on this. I HAVE ACTIVATED ALL SERVICES that is not the issue.  This works fine in our QA system so I know it is some sort of configuration in the development system that is causing this issue.
    We just applied support packs to 23 on SAP ECC 6.0. SAP_ABAP, SAP_BASIS 7.0 level 23.  This was working before patches. There had to be some note that changed what WEBdynpro's look at so now development is no longer working. 
    Any suggestions would be appretiated.
    Regards,
    Diane Szmurlo

    We found that the profile parameter login/ticket_only_by_https was set to 1.  Once we changed to 0 everything worked fine.

  • ABAP - input data validation

    I have been trying to look through the forum for means of input data validation to no vail. It is necessary to validate data before saving in database. There is an interface IF_WD_VALIDATION out there which seems to handle this task but no more information is provided on how to use it. Does anyone know more about it?
    By validation, I mean verification of:
    data type
    data value (min value, max value)
    data dependence (a<b, or a>b)
    Your suggestion is appreciated.

    There is more solution to validate fields.
    If you import adaptiev RFC model, Dynpro will make validation.
    Secend vay is to put validation in setters function and raise exception if is not valide
    public void setName(String name)
      if(name.length() > 100) throw new Exception("name is to loong");
      this.name = name;
    or mabie more simpliest is to make boolean function check()
    If you want stop workflow in not valide case you can do with
    wdComponentAPI.getMessageManager().raiseException("message", true)

  • Error Handling in tables using ABap Webdynpro

    Hi All,
    I am new to this ABAP webdynpro programming. I have a small question. I am using a table control in one of my iview. I need to check some validations on some columns of this table. Let's say I have a table with 3 columns A,B and C. 
    Case 1 : Whenever any user enters values in C which is greater than A i want to raise an error message saying "The Value is greater than A". The user shouldn't be allowed to enter anyother inputs before correcting the same.
    OR
    Case 2: If the user enters 10 rows in the table and the 5th row contains the error. How can i highlight that row or field which contains the error.
    Your inputs will be valuable to me.
    Regards,
    Pravesh.

    Hi,
    Get the elements of the node for which you table is bound.
    Loop through the context element set.
    get the record for that context attribute and check the column A and column B value and throw
    the error using the report_error_element_message when there is error.
    Check this sample code -
      DATA:
        lt_attr_list type STRING_TABLE,
        ls_attr_list type string.
      ls_attr_list = column name.
      append ls_attr_list to lt_attr_list.
      clear ls_attr_list.
      ls_attr_list = column name.
      append ls_attr_list to lt_attr_list.
      clear ls_attr_list.
    DATA: lit_elementset type WDR_CONTEXT_ELEMENT_SET,
    lis_element type ref to IF_WD_CONTEXT_ELEMENT,
    ls_data type <<strucure type>>.
        CALL METHOD <<nodename>>->GET_ELEMENTS
          RECEIVING
            SET = lit_elementset.
        LOOP AT  lit_elementsetINTO  lis_element.
    lis_element->get_static_atributes->
    importing = ls_data.
    if ls_data-columnC GT ls-data-columnA.
    lr_msg_manager->report_element_error_message->
    message_text = 'Column C canot be gretaer than column A'
    element = lis_element
    attributes = lt_attr_list <<Populate the attributes table for which errors are to be shown>>
    endif.
    clear: ls_data, lis_element.
    ENDLOOP.
    Regards,
    Lekha.

  • ABAP webdynpro CO not showing input parameters

    Folks,
    I know this is strange. But might be that I'm missing something in the ABAP webdynpro creation/configuration.
    Here it is./.
    I have created an ABAP webdynpro application in SE80 with the context declared in COMPONENTCONTROLLER and a view with the context mapped to the COMPONENTCONTROLLER's context.
    The webdynpro application per se is working fine.
    When i created a CO in GP with type ABAP WD Application, and choose this application, all is fine until i reach the Define input screen. Here, i dont see any of those inout fields that are present in my WD COMPONENTCONTROLLER context. Should i do something to make it visible here?
    Cheers,
    Mandrake

    Good question. I'm surprised why this question never came up till now.
    I had a requirement where I had to use WD for ABAP in GP. I did a lot of research on this and found out with the following inferences.
    Pros
    1) It is easier to build and use when compared to WD for JAVA
    2) No deploying needed
    3) ABAP coding can be done in this so as to utilize the power of SAP to the fullest.
    4) No Java knowledge is required
    5) Can embedd any Adobe forms to make it interactive Adobe in GP
    Cons
    1) It can only import values from GP context and cannot export parameters like any other CO.
    2) Not very flexible as WD Java
    3) Comes up with an additional submit button on the GP Process which can supercede all the other checking and data validation functionalities that are built in the other webdynpro buttons in the Actual ABAP WD.
    4) The context visibility is one way from GP and not to GP.
    Steps:
    1) Create the WDA in SE80 and test it.
    2) Create a CO of type WD for ABAP
    3) Map the parameters with the process context parameters
    4) Test the CO and Process
    Hope this clarifies your doubts.
    Cheers,
    Mandrake!

  • BRFplus + BPM + ABAP Webdynpro Architecture

    Hi Gurus,
    We are setting up Data Governance model in our company. As a part of this, we are currently evaluating various options. We are also  considering BRF plus solution. Some of our high level requirements are as follows
    1.     Break SAP transactions for Material Master and regroup the fields according the new business processes in different screens in web front end (possibly ABAP WebDynpro)
    2.     Set up a workflow solution for new business processes (possibly BPM or Business Workflow)
    3.     Integrate Business rules and validations, data checks and so on using BRF plus in to the workflow.
    What that means is that whenever users make changes to the Material master Data in web front end, then a workflow is triggered and rules are applied to the data before the data is changed/created.
    My questions are as follows
    1.     Do we really need all these 3 components namely ABAP Webdynpro, BPM or Business Workflow and BRFPlus to achieve what we want to achieve? Or we can achieve this without having one of the components mentioned above?
    2.     If yes or no, how the architecture should look like?
    3.     How do we integrate these techonologies (which features of what component)
    4.     Any examples you can share?
    Shai

    I don't see the need of web dynpro or BPM if you only want extra data validations. 
    You can integrate extra rules into your regular system as is using BRFplus for extra validations.

  • Reg File Upload Object in abap Webdynpro

    Hi Friends,
    Would like to enquire one doubt in the file upload object in abap webdynpro.
    By default when we press the browse button, near to the file name there is a button which shows the the file types like:
    ., *.html, ,gif,.jpeg etc.
    Is there any way we can control that, as i have an requirement where in to upload only certain extension types.
    thankyou.

    HI,
    I would suggest you to follow this approach :
    1. Create a Table in your View in which FileUpload is there.
    2. Populate this value with valid file extension.
    3. Make it invisible by default.
    4. Now when you have entered value in Fileupload and click on Ok button.
    5. Check whether Mimetype matches any value in Table.
    6. If it is invalid, Throw an error message and mke Table of Valid extension Visible.
    Sample code to have Table with Valid entries.
    types : begin of str,
                 valid_ext type string,
             end of str.
    data : wa type str,
              itab type table of str.
    wa-valid_Ext = 'EXL'.
    append wa to itab.
    wa-valid_ext = 'DOC'.
    append wa to itab.
    lo_nd->bind_Table( itab ).
    here lo_nd is your ref to node of Table having valid extensions.
    7. Bind this Table's Visible property wiht wdui_visiblity .
    8. Set it Visible - 02 , Inviisible - 01.
    I hope it is clear.

  • Zci type ADOBE Interactive Form in ABAP Webdynpro short dump

    Adobe Reader version 8.1.2
    Life Cycle Designer version 7.1.4270.1.421766
    ECC 6.0 patch 13
    When I ran the 'FP_PDF_TEST_00' , it shows
    Version Information: 710.20061024154505.342190
    In my ABAP Webdynpro app., it has 3 inputfields.
    In the Form layout, I changed the form layout type to 'ZCI' for interactive form, and Insert the WebDynpro Script.
    And in the ABAP Webdynpro view layput designer, I enabled the pdf form element.
    All objects compiled without any problem.
    During the runtime, it got the following short dump:
    21 METHOD       CX_WD_GENERAL=================CP    CX_WD_GENERAL=================CM003     5
        CX_WD_GENERAL=>RAISE                                                                     
    20 METHOD       CL_WD_ADOBE_SERVICES==========CP    CL_WD_ADOBE_SERVICES==========CM008   193
        CL_WD_ADOBE_SERVICES=>CREATE_PDF                                                         
    19 METHOD       /1WDA/LADOBE==================CP    /1WDA/LADOBE==================CCIMP  1955
        CL_INTERACTIVE_FORM_ZCI=>IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT                         
    Our BASIS sent me the ADS trace:
    SAP Interactive Forms by Adobe
    Render Error Report
    'pdf' Log Entries
    restoreState is not a valid attribute of subform, Attribute not loaded. Line 5.
    Invalid node type: dataGroup
    The fault occurred on line 0.
    The SOM expression '$record.BAPIBNAME' for the dataRef specified on field 'BAPIBNAME', resolved to an incompatible node type of 'dataGroup'.
    Any comment or advise?

    Hi,
    As far as i know when you use Adobe forms in a WD4A application, language is your "web" connection language.
    You can have a look at standard class CL_WD_ADOBE_SERVICE, it's used when generating an adobe forms from WD4A. , more particulary look at method DETERMINE_DOCPARAMS.
    regards

  • Deleting row from table in ABAP webdynpro

    Hi all,
    Can anyone help me regarding deletion of a row from a table in ABAP webdynpro.
    I have written a code like this :
        DATA:
          NODE_STUDINFOSYS                    TYPE REF TO IF_WD_CONTEXT_NODE,
          ELEM_STUDINFOSYS                    TYPE REF TO IF_WD_CONTEXT_ELEMENT,
          STRU_STUDINFOSYS                    TYPE IF_COMPONENTCONTROLLER=>ELEMENT_STUDINFOSYS .
      navigate from <CONTEXT> to <STUDINFOSYS> via lead selection
        NODE_STUDINFOSYS = WD_CONTEXT->GET_CHILD_NODE( NAME = IF_COMPONENTCONTROLLER=>WDCTX_STUDINFOSYS ).
      get element via lead selection
        ELEM_STUDINFOSYS = NODE_STUDINFOSYS->GET_ELEMENT(  ).
    deleting data selected via lead selection
        NODE_STUDINFOSYS->REMOVE_ELEMENT( ELEMENT = ELEM_STUDINFOSYS ).
    *But I am getting an error:*
    Error when processing your request
    What has happened?
    The URL http://hsdnt24s11.hclt.corp.hcl.in:8000/sap/bc/webdynpro/sap/znet310_add_del_sech/ was not called due to an error.
    Note
    The following error text was processed in the system HE6 : The lead selection has not been set. VIEW_ADD_DEL_01
    The error occurred on the application server hsdnt24s11_HE6_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: RAISEELEMENT_NOT_FOUND of program CL_WDR_CONTEXT_NODE===========CP
    Method: PATH_TABLE_GET_ELEMENT2 of program CL_WDR_CONTEXT_NODE===========CP
    Method: GET_BOUND_ELEMENT of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system HE6 in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server hsdnt24s11_HE6_00 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server hsdnt24s11_HE6_00 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Error code: ICF-IE-http -c: 800 -u: SUMANK -l: E -s: HE6 -i: hsdnt24s11_HE6_00 -w: 0 -d: 20081220 -t: 155832 -v: RABAX_STATE -e: UNCAUGHT_EXCEPTION
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team
    Can anyone help me???

    Hi Suman,
    this issue seems to be not specific to the FPM. I would like to suggest you to address this problem in the ABAP forum.
    Best regards,
    Thomas

Maybe you are looking for