Debugging methods

Hi all,
Can  you please explain procedure for debugging and how many ways debugging can be done..
thanks in advance
Mani

Hi,
System Debugging
If you set this option, the Debugger is also activated for system programs (programs with status S in their program attributes). When you save breakpoints, the System Debugging setting is also saved.
Update Debugging
Update function modules do not run in the same user session as the program that is currently running in the ABAP Debugger. These function modules are therefore not included in debugging. Only if you select the Update Debugging option can you display and debug them after the COMMIT WORK.
Normal Debugging
Normal debugging is the one we do it by the normal dynamic break points or by /H or by using stattic break points.
http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/frameset.htm
For debugging tutorial:
http://help.sap.com/saphelp_erp2005vp/helpdata/en/5a/4ed93f130f9215e10000000a155106/frameset.htm
http://www.sapdevelopment.co.uk/tips/debug/debughome.htm
http://www.sap-basis-abap.com/sapab002.htm
Debugging Document.
http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/84/1f624f4505144199e3d570cf7a9225/frameset.htm
http://help.sap.com/saphelp_bw30b/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
~~Guduri

Similar Messages

  • Help Debugging method

    Hi:
    Can someone help me debug and correct following program?
    The error message I receive is Exception in thread "main" java.lang.StringIndexOutOfBoundsException:
    String index out of range: 1
    at java.lang.String.charAt(String.java, Compiled Code)
    at RemoveDuplicates.key(RemoveDuplicates.java, Compiled Code)
    at RemoveDuplicates.main(RemoveDuplicates.java:12)
    The code is as follows:
    class RemoveDuplicates
    public static void main(String args[])
    String keyword = args[0];
    System.out.println(key(keyword));
    public static String key(String keyword)
    {String temp = "";
       for(int i = keyword.length()-1; i > -1 ; i--)
       if(i == keyword.indexOf(keyword.charAt(i)))
        temp = keyword.charAt(i)+ temp;
        keyword = temp;
    return keyword;
    If I change the code as follows it will run without error but I need to put the code in a method as part of a larger program.
    class RemoveDuplicates
    public static void main(String args[])
    String temp = "";
    String keyword = args[0];
    for(int i = keyword.length()-1; i > -1 ; i--)
    if(i == keyword.indexOf(keyword.charAt(i)))
    temp = keyword.charAt(i)+temp;
    keyword = temp;
    System.out.println(keyword);

A: Help Debugging method

Here's your method corrected - albeit with some renamed variables, a variable addition and some reformatting...
  public static String removeDuplicates(String s)
    String temp = "";
    for(int i = s.length()-1; i >= 0 ; i--)
      char c = s.charAt(i);
      if(i == s.indexOf(c))
        temp = c + temp;
    return temp;
  }The only functional change is the removal of the line in the if statement body of "s = temp"... This would cause the StringIndexOutOfBounds and would also lose the as yet unprocessed characters.
Here also is a version which trades off a higher memory usage to avoid creating a lot of Strings and rescanning the original String...
  public static String removeDuplicates(String s)
    boolean[] foundChars = new boolean[Character.MAX_VALUE+1];
    StringBuffer sb = new StringBuffer(s.length());
    for(int i = 0, j = s.length(); i < j; i++)
      char c = s.charAt(i);
      if(!foundChars[c])
        foundChars[c] = true;
        sb.append(c);
    return sb.toString();
  }Hopefully these both work...
Talden
PS: Don't forget those dukes...

Here's your method corrected - albeit with some renamed variables, a variable addition and some reformatting...
  public static String removeDuplicates(String s)
    String temp = "";
    for(int i = s.length()-1; i >= 0 ; i--)
      char c = s.charAt(i);
      if(i == s.indexOf(c))
        temp = c + temp;
    return temp;
  }The only functional change is the removal of the line in the if statement body of "s = temp"... This would cause the StringIndexOutOfBounds and would also lose the as yet unprocessed characters.
