Validating the value in the table element

hello all,
            I have a column in the table element as editable and i want to validate the value entered in the editable column with value in another column.can this achieved without selecting the row in the table...like on change of value etc...
i am new to web dynpros..can any one help me on this.
with regards,
sandeep akella.
Edited by: sandeep akella on Aug 10, 2009 2:42 PM

I now create a toolbar for my table and within that toolbar am creating a Toolbarbutton. Now upon pressing this button I want to validate the entries of SEATS_NEEDED against the entry in SEATS_AVAILABLE. In case of any inconsistency I not only throw an error message but also highlight the particular columns cell in which the error has occured. Below is the coding inside my buttons action handler:
METHOD onactionvalidate_booking .
  DATA: lr_node TYPE REF TO if_wd_context_node,
        lt_sflight TYPE wd_this->elements_sflight,
        wa_sflight TYPE wd_this->element_sflight,
        lr_element TYPE REF TO if_wd_context_element.
  lr_node = wd_context->get_child_node( name = wd_this->wdctx_sflight ).
" Fetch the entire tables data into an internal table for validation purpose
  lr_node->get_static_attributes_table(  EXPORTING from   = 1
                                                    to     = 2147483647
                                         IMPORTING table  = lt_sflight ).
  LOOP AT lt_sflight INTO wa_sflight WHERE seats_available <> 0.
" Check if user is trying to book more seats than what are available & throw an error message if needed
    IF wa_sflight-seats_needed > wa_sflight-seats_available.
      lr_element = lr_node->get_element( index = sy-tabix ).
" get message manager
      DATA lo_api_controller     TYPE REF TO if_wd_controller.
      DATA lo_message_manager    TYPE REF TO if_wd_message_manager.
      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_attribute_error_message
        EXPORTING
          message_text   = 'Number of desired seats greater than available seats!'
          element        = lr_element
          attribute_name = 'SEATS_NEEDED'.
    ENDIF.
  ENDLOOP.
ENDMETHOD.

