Has to check the validity

hi,
     i have to check the validate aggrements for each material and has to display * if there are more than 1 valid aggrement for a particular material .
v_count = 1.
      LOOP AT i_ebeln INTO wa_ebeln
              WHERE matnr = wa_displaylog-matnr and matnr ne space.
          IF v_count > 1.
          wa_displaylog2-mover = '*'.
          EXIT.
        ENDIF.
        wa_displaylog2-mover = space.
        wa_displaylog2-ebeln = wa_ebeln-ebeln.
        wa_displaylog2-netpr = wa_ebeln-netpr.
        v_count = 2.
      ENDLOOP.
when i used this code and changes the test file it is displaying only one aggrement number(ebeln) and no *   .when i excute again its working .what was the problem
i used my select stmt as
SELECT ekpoebeln matnr ekponetpr
     INTO CORRESPONDING FIELDS OF TABLE i_ebeln
     FROM ekpo INNER JOIN ekko
    ON ekkoebeln = ekpoebeln
    WHERE ekkokdate >= sy-datum  AND ekkoloekz NE 'L' AND ekpo~loekz NE 'L' AND
    ( ekkoebeln LIKE '46%' OR ekkoebeln LIKE '56%' ).
Plz suggest the appropriate answer .
Thanks
Edited by: sukruthi raj on Jan 15, 2008 6:54 PM

LOOP AT i_ebeln INTO wa_ebeln
WHERE matnr = wa_displaylog-matnr and matnr ne space.
AT NEW wa_ebeln-ebeln.
v_count = 1.
ENDAT.
wa_displaylog2-mover = space.
wa_displaylog2-ebeln = wa_ebeln-ebeln.
wa_displaylog2-netpr = wa_ebeln-netpr.
IF v_count > 1.
wa_displaylog2-mover = '*'.
ENDIF.
v_count = 2.
MODIFY i_ebeln FROM wa_ebeln INDEX sy-tabix.
ENDLOOP
Try changing like this.
Regards,
Sudhir Atluru