Here also is a version which trades off a higher memory usage to avoid creating a lot of Strings and rescanning the original String...
  public static String removeDuplicates(String s)
    boolean[] foundChars = new boolean[Character.MAX_VALUE+1];
    StringBuffer sb = new StringBuffer(s.length());
    for(int i = 0, j = s.length(); i < j; i++)
      char c = s.charAt(i);
      if(!foundChars[c])
        foundChars[c] = true;
        sb.append(c);
    return sb.toString();
  }Hopefully these both work...
Talden
PS: Don't forget those dukes...

  • How to debug method of object of worklfow in background

    Hi guys,
    Is it possible to debug method of object of workflow which is set in background?
    Thanks!

    Hi
    Refer to link below
    Re: Debug workflow task
    Hope it will help you.
    Regards
    Natasha Garg

  • Debugging methods used in BSP

    In my BSP, there is a method of a particular class being used to populate some table which is being displayed in the front end. I want to set a break-point on the method so I could see on runtime how & from where is it fetching data. Could anyone guide me on the same please. Thanks in advance.
    Regards.

    Hi,
    Please check the below links :
      https://www.sdn.sap.com/irj/sdn/wiki?path=/display/bsp/debugging+problems
      http://help.sap.com/saphelp_nw2004s/helpdata/en/17/00ab3b72d5df3be10000000a11402f/frameset.htm
    Hope these helps...
    Regards,
    Prakash.

  • How can i find (Debug - method) the flow of program in workflow at run time

    Hi All,
    I working in Workflow monitoring. When a workflow is set into error in SWPR , i need to analyse the error and report it. In many cases the error happens in the method of class / BOR. So i could not find out the what happens inside the method. I am doing this in an productive environment.i am not given to Run any METHOD or BOR or CLASS ? How can i make my workflow monitoring better to show exact error ?
    Thanks in advance !
    Richard A

    Dear Richard,
    You cannot debug a method by directly setting a break point as we do normally.....u can do this by
    just putting an infinite loop at the point where u want to set the debug point inside the method.
    Execute the workflow where this method is being used.
    Then go to SM50, here you will find your method which has gone into infinite loop.I debug mode change the value of the variable so that it can move ahead of the infinite loop.
    Now you can debug easily and find out where the problem lies.
    Do reply back in case of any query or even if yr problem is resolved.
    Regards,
    Geet

  • Debugging method fill _po_interface

    Hi,
    is there any way to debug the method fill_po_interface in an implementation of the badi BBP_CREATE_PO_BACK even if it is the user WF-BATCH (system user ) who runs it after the last step of the workflow validation before creating the purchase order in the R/3 system from SRM.
    In fact,is there any trick to debug RFC call ?
    Thank you in advance.
                           Best regards Mahmoud

    I am going into debugging mode .Thanks very much for that.
    Now I am trying to Pass some field values into a container element by using the below statement.
    in my ABAP program.
    SWC_SET_ELEMENT t_cont 'L_DATE' WA_PROC01-SPPDAT.
    where I am fetching a date value into the workarea wa_proc01.
    L_DATE is my WF Container element and t_cont is of type swcont.
    And while debugging the method I wrote in the method or the BO as below.
    DATA :w_task TYPE swwwihead-wi_rh_task VALUE 'WS90600050'.
    SWC_GET_ELEMENT t_cont 'L_DATE' WA_PROC01-SPPDAT.
    CALL FUNCTION 'SAP_WAPI_READ_CONTAINER'
    to read the values of the container at runtime.
    But I dont see any container elements in there.
    Pls let me knw where I am gettting wrong.
    I did this much seeing some previous threads.
    Regards,
    Krishna.

  • Debugging Method of a Custom BO used in WF.

    Hi All,
                 This may be a very silly doubt ,but tried searching some existng threads but could'nt find a useful one for my issue.
    I have created a custom BO in swo1 .Created some methods for fetching data form database.
    I am triggering my event from a program using Swe_event FM at a point where I fill some details in a custom screen and once the SAVE button is clicked.
    Here everything works fine , it triggers the event , eventually my workflow and I see the task in my SAP inbox too.
    But my issue is ,I want to use the values entered in the screen in my WF decision,I knw I can write a COMMIT WORK statement .
    I want to know if I can debug my method while executing the process.
    If I tet run my method it stops at the Break points,but it never stops while I run the whole process.
    I tried doing System debugging On , Update debuggng On , break wf-batch , break "my userid" .
    Nothing works,i mean it doesnot stop.
    Pls suggest a way for this,so that I can debug my methods at runtime.
    Regards,
    Krishna.

    I am going into debugging mode .Thanks very much for that.
    Now I am trying to Pass some field values into a container element by using the below statement.
    in my ABAP program.
    SWC_SET_ELEMENT t_cont 'L_DATE' WA_PROC01-SPPDAT.
    where I am fetching a date value into the workarea wa_proc01.
    L_DATE is my WF Container element and t_cont is of type swcont.
    And while debugging the method I wrote in the method or the BO as below.
    DATA :w_task TYPE swwwihead-wi_rh_task VALUE 'WS90600050'.
    SWC_GET_ELEMENT t_cont 'L_DATE' WA_PROC01-SPPDAT.
    CALL FUNCTION 'SAP_WAPI_READ_CONTAINER'
    to read the values of the container at runtime.
    But I dont see any container elements in there.
    Pls let me knw where I am gettting wrong.
    I did this much seeing some previous threads.
    Regards,
    Krishna.

  • Debug method for workflow OEOL (OM: Order Line)

    Hi,
    The workflow OEOL encouter an unknow exception. We want to enable the debug for the workflow, anybody know how to do it , please share.
    Best Regards
    Terrence

    In the workflow there are different activities in OEOL
    Some of them are synchonized activities & others are notified/Deffered activities.
    Which type of activity that you want to debug ?
    if the activity that you are trying to debug is deffered/notified then try as below :
    1) Hold the workflow background process & any other programs that are designed to push the line from Notified activity ie Shcedule orders program will push the line in schedule eligible activity.
    2) Enabel OM debug level at user level and try to progress the line if it is in notified activity or submit workflow background process program with the current user.
    If this is test environment & you know the specific plsql part you want to debug, put OM debug initialization statement in plsql so that you would be able to get the deubg info.
    Hope this helps.

  • UITabBarItem Category giving error on Device | Debug ONLY!?!?

    Hello guys! I have an issue that is puzzling me. I've created a category for UITabBarItem and it looks like this:
    @implementation UITabBarItem (UITabBarItemCategory)
    -(void)setImage:(UIImage*)image{
    if(image == NULL){ //might be called with NULL argument
    return;
    _image = [image retain];
    _selectedImage = [image retain];
    @end
    And here is my implementation in my ViewController subclass:
    #import "MainScreenViewController.h"
    #import "UITabBarItemCategory.h"
    @implementation MainScreenViewController
    - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
    // Initialization code
    self.title = NSLocalizedString(@"main_tab_title","Main screen tab button");
    [self.tabBarItem setImage:[UIImage imageNamed:@"TabBarItemMain.png"]];
    return self;
    The intention of this is to customize the images displayed in the UITabBarController because the blue chrome color don't fit inside my design. It works like a champ in the Simulator however, when I try to run this in my iPhone device using the "Device|Debug" method, I get the following compilation error:
    "_OBJC_IVAR_$_UITabBarItem._image", referenced from:
    _OBJC_IVAR_$_UITabBarItem._image$non_lazy_ptr in UICategory.o
    "_OBJC_IVAR_$_UITabBarItem._selectedImage", referenced from:
    _OBJC_IVAR_$_UITabBarItem._selectedImage$non_lazy_ptr in UICategory.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    Build failed (2 errors)
    Could this be an Xcode bug? Am I doing something wrong?
    Conceptually, I should be able to access these private variables because I'm extending UITabBarItem.
    The other option will be to subclass the UITabBarItem and use it's drawRect method, however I don't know how to init the object because it's managed by a ViewController.
    Any tips and suggestions will be highly appreciated.
    -ML

    I am having the same problem.
    I have sublassed UITabBarController
    DATabBarController.h
    #import <UIKit/UIKit.h>
    @interface DATabBarController : UITabBarController {
    @property (nonatomic,readonly) UIView *containerView;
    @property (nonatomic,readonly) UIView* viewControllerTransitionView;
    @end
    DATabBarController.m
    #import "DATabBarController.h"
    @implementation DATabBarController
    - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
    // Initialization code
    return self;
    -(UIView*) viewControllerTransitionView
    return _viewControllerTransitionView;
    -(UIView*) containerView
    return _containerView;
    - (void)dealloc {
    [super dealloc];
    @end
    The error I get is:
    "_OBJC_IVAR_$_UITabBarController._viewControllerTransitionView", referenced from:
    _OBJC_IVAR_$_UITabBarController._viewControllerTransitionView$non_lazy_ptr in DATabBarController.o
    "_OBJC_IVAR_$_UITabBarController._containerView", referenced from:
    _OBJC_IVAR_$_UITabBarController._containerView$non_lazy_ptr in DATabBarController.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    The bizarre part is that it works quite nicely on the Simulator, but on the iPhone it won't compile.
    I found this statement on Apple's documentation:
    "This class is not intended to be subclassed."
    Link: [UITabBarController|http://developer.apple.com/iphone/library/documentation/UIK it/Reference/UITabBarController_Class/Reference/Reference.html]
    Why would it work in the Simulator?
    If either of you figured it out, I would be great to learn what you have discovered.
    Thanks,
    James

  • Determine debug status in ABAP

    Is there a way to determine that a program is being run in debug mode?
    I would like to be able to use transaction /h and then subsequently run a program and the program act differently depending on whether the debug method is being used.
    I though system field SY-DEBUG would change but it does not appear to be different if the debug is run or not.
    My end goal is to be able to access Bex Customer Exits when the report is run in a web application. Pehaps there is a way to activate debugging for this.

    Hi Ross,
    Have you tried External Debugging at all to debug your program?
    Cheers,
    Neil.

  • Compiling differently for debug and release

    I want to produce slightly different .class files for my debug and release compilations. For debug, methods like toString() should return rich information which should not be present in the release version. In fact, I want most of my debug specific code to not be included in the final release to keep ti's file size down.
    I realise I can do this by creating something like
    public interface MyGlobals {
        static final boolean DEBUG = false;
    }and implementing this on any class that needs to do debug specific work. However, I'm in a bit of a chicken and egg scenerio. This file needs to exist during development time so that every class that needs it can implement it - however, this would prevent me from dynamically changing it based on whether I'm doing a debug or release build. On the other hand, if the file is generated automatically at compile time, all the classes that need to refer to it will need to refer to a non-existant source file, which will cause problems in my NetBeans IDE.
    Is there a way around this? It would be nice if there was some sort of a configuration file you could specify to to alter how the code is generated. Something similar to C++ #ifdef.

    I realise I can do this by creating something like
    public interface MyGlobals {
    static final boolean DEBUG = false;
    /code]You should be careful about this, by the way, rember that this kind of constant value gets compiled in to classes that reference it, and java doesn't always pick up the need to recompile when the source of MyGlobals changes.
    On the other hand, if you don't declare it final then the compiler can't optimise out code that you want it to exclude for you.

  • Debugging LabVIEW/Bl​ackfin applicatio​n is VERY SLOW...

    Hey guys,
    I am working through the evaluation example programs for LabVIEW Embedded for Blackfin, and I'm using various debug channels (instrumented, non-instrumented), but I do not have an emulator....
    I have found that the debugging (breakpoints, single-stepping, etc.) is extremely slow and painful....is this a non-issue with an emulator ($4000!)?
    I can't see where debugging with the non-emulator channels is practical....I'm hoping that an emulator (ADI-HPUSB-ICE or equivalent) solves the problem and behaves more like a local debugger when single-stepping and such...
    Does anyone have any experience with development and debug using an emulator vs. the slower speed intrusive debug methods?
    Thanks,
    Larry

    Hey,
    I use the yellow crossover cable that came with my EZ-Kit.
    As I stated earlier, I make sure that the only ethernet connection that is "live" is the one connected to the EZ-Kit.
    I use the Processor Status window to view the current state of the connection with the board.   Sometimes, I find that I have to press the Debug button on the project window, then Cancel the connection to get the board to HALT.  I have reached a point where I don't need to hard-reset or unplug the board very often.
    I have attached screen shots of the Build Options panels that I am using now.
    Hope this helps,
    Larry
    Attachments:
    BuildOptions3.png ‏16 KB
    BuildOptions1.png ‏12 KB
    BuildOptions2.png ‏11 KB

  • How to debug IPC program?

    I need debug FM IPC_CHANGE_ITEM_CONFIG, when it calls virtual machine container, a window is pop-up, says 8003 port is opened... I am new to CRM and don't know how to do next, may anybody do me a favor?

    hi,
    The debugging method you explained is not possible for IPC because it is sitting upon VMC.
    Please refer below documents how to do ipc debugging .
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e0e8b21b-e1b4-2c10-49b5-fd6a95162976
    http://help.sap.com/saphelp_nw70/helpdata/EN/47/54eff154cd0a1fe10000000a42189d/frameset.htm
    Thanks and Regards
    shanto aloor

  • Method BUS1001006.CreateViews

    If you make use of Method 'CreateViews' in Business Object BUS1001006 it appears you get a bit of problem when a user tries to execute the workitem if you don't restrict the input parameter 'ViewListLine' to a single entry.
    Let's say a Material needs a couple of extra views completing, standard SAP makes sure you SAVE the current view before you move on to the next view.  But of course saving in the middle of a workitem causes a problem and you get a returned error 'the group data for the material XXX is locked by user YYY'.
    Any ideas on how to get through this?
    Of course you can loop through the uncompleted views one by one, but this is likely to get irritating for users needing to process alot of materials.

    Hi,
    Yeah, i debugged method in SWo1, it is working properly.
    Also that activity step is getting completed, after executing that code.
    But, prob is, control is not returning to main WF after executing all steps in sub WF, if i have that code.
    if i comment it, control is returning back to main WF.
    somehow, seems to be some commit work issue.
    I changed the above code & calling BAPI BAPI_MATERIAL_EDIT instead of MM02.
    it is working fine, but, i cant go directly to particular view with BAPI.
    regards.
    santosh.

  • Debug SAP Retail store

    Hi SAPers,
                 I was wondering how i can debug a goods movement transaction in SRS? I want to find out the underlying logic for the "Refresh" button in the Goods movement transaction.
    Thanks in advance.
    Regards,
    James

    I have found out just 2 debugging methods:
    1. Debug ITS Components with ABAP Debugger - described in ITS Administration Guide
    2. Use the endless loop within appropriate transaction (for example, WHILE ... ENDWHILE). And after that debug through tr. SM50 (R/3 side) - there will be hung up process.
    The secong one I like more from my experience - but none of those are perfect.
    Best regards,
    Rorijs

  • Maybe you are looking for

    • Use of NACE after creating print program n smart form

      Wat's d purpose of NACE?I hav created my own print program n smart form according to my own requirement.If NACE is necessary 4 my smart from.How can i use NACE i mean navigation steps. Please help me out.Its urgent. Thanks & Regards, Santhosh.

    • Set up a WDS with Express an DLink

      Is it possible to set up a WDS with AP Express and Dlink 614+ or you need to use only apple products for that? I would like to use DLink as an extra antenna for my AP Express. KR

    • Attachments appear missing in CRM 7.0 after Upgrade from 6.0

      We use CRM for SSMS functionality to create help desk tickets which can have documents attached to them which are stored in and retrieved from content server. All was well in the land of CRM 6.0. Since the upgrade to CRM 7.0, when viewing an SSMS tic

    • Hi have problem with opening a image for raw or photoshop

      I just purchused CS5 on line this is a download upgrade. When I go to open a raw image it automaticaly opens in internet explorer. or when I go to File/ open with/  it says- internet explorer 8 (default). how can I change this to open in raw when I c

    • Modbus RTU - Reading Holding registers problem - Novus myPCLab

      Hello, I'm trying for a few days to read Holding registers in Novus myPCLab (it uses Modbus RTU protocol). I used both DSC module and Modbus library with no success (it appears to connect correctly but cant read). I need to read the given current. Do