To validate the fields within JSP

Hi,
I want to make sure that there's a way to validate the fields against the DB using Javascript.
I remember that using JSP we can run SQL scripts; am I correct or not?
Thks & Rgds,
Huamin

not sure what u r asking for....
u can validate the data in the database using javascript very easily....
u can always write SQL queries in JSP but it is not advisable....
Pls elaborate ur requirement...
Thanks

Similar Messages

  • 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

  • I have to validate the field enter in that table  values is enter in the ra

    i have one table field with data
    1. <=0.5
    2. <=1
    3.textsfsfs
    4. >=2 like that
    i have to validate the field enter in that table  values is enter in the range of the above field.
    can you help me how to validate
    ex:
    if wa-upper =  wa2-sumplus  here i have to check the upper and lowe values
    if the user enter in between and eq based on the i have to give erro message.
    Please help me the same.
    Thanks
    Ramkumar

    Hi Lekha,
    Thank you this problem was solve.
    we did the this validation in back end insted of front end.
    i passed the table data in to ZFM there we are validating and giving the error message.
    thank you for helping me all the time.
    ONE problem:
    LV_TEXT is the context attribut containe type string.
    i amgetting the values in to LV_TEXT attribut.
    LV_TEXT = nkafjkafkafhkafksfkak<b>#</b>bshfsafkasfkasfkas.
    i wanto to split this and will get the before <b>#</b> values in to other other node workarea LS_dis_new.
    this LS_DIS_NEW i have to modify with table LT_DIS_NEW.
    i used the code : Split wa at '#' into table LT_DIS_NEW.
    this is not working.
    please help me the same.
    Thanks
    Ramkumar

  • 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 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 can i validate  the field directline under personal information of ESS?

    Hi all,
    How can i validate the field directline under personal information--> communication data  of ESS?The thing is we don't have NWDI setup in our organization.Is there any possibility of doing it under SPRO trn.
    Thanks and Regards,
    sam

    Hi,
    This is probably a wrong forum that you have posted your question to.
    Regards,
    Siddhesh

  • Reports--  to  validate the  field values in a selection screen

    How to validate a  Particular field ..... in the selection screen ...!
    that is how to  determine the values of the  field in the  selction screen .....

    Hi,
    Check the code below:
    <b>at selection-screen</b>.
      SELECT SINGLE * FROM MSEG WHERE
           MBLNR = IMBLNR.
      IF SY-SUBRC <> 0.
       MESSAGE E016(PG) WITH 'Please select valid Material Document Number'.
      ENDIF.
    I used it in my program.
    Hope this helps.
    Reward if helpful.
    Regards,
    Sipra

  • How to clear the fields within copy routines in the copy contorl

    HI Gurus,
    I need to clear  the fields VBP-VBELV and VBAP-PSSNV within the copy routines 303 in the copy control between quote item and sales order item. I am not sure how to do that... Can some body please help.
    This is required because we had sales order and quote using the same requirement type which controls the special stock indicator. This leads to the stock getting update in quotation instead of the sales order, because the quotation is initiating document (collecting all cost etc).Now i know requirement should only be passed to production from sales order and not from quotation so i changed the config but there are some existing documents using same requirement type on both quotation and sales order and to correct those i need to clear fields VBP-VBELV and VBAP-PSSNV within the copy routines 303.
    Please help!
    Regards,
    Sam

    Hi ,
    just use this code in ur save button action handler , this will clear the field after entered in to the database and will ready for the next set of data.
    String password=wdContext.currentContextElement().getpwd();
    try{
         InitialContext ctx=new InitialContext();
         DataSource ds=(DataSource)ctx.lookup("jdbc/SAPJ2EDB");
         Connection con=ds.getConnection();
         con.setAutoCommit(false);
         Statement stmt=con.createStatement();
         int retIns = stmt.executeUpdate("insert into TMP_NEWUSERDETAIL(PASSWORD) values("password")");
         con.commit();
         con.setAutoCommit(true);
         wdContext.currentContextElement().setpwd(null);
    or use a seperate button to clear the field.
    wdContext.currentContextElement().set<Attributename>(null);
    Regards
    Vijayakhanna Raman

  • How to find the enhancement spot  in PA30 to validate the field

    Hi ,
    Is there any standard procedure to find the enhancemant spot , i want to validate the infotype field in PA30
    Thanks,
    Kalyani

    Hi,
    Execute PA30. In debugging place breakpoint at Enhancement Spot statement or CALL BADI or GET BADI statements and proceed with pressing F8. The debugger will stop when it encounters either of the statement.
    Hope this helps.
    Thanks & Regards,
    Anand Patil

  • How can I validate the fields filed by the user?

    Hi,
    I want to validate the filed filed by the user..
    If he doesn't fill some fields than an alert box must be returned..
    Thanks

    HI Sachin,
    Why are u ruling out SUIM as it produces teh Change docuemnts for a role as u have requested ?.
    Infact teh Tcode RSSCD100_PFCG is exactly the same which are looking for and it provides the Date, User Id and teh kind of changes done to any Role.
    You have to select the radio button ALL CHANGE DOCUMENTS and run the Tcode.
    Hope this helps,.
    Br,
    Sri
    Award points for helpful answers

  • How to Validate the Fileds in LSMW - In step 6.   Maintain Fixed Values, T

    Hi
    How to validate the fileds in the LSMW in the step
      6 Maintain Fixed Values, Translations, User-Defined Routnes.
    In this step how to i validate the fileds.
    Please help.
    Regards
    Gangi

    Hi,
    You can validate the fields in the LSMW in field mapping section .
    For example you are loading the BOM using LSMW and you want to validate those material numbers which do not exist in the material master .
    For this purpose write a select statement to check the materials existence like below :
    select single matnr into v_matnr
    from mara
    where matnr = source-matnr .
    if sy-subrc <> 0.
    skip_record. " this statement will skip the record .
    endif.
    To get such statements to handle the records withing LSMW during data transfer .Go to the field mapping step , there in abap conversion routine step
    go to ' INSERT' -> 'GLOBAL FUNCTIONS' -> ( then a pop will open offering various function options for your requirement. ) In fact SKIP_RECORD is also available there .
    reward if it helps...
    Regards,
    Omkar.

  • Where can we validate the MANDT field in a database table.

    Hi All,
    In any database table we will be having MANDT field.  In the program while populating the table we never populate the field MANDT. But still in the database table, it automatically takes the current clinet number.
    Could any body tell me where can we validate this.  I have a requirement in my program, in which I need to populate one of the field with one constant value.
    Thanks,
    srinivas.

    hi table T000 is for the  Clients master table ....
    the client is the special field for all the master tables...
    for validating the field you need to do like this..
    data: v_mandt type sy-mandt .
    tables:t000.
    select-options:s_mandt for t000-mandt.
    select mandt
             from t000
             into v_mandt
              where mandt in s_mandt.

  • Looking at Data in the IP_IN_QUEUE -- Payload Field within IP_MESSAGE_TYPE

    Does anyone have any sql, that would display the contents of the PAYLOAD field within the IP_MESSAGE_TYPE object, once a message gets queued after an incoming EDI transaction gets processed by B2B successfully --> note BPEL/SOA is not running at this point --> I just want to dump the XML itself.
    I tried using the following code, but can not get the dbms_lob.read function to work properly; my dbms_lob.getlength function returns 5700, but I can not even read 250 bytes --> get sql "06502" PL/SQL numeric or value error: bind too small
    --> I however can read 150 bytes .
    Can someone perhaps figure this out.
    CREATE OR REPLACE PROCEDURE b2b_deq AS
    dequeue_options dbms_aq.dequeue_options_t;
    message_properties dbms_aq.message_properties_t;
    message_handle RAW(16);
    ipmsg ip_message_type;
    inp_clob               clob;
    output_data_clob varchar2(2000);
    len_clob               binary_integer;
    start_pos_clob integer;
    BEGIN
    dequeue_options.consumer_name := 'b2buser';
    dequeue_options.dequeue_mode := dbms_aq.remove;
    dequeue_options.navigation := dbms_aq.next_message;
    dequeue_options.wait := dbms_aq.forever;
    dbms_aq.dequeue ( queue_name => 'IP_IN_QUEUE',
    dequeue_options => dequeue_options,
                        message_properties => message_properties,
                        payload => ipmsg,
                        msgid => message_handle);
    dbms_output.put_line('Message ID: ' || ipmsg.msg_id);
    dbms_output.put_line('Message Size: ' || dbms_lob.getlength(ipmsg.payload));
    SELECT ipmsg.payload INTO inp_clob FROM dual;
    dbms_output.put_line('Message Size #2: ' || dbms_lob.getlength(inp_clob));
    start_pos_clob := 1;
    len_clob := 250;
    dbms_lob.read(inp_clob,len_clob,start_pos_clob,output_data_clob);
    dbms_output.put_line('Message XML: ' || output_data_clob);
    Thanks.
    Arthur (203-921-5925)

    Thanks for the info --> it worked fine now.
    Also Ramesh, with regards to an example/sample of a BPEL process that reads an 850 from an IP_IN_QUEUE and processes this txn via a PL/SQL api (OAD) -
    someone has told me that this does exist somewhere --> do you have any knowledge on this piece of code perhaps.
    My key point here is in the ability to post multiple line items into 11i via the process. I posted this question on the SOA forum, but no replies have come through in five days or so.
    Thanks as always.
    Arthur (203-921-5925)

  • How to validate date fields in the flash form

    i want to validate the date fields to make sure the values
    are not greater than today's date and from-date is less than or
    equal to to-date in the flash form. Does the actionscript have a CF
    DateDiff function for the validatation?
    Thanks

    I finally (after much reading up on actionscript) figured out
    my problem with date validation...which was similar to yours...
    I posted the solution I found for my AS date validation issue
    here:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=22&threadid=1232361
    I hope it helps!!!

  • Any way to validate the Mandatory field in the XML file

    Hi,
    Is there any way to validate the Mandatory field in the XML file. I created an xml type table xml_validate based on the schema and insert the XML files with statement.
    INSERT INTO xml_validate(warehouse_id,xml_file_name,warehouse_spec)
    Values (agreementid,p_filename,XMLTYPE.createXML(l_clob));
    It is validating the data types, extra tags etc but not validating the missing of the manadatory tag/value.
    Thanks in advance
    Rizly

    Hi Ants,
    Yes, I was not doing the strict validation, after searching the forum i understood that was the reason. So i did this way,
    begin
    for x in (select myColumn from myTable where WAREHOUSE_ID=41) loop
    x.myColumn .schemaValidate();
    end loop;
    end;
    The out put is:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00011: internal error: LsxvPushCandidate array overflow
    ORA-06512: at "SYS.XMLTYPE", line 345
    ORA-06512: at line 3
    My i know more information about this error, especially
    LSX-00011: internal error: LsxvPushCandidate array overflow
    Thanks in advance
    Rizly

Maybe you are looking for