Similar Messages

  • Where i can find the value categry code and element in cjvc

    hi gurus
    where i can find the value categry code and element in cjvc .in which table these fields are stored.could anyone tell me relation.
    Thanks & Regards
    Sandya

    not answer

  • Eliminate the values from internal table

    I have an internal table with fields..
    begin of it occurs 0,
    ebeln
    matkl
    werks
    end of it.
    its filled with values..
    ebeln |  matkl | werks |
    12111 |   A123 | LK
    12111 |   A123 | LK
    12111 |   A123 | LK
    12111 |   A123 | LK
    12111 |   A123 | LK
    12111 |   A123 | LN
    12121 |   A124 | LK
    12121 |   A124 | LK
    12121 |   A124 | LK
    12122 |   A125 | LK
    12122 |   A125 | LK
    12122 |   A125 | LK
    12123 |   A126 | LN
    12123 |   A126 | LN
    Now I want to eliminate the values from the internal table where all ebeln and werks are different..for example..all 12111's should be eliminated from the internal table as the it has different werks assighned to one of the ebeln's..and I need only ebeln's with 12121 and 12123.
    Any suggention would be helpful..
    Thanks,
    M/

    Hi,
    DATA : v_ebeln LIKE  table name-ebeln,
                v_werks LIKE table name--werks.
    SORT itab BY ebeln werks .
    LOOP AT ITAB.
      ON CHANGE OF  itab-ebeln.
          Move : itab-ebeln TO v_ebeln,
                    itab-werks TO v_werks.
       ENDON.  
       IF ITAB-ebeln  NE  v_ebeln OR
          ITAB-werks NE v_werks.
       DELETE ITAB WHERE ebeln EQ ITAB-ebeln .
        clear  : v_ebeln , v_werks.
    ENDIF.
    ENDLOOP.

  • Fetch the values from internal table inside an internal table (urgent!!)

    data : BEGIN OF PITB2_ZLINFO occurs 0,
             BEGDA LIKE SY-DATUM,
             ENDDA LIKE SY-DATUM,
             PABRJ(4) TYPE N,                       "Payroll Year
             PABRP(2) TYPE N,                       "Pay. Period
             ZL LIKE PC2BF OCCURS 0,
           END OF PITB2_ZLINFO.
    I have a internal table like this,
    How to Fetch the values from internal table inside an internal table.
    Kindly Help me on this..
    Regards,
    Ram.

    Hi,
    Try this....
    Loop at PITB2_ZLINF0.
    Loop at PITB2_ZLINF0-ZL.
    endloop.
    Endloop.
    Thanks...
    Preetham S

  • How to get the values of the value table ?

    Hello all,
    I want to get the values of the value table, given a domain name.
    Ex: To get the MATNR values of table MARA, giving the MATNR as input on the selection screen.
    Is it possible? Is there any FM?
    Thanks
    SR

    Hi
    forget my previous answer.
    Yuo can use a code like this:
    PARAMETERS: p_table TYPE  ddobjname,
                p_dom   LIKE  dfies-domname.
    DATA dfies_tab LIKE STANDARD TABLE OF dfies WITH HEADER LINE.
    DATA: ftab TYPE TABLE OF string.
    FIELD-SYMBOLS: <fs_table> TYPE table.
    CALL FUNCTION 'DDIF_FIELDINFO_GET'
      EXPORTING
        tabname        = p_table
      TABLES
        dfies_tab      = dfies_tab
      EXCEPTIONS
        not_found      = 1
        internal_error = 2
        OTHERS         = 3.
    CHECK sy-subrc <> 0.
    LOOP AT dfies_tab WHERE domname = p_dom.
      APPEND dfies_tab-fieldname  TO ftab.
    ENDLOOP.
    SELECT (ftab)
           FROM (p_table)
           INTO TABLE <fs_table>.
    In this case you have to create dynamically the table <fs_table> or you can also use a table string:
    DATA: T_DATA TYPE STANDARD TABLE OF STRING.
    SELECT (ftab)
           FROM (p_table)
           INTO TABLE T_DATA.
    Max

  • How to retrieve the values from a table if they differ in Unit of Measure

    How to retrieve the values from a table if they differ in Unit of Measure?

    If no data is read
    - Insure that you use internal code in SELECT statement, check via SE16 desactivating conversion exit on table T006A. ([ref|http://help.sap.com/saphelp_nw70/helpdata/en/2a/fa0122493111d182b70000e829fbfe/frameset.htm])
    If no quanity in result internal table
    - There is no adqntp field in the internal table, so no quantity is copied in itab ([ref|http://help.sap.com /abapdocu_70/en/ABAPINTO_CLAUSE.htm#&ABAP_ALTERNATIVE_1@1@]).
    - - Remove the CORRESPONDING, so quantity will fill the first field adqntp1.  ([ref|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_WA.htm])
    - - Then loop at the internal table and move the quantity when necessary to the 2 other fields.
    * Fill the internal table
    SELECT msehi adqntp
      INTO TABLE internal table
      FROM lipso2
      WHERE vbeln = wrk_doc1
        AND msehi IN ('KL','K15','MT').
    * If required move the read quantity in the appropriate column.
    LOOP AT internal_table ASSIGNING <fs>.
      CASE <fs>-msehi.
        WHEN 'K15'.
          <fs>-adqnt2 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
        WHEN 'MT'.
          <fs>-adqnt3 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
      ENDCASE.
    ENDLOOP.
    - You could also create another table with only fields msehi and adqntp and then collect ([ref|http://help.sap.com/abapdocu_70/en/ABAPCOLLECT.htm]) the data to another table.
    Regards,
    Raymond

  • How to display the values from the table in the screen

    Hi,
    I have created a screen where i will enter the values for the field treshold amount and desc and if i press update button  .it will update the new values by overriting the existing values .
    Now i have got requirement i need to create a button show which will display the existing value from the table. always there will be only one entry...in this table
    Please can one give me idea...to do this
    or sample code...thanks in advance
    regards
    paveeeeee

    Define a function code 'SHOW' for your button. In your PAI module, when you check for various sy-ucomms, check for 'SHOW' also.
    Your code will be like this:
    Case sy-ucomm.
      when 'SHOW'.
         perform show_details.
    endcase.
    In the perform, you can fetch the data from the table and put it in global variables. In the PBO, move the data from the global variables to the screen fields so that they get displayed on the screen.
    Hope this helps. Reward points for useful answers.
    Regards
    Nithya

  • How to truncate the values from the table

    Hi All,
    I am working on an issue..where we are first deleting all the records from the table and then based on few conditions we are putting the records back in that table...when we tried to run this program along with few others those who are doing almost the same stuff we are having issues...we tried to schedule few jobs related to these programs only...but after a ceratin amount of time couple of jobs got canceled...I was talking to my basis guy and he said the problem is ratehr then truncating the records from the table we are deleting the records and it's taking lots and lots of space to execute...so we need to truncate the records from the table insted of deleting it...we are using the following the statement right now:
        DELETE FROM ZTUS_PG.
        COMMIT WORK.
    So can you please tell me how can we truncate the values from this table instead of just deleting them and what would be effect of this.
    Thanks,
    Rajeev Gupta

    I don't think basis is saying you should delete all the records from the table. They are saying remove the table and it's contents (a much faster thing to do). I'm not sure this the right thing to do, but you can have a look at:
    http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.apdv.sample.doc/doc/admin_scripts/s-truncate-db2.htm
    Something like:
    EXEC SQL.
      TRUNCATE TABLE ZTUS_PG REUSE STORAGE
    ENDEXEC.
    COMMIT WORK.                      "Empty table is committed here
    Rob
    Edited by: Rob Burbank on Dec 1, 2008 4:06 PM

  • When i am retreiving the values from the access table i am getting null val

    hi all,
    I comeacross the following problem,I connected my applet to the Access database with jdbc:odbc driver.
    I am trying to retreive the values from the table.I am getting the result correctly when the same code with using applet it was giving the correct result.
    when I am using an applet program it was giving the null value istead of the actual records.
    can anybody tell me the reason why
    thanks in advance
    and also how to connect the databse in the webserver when i installed my applet in the client side
    please give me some suggestions to do that
    thankyou
    lakshman

    Hi Krishna,
    Can you please copy the code generated by ODI for creating your C$ table ?
    i mean :- create table C$_0Entity ( from the operator log
    Regards,
    Rathish A M

  • How to change the value of the Selection field in the ROOSFIELD table for o

    Hi there
    I have a standard data source 0CRM_SALES_ACT_1 for which one of the standard field has the status A(Hidden).
    In the field selection filed of the table ROOSFIELD and I want to change it to P(Visible)  for  one of the field in the Data source.
    How it can be done. Any suggestion will be greatly appreciated.
    kind regards
    Sarah

    Hi,
    Keerthi
    Good Question..Even am also new to this issue.
    But let me try to find the solution.
    Before lookinto this issue. i need clarification on this.
    1. You want to see the value in the text box as a color one or you want to change the disable from true to false?
    If that is the case, then following one is my suggestion.
    In proceesRequest method
    1. get the handle for the messageTextInput Bean and based on that set the disable property to false
    for example:
    OAMessageTextInputBean t1 = (OAMessageTextInputBean )webBean.findChildRecurrsive("ItemId");
    t1.setDiabled(false);
    In ProcessFormRequest method
    1. get the handle for the messageTextInput Bean and based on that set the style class or css property to "OraFieldText"
    for example:
    OAMessageTextInputBean t1 = (OAMessageTextInputBean )webBean.findChildRecurrsive("ItemId");
    t1.setCss(OraFieldText);
    (Or)
    If it will not work then directly set the cssClass Property to OraFieldText.
    I hope it will work....am not sure about this.
    Regards
    Santhosh kumar.k

  • How to pick the value of the line item in table control

    My screen.
    I have designed table control by referring internal table without using wizard.
    I have placed button inside of that table control.
    my requirement is by clicking the button it ll show the value of the line inside of the table control.
    I have used "get cursor...".
    But the problem is "it ll show only the cursor value of the front screen, if suppose i scroll the value of table control at the time also, it ll show the cursor value of the screen, it ll not show the exact value of the cursor inside of the table control.

    Wrong Forum Anand......!

  • How to set the value of the column as the value of other table coulmn.

    dear friends
    i have a table SO_D having coulm (so_no,item_cd,qty,rate,unit)
    and anather table so_tax(so_no,tax_code,tax_percent,tax_amt,item_cd,flag)
    now i have ALL VALUES in the first table i.e so_d
    but in table so_tax i have all values except item_cd.
    the values in the so_tax table comes from so_d by the formula ((qty*rate)*percent(which in so_tax table))/100) corresponding to each item_cd
    here so_no and item_cd are primary key in so_d and foreign key in the so_tax.
    and for each so_no the item_Cd is unique and my repeat for new so_no in the table so_d.
    now i have the problem that in the table so_tax the value in the coulmn item_cd is blank .
    but the tax amount is calculated for each item_cd .
    now i want to update the table with the item_Cd values ad they are in the so_d table according to the tax amount calculated by using above formula.
    please suggest the solution..
    any query please ask
    i can provide values for the each table..
    thanks in advance

    Data sample for the table so_d is
    SO_NO ITEM_CD QTY RATE UNIT
    AT0064 12000135 15 22163 NOS
    AT0064 12000136 15 20337.82 NOS
    AT0064 12000137 15 21902.27 NOS
    AT0064 12000138 15 20337.82 NOS
    AT0064 12000139 15 20337.82 NOS
    AT0149 CO000109 2 20755 NOS
    AT0149 CO000110 1 2502 NOS
    AT0149 CO000111 1 2502 NOS
    AT0149 CO000112 1 2502 NOS
    AT0149 CO000113 1 9328 NOS
    AT0149 CO000114 1 15476 NOS
    AT0149 CO000115 1 82150 NOS
    AT0149 CO000116 1 2915 NOS
    AT0149 CO000117 1 11766 NOS
    AT0149 CO000118 1 2968 NOS
    AT0149 CO000119 1 2968 NOS
    AT0149 CO000120 1 3286 NOS
    AT0149 CO000121 1 7950 NOS
    AT0149 CO000122 1 1908 NOS
    SAMPLE DATA FOR SO_TAX
    SO_NO TAX_CODE PERCENT AMT ITEM_cD FLAG
    AT0064 X02 4 13297 Y
    AT0064 X02 4 12203 Y
    AT0064 X02 4 13141 Y
    AT0064 X02 4 12203 Y
    AT0064 X02 4 12203 Y
    AT0149 V16 14.5 6018 Y
    AT0149 V16 14.5 363 Y
    AT0149 V16 14.5 363 Y
    AT0149 V16 14.5 363 Y
    AT0149 V16 14.5 1353 Y
    AT0149 V16 14.5 2244 Y
    AT0149 V16 14.5 11912 Y
    AT0149 V16 14.5 423 Y
    AT0149 V16 14.5 1706 Y
    AT0149 V16 14.5 430 Y
    AT0149 V16 14.5 430 Y
    AT0149 V16 14.5 476 Y
    AT0149 V16 14.5 1153 Y
    AT0149 V16 14.5 277 Y
    HERE ITE_CD IS BLANK

  • Api to update the values in per_periods_of_placement table

    Hi,
    can anyone let me know whether any hrms api is available to update the values in the table PER_PERIODS_OF_PLACEMENT.
    I want to update the values under the column TERMINATION_REASON in per_periods_of_placement for few set of contingent workers(for those a wrong reason was entered need to replace with correct value now).
    Please revert asap.
    Thanks,
    Jithendra

    Here is my stand alone PL/SQL block :
    I am supplying the start_date fro mthe per_periods_of_ placement table itself...
    DECLARE
    CURSOR get_cwk_details IS
    SELECT person_id cwk_person_id,
    object_version_number ovn,
    date_start service_start_date
    FROM per_periods_of_placement pdp, hr_lookups l
    WHERE l.lookup_type(+) = 'HR_CWK_TERMINATION_REASONS'
    AND l.lookup_code(+) = pdp.termination_reason
    AND HR_GENERAL.DECODE_LOOKUP ('HR_CWK_TERMINATION_REASONS',
    PDP.TERMINATION_REASON) = 'Deceased' ;
    l_person_id NUMBER(20);
    l_ovn NUMBER(10);
    l_date_start DATE;
    BEGIN
    FOR get_cwk_details_rec in get_cwk_details
    LOOP
    l_person_id := 153564;--get_cwk_details_rec.cwk_person_id;
    l_ovn := get_cwk_details_rec.ovn;
    l_date_start := get_cwk_details_rec.service_start_date;
    dbms_output.put_line('l_person_id = ' || l_person_id);
    dbms_output.put_line('l_ovn = ' || l_ovn);
    dbms_output.put_line(' l_date_start = ' || l_date_start);
    apps. hr_periods_of_placement_api.update_pdp_details(
    P_VALIDATE => FALSE,
    P_EFFECTIVE_DATE => l_date_start,
    P_OBJECT_VERSION_NUMBER => l_ovn,
    P_PERSON_ID => l_person_id,
    P_DATE_START => l_date_start,
    P_TERMINATION_REASON => 'DW');
    COMMIT;
    END LOOP;
    END;

  • How enter the values in to table when create entries option is not working

    hi everyone,
         can u please tell me How enter the values in to table when create entries option is not working.
    it's urgent.
    thanking u all

    Hi Shree,
    how many entries u want to insert ,,
    is it a ztable or custom table ..
    just tell me ur clear requirement ..
    clarify the same ..
    if no options avaliable then if its less entries or some value u can do it through debugging ..
    if its bulk entries then u can write a program ..
    just let me know ..
    regards,
    VIjay

  • Controlling form appearance according to the values in the table.

    Hi,
    I want to control my form appearance foreground color,background color, font name, font size etc. at form startup. These values are kept in a table. Please tell me the best way.
    Thanks,
    Shafiq
    null

    Depend on the values; if the values are a given, i.e if the values only takes a certain combinations then create predefined visual attributes and at runtime apply thro the pre-form trigger.
    if the values are vary regularly then pick the values at runtime pass it thro parameters/global variables at the pre-form
    /when-new-form instance.
    null

  • Hardcode the values in the table

    Hiii
    Iam developing a web dynpro application.With out writing the code i can able to deploy and run the application.In that i want to hardcode values in the table for demo purpose.how i can get those values.
    Is there any property in web dynpro to do that,,,,,,,, or else,,,,,,,,, we have to write the code in the application.
    If thats the case,,,,Please provide the code to get the values in the table.
    Regards
    Sushma

    Hi
    For different data,,,,,in what way i have to do.
    Like this your saying
    IPrivateEtrecEmpView.IEmployeeElement element4 = wdContext.nodeEmployee().createEmployeeElement();
                   element4.setDesignation("Software Engineer");
                   element4.setDepartment("Basis");
                   element4.setEmailID("");
                                  element4.setEmpCode("0011579");
                                  element4.setEmpName("");
                                  element4.setMobileNo("");
                                  element4.setSlno("4");
                                  element4.setLocation("Bangalore");
                        wdContext.nodeEmployee().addElement(element4);
         IPrivateEtrecEmpView.IEmployeeElement element3 = wdContext.nodeEmployee().createEmployeeElement();
                             element3.setDesignation("Software Engineer");
                             lement3.setDepartment("Web dynpro");
                             element3.setEmailID("");
                             element3.setEmpCode("0011579");
                             element3.setEmpName("");
                             element3.setMobileNo("");
                                  element3.setSlno("4");
                                  element3.setLocation("Bangalore");
                   wdContext.nodeEmployee().addElement(element3);

Maybe you are looking for

  • Problem with Chart Pivoted Results

    Hi, I have upgraded catalog from 10.1.3.4.2 to 11.1.1.6.0 everything went fine. All reports are working but the report having Chart Pivoted Results doent show Chart. I tried to edit that request but no luck. it only shows Pivot table but no graph. An

  • IPhoto shows "No Photos" when importing...

    iPhoto shows "No Photos" even when I have photos to import. If I restart the computer and then plug in my camera into the USB, iPhoto will pop up and show all the photos in my camera and import, but it only seems to do so immediately after restart. I

  • Lightroom confused with NEF + JPG pairs

    I moved a directory of NEF+JPG files from directory "A" to "B". And then deleted "A". When I did this, directory "A" disappeared from the library, as expected. But something went wrong. Directory "A" on the hard drive (when viewed with Windows Explor

  • CIF Error

    Hi All We are facing an error after the CIF of material form ECC to SNC the error is "Field /SAPAPO/MARM-GEWEI unit missing for product 000000000063503884 PCN"  Kindly help me to resolve this error. Thanks & Regards Siddharth Vaid

  • Why is the LCMCLI ignoring my use of the "-includeSecurity=true' parameter?

    I'm using the LCM Command Line Interface (LCMCLI) to promote content (e.g., AOLAP reports, Webi reports, etc.) between CMS environments. The objects' User Security includes the BI Platform's built-in groups as well as mapped Active Directory groups.