Error message in the loop statement

Hi Experts:
                In my ABAP program,
                In the loop of internal table,when match some condition,the system give error message, or go on.
                Now,if the internal table has ten records,  three records match some condition,the others need
                       process going on.
                But in my program,if finds error record,giving error message,can't process other records.
                I want it can not only show error message,but also process other records.
                Pls give me some advice,tks!

Hi,
Message type E is error type and it will terminate your program.
So either we can declare the message type E as information message or status or we can add a varaible flag which can be set on error.
So that it would not terminate the program.
Example :
Loop at inttable1.
if condition for error
flag = 'X'.
continue.
endif.
endloop.
Outside the loop.
if flag = 'X'.
message in other internal table with details.
endif
Hope this helps.
Thanks,

Similar Messages

  • How to set error message inside the loop...module pool

    Dear all,
         Am creating Table Control without wizard. In that i am looping the values, that is, Once if i entered 5 digit values means, 12345-08... the values should be stored in z-table like this 12345,12346,12347,12348 . That is 5-8 it as to update in z table. for this i createdloop at itab and inside that i written a code to count the value and all. and also its clearly updating the value in ztable too. now i want to know, if once again i entered the same value means, like 12345-08.. it as to show error messge.I dont know how to set the condition with error message inside the single loop .... Its all comes under module pool program.
    Thanks,
    Santhosh.R

    If i understood your doubt, here goes the answer.
    LOOP AT itab INTO wa_itab.  " This is your loop
      l_tabix = sy-tabix. "l_tabix receives the line of the loop
      READ TABLE itab WITH KEY itab = wa_itab.  "itab is the same tab of your loop
      IF sy-subrc EQ 0 AND l_tabix NE sy-tabix.    "Here the sy tabix have the value of the read table.
    *     Here you do your error treatment.
      ENDIF.
    ENDLOOP.
    Explanation: When you are looping your internal table, you use a READ TABLE to see the already recorded registers. If the read table finds one register (sy-subrc EQ 0) and the this register is not the one of the current line (l_tabix NE sy-tabix). It means you have a duplicated register.
    Maybe there is someway easier to do this, but this is what i thought now.
    I hope this was your doubt hehe.
    Thales Schmidt

  • Java - Axis2: How to get an error code / error message from the Javascript via SOAP

    Hi
    In our Java applicsation we call a Javascript in a Indesign CS Server using the following code:
    --- SNIP BEGIN ---
    // calls the remote service on the indesign server
    try {
    // create service
    ServiceStub oIndsgnSrvStub = new
    ServiceStub(sIndesignServer);
    // create service parameter
    ServiceStub.RunScriptParameters
    oIndsgnSrvRSParams = new ServiceStub.RunScriptParameters();
    // create arguments with source- and target-file for parameter
    ServiceStub.IDSPScriptArg[] oIndsgnSrvSArgs = new ServiceStub.IDSPScriptArg[2];
    oIndsgnSrvSArgs[0] = new
    ServiceStub.IDSPScriptArg();
    oIndsgnSrvSArgs[0].setName("xml-input");
    oIndsgnSrvSArgs[0].setValue(sSourceFile);
    oIndsgnSrvSArgs[1] = new
    ServiceStub.IDSPScriptArg();
    oIndsgnSrvSArgs[1].setName("output-file");
    oIndsgnSrvSArgs[1].setValue(sTargetFile);
    // define service parameter
    oIndsgnSrvRSParams.setScriptArgs(oIndsgnSrvSArgs);
    oIndsgnSrvRSParams.setScriptFile(sScriptFile);
    oIndsgnSrvRSParams.setScriptLanguage("javascript");
    oIndsgnSrvRSParams.setScriptText("");
    // create runscript
    ServiceStub.RunScript oIndsgnSrvRS = new ServiceStub.RunScript();
    // set parameter
    oIndsgnSrvRS.setRunScriptParameters(oIndsgnSrvRSParams);
    //$$$ there should be an answer returned by the InddSrvr
    // execute SOAP call
    ServiceStub.RunScriptResult oIndsgnSrvRes = oIndsgnSrvStub.RunScript(oIndsgnSrvRS);
    if(oIndsgnSrvRes.getErrorNumber() == 0) {
    oServerProdJob.setProdState(CBP_Constant.REMOTEPRODUCTIONSTATE_SUCCESS);
    bOK = true;
    } else {
    oServerProdJob.setProdState(CBP_Constant.REMOTEPRODUCTIONSTATE_FAILURE);
    bOK = false;
    //$$$ should be set, if there is something returned by inddsrvr
    //oServerProdJob.setErrorMsg(sErrorMsg);
    } catch(Exception e) {
    sError += e.getMessage() + "\n";
    bOK = false;
    --- SNIP END -----
    The problem is that we don't get the error code and/or the error message from the Javascript in oIndsgnSrvRes. The error code is always 0 if I set an Integer value as return in the Javascript. If I set a String, there is an Exception in the Java application.
    Here is the Java script we use:
    --- SNIP BEGIN ---
    main();
    main()
    var sError = "";
    var sXMLInput = "";
    var sLayoutPath = "";
    // get the SDKCodeSnippetRunner object
    var cbpAdapter = app.cbpCbpadapterObject
    if (cbpAdapter) {
    sXMLInput=app.scriptArgs.get("xml-input");
    sLayoutOutputFile=app.scriptArgs.get("output-file");
    sError = cbpAdapter.doProcess(sXMLInput, sLayoutOutputFile);
    return sError; // This give an Exception; if I return an Integer the ScriptResult is always 0
    --- SNIP END -----
    If I try this with the test application from Adobe I get the error code correctly. But in the Java application, using SOAP, I can't get the error code.
    What could be wrong?
    Any ideas?
    Thanks a lot for the support.
    Kind regards
    Hans

    user11340104 wrote:
    Hello -
    i am calling sqlplus from a bash shell script. If the sql statement generates an error, how can I return that error code (unsuccessful) back to the bash shell?
    Well, let google be your friend,
    http://www.google.co.in/search?rlz=1C1GGLS_enIN327IN327&sourceid=chrome&ie=UTF-8&q=sqlplus+error+codes
    There are many threads I guess talking about the same issue.
    HTH
    Aman....

  • I am trying to re-install Photoshop CS6. The files have downloaded but I get and error message that the Adobe Support Advisor is required to determine what the installation probIem is. I click on the link that says "get the Support Advisor here only to be

    I am trying to re-install Photoshop CS6. The files have downloaded but I get and error message that the Adobe Support Advisor is required to determine what the installation probIem is. I click on the link that says "get the Support Advisor here only to be told the Support Advisor no longer exists!! A blind loop. I need to have Photoshop CS6 installed...what do I do from here??

    The CC Cleaner Tool assumes the Akamai Download Manager is activated and it has not. It seems to be the missing file that triggers the error message. \in a previous re-install I was prompted to download & install the Akamai Download Manger, but not this time. Is there somewhere on the Adobe website that I can download it??

  • Database Connection Error: Cannot obtain error message from the server

    I have a SQL statement that wants to add a temp table to the database.   The SQL statement works fine but when I try to add it via 'Add Command' feature in Crystal XI R2, I get the following error message:
    Database Connection Error: Cannot obtain error message from the server
    Any ideas?
    Thanks in advance,
    Zack H.

    Hi Raghavendra,
    I am using this in the 'Add Command' feature but I get the error message displayed in the subject line:
    CREATE TABLE #TibetanYaks(
    YakID char(4),
    YakName char(20) )
    INSERT INTO #TibetanYaks (YakID, YakName)
    SELECT  LastName, FirstName
    FROM      Employee
    WHERE      EmployeeID between '2000' and '3000'
    I haven't tried to add this as a stored procedure but I imagine it will work as I have no problems yet with stored procedures.  I simply want to be able to use temporary tables for the sole purpose of that session and not creating anything static in the database.
    By the way, even though I get the error message, when I look on the backend database, I see that the temporary table was successfully created...its just not brought across correctly in Crystal.
    Any ideas?
    Zack H.

  • I get this error message in the bottom left hand corner of the pages I visit ?

    I have an HP Pavillion Slimline using Windows 7 with 64 bit. When I surf from page to page, I keep getting this error message in the bottom left hand corner of the window. Sometimes it says "Done with error" or just "Error". How do I fix this problem ?
    This question was solved.
    View Solution.

    Commonly it's a script error on the page your presently viewing. See: http://support.microsoft.com/kb/308260
    I am a volunteer. I am not an HP employee.
    To say THANK YOU, press the "thumbs up symbol" to render a KUDO. Please click Accept as Solution, if your problem is solved. You can render both Solution and KUDO.
    The Law of Effect states that positive reinforcement increases the probability of a behavior being repeated. (B.F.Skinner). You toss me KUDO and/or Solution, and I perform better.
    (2) HP DV7t i7 3160QM 2.3Ghz 8GB
    HP m9200t E8400,Win7 Pro 32 bit. 4GB RAM, ASUS 550Ti 2GB, Rosewill 630W. 1T HD SATA 3Gb/s
    Custom Asus P8P67, I7-2600k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX660 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Custom Asus P8Z77, I7-3770k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX670 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Both Customs use Rosewill Blackhawk case.
    Printer -- HP OfficeJet Pro 8600 Plus

  • I installed a new printer and now Photoshop Elements tells me I can't print.  The error message is "The saved printer information is not compatible with this version of Photoshop Elements, or the saved printer is no longer available.  You will need to che

    I installed a new printer and now Photoshop Elements tells me I can't print.  The error message is "The saved printer information is not compatible with this version of Photoshop Elements, or the saved printer is no longer available.  You will need to check your printer settings before printing."  I have uninstalled and re-installed Photoshop Elements, checked my printer settings and still I can't print a photo.

    Hi ,
    Please update to PSE 13.1
    13.1 has solved this problem.
    Refer to this link.
    Photoshop Elements Help | Printer errors with Photoshop Elements 13

  • I have an older iMAC that once burned CD's with no issues. Now I get an error message saying "The attempt to burn a disc failed. The device is not accessible, probably because it was removed". I have never had it touched so the device was not removed.Help

    I have an olde iMac that once I have an older iMAC that once burned CD's with no issues. Now I get an error message saying "The attempt to burn a disc failed. The device is not accessible, probably because it was removed". I have never had it touched so the device was not removed. Please advise as to what could be the problem. How to fix. Thanks

    Try resetting the SMC and PRAM first, if that doesn't help try a cleaning disc.....and then buy an inexpensive external burner. Slimline super drive failures are all too common.
    To reset the SMC
    Shut down the computer.
    Unplug the computer's power cord.
    Wait fifteen seconds.
    Attach the computer's power cord.
    Wait five seconds, then press the power button to turn on the computer.
    Resetting NVRAM / PRAM
    Shut down your Mac.
    Locate the following keys on the keyboard: Command (⌘), Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.

  • How to add an error message in the application module?

    Hi,
    I have some code running in the application module. I want to display error messages in the messages section of the screen if an error happens in my code.
    How could I achieve this?
    I am using JDeveloper 10G
    Thanks

    Muhammed,
    Have you tried throwing a JboException in your AM code?
    John

  • Print a custom Error message in the XML bursting program's log file...

    Hi,
    I having this requirement, where i need to print a custom error message in the xml bursting program's log file.
    Actually i am having a report where i create invoices and then those invoices are emailed to the respective customers, now say if a customer has three contacts and there is only two valid email id's so what happens is bursting will be successful for two contacts whereas the third contact dosen't get any emails. when this happens i need to log a message in the bursting programs log file stating a custom message.
    Two things i want to know..
    1- Whether is it possible to write into the xml bursting programs log file
    2- If yes, then how..
    note: it ll be greatly appreciated if the answer is elaborated.
    thanks,
    Ragul

    Hi,
    I having this requirement, where i need to print a custom error message in the xml bursting program's log file.
    Actually i am having a report where i create invoices and then those invoices are emailed to the respective customers, now say if a customer has three contacts and there is only two valid email id's so what happens is bursting will be successful for two contacts whereas the third contact dosen't get any emails. when this happens i need to log a message in the bursting programs log file stating a custom message.
    Two things i want to know..
    1- Whether is it possible to write into the xml bursting programs log file
    2- If yes, then how..
    note: it ll be greatly appreciated if the answer is elaborated.
    thanks,
    Ragul

  • Trying to download iTunes 11.1 but it keeps giving me an error message saying: The feature you are trying to use is on a network resource that is unavailable.

    Trying to download iTunes 11.1 but it keeps giving me an error message saying:
    The feature you are trying to use is on a network resource that is unavailable.
    Click OK to try again, or enter an alternate path to a folder containing the installation package "iTunes64.msi" in the box below.
    Use Source:

    iTunes.msi
    Perfect, thanks.
    Download the Windows Installer CleanUp utility from the following page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    To install the utility, doubleclick the msicuu2.exe file you downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • The restore session has stopped working. It tries to load, but then gives an error message that the script is not working and will not actually show the previous tabs I had open.

    I count on using the Firefox restore session feature. But it's stopped working. For the past couple of days, it hasn't worked a single time. (I haven't changed anything on my PC.) It just suddenly stopped working.
    Now it gives me an error message that the script has stopped working. It gives me a couple of options. I'm not sure of the exact wording, but one option is to stop the script and the other is to keep trying. But the keep trying never works.
    I have to stop the script, hence, the list with my previous tabs never comes up.

    Which file is mentioned as the cause of that script error?<br />
    Is that a file with a chrome protocol?

  • I have two versions of Pr, one is the latest 2014 and when trying to open a Pr2014 session, I get an error message saying the project was saved in a newer version and cannot be opened. Help

    I have two versions of Pr, one is the latest 2014 and when trying to open a Pr2014 session, I get an error message saying the project was saved in a newer version and cannot be opened. Could there be an issue with an older Pr application on the computer? Please help!

    You need to be very careful which project you open in which version.
    For 2014 make sure its on 2014.1 build 81.

  • I am unable to open a project that I have worked on and saved.  I get an error message that the file is damaged and cannot be opened.

    I am unable to open a project that I have worked on and saved.  I get an error message that the file is damaged and cannot be opened.

    Leslie Tanaka
    Travel and detours have kept me from following up sooner. If the problem that you wrote about still persists.....
    Let us go back over that Adobe document regarding troubleshooting damaged projects.
    3. Delete the Application Preferences
    Where you able to follow that path and delete the Adobe Premiere Elements Prefs file at the end of the path? And, after you did, did the saved/closed programs still refuse to open? If you could not carry out this procedure, what were the limiting factors that kept you from do
    7. Test to see if individual media files are causing the problem.
    That is an important one. How far did you get into following the instructions given in the document? If you could not complete the test, what was the major block that prevented you from doing so?
    I want to make sure that we have gone through everything in that document and ruled all factors there in or out. If it was a matter of you not understanding the instructions, I am hoping that the above will channel you questions to me so that I can clarify anything that you did not understand in the Adobe document instructions.
    I do not recall if I asked previously. Even if you cannot open all your saved/closed projects, can you still open a new project and save/close it? Maybe even reopen it?
    Please review and consider.
    Thank you.
    ATR

  • Error message in the IDOC at item level

    Hi,
    Iam working on IDOC.when idoc failed i get the that idoc error message and displaying in the report at header level.But my requirement is to diplay the error messages at the item level.Is it possible to display the error messages at the item level?For example for IDoc number is 30000045.For this idoc number 7 line items is there like 1000,1001,1002,1003,1004,1005,1006,1007.i want error message line item wise.Kindly suggest me.
    Regards,
    Sujan

    hi sivaprasath,
    write the custme code as per your requirement so that it will do..user exit or badi .
    ~linganna

Maybe you are looking for

  • Excise invoice for CR/DR  note

    Hi all How to configure  excise inovice creation for  Billing type  L2/G2 Document flow is  sale order (CR/DR) --wotout delivery  :billing creation wtih reference to sale order  (G2/L2) but with reference to G2/L2 billing type not able to create sale

  • Any ideas on how to make program simpler?

    This program is designed to send multiple TTL pulses to different instruments, while at the same time receiving and analyzing analog input data.  We will likely be sampling at fairly low rates (rarely over 100 Hz).  We will be getting a new USB board

  • Buttons (silent, volume, on/off) and headphone jack no longer working!

    All of a sudden my iPhone stopped working - that is, none of the buttons work except the round one below the screen. None around the sides work any more and the headphones jack doesn't work either. I have the latest os/firmware (3.1). This happened t

  • MICR code in AP Checks

    Hi, We are using the XML Publisher to generate the checks in Payables. We are using the IDAutomationMICR font. The ttf file has been moved to the UNIX server and the custom property has been added to the RTF template When we open the output, we get a

  • RE:connection to port 6241 failed during java upgrade

    Hi all, We are performing Java Upgrade and we are stuck in the intial stage stage. The problem is connection to port 6241 failed . We have retained the default port. Thanks and Regards, sowmya