Similar Messages

  • Check the validity of a SQL statement before execution

    Hi everyone,
    In an applet I have created, I am allowing the user to create a SQL statement which will be sent to a servlet that in turn issues the JDBC request for the SQL statement. My concern is that since my GUI lets the user create more or less any kind of SQL statement (including an illegal one) I need to verify if the user has created the correct SQL. How can this be achieved?
    To recapitulate and summarize, I need to know how I can check the validity of a SQL statement without actually executing it and handling the SQLException. FYI, I am using the mm-mysql driver.
    Thanks,
    Alan

    jschell is correct. Unless you're writing something like an ISQL tool you want to be very careful doing this.
    Having said that Mimer SQL have SQL validators that may do what you want http://developer.mimer.com/validator/index.htm
    They've also got the SQL Validator running as a web service that you can use. Theres example code here showing how to use it.
    http://sqlvalidator.mimer.com/index.html
    At the risk of being accused of selfpromotion you can check out the SQL Validator plugin for SQuirreL SQL CLient. This is a fully functional example of using the Mimer SQL Validation web service. http://squirrel-sql.sourceforge.net/
    Col

  • Is there anyway we can check the validity of dump file in Unix system

    Hi,
    I have taken export of 2 tables which are huge in volume. one of the table seems to be successfully exported yet another one failed due to space scarcity. Since both the tables share a single dumpfile.
    I wanted to know.
    1. Can we use the same dumpfile to import the table which is successfull or it can not be used because the second table got error while exporting?
    2. Is there any way we can check the validity of dumpfile in unix plateform.
    Your reply is highly appreciated.

    784786 wrote:
    Hi,
    I have taken export of 2 tables which are huge in volume. one of the table seems to be successfully exported yet another one failed due to space scarcity. Since both the tables share a single dumpfile.
    I wanted to know.
    1. Can we use the same dumpfile to import the table which is successfull or it can not be used because the second table got error while exporting?No. It is better to take another backup of the same
    >
    2. Is there any way we can check the validity of dumpfile in unix plateform.
    Please check the export log backup. If it says that export terminated successfully, then the dump may be fine.

  • Check the validity of date

    hi..i'm creating a new user jsp page and in that i want to check whether the date entered by user as his/her date of birth is valid or not...i've taken three dropdown boxes to enter the date, month & year. how will i check the validity and concate three values and save it in database..thnx

    Validate it using java.util.Calendar which is set not to be lenient.
    Example: [http://balusc.blogspot.com/2007/09/calendarutil.html].
    Save it in DB using PreparedStatement#setDate().
    Example: [http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html].
    The field in DB must be a DATE, DATETIME, or TIMESTAMP.

  • How to check the validation of RegEx

    Hi,
    My application needs users to enter RegEx. My question is how I can check the validation of the RegEx that users enter. The Class RegExp does not seem to provide any methods to check the validation of the RegEx.
    Regards,
    Haibin

    You would need to hand roll your own validator, unless someone knows of one that is out there. Flex does not validate RegEx.
    If this post answers your question or helps, please mark it as such.

  • Ehancement for to check the validations in ME21n,ME22n,ME28,ME29n

    Hi experts...
    I have one requirement in Ehancement for to check the validations in ME21n,ME22n,ME28,ME29n...
    If the PO document date is after 31.12.2010 and vendor Group 1800 then check the Inco-terms with "SET" values whether the user entered value fals with in the "SET" value, if so then allow to save the PO else Else system should read the "SET" values and suggest user to select correct Inco terms.
    Example when user enter wrong Inco-Terms then system shoud give Error Message Please Select Inco-terms CPT or DAP or FCA..
    Can any body plz suggest me the user exit or Is it possible through the enhancement Framework...
    plz help me how to proceedd??
    Thanks & Regards,
    Veena.
    Moderator Message: Spec-dumping is not allowed.
    Edited by: kishan P on Jan 3, 2011 11:00 AM

    Hi Veena,
    To find a BADI for a given tcode follow the below steps.
    1. Go to the TCode.
    2. Menu Item System -> Status.
    3. Double click on the transaction Name (For ME21N double click on ME21N).
    4. Check the Package (e.g. ME)
    5. Go to TCode SE80
    6. In the drop down choose Package and type the Package Name (e.g. ME). Dont forget to Hit Enter or display.
    7. Object Name Enhancements -> Business Add-ins (Def.) (You will see all the BADI's available here ).
    In your case, you need BADI : ME_BAPI_PO_CUST.
    Go to SE19 to implement the BADI.
    If you put your conditions in Create Purchase Order(ME21N), you will not need to add them in Release PO(ME28N) since the conditions will be checked when PO is created.
    Regards,
    Jovito.

  • How to check the validity period of saprouter ?

    Dear all,
    As per sap note 1178684, we can check the validity period of the saprouter by executing "sapgenpse get_my_name -n validity"
    I am wondering how to run that command in as/400 ?
    Please advise. I am not familiar with as/400 OS.
    Thanks
    Regards,
    Kent

    Hi Kent,
    please proceed as described on the http://www.easymarketplace.de/snc-iseries-setup.php
    logon with sidadm (or sidofr):
    (depending on the user, that is running the SAPRouter)
    CD DIR('/usr/sap/saprouter')
    ADDLIBLE LIB(SAPROUTER)    ??? or whereever the stuff is ...
    RMVENVVAR ENVVAR('SECUDIR')
    ADDENVVAR ENVVAR('SECUDIR') VALUE('/usr/sap/saprouter')
    RMVENVVAR ENVVAR('SNC_LIB')
    ADDENVVAR ENVVAR('SNC_LIB') VALUE('/usr/sap/saprouter/sapcrypto')
    CALL PGM(SAPGENPSE) PARM('get_my_name')
    Regards
    Volker Gueldenpfennig, consolut international ag
    http://www.consolut.net - http://www.4soi.de - http://www.easymarketplace.de

  • How to check the validation in UI before committing data?

    Hi,
    I'm using Jdev 11.1.2.1.0 version .
    I needed to check whether there is duplication of values in Boolean check box before committing the data into the Database.
    But this validation rule is to be checked based on the value selected in the Select One Choice drop down list in the page.
    I did it with adding a ValueChangeEvent in the drop down list and checking the values in the Boolean check box. It worked , but only in the case of earlier committed data in the database.
    How can i actually verify the data entered in the table in the page before it being committed into the DB ?
    Nigel.

    Hi,
    an improvement to your solution would be to move the major part of your code from the backing bean into a method on the ApplicationModuleImpl file (you create this from the AM editor)
      public boolean checkForDuplicate(){
           ViewObject vo = this.findViewObject("ResponseVO");
           int numRows;
           int j=0;
           numRows = vo.getRowCount();
           String rowValue = "a";
    //the part below of your code I don't like at all. Why do you need to increase a flag
    //and use an if statement ?
           for (int i=0; i<numRows; i++){
              rowValue = (String)vo.getCurrentRow().getAttribute("ResponseFlag");
              if(rowValue.equals("Y")){                           
                  j++;
                  if(j>1)
                      return true;
             return false;                           
        }This code you then expose on the AM as a client interface (same AM editor --> Java menu option)
    In the PageDef file (double click it to access the visual editor) click the plus icon next to the Bindings header. Choose "Generic Binding" --> method binding and point it to the AM and the exposed method. This creates a method binding "checkForDuplicate"
    Change your managed bean code to
      BindingContext bctx = BindingContext.getCurrent();
      BindingContainer bindings = bctx.getCurrentBindingsEntry();
      OperationBinding checkForDuplicate = (OperationBinding ) bindings.get("checkForDuplicate");
      checkForDuplicate.execute();
      boolean isDuplicate =  checkForDuplicate.getResult();            
      if(isDuplicate){
             FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, null, "Two same respones!");
             FacesContext.getCurrentInstance().addMessage(null, msg);
                                               Frank

  • Internal Error has occured, Check the log file

    Hello all,
    After i login to my OEM grid console, i get the message
    "Internal Error has occured. Check the log file for details."
    once i press the OK button, i directs me to the home page as if noting has occured. I was happening rarely previosly and now its a regular thing.
    Which log file am i supposed to check?
    TIA,
    Jj

    Hey:
    I know it was a month ago when you posted. I'm getting the same messages now. Win 2K3, SP2 + all patches. Walked through basic install with Oracle's help. They're interested in emoms.trc/log and the alert log (although the alert log has been clear).
    Thx
    Tony

  • I need a function to check the validation of a psp element

    Hi guys,
    i have the challenge to check psp-elements in a foreign system but i don´t found any function to do this. Has anyone an idea?
    explaining: I have a dialog with a char field to enter the psp element. In PAI i want to check the psp element via RFC function in another system.
    kr
    Thorsten

    Hi,
    Yes, you misundertood.
    The BAPI name says PROJECT, but it also validates WBS. Use the code as below:
    PARAMETERS p_wbs TYPE char24.
    DATA e_return                 TYPE bapireturn1.
    DATA i_wbs_element_table    TYPE STANDARD TABLE OF bapi_wbs_elements.
    APPEND p_wbs TO i_wbs_element_table.
    CALL FUNCTION 'BAPI_PROJECT_GETINFO'  "add your RFC destination
      IMPORTING
        return                       = e_return
      TABLES
        i_wbs_element_table          = i_wbs_element_table.
    IF e_return IS NOT INITIAL.
       MESSAGE ID e_return-id
               TYPE e_return-type
               NUMBER e_return-number
               WITH e_return-message_v1 e_return-message_v2 e_return-message_v3 e_return-message_v4.
    ENDIF.
    Cheers,
    Custodio

  • I would like to check the validity of the IMEI of my IPHONE4S

    hello,
    I would like to check the vialidity of the IMEI of my IPHONE4S.
    Apple support seems to be not working. Is there any other way to check it?

    Does your iPhone work as a phone?  If yes, I'm guessing that the IMEI is valid.

  • How to make new directory to check the valid path?

    Hi gurus,
    Is there a way to validate the path while creating DIRECTORY?
    e.g. SQL> CREATE DIRECTORY dump_dir AS 'u01/users/dump';
    Can I validate the path from the SQL?
    Thanks,
    Prakash

    Oracle doesn't check the path exists, you must make sure the path is well written and it really exists on your OS. In the case of Unix like OS' you must make sure it has enough privileges for the oracle os user to be able to at least read and write if required.
    ~ Madrid

  • How to check the validation at data base level as well as current user ente

    Dear all
    i have creation page in that item code will not enter the duplicate values
    in that creation page contains advanced table
    user will click on create 15 blank records using add another row
    suppose in first row user will enter LAPTOP assume this item code
    in this case i need to raise exception through databse level
    in second row also user enter LAPTOP1 in this case exception will not raise becaause data is not there at databse
    in third row user will enter LAPTOP1 in this case item is not there in data base but it is there in second row in this case
    i need to raise exception
    how to achieve this
    Thanks in Advance
    Sreekanth

    You can validate this in form submission.
    1. Call a method in AMImpl.java
    2. loop the ViewObjects and check the values
    3. If you find a match, throw the error
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                   

  • How to check the validity of recipient when sending email

    hi Gurus,
    i wanna send email thru class, and i need to know if the email is sent successfully, i can check the email status thru SOST.
    but is there any way to get a return message immediately as soon as  I 'm sending the mail  out.
    Thanks in advance.
    Desmond Yang

    S you are right.
    If you want to validate email id, use table ADR6. Check below code,
    "Get Ship-to-party email address
    DATA: l_f_adrnr TYPE adrnr,
          l_f_mail TYPE ad_smtpadr.
          SELECT SINGLE adrnr FROM vbpa INTO l_f_adrnr        " Get Address number
            WHERE vbeln = vbdkr-vbeln AND
                  parvw = 'WE'.  " 'WE' Ship-to-party
          IF sy-subrc = 0.
            SELECT SINGLE smtp_addr FROM adr6 INTO l_f_mail  " Get Email id from Address number
              WHERE addrnumber = l_f_adrnr.
          ENDIF.
          IF l_f_mail IS INITIAL.
            MESSAGE i503(sbcoms) WITH l_f_mail. " Throw a message saying Recipient is unknown
          ELSE.
            " Code to send mail
         ENDIF.

  • Read email adress from a text file then check the validity of them

    a text file has three lines, each line contains one email adress:
    [email protected]
    qwe@@ws.com
    wer//@we.net
    read the email address from a text file, then check which one is invalid, output the invalid email adress in the console.

    no 3 .umm, an email adress can have more than 2 '.'s in it,
    example:
    [email protected]
    would be a valid email address.
    To decide what a valid address is you'd need to parse it against the correct standard.
    I think however that javax.mail.internet.InternetAddress does this for you, check out the docs:
    http://java.sun.com/products/javamail/1.2/docs/javadocs/javax/mail/internet/InternetAddress.html
    even if it parses it may not be a valid address though in that it may not actually exist.

Maybe you are looking for