Where to validate ALV entries

We have an editable ALV grid.  Where is the right place to call our validations from?
Following validation, we also want to (programattically) update some cells in our grid.
Where is the right place to place the updates?
Thanks

Hi,
You will have many options to validate the ALV entries, based on your requirement you need decide.
Let us assume if you want to validate on each cell ->then once user enter some value on cell ask them to enter, you need to validate these cell values on_enter event on alv functionality.
If user want to validate once enter all the cells...then you need to provide some button or use the standard button CHECK on ALV application tool bar..under the Action button youneed to validate.
Let me know if you need more clarfications on this.
Regards,
Naresh.

Similar Messages

  • Validate ALV entry

    Hello.
    I'm using an ALV display with a custom field catalog to allow a user to edit data via the ALV display (certain fields).
    I create my container and fieldcatalog in the PAI of my screen and use CALL METHOD grid1->refresh_table_display to display it, I can edit the contents of the table displayed in the ALV just fine. Now I want to validate the edits as they happen and pop a message and disallow the edit by a rule/validation I define. Can someone show me how/where/what to insert a validation routine into this?
    Thanks!

    Handle the data_changed event in the grid.
    Whenever you make changes in the data in ALV Grid this event would be triggered. Here you can perform additional validations that you may need to perform.
    code METHODS handle_data_changed
    FOR EVENT data_changed OF cl_gui_alv_grid
    IMPORTING er_data_changed.[/code]
    Implementation:
    code METHOD handle_data_changed.
    PERFORM validations USING er_data_changed.
    ENDMETHOD.[/code]
    codeFORM validations USING er_data_changed TYPE REF TO cl_alv_changed_data_protocol.
    DATA: ls_good TYPE lvc_s_modi.
    DATA wa LIKE LINE OF lt_good_cells.
    CALL METHOD g_grid->register_edit_event
    EXPORTING
    i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    LOOP AT er_data_changed->mt_good_cells INTO ls_good.
    CASE ls_good-fieldname.
    WHEN 'FIELDNAME'. "Your fieldname
    CALL METHOD er_data_changed->get_cell_value "Get the changed value
    EXPORTING
    i_row_id = ls_good-row_id
    i_fieldname = ls_good-fieldname
    IMPORTING
    e_value = temp. "Your temp variable
    "Make your validations here.
    ENDCASE.
    [/code]

  • Reset ALV entry in display

    Hello.
    I'm using an ALV display with a custom field catalog to allow a user to edit data via the ALV display (certain fields).
    I create my container and fieldcatalog in the PAI of my screen and use CALL METHOD grid1->refresh_table_display to display it, I can edit the contents of the table displayed in the ALV just fine. I can validate each entry the user makes using the register_edit_event and use CALL METHOD er_data_changed->get_cell_value to get the user data as they enter and I can then validate the entry against my custom rules. My issue is that if the user violates the rules I defined in my code I would like to reset the entry. What method can I use to do this. My code for validation is below.
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD handle_data_changed.
        DATA: ls_good TYPE lvc_s_modi.
    DATA wa LIKE LINE OF lt_good_cells.
        CALL METHOD grid1->register_edit_event
                EXPORTING
                      i_event_id = cl_gui_alv_grid=>mc_evt_modified.
        LOOP AT er_data_changed->mt_good_cells INTO ls_good.
          v_tabix = sy-tabix.
          CASE ls_good-fieldname.
            WHEN 'QUANTITY'.
              CALL METHOD er_data_changed->get_cell_value
                  EXPORTING
                        i_row_id = ls_good-row_id
                        i_fieldname = 'MATNR'
                  IMPORTING
                        e_value = v_1303matnr.
              CALL METHOD er_data_changed->get_cell_value
                  EXPORTING
                        i_row_id = ls_good-row_id
                        i_fieldname = ls_good-fieldname
                  IMPORTING
                        e_value = v_qtytemp.
    *---> I validate here and if I find an issue I would like to reset or change the cell value.
          ENDCASE.
        ENDLOOP.
      ENDMETHOD.
    Thanks!!

    I have located the answer.
    When I do my validation routine if my error criteria has been reached I through a flag and then execute the method "modify_cell" to reset it to whatever value I choose.
                CALL METHOD er_data_changed->modify_cell
                    EXPORTING
                          i_row_id = ls_good-row_id
                          i_fieldname = <my fieldname>
                          i_value = <value to reset field to>.

  • How to validate table entries for that table

    i hav created one ztable se11.how to validate table entries for that table

    hi,
    create foreign key relation ships
    do the following way
    create a check table with key fields  the fields which you want to check
    create a foreign key relations with that table
    the procedure is as follows
    To create your check table:
    Begin at the Dictionary: Initial Screen.
    Type the table name in the Object Name field.
    Choose the Tables radio button.
    Press the Create button. The Dictionary: Table/Structure: Change Fields screen is displayed.
    Type a short text, choose delivery class A, and tickmark Tab. Maint. Allowed.
    Type the field and data element names at the bottom of the screen.
    Tickmark both fields to indicate that they both form the primary key
    Press the Save button on the Standard toolbar. The Create Object Catalog Entry screen appears.
    Press the Local Object button. You are returned to the Dictionary: Table/Structure: Change Fields screen
    Press the Technical Settings button on the Application toolbar. The ABAP/4 Dictionary: Maintain Technical Settings screen is displayed.
    In the Data Class field, enter APPL0 (APPL0 with a zero, not APPLO with an alphabetic O).
    Enter 0 (zero) in the Size Category field.
    Press the Save button.
    Press the Back button. You are returned to the Dictionary: Table/Structure: Change Fields screen.
    Press the Activate button on the Application toolbar. The message "was activated" appears in the status
    bar and the Status field contains the value Act..
    Choose the menu path Utilities->Create Entries to enter data into your newly created check table. Enter six rows with land1 values of US, CA, DE, IT, JP, and AU.
    Foreign Key Creation Procedure
    To create a foreign key:
    Begin at the Dictionary: Initial Screen.
    In the Object Name field, type the name of the table that is to contain the foreign key .
    Choose the Tables radio button.
    Press the Change button. The Dictionary: Table/Structure: Change Fields screen is displayed.
    Position your cursor on the field that is to become the foreign key
    Press the Foreign Keys button on the Application toolbar. The Create Foreign Key screen will be displayed
    Type a description of the foreign key in the Short Text field, for example, Country Code validation.
    Type the name of the check table (-t005) in the Check Table field, or click on the down-arrow and choose it from the list.
    The Change Foreign Key pop-up appears. It states Check table name was created or changed. Generate a proposal for field assignment? Press the Yes button.
    You are returned to the Create Foreign Key screen. The check table field names and the foreign key field names are displayed. (The check table field names are -t005-mandt and -t005-land1. The foreign key field names are -lfa1-mandt and -lfa1-land1).
    Press the Copy button. You are returned to the Dictionary: Table/Structure: Change Fields screen and the message "Foreign key was transferred" appears in the status bar. The Status fields contain the values Revised and Not saved.
    Press the Activate button on the Application toolbar. The message "was activated" appears in the status bar. The values in the Status fields are now Act. and Saved.
    reward if helpful
    prasanth

  • Validate Journal Entries using write back BADI (UJR_WRITE_BACK)

    Hi Experts
    I need to validate journal entries such that the total credit and debit postings for each COMPANY is equal. Also I need to do the same validation by PROFIT CENTER. After doing a bit of research I found out that the best way to do it is by coding it in the write back BADI.
    Has anyone faced such a situation before? Is there any better way to do it? Can anyone share the code?
    Thanks
    Edited by: Shisher Chakrabarty on Mar 1, 2012 10:22 AM

    Hi Shisher,
    Please check the below guide for Write Back BADI. The doc has also got the source code for the same.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0309226-814f-2d10-61a6-ef8da29e3727?QuickLink=index&overridelayout=true&48056389302995
    Regards,
    Raghu

  • Validate form entries: does java support regular expressions?

    i want to validate form entries, does java support regular express like javascript?

    Just recently in 1.4 regex was finally introduced :)
    Take a look at http://developer.java.sun.com/developer/technicalArticles/releases/1.4regex/

  • Where do old calendar entries go? They are all gone since i installed icloud...

    Where do old calendar entries go? They where always on my ipod. But ever since I installed icloud most of my old entries are gone, except for birthdays and other repeated entries. Is there a way to get these old entries back? Or can you find them somewhere on icloud?

    https://addons.mozilla.org/en-US/firefox/

  • How to validate an entry in a table?

    I have a (single column) table view linked to an NSArrayController that has a custom class definition as its 'Class Name'. I also have KVC compliant methods to populate the array controller within my 'model'. I can see the 'countOf...' and 'objectIn...AtIndex' methods being called and the table contains the correct data.
    I have the 'Validates Immediately' option set on both the table column binding and the controller content array binding.
    My problems come when I alter the contents of an entry in the table. Firstly, the only 'validate...:error:' method that is called is on the custom class for the field that is updated.
    Secondly, the 'insertObject:in...:AtIndex' and similar (especially the 'replaceObjectIn...AtIndex:withObject:') methods are not called.
    I have checked and rechecked that the KVC names include the correctly capitalised name of the class.
    How can I get the validation (and other) routines to be called?
    Thanks
    Susan

    Abandoned!!

  • Where are my calendar entries from 2011?

    I can no longer access any calendar entries from 2011.  They are GONE.  As a test, I made another entry in the December 2011 calendar, and within five seconds, it disappeared!  Where are my entires for all of last year?  How do I get them back?  I do not have a calendar program on my PC, and I never set any preferences when I installed Icloud, and I cannot access calendars in Icloud without installing Outlook.  I dont want Outlook.  I want my data back from the cloud!  HELP!

    You need to find out how the Google calendar application imports calendars from Macs. As for the Calendar itself you can export the calendar to a file. The Google calendar should be able to Import that file.

  • Where is this ldap entry stored?

    Direcory Server: 5.2
    I am looking for the file where cn=schema entry value isstored. I would like to change one of the attribute values. Console edit gives protocol error.
    Help is apprecitated,
    Thanks

    1. modifyTimeStamp is an operational attribute. Many operational attributes can only be changed by the server itself. I suspect modifyTimeStamp is one of them, and that's why you get protocol error.
    2. If in your cn=schema entry there are multiple values of modifyTimeStamp, then the entry must have been damaged as the attribute is defined as single-valued.
    3. Theoetically (I'm guessing here) the cn=schema entry should be in the database file: <slapd-instance>/db/NetscapeRoot/id2entry.db3. But I have no idea how you can fix it.

  • Possible to validate data entries during Digital Signature?

    I have a form that was built from scratch using Adobe LiveCycle  Designer ES 8.2. I also have Adobe Acrobat Pro 9.3.2. (WinXP)
    I  see numerous articles online related to validating user input prior to  data submission for an online form via a Submit button, however, I  am trying to figure out how to implement the same sort of data  validation during the signing of a particular digital signature field in an offline pdf form. Simply, I want to perform data validation during a digital  signature instead of when user presses Submit button.
    Here's my  use-case:
    1. Form Originator fills out a large number of data fields  and signs form via a CAC cert.
    2. Another person will review,  possibly edit/add data, and sign another signature block with CAC.
    3.  Then there is one more final CAC signature on the form before it is  completed and then emailed to the right folks for processing.
    4. I  would like to be able to enforce the population of several Mandatory  data fields (at least one Radio button and one text input, possibly  others) before the 3rd signature can be applied to the document.
    Again, I  need to emphasize this is all happening in an offline form, no data  submission or database back-end. Also, everything with the digital  signatures (and locking up fields afterword) works totally fine, just interested  in adding Data Validation capability during Digital Signature.
    I am in no way a javascript expert, but I can  probably learn from a good example. Any help or guidance is very much appreciated. Thanks...

    If you are using SignatureField in the form then you will get two events preSign and postSign which you can use to validate the field input just like you do with a Submit button.
    Thanks
    Srini

  • BPM Studio 10.3.1 - where are my logMessage entries?

    Hi, I am trying to visualize debug messages in BPM Studio 10.3.1 (Standalone), generated with
    logMessage "myMessage" using severity = DEBUG
    to help debug PBL code. But where can I find the .log file where the messages are supposed to appear? Thanks!

    Hi, Dan, thank you very much for your very detailed answer! When I looked in the system directory your answer refers to, I found that there were two log files, project.log.0 and project.log.1, which explains why I had not found them when looking for "*.log". They just had to be somewhere! And the Viewer Log view is also very helpful. Regards, Silvia.

  • Where to validate user input

    hi all,
    I have following problem:
    When user submits form, all the data in request are Strings. Now suppose I need to put this data in database using TransferObject and DAO. My question is how to do it properly? I think about two ways of doing that:
    1)
    Create TransferObject with all properties being Strings or arrays of Strings, and then let DAO classes take care about validation of data format and type conversion. In this case all I need to do in my servlet is to create TransferObject, fill it with form data without any validation and then pass this object to DAO. Then DAO makes all conversions, and either adds new record or raises format exception.
    2)
    Create TransferObject with different types of properties according to database fields types. Then DAO get's valid data and all it needs to do is to put it in database. But then I have to take care about validation in my servlet to pass valid data to DAO.
    This way has at least one disadvantage for me: I think I can't use any utilities copying all properties from form to TransferObject.
    So tell me which way should be used to have right aplication design.
    Thanks for all replies.

    IMO, the database should concern itself with data integrity and referential integrity. It will validate the data type, precision and scale you are attempting to insert or update. It will also enforce referential constraints (e.g., primary keys, foreign keys, unique constraints, etc.) that may exist on the table(s). Finally, the database is responsible for ensuring a transaction is atomic, either the whole logical unit of work will be committed or the changes rolled-back successfully.
    More complex validations (e.g., account balance cannot be negative unless savings account balance is greater than $1,000) should generally be done in the middle-tier, though an argument can be made that even these validations can also be put in the database.
    Generally, for complicated transactions, the middle-tier will be responsible for transaction management. This is not a minor responsibility in a complicated set of data updates. The middle-tier will also enforce workflow and/or data sufficiency (e.g., even though a column may be nullable in the database, a business rule may require the value be specified).
    Finally, some validation can occur on the client. Though, you should always look at these validations in terms of application response time, not actual data validation. You may want to place some validations on the client so that a server trip is not required for validation. However, all validations must occur in the middle-ware and/or database. You cannot trust client code. Someone might modify the page and resubmit it.
    - Saish

  • Where to validate user input from FPM_FORM_UIBB?

    I am supporting an ESS OVP app using WDA and FPM. 
    This question concerns validating/changing user input from an edit page entered through FPM_FORM_UIBB
    In a form, on an edit page, we wanted to mask the initially loaded value of a field with asterisks.
    I used the feeder class get_data() method to accomplish this.
    The user may then overtype the asterisks with content data.  At times, the user leaves some of the asterisks there as well.
    I want to check the contents of the inpu field, and, if needed, compress out the asterisks.
    if not inputfield co '* ' .
    translate inputfield using '* ' .
    condense inputfield NO-GAPS .
    endif .
    Where can I put this code? Or, where, generally, do you code validations of form data?
    Thanks…  
    …Mike

    Hi Mark,
    You should be able to catch the event in PROCESS_EVENT and GET_DATA. I would put the break-point in both of these methods and check for the field values and based on that decide course of action. So steps would be.
    1) Put in the break-points in the obove methods.
    2) Check the event and the field values you are intrested in.
    3) Code accordingly.
    Hope it helps.
    Laeeq Siddique

  • Validate element entry at Element Entry Screen and BEE

    Hi,
    I would like to incorporate some validation at both the Element Entry screen and Batch Element Entry.
    The validation rule is user is only allow to enter one element between Element A and Element B, they are mutually exclusive.
    1) When user enter Element A, Element B should not exist in Element Entry screen.
    2) When user enter Element B, Element A shoudl not exist in Element Entry screen.
    The entry point for the element can be done via
    1) loading via BEE screen
    2) entry via Element Entry screen
    Thus, the validation rules should apply at both the entry point.
    I have tried to used the user hook via the pay_element_entry_api, however, it is not working (meaning no validation take place).
    And I also notice that the form PAYWSMEE.fmb is not using the pay_element_entry_api but is using hr_entry_api.
    Appreciate advise on this as this validation is really important to the clietn to ensure correct payment.
    Thanks,
    ShiauChin

    Thanx Sharath for your quick response.
    But I have run QuickPay for that employee.
    After running QuickPay the input values names are coming into element entry value screen.
    But it is not showing the value corresponding to the element input value names.
    Thanks,
    Pankaj Kedia

Maybe you are looking for

  • Error code while setting up

    Moved for greater exposure

  • Duplicate iPhone Messages

    My husband and I each have a phone (different numbers) and we are getting each others messages. Any thoughts on how to avoid?

  • Complete my album - Seriously??? Can't get track in Album & EP

    For reasons I'd rather not get into I am looking at trying to have a copy of a song from an EP I bought also show up in the Album that I bought using "Complete my album". I am aware that I can change the information under "Get Info" to match either t

  • Problem in Creatig the URL iview for a Team Room

    Hi SDN, <b> I have created a team room in collaboration and created the URL iview of that team room. But in the iview i am getting the MASTHEAD of the portal also. But I do not want the MASTHEAD to appear. HOW DO I GO ABOUT THIS?????? </b> regards Br

  • Eyedropper and Histogram shortcuts?

    Two shortcuts that I hoped would be in Apv2 were: 1. for the White Balance Eyedropper 2. for showing/hiding the Histogram Am I missing these somewhere or do I need to go back to providing Aperture Feedback?