Debug ABAP code in InfoPackage

Hi friends,
How i can debug a ABAP code from a variable selection in Infopackage?
Thanks,
EA

I guess you would have figured it out - but for the use of people who might chance upon this post while searching ...
to debug the ABAP code in an Infopackage - you need to run it in dialog mode ( Start Data Load Immediately ) and not in background. This is because background processes cannot be debugged.

Similar Messages

  • Debugging ABAP Code From Within WebDynpro

    Hi experts,
    I would like to check whether i can debug ABAP code from within webdynpro if i m using a remote J2EE server.
    So netweaver development studio is on my machine
    J2ee server is on a remote machine
    R/3 is also on another remote machine
    Thanks.
    Rgds,
    Daniel

    Hi Daniel,
    One thing note here is
    "You have debugging authorization in the ABAP Workbench in the relevant system.
    Since debugging in the ABAP system via load balancing is not supported, you must reconfigure your JCO destinations so that the calls take place on a dedicated ABAP application server. For Web Dynpro, this is done in the Web Dynpro Content Administrator. In the destination maintenance, specify Single Server Connection as the Destination Type ".
    Other than that ideally it works with j2ee and abap on diff systems.
    Regards
    Ayyapparaj

  • 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

  • Date range selection in abap code in infopackage

    Hi!
    I have a field called "OPEN_DATE".
    When the infopackage is runned, I need the abap code to fint the current date, and from that, make a date range from the first day of current month to the last day of current month
    Ex:
    Current date = 12.12.2008
    Abap code should extract 01.12.2008 - 31.12.2008
    Thanks!

    Hi helge,
    Data: l_idx like sy-tabix.
    Data: date_low like sy-datum,
             date_high like sy-datum.
    Date_low = sy-datum.
    date_low+6(2) = '01'.
    CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
      EXPORTING
        DAY_IN                  = Date_low
    IMPORTING
       LAST_DAY_OF_MONTH       = date_high
    read table l_t_range with key
    fieldname = 'OPEN_DATE'.
    l_idx = sy-tabix.
    Pass Range values to L_T_Range Table.
    Move date_low to L_T_Range -Low.
    Move date_high to L_T_Range -High.
    L_T_Range -Sign = u2018Iu2019. *****(Here: I u2013 Include, E u2013 Exclude)
    L_T_Range -Option = u2018BTu2019.****( Here: BT u2013 Between )
    modify l_t_range index l_idx.
    p_subrc = 0.
    Regards,

  • How To debug ABAP code using sapui5 application on NWBC

    Hi All
    I am working on NWBC with SAP_PAO_HRPROFESSIONAL_3 Role. This role contains SAPUI5 application. I am trying debug the ABAP code called while executing this application.
    Please help me how to get into ABAP debugger while executing this application.
    Thank you
    Ujj

    HI Ujj,
    First thing to do is look at the role and see which UI5 application is being executed. The UI5 application will be running in the web container of NWBC, you can make it open in a standalone browser (hold down the CTRL key in NWBC and go to the Help Menu) and then turn on the debugging tools (F12) in the browser. There you will see which Gateway services are being called. You will need to set your ABAP breakpoint in the implementation of the Gateway services. Find the class in SE80.
    Hth,
    Simon

  • Debugging ABAP Code From Within Webdynpro Application

    Hello Experts,
    We use ABAP RFC Function in Our Java Webdynpro application, We need to debug the parameters pass from the webdynpro application to the ABAP Function.
    In order to do that we:
    1. Defined a JCO connection with "Single Server Connection" as the Destination Type.
    2. We have loged on to the relevant system and client using SAP GUI with the same user that run the webdynpro application.
    3. We have activate the external debugging in se80 Utilities -> Settings
    4. We have set an HTTP (external) breakpoint in the ABAP code,
    As mentioned in the article:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0e9a9d90-0201-0010-478e-991dbea73a30
    However, we recieve a dump in the R3 system:
    RFC_DEBUGGING_NO_DIALOG_USER
    ShrtText
    RFC debugging is only possible with dialog user
    What happened?
    You attempted to debug a program by RFC. However, in this destination
    there is a user whose user type permits communication without dialog.
    This means, for example, that debugging with a system user is not
    possible.
    What can you do?
    Restart the program and take note of the following:
    You can do one of the following:
    1. You can change the user listed in the RFC destination and enter a
    dialog user.
    2. In the target system of RFC you can change the user type of the user
    listed in the RFC destination to 'dialog'.
    3. You can avoid this runtime error by omitting the RFC debugging.
    If in the ABAP debugger the statement cursor points to the statement
    (CALL FUNCTION ... DESTINATION), you must choose the function
    'Execute'.
    We checked and the user we use is defined as dialog in SU01 and the user that the webdynpro use to call the functio is the same user as was logged in.
    What else should we do?
    Thanks,
    Eyal

    Hello Eyal,
    You mentioned the following..
    1. Defined a JCO connection with "Single Server Connection" as the Destination Type. 2. We have loged on to the relevant system and client using SAP GUI with the same user that run the webdynpro application.*<---The system that you logged into is your source system*
    3. We have activate the external debugging in se80 Utilities -> Settings
    4. We have set an HTTP (external) breakpoint in the ABAP code,
    and the name of the system defined in the RFC connection will be your target system.
    As per the response (dump error message) in this target system you need to have a dialog user.
    And this dialog user needs to be defined in the RFC destination that is being used to connect to the target system.
    Regards,
    Siddhesh

  • Debug ABAP code used for ABAP mapping

    Hi Experts,
    I have worked on Abap mapping. I have executed the code in SE24 to acheive desired mapping and the desired output is also generated.
    attached below is a part of the code i have used:
    method IF_MAPPING~EXECUTE.
    * initialize iXML
      TYPE-POOLS: ixml.
      CLASS cl_ixml DEFINITION LOAD.
    * create main factory
      DATA: ixmlfactory TYPE REF TO if_ixml.
      ixmlfactory = cl_ixml=>create( ).
    * create stream factory
      DATA: streamfactory TYPE REF TO if_ixml_stream_factory.
      streamfactory = ixmlfactory->create_stream_factory( ).
    * create input stream
      DATA: istream TYPE REF TO if_ixml_istream.
      istream = streamfactory->create_istream_xstring( source ).
    * parse input document =================================================
    * initialize input document
      DATA: idocument TYPE REF TO if_ixml_document.
      idocument = ixmlfactory->create_document( ).
    * parse input document
      DATA: iparser  TYPE REF TO if_ixml_parser.
      iparser = ixmlfactory->create_parser( stream_factory = streamfactory
                                            istream        = istream
                                            document       = idocument ).
      iparser->parse( ).
    I just want to debug and see if an input is provided how does each of these methods make a difference to it.
    I tried to input some value in the SOURCE parameter on executing the code but it is not working fine.
    Could you please suggest hiw i should go about so that i can see the exact way the input Xstring is affected by each of these methods in the debugger.
    Help will be appreciated.
    Many thanks,
    Neha
    Edited by: Neha Nagrani on Jul 7, 2008 11:46 AM

    Hi Neha,
    Write a Small Report as Folows:
    1.  Create your XMl payload of Type xSTRING.
    2.  Call the method EXECUTE
    Place a Breakpoint on the method. and then keep debugging inside.
    the SetParamter method is obviously called from inside.
    This is the Simplesrt Solution.
    Reward points if useful
    Regards,
    Abhishek

  • How to debug ABAP code

    Hi Gurus,
    Can anyone please tell me how to debug code written in EXIT for extractions.
    If possible please provide me a step by step approach.
    Thanks
    Regards,
    aarthi
    [email protected]

    Hi Dinesh,
    Thanks for your prompt reply.
    That is where, I am facing the problem. I know how to set break point. But, how to check the required field value, which key to press to reach the break point directly, etc. I need to know these kind of this.
    Can you please provide details about those things.
    Thanks
    Regards,
    aarthi
    [email protected]

  • ABAP code to set Infopackage Monitor to "RED" status?

    Hello,
    I have an Infopackage that is using ABAP code to determine the selection values dynamically for an Infoobject during the load (Type: 6 ABAP routine).  We have built in customer error checking on the selection values based on our requirements.
    In the event of an error I need to do the following:
        -Set the 'Total' and 'Technical' color status to "RED" in monitor.
        -Define custom error message in "Status" tab of monitor for load.
    Does anyone know how to accomplish this?  Links to an example or previous thread will be appreciated.
    Thank you,
    Brian
    Message was edited by:
            Brian

    The status of a particular request is stored in the table RSREQDONE. You can have an abap code to modify the entries of the field TSTATUS (technical status of the request) in this table for the given request number.
    Example:
    Value of @5B@ for this field denotes that this request is successful (GREEN)
    FYI, I am not sure how recommendable this process is coz I never implemented before.

  • How to Debug a ABAP code running the background in Portal

    How can I debug a ABAP code running in the background while executing a transaction code through portal.
    e.g Presently I have to incorporate some checks in the portal. For that I know the function module where i need to put though checks. Now I want to know, how does the code during runtime. What values do we get in the function module. For this I need to get into the debugging mode while executing the portal.
    So how can we do that???

    Namit,
    it doesnot matter whether it is a standard funtion module or a custom one .check whether you are debugging for proper user(portal user and backend user are same) and check debugging is activated

  • Detect DEBUG mode in ABAP code

    Hi all,
    Is there a way to detect that we are in DEBUGGING mode in ABAP code.
    I need to determine this, because we have function modules that will be runned in a separate process in the background. If i could detect DEBUG mode, i could choose not to run these modules in the background, making debugging them possible.
    Regards,
    Rob.

    When you debug a program that calls function modules using the IN BACKGROUND TASK addition, they are processed in a background work process (additional internal session). If you set the In background task: Do not process option, the system collects the function calls, but does not start the background work process. The Debugger assigns a transaction ID, which identifies the background work process uniquely. You can now start the Debugger for the background work process using transaction SM58. You can select the function module concerned here, and then execute it via the Edit menu.
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617d0ce68c11d2b2ab080009b43351/frameset.htm
    There is a system variable SY-DEBUG, not sure if it works, though.
    Regards,
    Subramanian V.

  • ABAP Code Date Selection for InfoPackage Scheduler

    Hello Group
    I need to automate the selection of valid condition records for an extraction that have a From and To date range.
    I noticed there is an option (Routine for time interval) to write ABAP code along with a template that is available in the InfoPackage.
    I think the logic for the selection would be any record
    Valid from       <= today
    Valid to           >= today
    Can anyone help with the ABAP code?
    The template is as follows:
    program conversion_routine.
    Type pools used by conversion program
    type-pools: rsarc, rsarr, rssm.
    tables: rsldpsel.
    Global code used by conversion rules
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
    form compute_time_dependent_dates
      changing p_datefrom type d
               p_dateto   type d
               p_subrc like sy-subrc.
          Insert source code to current selection field
    $$ begin of routine - insert your code only below this line        -
              p_datefrom =
              p_dateto   =
              p_subrc = 0.
    $$ end of routine - insert your code only before this line         -
    endform.
    Thank You for your help!!
    Frank

    I resolved the problem . I have changed the order of read table l_t_range because I need the header .
    In the loop at datos I add the line l_t_range-iobjnm = 'ZXGE_UNO'.
    The problem wasn't the call RFC it was that I built l_t_range bad. I need the infoObject name.
    This is correct!!
    READ TABLE L_T_RANGE WITH KEY
             FIELDNAME = '/BIC/ZXGE_UNO'.
    LOOP AT DATOS.
          L_T_RANGE-FIELDNAME = '/BIC/ZXGE_UNO'.
          L_T_RANGE-IOBJNM = 'ZXGE_UNO'.
          L_T_RANGE-SIGN = 'I'.
          L_T_RANGE-OPTION = 'EQ'.
          CONCATENATE '00' DATOS-WA+3(4) INTO L_T_RANGE-LOW.
          APPEND L_T_RANGE.
        ENDLOOP.
    *READ TABLE L_T_RANGE WITH KEY+
    +*FIELDNAME = '/BIC/ZXGE_UNO'.+
    +*    L_IDX = SY-TABIX.+
    +*    MODIFY L_T_RANGE INDEX L_IDX
    Thanks a lot
    Ana

  • How to Stop at Source System's Abap Code from BI Infopackage Trigger

    Hi Experts,
    I have enahanced 2 fields to some standard data source, that fields data is comiong fine to RSA3 in Source system.
    i am not getting 2 fields data to BI  PSA, but that 2 fields data  i am getting at in RSA3 Tcode  source system.
    i have tried all the ways to get data to BI PSA, but no luck.
    so, while running infopacke from BI i need to stop  at  Source System's Abap code where i have wriiten the code for those 2 fields.
    so, please any  one can explain, how to stop at source system's Abap Code once i  trigger infopackage from BI.
    Regards,
    Nagaraju K.

    Hi,
    which data source on your working?
    master data or transaction data
    enter the TCODE- CMOD
    choose the project
    select the funciton exit - EXIT_SAPLRSAP_001 - Transaction data
                                        EXIT_SAPLRSAP_002 - master data attr
                                        EXIT_SAPLRSAP_003 - mster data text
                                        EXIT_SAPLRSAP_004 - master data hier.
    choose the include program - ZXRSAU01.
    go to source code tab -> go to change mode -> find the code will start form here
    EX- : when " ZLIS_13_VDITM
    if not required don't put break-point .
    just comment it code.
    Thanks,
    Phani.

  • Sample ABAP code for userexits, and calling bapi's

    Hi,
    Can someone please send me sample ABAP code
    1) to do extractor enhancement using user exit.
    2) ABAP program to call BAPI to read live cache order series data in SNP and write to Idocs through some ports.
    3) ABAP routine to generate file name (based on date/country)in the infopackage to upload flatfiles.
    Thank you very much in advance and appreciate any help.
    Regards
    Prasad

    hai ,
    check this code...
    *& Tables
    tables : tstc,     "SAP Transaction Codes
             tadir,    "Directory of Repository Objects
             modsapt,  "SAP Enhancements - Short Texts
             modact,   "Modifications
             trdir,    "System table TRDIR
             tfdir,    "Function Module
             enlfdir,  "Additional Attributes for Function Modules
             tstct.    "Transaction Code Texts
    *& Variables
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    *& Selection Screen Parameters
    selection-screen begin of block a01 with frame title text-001.
    selection-screen skip.
    parameters : p_tcode like tstc-tcode obligatory.
    selection-screen skip.
    selection-screen end of block a01.
    *& Start of main program
    start-of-selection.
    Validate Transaction Code
      select single * from tstc
        where tcode eq p_tcode.
    Find Repository Objects for transaction code
      if sy-subrc eq 0.
        select single * from tadir
           where pgmid    = 'R3TR'
             and object   = 'PROG'
             and obj_name = tstc-pgmna.
        move : tadir-devclass to v_devclass.
        if sy-subrc ne 0.
          select single * from trdir
             where name = tstc-pgmna.
          if trdir-subc eq 'F'.
            select single * from tfdir
              where pname = tstc-pgmna.
            select single * from enlfdir
              where funcname = tfdir-funcname.
            select single * from tadir
              where pgmid    = 'R3TR'
                and object   = 'FUGR'
                and obj_name = enlfdir-area.
            move : tadir-devclass to v_devclass.
          endif.
        endif.
    Find SAP Modifactions
        select * from tadir
          into table jtab
          where pgmid    = 'R3TR'
            and object   = 'SMOD'
            and devclass = v_devclass.
        select single * from tstct
          where sprsl eq sy-langu
            and tcode eq p_tcode.
        format color col_positive intensified off.
        write:/(19) 'Transaction Code - ',
        20(20) p_tcode,
        45(50) tstct-ttext.
        skip.
        if not jtab[] is initial.
          write:/(95) sy-uline.
          format color col_heading intensified on.
          write:/1 sy-vline,
          2 'Exit Name',
          21 sy-vline ,
          22 'Description',
          95 sy-vline.
          write:/(95) sy-uline.
          loop at jtab.
            select single * from modsapt
            where sprsl = sy-langu and
            name = jtab-obj_name.
            format color col_normal intensified off.
            write:/1 sy-vline,
            2 jtab-obj_name hotspot on,
            21 sy-vline ,
            22 modsapt-modtext,
            95 sy-vline.
          endloop.
          write:/(95) sy-uline.
          describe table jtab.
          skip.
          format color col_total intensified on.
          write:/ 'No of Exits:' , sy-tfill.
        else.
          format color col_negative intensified on.
          write:/(95) 'No User Exit exists'.
        endif.
      else.
        format color col_negative intensified on.
        write:/(95) 'Transaction Code Does Not Exist'.
      endif.
    Take the user to SMOD for the Exit that was selected.
    at line-selection.
      get cursor field field1.
      check field1(4) eq 'JTAB'.
      set parameter id 'MON' field sy-lisel+1(10).
      call transaction 'SMOD' and skip first screen.

  • Using BAPI's in ABAP code

    Hi bapi Guru's,
    I am asked to use bapi's(Instead of BDC's) for data upload .I am not getting good documentation on 'USING BAPI's IN ABAP',Like Defining structures, and what are the FM's to be called like bapi_commit.
    Any Info is Appriciated.
    Regards
    satish

    Sorry Satish,
    Maybe this is going off topic a little, bit perhaps also its relevant as you have been asked to move from BDC's to BAPIs.
    Juan,
    When I talk about debugging, there are two levels to this:
    <b>1. Debugging by the programmer</b>
    In this case, how can it be easier to debug an error from a BAPI than from the screen?  For a sales order, for example, when you enter a delivery date of 01.01.2000 for an item, via BDC you will get an error message as the item is entered (something along the lines of delivery date is in the past), and you will see exactly the date you have entered, and if you don't understand the error, you can click on F1 and it will give you the long description of the error.  Via a BAPI, you would get the error message, and you MIGHT get the item number and the date in question.  But if you don't understand the error what do you do then?  Debug the BAPI itself?  You could, but isn't this a rather lengthy way to get to the root of the problem?  In general, any errors you get calling BAPIs/BDCs are errors with your master data, or breaking business rules, you shouldn't have to debug standard code to tell you whats going wrong, the application can tell you.
    <b>2. Debugging by the end user</b>
    When you implement a BAPI/BDC this will be related to an interface/automated transaction etc.  When its in production you will occassionally get errors (due to bad master data, not fully capturing all the business logic in your custom coding [it happens], technical issues etc.)  What do you do then?  In the case of BDC you can do nothing.  The error is recorded, and you can get end users to process the errors by stepping through the screens (which they already know how to use) and make corrections as required.  In the case of BAPIs, you have to record the error in a table or a file, then develop some kind of interface to display the errors, then develop some kind of process for re-processing the errors.  If the data used to call the BAPI is not correct then you also need to provide a facility for changing the data before reprocessing.  Normally you do none of this because its too much work and you end up having all errors coming back to the SAP team who have to debug and change table entries etc. to get it all to work.  I would not say that this makes BAPIs easier to debug.
    Oops, just realised my pasta is burning!!!
    Anyway, think I got my point across.  Not personal but feel quite strongly about this topic.  To me BDC's are still a relevant tool despite the push for Idocs/BAPIs.
    Cheers,
    Brad

Maybe you are looking for