Skipping a portion of code at runtime

Hi all,
Can anyone please suggest a way to skip a particular lines of code while in debugging mode without altering the ABAP program code.
Regards,
Prabaharan.G

Hello Prabahkaran,
If you're on 4.7 then you would be having the Goto statement in debugging. Choose the Menu Option <i>Debugging>Control>Goto Statement</i>.
This option is different than the one Patrick had suggested. It just jumps to the statement where the cursor is placed. the statements in between are not executed. And what is really cool about this option is that you can even go <i>backwards</i> during debugging - From Line 20 you can go back to line 15, for example.
Check this out and let me know if it suits your purpose. If you're on a release < 4.7, then I'm afraid you do not have this option.
Regards,
Anand Mandalika.
P.S. Please don't forget to reward the answers that have helped you. If a reply solves your problem, give it 10 points. That will mark this thread as "answered".
Message was edited by: Poornanand Mandalika

Similar Messages

  • Basic error handling: how to catch all errors in a portion of code (and act accordingly)

    I have a portion of code in a VI that I know is likely to fail at some point (opening a file, then reading two arrays from it: the file can be absent, or contain the wrong data).
    I would like to be able to catch any errors that may occur during this procedure, and if such an error occurs launch a pre-defined action (return a default value, for instance).
    Is there a simple way to do this, in a way similar to the disabling of a portion of code with a Diagram Disable structure ?

    use the "bundle by name" function to set the individual elements of the error cluster to the values you want.
    CLA, LabVIEW Versions 2010-2013

  • Building code at runtime.

    Hello,
    I am wondering if this is even possible ... Imagine having a class written as follows:public class HelloWorld{
       public sayHello(){
          // This space was left on purpose.
    }Now I have a text file (example sayHello.txt) with the following text in it.System.out.println(�Hello, World!�);Is it possible to load the text file text and make it get executed when I call the sayHello Method?
    I mean it is like building some code at runtime.
    Thanks and Regards,
    Sim085

    The JVM itself only handles the bytecode. It doesn't even need .class-files, the classloader just passes it a byte[] and tells it to parse that as a class definition. Where that byte[] comes from doesn't matter. Most of the times it's read from a class file in the file-system, a jar or a URL, but it can just as well be runtime-generated by some scripting language.
    The other alternative of course is to write a scripting language interpreter in Java that happens to be able to call java methods. The effect is pretty much the same, except you don't have to care about class loader issues and it might be a tad slower.
    I don't exactly know which of these two categories Groovy, Jython and BeanShell fit into.

  • See my code for runtime lov

    hi master
    see my code for runtime lov
    DECLARE
    X BOOLEAN;
    rg_name VARCHAR2(40) := 'RG_CNTRY';
    rg_id RecordGroup;
    lov_id LOV;
    qry varchar2(4000);
    errcode number;
    BEGIN
    rg_id := Find_Group( rg_name );
    qry := 'SELECT * from dept' ;
    IF NOT Id_Null(rg_id) THEN
    Delete_Group( rg_id );
    END IF;
    rg_id := Create_Group_From_Query( rg_name,qry);
    errcode := Populate_Group( rg_id );
    lov_id := Find_LOV('LV_COUNTRY');
    Set_LOV_Property(lov_id,GROUP_NAME,'RG_CNTRY');
    X := SHOW_LOV('LV_COUNTRY',110,25);
    END;
    when i press button then system give this error
    Frm-41091 : cannot find lov : invalid id.
    Frm-41828 : lov dose not exist.
    please give me idea
    Thanking you
    Aamir

    lov := Find_LOV('LV_COUNTRY');Make sure the LV_COUNTRY lov exists in your module.

  • T-code MDBT runtime error  GETWA_NOT_ASSIGNED

    Hell everyone.
    I copied a client from another client,then I runned MRP in the new client by T-code MDBT.
    It happened an error.
    Can anybody tell me how I can reslove this issue?
    Thanks & Best regards!
    The detail error as below:
    Runtime Errors         GETWA_NOT_ASSIGNED
    Date and Time          2010.06.19 11:01:46
    Kurztext
         Field symbol has not yet been assigned.
    发生了什么?
         Error in ABAP application program.
         The current ABAP program "FCR05205" had to be terminated because one of the
         statements could not be executed.
         This is probably due to an error in the ABAP program.
    你能做什么?
         Print out the error message (using the "Print" function)
         and make a note of the actions and input that caused the
         error.
         To resolve the problem, contact your SAP system administrator.
         You can use transaction ST22 (ABAP Dump Analysis) to view and administer
          termination messages, especially those beyond their normal deletion
         date.
         is especially useful if you want to keep a particular message.
    错误分析
        You attempted to access an unassigned field symbol
        (data segment 11).
        This error may occur for any of the following reasons:
        - You address a typed field symbol before it is set using ASSIGN
        - You address a field symbol that points to a line in an internal table
          that has been deleted
        - You address a field symbol that had previously been reset using
          UNASSIGN, or that pointed to a local field that no longer exists
        - You address a global function interface parameter, even
          though the relevant function module is not active,
          that is it is not in the list of active calls. You can get the list
          of active calls from the this short dump.
    如何更正此错误
        You may able to find an interim solution to the problem
        in the SAP note system. If you have access to the note system your
        use the following search criteria:
        "GETWA_NOT_ASSIGNED" C
        "FCR05205" or "FCR05F00"
        "PUT_P_VGWXX"
        If you cannot solve the problem yourself and you wish to send
        an error message to SAP, include the following documents:
        1. A printout of the problem description (short dump)
           To obtain this, select in the current display "System->List->
           Save->Local File (unconverted)".
        2. A suitable printout of the system log
           To obtain this, call the system log through transaction SM21.
           Limit the time interval to 10 minutes before and 5 minutes
           after the short dump. In the display, then select the function
           "System->List->Save->Local File (unconverted)".
        3. If the programs are your own programs or modified SAP programs,
           supply the source code.
           To do this, select the Editor function "Further Utilities->
           Upload/Download->Download".
      4. Details regarding the conditions under which the error occurred
         or which actions and input led to the error.
    Edited by: lzjsdxg on Jun 19, 2010 6:35 AM

    Are there anybody can help me?
    Thanks!

  • Can Java evaluate code at runtime ?

    Hi all !
    Can Java evaluate (compile and run on the fly) runtime defined code (as text) ? Like JavaScript does :
    eval("Object1.DoSomething(0);") or eval("a = a +1; b = a;")
    How complex statements are allowed to be evaluated at runtime if so ?
    Thanks !

    Hi all !
    Can Java evaluate (compile and run on the fly) runtime
    defined code (as text) ? Like JavaScript does :No, but maybe BeanShell may be of interest to you:
    http://www.beanshell.org/
    Jesper

  • Inconsistent exit code from Runtime.getRuntime().exec

    I'm getting non-deterministic behavior from a call to a native process. Here is the code:
    public class Test {
    public static void main (String[] pArgs) {
    try {
    String cmd[] = { "cmp", "-s",
    pArgs[0],
    pArgs[1] };
    System.err.println("running command: ");
    Process p = Runtime.getRuntime().exec(cmd);
    System.err.println("getting exitcode...");
    int exitcode = p.waitFor();
    System.err.println(exitcode);
    System.err.println(p.exitValue());
    } catch(Exception e) {
    System.err.println("Caught exception while executing cmd");
    e.printStackTrace();
    And here is the output:
    bock@homeruns[~/work/index]10:08> java Test output output.old
    running command:
    getting exitcode...
    0
    0
    bock@homeruns[~/work/index]10:08> java Test output output.old
    running command:
    getting exitcode...
    1
    1
    bock@homeruns[~/work/index]10:08> java Test output output.old
    running command:
    getting exitcode...
    0
    0
    they should all be 1's because the files are different. when i run it on the command line i get:
    bock@homeruns[~/work/index]10:13> cmp -s output output.old ; echo $?
    1
    any help would definitely be appreciated!
    thanks,
    roger

    thanks for the link. i read through it but it doesn't seem to address why the exit code would be inconsistently reported. the other problems described by that link don't seem to apply to this case because i have not experienced hanging and there is no standard input, standard output, or standard error associated with "cmp -s" - all it does is return the appropriate exit code.
    should i be reporting this as a bug to sun? up till recently i've been assuming it was a problem with my code but now i'm not so sure...

  • Wrong portions of code being executed in standard transactions

    Hi guys,
    I've recently come accross some weird errors in a standard transaction in a system and thought you might have a clue. I was getting an ugly dump in F110 in a fresh system that it can't do a READ TABLE with index 0. After investigating it and debugging it for a while, I got in the PAI of a screen, where two procedures were important:
    1) WERTE_PRUEFEN was being executed in a loop...endloop (that's where the error supposedly occurred). The thing is in the debugger it didn't go into this module inside the loop, as it should if there are no entries.
    2) After that, WERTE_LOESCHEN. When I got here and pressed F5 to see what's going wrong in it, guess where the debugger redirected me: you're right, to the WERTE_PRUEFEN thingy. So a statement like MODULE WERTE_LOESCHEN. gets me to a completely different procedure. This is crazy!
    I'm not at my first experience with this. BEx applications would do this if you'd change the ABAP source code and the people wouldn't reconnect again. Even if in the debugger I'd see the new code, the system would execute the old one, probably some caching issues. Always worked when people disconnected / reconnected.
    However, in the actual situation, no matter how many times I log on/off, the dump is there.
    This is not the only example of this kind, there are more module statements gone crazy in F110 in this system, but only this one dumps instantly.
    What do you think it could be the cause of that/ what is a good solution for this?
    I was thinking it has something to do with the program's generation and I asked the Basis guys to run an SGEN, hopefully that would help.
    Thanks in advance,
    George

    Hi Vikranth,
    Nope, just pressing F5 trying to get into WERTE_LOESCHEN and being redirected to that module inside the LOOP...ENDLOOP, WERTE_PRUEFEN. Well, I didn't say this happens in every system, only in that specific one. Of course, if I logon in another system, everything looks fine.
    Another person suggested that it's the GUI to blame and that I should get the newest version. Still, the error was reported by a person that has the latest version of the GUI. I still think it's a generation/ installation issue but got no reply from the Basis admin so far.
    Regards,
    George

  • Detection of Connected Device through Java code at Runtime.

    Hello All,
    In my Java application, I want to detect any Device/ Drive/ USB/ Storage Device which is connected at runtime or before application starts. Also I want to know which device is connected first. If you have any idea about this please tell me.
    Thanks and Regards
    Nikhil

    I want to detect any Device/ Drive/ USB/ Storage Device which is connected at runtime or before application starts.Well as said by fellow poster thereare no direct API of the things you stated in JAVA (packed) as of now.
    However, if you pertain to implement it in JAVA you may have to make use of JNI (Build customized Native methods & Classes) and build an API with it.which could be well be a new api for all of us :)
    However make use of the link below check whether that could be of some help 4 u
    http://forum.java.sun.com/thread.jspa?threadID=640782&messageID=4489169
    http://today.java.net/lpt/a/303
    and an existing open source API in JAVA for USB (Supports WINDOWS exclusively)access
    http://jusb.sourceforge.net/?selected=api
    REGARDS,
    RaHuL

  • Skipping a portion of PM plans

    Hi All,
    My client has a situation below
    1. A particular production line is down for 6 to 8 months in a suspended animation. So, they want to skip all PM plans during this period. Currently orders are getting generated and they are cancelling them manually with a updated status. How to stop this unnecessary order creation?
    - Can we list all M.Plans impacted and reschedule the starting date?
    - If we deactive the technical objects will it stop order generation? If yes, when I activate it back I shouldnt get orders from suspended animation period. I hear that the client tried it but it kick out during the entire period.
    - Any enhancement std.SAP offers to get this functionality?
    2. In another scenario, say there is a breakdown of a reactor and overhaul is completed for this and brough back into operation. During this overall period, the maintenance team has done all statutory maintenance required on the connected instruments and also, on other equipments.
    Question: In this case, client want to record this statutory & PM done during this breakdown on instruments/equipments and to reset the schedule such that each of the assets starts its package duration starting from this breakdown date.
    Any comments/views will be much appreciated.
    Cheers

    Your thread heading also speaks about skipping the order & you initial content talks about skipping the orders & restricting the creation of unwanted or old orders.
    So, they want to skip all PM plans during this period. Currently orders are getting generated and they are cancelling them manually with a updated status. How to stop this unnecessary order creation?
    - Can we list all M.Plans impacted and reschedule the starting date?
    You can make Maintenance plans Inactive, so that those plans will not be considered during automatic or manual scheduling run.
    Once your overhaul / suspended animation period is over, you can reschedule the maintenance plan with new start date in IP10. This rescheduling should be in only in IP10 & for each maintenance plan individually. This rescheduling should be done before next planned automatic scheduling run.
    - If we deactive the technical objects will it stop order generation? If yes, when I activate it back I shouldnt get orders from suspended animation period. I hear that the client tried it but it kick out during the entire period.
    Even you deactivate technical object or maintenance plan & again if you activate, there is a possibility of creating orders in past date. But there is some settings available (some threads are there) to restrict order creation in past dates. Please search in google.

  • Java applet plugin code for Runtime Environment 1.5 _05 & its updates

    What is the Java plugin code for jre1.5_05 & its updates so that I may Paste it in my HTML script for my website

    my applet:
    <OBJECT That's not an applet. That's a piece of HTML that loads an applet.
    We would need to see:
    1. Complete exception message and stack trace.
    2. The Java source code that threw the exception, with the line that threw it clearly marked.

  • Newbie question:  How to skip NSLog() in production code

    Is there a preprocessor flag that will turn off all the NSLog()'s in my production release? or do I need to use an if (DEBUGFLAG) NSLog (blah...) ??

    This is more of a TestStand post, you might want to think about posting it there instead.
    You can create step types from the Types view (select the View Menu -> Types or press CTRL+T).  From the Types view right click to create a new step type.
    Once you have a new step type, right click on it (in the Types View) and select Properties...  From the Step Properties dialog select the Substeps tab.  From this tab you can select to Add..  Pre Step, Post Step, Edit and Custom operations for that step type.
    I would suggest for your parsing of the SourceCode add a Pre Step, once added select Specify Module and browse to your parsing VI.  Your parsing VI will need a control that contains a reference to the VI so that you can updates its Front Panel. 
    I would suggest you also need a Post Step for building your SourceCode back up for returning to TestStand. You may want to get the Post step to return the SourceCode to a property of the new step which you can then get TestStand to access when required.
    Hope this helps
    Message Edited by SercoSteveB on 04-07-2010 09:40 AM
    https://decibel.ni.com/content/blogs/DailyCLAD

  • Executing code at runtime which will be read from a file

    I am very sure I have seen this but can't find this again.
    I want to parse a file where some java commands might be in it and then execute them when my application is already running.
    Is it possible?

    There are compiler classes in the API, but they're not openly documented and their use is rather discouraged.

  • Tag to make coldfusion skip parsing a certain block of code.

    Is there a tag to make coldfusion skipping parsing a certain code.
    Example, I want coldfusion to output the following code without executing it.
    <cfquery name="qryTest" datasource="myds">
    SELECT * FROM dual
    </cfquery>
    should result as
    <cfquery name="qryTest" datasource="myds">
    SELECT * FROM dual
    </cfquery>
    not coldfusion executing the qryTest.

    how?
    you mean the following:
    &lt;cfquery name="qryTest" datasource="myds"&gt;
    SELECT * FROM dual
    &lt;/cfquery&gt;
    not exactly what I am looking for.

  • ABAP runtime code profiler

    Hi all,
    I searched a way to perform real-time analysis of my ABAP code but I did not find it.
    Is there a profiler / run-time checker that analyzes the portions of code taking execution times?
    Thank you

    Hi Alberto,
    If you interested in analyzing portion of code, you have option in new debugger
    New Tool - > Special Tool -> Trace (SE30 /ST05) 
    New window will open with trace management . Here you can activate the trace and deactivate when portion of code competed. Then you check the log.   
    Thanks & Regards,
    Arun

Maybe you are looking for