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.

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 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.

  • 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 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

  • 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.

  • Quick Question on Arrays.fill() Method

    Does this work for a multidimensional array? I've tried and I can't get it to.
              double stuGrade[][];
              stuGrade = new double[3][125];
              Arrays.fill(stuGrade, -1); //Have also tried Arrays.fill(stuGrade[][], -1) error: Cannot resolve symbol
    symbol: method fill (double, int)
    Have imported java.util.Arrays....
    I need to set all values in atleast one row to a negative number. I haven't had a chance to look at vector (is that it?) arrays. So every element may not be populated. Since it is possible for an entry to be zero, I can't use a condition of not equal to zero to determine whether the loop should continue processing or not....
    Thank you!

    fill(double[] a, int fromIndex, int toIndex, double
    val)
    Where a is your array.... so really your just missing
    your fromIndex and toIndex... no worries.Seeing as how the OP's array is a double[][] rather than a double[], the worries will continue. The fromIndex and toIndex are optional; if he's wanting to fill a single entire array, the fill(double[] a, double val) is fine.

  • Data Control does not show POJO returned from method

    Hi,
    I am running JDev 11.1.1.7. In my AppModule.impl I created a method that returns a simple POJO (which implements serializable) that has two String fields. I have exposed the method in the appmodule client interface. In the data control the method shows up with a return element instead of an object or any way to access the two String fields. I want to display the two String fields in separate output text components on my jspx page. I'm not finding documentation on how to do this. Can somebody point me to documentation or tell me how to make this change to the data control method return?
    Thanks in advance,
    Steve

    AM method can return custom type, but AFAIK there is no support for object introspection in design time.
    (so you can invoke this programmatically and cast to appropriate type, but you can't do DnD from Data Control pane).
    So, option 1 is to bind value property of your outputText fields to managed bean, programmatically call AM method, fill these properties manually and refresh your UI components(note that managed bean must be registered in viewScope or higher to preserve values)
    Option 2 is to create Bean DataControl (with this you will have DnD support)
    Dario

  • Promise to pay and payment method

    Hi all,
    The following is the case in Collections Management. When you use the payment method in AR you will find that you will run into problem logging a P2P on items that have a payment method filled in. Now for direct debit it would be under discussion if this is correct or not since a direct debit goes thru F110 however when you have other payment method filled in (like banktranfer, payment by check or BoE) then you have a problem. Personnally i think this is a bug or conflicting functionality so i already discussed this with SAP.
    You can manually bypass the above by setting the payment block on the invoice (from the worklist) but that is a lot of work. Now my question:
    How difficult is it to create a user exit on the BSID table to fill in the payment block on the customers/ company codewith all documents that have a certain payment block?
    I was thinking to use the following variable fields in the UE:
    BSID-BUKRS u2013 Company Code
    BSID-KUNNR u2013 Customer Number
    BSID-ZLSCH u2013 Payment Method
    BSID-ZLSPR u2013 Payment Block
    Does any of you have experience with this, is it possible? Might there be another way?
    Thanks in advance
    Richard

    Hello James,
    Following are the major differences in promise to pay and installment plans
    1)When you create installments, new statistical items are created by the system using the main transaction of installments in the table of open items DFKKOP. However, new statistical items are not created in the case of promise to pay. Just a new promise to pay document is created from where you can see individual items and amount due to date etc
    2)When you create an installment, you have the option of viewing installment amounts in the account balance display or the original document(against which the installment was created). Incase of promise to pay, you cannot see individual promise to pay items in account balance display(FPL9). you only see the original document
    3)When you create an installment against a recievable, the ABWBL field in DFKKOP is updated with the document number of the installment plan created. Same is true for promise to pay documents as well
    4) Installments nt possible for items that have been sent to coll agencies. This is not true for P2P
    In my perspective, installments is a very flexible way of deferring due dates and breaking line items. If you use the functionality for doing it you will have much wider options in terms of clearing control and reporting. However, P2P(as i see it) is just an agreement with consumer and is not as flexible as installments and might make you life a little difficult
    I hope this will help. I'd suggest you also take input from other experts here. Thanks!

  • How debug a routine created in InfoPackage for Data selection ?

    Hi everybody,
    I decide to debug a routine create in InfoPackage.
    Here, the name of my ABAP routine:
    program conversion_routine
    form compute_TREATMENT_DATE
    When i execute the "/h" command to launch debugger, i don't see this routine in Call Stack...
    How i can debbug ?
    Any suggestions ?
    Thanks in advance,
    Best regards,
    Rodolphe.

    Debug ABAP Routine in InfoPackage:  
    Put a loop on the routine,
    data : debug(1).
    do.
    if debug = 'X'.
    exit.
    endif.
    enddo.
    And when run infopackage, go to sm50.
    On that process, menu program->debug program.
    In debug screen, type in debug, and fill with X and click 'edit'-pencil icon.
    F5 to next step.
    hope this helps...

  • How debug a routine create in InfoPackage for Data selection ?

    Hi everybody,
    I decide to debug a routine create in InfoPackage.
    Here, the name of my ABAP routine:
    program conversion_routine
    form compute_TREATMENT_DATE
    When i execute the "/h" command to launch debugger, i don't see this routine in Call Stack...
    How i can debbug ?
    Any suggestions ?
    Thanks in advance,
    Best regards,
    Rodolphe.

    Debug ABAP Routine in InfoPackage:  
    Put a loop on the routine,
    data : debug(1).
    do.
    if debug = 'X'.
    exit.
    endif.
    enddo.
    And when run infopackage, go to sm50.
    On that process, menu program->debug program.
    In debug screen, type in debug, and fill with X and click 'edit'-pencil icon.
    F5 to next step.
    hope this helps...

  • Debug abap routine in infopackage

    Hi experts,
    What is the easiest way to debug an abap routine used in the infopackage for dynamic selection? When I go into the code I cannot place a breakpoint. Optionally I can do a /h before hitting the schedule button but what can I look for to go directly to my abap code?
    mark

    HI
    Below is an excerpt from a reply by AHP few months back
    put a loop on the routine,
    data : debug(1).
    do.
    if debug = 'X'.
    exit.
    endif.
    enddo.
    and when run infopackage, go to sm50,
    on that process, menu program->debug program,
    in debug screen, type in debug, and fill with X and click 'edit'-pencil icon.
    F5 to next step.
    hope this helps.
    Regards
    Prakash

  • 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

  • Maybe you are looking for

    • Creation of Trusted RFC fails

      Hello I am trying to connect my ERP and BW systems to Solution Manager but I can't make Trusted RFC connections. When I checked SM59 on three systems I see `You are not authorized to logon to the target system (error code 1) I did successfully instal

    • Why doesn't my iTunes on Windows 8 doesn't recognize my iPhone 5?

      My iTunes used to regonize my iphone 5 when i was on windows 7, but i just recently upgraded it to windows 8 and the iTunes dosen't regonize it anymore. I have the most up-to-date updates for the iphone and itunes. Please help me find the solution to

    • WRT54G

      I have made wrt54g as a access point as well as 4 port hub.My wireless signal is OK. but when I tried to connect wired it does not go through.I have connected via crossover cable. Is it correct. Pl. advise Neeraj

    • Reg: Reconcilation Account Types

      HI Guru's, In Standard SAP how many  Reconcilation Account Types are available... regards JK

    • Regarding reports cache

      Dear all, In appsTier in the directory $INST_TOP/logs/ora/10.1.2/reports/cache I have more than one lakhs file in formats txt and xml which are generated from the day instance was created and the size of cache is 9.5 Gb, should I delete them or are t