Function Module to edit ABAP coding

Hi Gurus,
Can anyone tell me if there is any standard function module to go into the code and change some code dynamically in abap Editor.
There is some text needs to be changed in source code, which occurs huge number of times.
Manually to do it is difficult. This activity needs to be done in many programs.
Hope I am clear.
Thanks,
Prasad
Edited by: Julius Bussche on Feb 5, 2009 10:58 AM
Use meaningfull subject titles

Hi Prasad,
Use function module
RS_TOOL_ACCESS
Parameters to use
OPERATION              EDIT
OBJECT_NAME                  ZRR_TEST_02
OBJECT_TYPE                   PROG
As Julius pointed out close your threads which are resolved
Regards

Similar Messages

  • Function Module to edit the ALV Output

    Hi,
      I have an ALV report output.I need the edit values based on some conditions in the ALV output and 
      save the changes. Is there any function module to edit the output and proceed further.
      Thanks in advance.
    Regards,
    Navas

    First create the field catalog of the field that you want to edit in this way
    WA_fieldcat-fieldname  = 'MENGE'.
      WA_fieldcat-qfieldname = 'MEINS'.
      WA_fieldcat-seltext_m  = 'PO Quan.'
      WA_fieldcat-edit = 'X' .
    Secondly you keep a custom button like 'SAVE' in the toolbar and  also try to keep a checkbox in your ALV.
    for checkbox you have to keep a following code snippet in your finallly displayed interanal table:
    chk(1)    TYPE c, and in the fieldcatalog you have to write following piece of code
      WA_fieldcat-fieldname = 'CHK'.
      WA_fieldcat-seltext_m = 'CheckBox'.
      WA_fieldcat-checkbox = 'X'.
      WA_fieldcat-edit = 'X' .
      WA_fieldcat-input = 'X'.
      WA_fieldcat-tabname = 'IT_FINAL'.
      WA_fieldcat-col_pos = 1.
    then you have to set the parameter i_callback_user_command           = 'USER_COMMAND'
    of FM REUSE_ALV_GRID_DISPLAY.
    Then write a subroutine like the following one to handle the SAVE operation
    FORM user_command USING I_r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    DATA:l_cntr TYPE i.
    CASE I_r_ucomm.
    WHEN '&ZXZ'.
          CLEAR l_cntr.
          CLEAR WA_final.
          LOOP AT IT_final INTO WA_final.
            IF WA_final-chk = 'X'.
              l_cntr = l_cntr + 1.
            ENDIF.
          ENDLOOP.
          IF l_cntr GT 1.
            MESSAGE i011.
          ELSEIF l_cntr = 1.
               READ TABLE IT_final INTO WA_final WITH KEY chk = 'X'.
               MODIFY IT_final FROM WA_final TRANSPORTING menge
              WHERE chk = 'X'.
              CLEAR WA_final.
              PERFORM disp_alv. <<<This is to display the refreshed alv after saving your data
         endif.
    ENDCASE.
    ENDFORM.

  • Problem in  using function module parameters in abap program

    i want to use the coding present in on one of the function module 'AS_API_INFOSTRUC_FIND'  i got the problem using the function module parameters in my abap program.
    these are the parameters inside fm
    ""Lokale Schnittstelle:
    *"       IMPORTING
    *"             VALUE(I_FIELDCAT) TYPE  AIND_FCAT
    *"             VALUE(I_FIELDS) TYPE  TABLE OPTIONAL
    *"             VALUE(I_OBLIGATORY_FIELDS) TYPE  TABLE OPTIONAL
    *"       EXPORTING
    *"             VALUE(E_INFOSTRUC) TYPE  AIND_DESC
    *"             REFERENCE(E_ALL_FIELDS) TYPE  TABLE
    *"             REFERENCE(E_MATCHING_FIELDS) TYPE  TABLE
    *"       EXCEPTIONS
    *"              NO_INFOSTRUC_FOUND
    i want to declare     E_ALL_FIELDS  parameter    in my abap program,
    i have declared as 
    data: E_ALL_FIELDS TYPE TABLE.
    but   the system throws error that
    'type of field 'TABLE'  is generic .no table line has been specified'.
    i want to use it in my abap program how can i declare in my abap program .

    You have to declare the table using any specific type.
    The type table in the FM is generic so you can pass any type you need.
    For instance:
    TYPES: BEGIN OF ty_fields,
             fieldname LIKE dfies-fieldname,
           END OF ty_fields,
    TYPES: TY_T_GLU1              LIKE GLU1                     OCCURS 0,
           ty_t_fields            type ty_fields                occurs 0.
      DATA: lt_info_struct_fields TYPE ty_t_fields WITH HEADER LINE,
            lt_matching_fields    TYPE ty_t_fields WITH HEADER LINE.
        CALL FUNCTION 'AS_API_INFOSTRUC_FIND'
             EXPORTING
                  i_fieldcat         = ft_fieldcat-fieldcat
                  i_fields           = ft_fields_filled[]
             IMPORTING
                  e_infostruc        = lv_info_struct_name
                  e_all_fields       = lt_info_struct_fields[]
                  e_matching_fields  = lt_matching_fields[]
             EXCEPTIONS
                  no_infostruc_found = 1.

  • Function Module to get ABAP source code for a specific version

    Hi all
    Is there a function module that I can use to get the source code of another function module at a specific version?
    For example, can I call a function module passing in "FM_NAME" and "FM_VERSION" and have it return the lines of code associated with that object?
    Thanks in advance.
    Stuart

    Thanks guys
    That's incredibly helpful! I have one more question that I just thought of last night...
    Is there a way to hook into the code activation process? I want to be able to take a snapshot of the ABAP source code at each point when it is activated for use in another system, but need to be able to intercept this event and get the source code at that point in time.
    Any ideas?
    Thanks!

  • Function Module To Copy Abap tables with data

    Hi,
    Is there an easy way to copy abap tables with the data to another destination table using function modules or sample codes?

    What do you mean for "destination"? Another SAP system e.g. an RFC destination?
    And what kind of table do you need to copy? Ztables? Standard Tables?
    If you mean Standard Tables, your task isn't a  safe procedure.

  • Function Module to Edit Billing Document Header (table VBRK)

    Hi all,
    Can someone tell me if there is a function module that can edit the billing document header please?  I do not need to created the billing document, it already exists.  I just need to edit specific fields.
    Many thanks.

    The requirement is to update these 2 fields in the table VBRK:
    BSTNK_VF (customer po number)
    ZUONR (assignment number)
    The client uses these 2 fields for non-standard purposes.
    Actually I was already trying to use the FM RV_INVOICE_DOCUMENT_UPDATE, but I am unable to make it work, for some reason. 
    For that function, I only passed VBRK as table, nothing else.  Specifically, I retrieved the header from VBRK, modify the 2 fields, then pass it to the VBRK table parameter of the function.

  • Function modules to edit table's record

    Hi, thanks in advance. I have two questions:
    1. I call function 'STC1_FULLSCREEN_TABLE_CONTROL' to edit a table, the problem is fieldnames are not displayed, all emptys. Please check below calling.
    CALL FUNCTION 'STC1_FULLSCREEN_TABLE_CONTROL'
           EXPORTING
                HEADER = p_table
                tabname = p_table
                endless = 'X'
                no_button = space
           IMPORTING
                okcode = w_okcode
           TABLES
                 nametab = it_dfies
                 TABLE = <itab>
                 fielddif = it_fdiff
                 modif_table = <ntab>
           EXCEPTIONS
                 OTHERS = 1.
    2. The second question is above function module is to edit a table in full screen style, multiple record lines are displayed. Could you please tell me which function module can be called to only edit one record in the screen?
    Thanks.
    Tom

    Hello Tom
    Use the following code before calling the function.
    loop at IT_DFIES into is_dfies.
        if is_dfies-reptext is initial.
          select single scrtext_s into is_dfies-reptext from ddftx where tabname = is_dfies-tabname
                                                                     and fieldname = is_dfies-fieldname
                                                                     and ddlanguage = sy-langu.
          IF sy-subrc = 0 and is_dfies-reptext is initial.
            select single scrtext_m into is_dfies-reptext from ddftx where tabname = is_dfies-tabname
                                                                       and fieldname = is_dfies-fieldname
                                                                       and ddlanguage = sy-langu.
            IF sy-subrc = 0 and is_dfies-reptext is initial.
              select single scrtext_l into is_dfies-reptext from ddftx where tabname = is_dfies-tabname
                                                                         and fieldname = is_dfies-fieldname
                                                                         and ddlanguage = sy-langu.
            endif.
          endif.
          If is_dfies-reptext is initial.
            select single fieldtext into is_dfies-reptext from ddftx where tabname = is_dfies-tabname
                                                                       and fieldname = is_dfies-fieldname
                                                                       and ddlanguage = sy-langu.
          ENDIF.
          If is_dfies-reptext is initial.
            is_dfies-reptext = is_dfies-fieldname.
          ENDIF.
          modify it_dfies from is_dfies .
        endif.
      endloop.
    I hope that could help
    Regards
    dstj

  • Is there any function module to download abap data to a word document?

    Hi all,
    I know that the downloading to word can be done by ole automation...But is there any function module in sap which can do the same....?? please let me know your expert comments.......

    Hello Rich,
    I have tried the function module word_ole_formletter ..but i am facing a problem...once i execute the program i can see that the data is coming to word document but it is coming in read only mode and again reverting back to a blank document as was befor the data is coming to word document..Can you suggest where i am going wrong...Also I tried to debug the function module but the break point is not coming to the function module ....

  • Time Constraint Error when calling a Function module from Webdynpro ABAP

    Any help will be greatly appreciated - Thanks RM
    Time Constraint Error
    Information on where terminated
        Termination occurred in the ABAP program "SAPUP50R" - in
         "CHECK_TIME_CONSTRAINT_S1".
        The main program was "MP000000 ".
        In the source code you have the termination point in line 1069
        of the (Include) program "UP50RU01".
    Error occurred during batch input processing
    Source Code Extract
          l_is_inconsistent = 'X'.
        ENDIF.
      Check if there are inverted time periods.
        IF l_prelp_line-begda > l_prelp_line-endda.
          l_is_inconsistent = 'X'.
        ENDIF.
    Check if there are overlaps or gaps.
        IF NOT l_prelp_before IS INITIAL.
          l_date_difference = l_prelp_line-begda - l_prelp_before-endda.
          IF l_date_difference <> 1.
            l_is_inconsistent = 'X'.
          ENDIF.
        ENDIF.
        l_prelp_before = l_prelp_line.
      ENDLOOP.
      IF l_prelp_before-endda <> '99991231'.
        l_is_inconsistent = 'X'.
      ENDIF.
      IF l_is_inconsistent = 'X'.
        IF p_access_type = 'R'.
    490 Datenbankschiefstand Personalnummer & Infotyp &
          MESSAGE x490 WITH l_prelp_before-pernr l_prelp_before-infty.
        ELSE.
    491 Unzulässige Daten Personalnummer & Infotyp &
    Line 1069 Error occcurs >>>>  MESSAGE x491 WITH l_prelp_before-pernr l_prelp_before-infty.
        ENDIF.
      ENDIF.
    ENDFORM.                    " CHECK_TIME_CONSTRAINT_S1     "XYVN0352581
    *&      Form  clear_no_adapter_needed              new     "XREN844998
          text
    FORM clear_no_adapter_needed .
      CLEAR no_adapter_needed.
    ENDFORM.                    " clear_no_adapter_needed
    *&      Form  set_no_adapter_needed              new     "XREN844998
          text
    FORM set_no_adapter_needed .
      no_adapter_needed = 'X'.
    ENDFORM.                    " clear_no_adapter_needed

    Hi,
    Well, are you trying to do a batch input on infotype 0000? If yes you need to check that the proposed values respects the time constraint, meaning no gap, no overlaps and no inversions. Also fields SUBTY, OBJPS, SPRPS and SEQNR must remain initial when processing IT0000...
    Kr,
    Manu.

  • One of worst  function module released by SAP in terms of coding standard

    Hi ,
      I have ever come across SAP function module in terms of Coding standard.
    "J_1I4_GET_ACTUAL_DUTY_IN_LIV".
    Please if any one knows SAP Quality team id please forward this function module to them.
    I do know how SAP has released this kind of function module
    Thanks
    Venkat
    Moderator message: moved to general discussions forum.
    Edited by: Thomas Zloch on Oct 4, 2011 10:42 PM

    LoL!
    [SAP Note 783224 - Rollback of the note 429073|https://service.sap.com/sap/support/notes/783224] is high priority...
    Important:
    The changes provided have to be applied MANUALLY. These changes cannot be applied via S Note or Note Assistant.
    The comments, notes about changes and some corrections to previous notes which changed the FM (manually) mention legal requirements very often...
    It is quite possible that the developer author is a lawyer
    Cheers,
    Julius

  • Function module or abap program

    Hello ABAP gurus,
           I need a function module or a program which can read and write into a transactional infocube. We have local currency as CAN and we wanted it to be overwritten as USD in the group currency. Here it is not a currency conversion as we are not changing the currency value but just the unit from CAN to USD. Note: No change with the transfer rules is allowed where USD can be given as a constant value. So the only option is either a function module or a ABAP program. So please any suggestion on this would be greatly appreciated.
    Thanks,
    anjali

    Hello ABAP gurus,
           I need a function module or a program which can read and write into a transactional infocube. We have local currency as CAN and we wanted it to be overwritten as USD in the group currency. Here it is not a currency conversion as we are not changing the currency value but just the unit from CAN to USD. Note: No change with the transfer rules is allowed where USD can be given as a constant value. So the only option is either a function module or a ABAP program. So please any suggestion on this would be greatly appreciated.
    Thanks,
    anjali

  • IDOC ABAP-PI Port Function Module not called

    HI all,
    i am using a scenario where i am sending (outbound) idocs via abap proxy to PI.
    I have assigned the function module to the abap-pi port.
    when i am trying to send a test idoc via we19, i get the message "IDoc '0000000000198029' transferred to ABAP-PSS port".
    but the function module (a copy of own_function)  doesn't get called. if i am testing the function module from se80 with the above mentioned idoc number '0000000000198029' everything is fine.
    in the partner profile i have added the corresponding idoc message type and selected to send idocs immediately. have i forgotten something in order to trigger the call of the function module ?
    br,
    martin

    Hello,
    I think it is not so easy to send IDoc to XI with ABAP-PSS-Port.
    I would try to create the IDoc and send it to XI-Port (Transactional RFC).
    This is SAP-Standard for IDoc-Scenario (SAP-R3 to XI).
    Best Regards, Dirk

  • Function Groups and Function Modules

    Hi,
    Can anyone give me the detail steps for creating Function Group and then from that function group creation of function module with example?
    Regards,
    Chandru

    Hi,
    Function Group creation -
           A function group is a program that contains function modules. With each R/3 system, SAP supplies more than 5,000 pre-existing function groups.
         In total, they contain more than 30,000 function modules. If the functionality you require is not already covered by these SAP-supplied function modules, you can also create your own function groups and function modules.
          We can put all the relevant function modules under one function group and all the global variables can be declared in this FG.
    FG Creation:
    1)     Function group can be created in SE80. There choose the 'Function Group' from the list of objects.
    2)    Then give a name for ur function group (starts with Y or Z) and press ENTER.
    3)   The click 'YES' in the create object dialog box and give a short desc. for this FG and save.
    Function Module:
                 A function module is the last of the four main ABAP/4 modularization units. It is very similar to an external subroutine in these ways:
    Both exist within an external program.
    Both enable parameters to be passed and returned.
    Parameters can be passed by value, by value and result, or by reference.
    The major differences between function modules and external subroutines are the following:
    Function modules have a special screen used for defining parameters-parameters are not defined via ABAP/4 statements.
    tables work areas are not shared between the function module and the calling program.
    Different syntax is used to call a function module than to call a subroutine.
    Leaving a function module is accomplished via the raise statement instead of check, exit, or stop.
    A function module name has a practical minimum length of three characters and a maximum length of 30 characters. Customer function modules must begin with Y_ or Z_. The name of each function module is unique within the entire R/3 system.
    Defining Data within a Function Module
    Data definitions within function modules are similar to those of subroutines.
    Within a function module, use the data statement to define local variables that are reinitialized each time the function module is called. Use the statics statement to define local variables that are allocated the first time the function module is called. The value of a static variable is remembered between calls.
    Define parameters within the function module interface to create local definitions of variables that are passed into the function module and returned from it (see the next section).
    You cannot use the local statement within a function module. Instead, globalized interface parameters serve the same purpose. See the following section on defining global data to learn about local and global interface parameters.
    Defining the Function Module Interface
    To pass parameters to a function module, you must define a function module interface. The function module interface is the description of the parameters that are passed to and received from the function module. It is also simply known as the interface. In the remainder of this chapter, I will refer to the function module interface simply as the interface.
    To define parameters, you must go to one of two parameter definition screens:
    1) Import/Export Parameter Interface
    2) Table Parameters/Exceptions Interface
    Then in the FM interface screen, give the following
    1) Import parameters
    2) Export parameters
    3) Changing parameters
    Then give
    1) Define internal table parameters
    2) Document exceptions
    You enter the name of the parameter in the first column and the attributes of the parameter in the remaining columns. Enter one parameter per row.
    Import parameters are variables or field strings that contain values passed into the function module from the calling program. These values originate outside of the function module and they are imported into it.
    Export parameters are variables or field strings that contain values returned from the function module. These values originate within the function module and they are exported out of it.
    Changing parameters are variables or field strings that contain values that are passed into the function module, changed by the code within the function module, and then returned. These values originate outside the function module. They are passed into it, changed, and passed back.
    Table parameters are internal tables that are passed to the function module, changed within it, and returned. The internal tables must be defined in the calling program.
    An exception is a name for an error that occurs within a function module. Exceptions are described in detail in the following section.
    Syntax for the call function Statement
    The following is the syntax for the call function statement.
    call function 'F'
        [exporting   p1 = v1 ... ]
        [importing   p2 = v2 ... ]
        [changing    p3 = v3 ... ]
        [tables      p4 = it ... ]
        [exceptions  x1 = n [others = n]].
    where:
    F is the function module name.
    p1 through p4 are parameter names defined in the function module interface.
    v1 through v3 are variable or field string names defined within the calling program.
    it is an internal table defined within the calling program.
    n is any integer literal; n cannot be a variable.
    x1 is an exception name raised within the function module.
    The following points apply:
    All additions are optional.
    call function is a single statement. Do not place periods or commas after parameters or exception names.
    The function module name must be coded in uppercase. If it is coded in lowercase, the function will not be found and a short dump will result.
    Use the call function statement to transfer control to a function module and specify parameters. Figure 19.9 illustrates how parameters are passed to and received from the function module.
    sample FM
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
      I_CALLBACK_PROGRAM                = ' '
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
      IT_FIELDCAT                       =
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        t_outtab                          =
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Example
    1  report ztx1905.
    2  parameters: op1 type i default 2,   "operand 1
    3              op2 type i default 3.   "operand 2
    4  data rslt type p decimals 2.        "result
    5
    6  call function 'Z_TX_DIV'
    7       exporting
    8            p1      = op1
    9            p2      = op2
    10      importing
    11           p3      = rslt.
    12
    13 write: / op1, '/', op2, '=', rslt.
    Regards,
    Shanthi.P
    Reward points if useful ****
    Edited by: shanthi ps on Jan 26, 2008 12:03 PM

  • RFC CALL canu00B4t execute Functions module ??

    Hello everybody,
    I have a problem with a Function module. The function module should open an link (it´s a Link of a Webdynpro Application).
    I have the following constellation.
    Bex Analyzer execute a RFC Call to open/execute the Function module. The Function module should open a URL (Webdynpro Application), but it doesn´t work.
    I don´t know why. The Connection of the RFC Call is ok. I have tested the RFC with any Object´s and it works (He "answered").
    What ist wrong in the Function Module, why can´t the FM open the URL??!
    Simple Code of Function Module
    call method cl_gui_frontend_services=>execute
    exporting
    document = 'URL'
    exceptions
    others = 1.
    Endfunction.
    A other test
    *CALL FUNCTION 'PRGN_GENER_EXECUTE_URL'
    *EXPORTING
    *NODE_DATA = 'url'.
    The VBA Code for RFC
    Sub Login()
    Dim functionCtrl As Object
    Dim sapConnection As Object
    Dim theFunc As Object
    Dim sReturn As Boolean
    Dim l_export As String
    Dim objQueryTab As Variant
    Set functionCtrl = CreateObject("SAP.Functions")
    Set sapConnection = functionCtrl.Connection
    sapConnection.Client = "100"
    sapConnection.user = "xy"
    sapConnection.Language = ".."
    sapConnection.SystemNumber = "xy"
    sapConnection.ApplicationServer = "xy"
    sapConnection.Language = "x"
    sapConnection.codepage = "xy"
    sapConnection.Destination = "xy"
    sapConnection.System = "x"
    sapConnection.SystemID = "......"
    sapConnection.Password = "xy"
    sapConnection.autologon = 1
    If sapConnection.Logon(0, True) <> True Then
    MsgBox "Keine Verbindung"
    Else
    Set theFunc = functionCtrl.Add("SS_RFC_URL_TEST")
    objQueryTab = "200"
    theFunc.Exports("I_PAR") = objQueryTab
    sReturn = theFunc.call
    If sReturn = True Then
    objQueryTab = theFunc.Imports("E_PAR")
    End If
    sapConnection.logoff
    End If
    End Sub
    >E_PAR is the Exportparameter of the Function module
    >I_PAR is the Importparameter of the Function module
    Thanks
    Edited by: Schwarzenberger Stefan on May 9, 2011 1:59 PM

    Hi, I have a similar situation.  Within VBA I am calling the RFC 'RFC_CALCULATE_TAXES_DOC'.  This RFC is used to communicate with external tax software like Taxware; it gets applicable tax rates, amounts, etc. based on tax jurisdiction code and other data.  The RFC is remote-enabled (has to be to talk to Taxware).
    This RFC requires an RFC Destination in order to work.  Within VBA, I have not been able to figure out the syntax required to enter the Destination name.  I saw Shreeram's post saying to use CALL FUNCTION 'PRGN_GENER_EXECUTE_URL' DESTINATION <RFC Destination Name>.  However, this looks like ABAP syntax and not VBA syntax.
    Does anybody know if this is possible within VBA?  Sounds like it's not but wanted to double-check.
    Thanks!!
    Kory Squire
    <<Removed email address>>
    Edited by: Matt on May 18, 2011 6:37 AM

  • How to DEBUG a function module running in background mode? Please help!

    Hi Experts,
       I am calling a function module in my ABAP code in background module using the following syntax:
      CALL FUNCTION 'YBBC2_CREATE_SNAPSHOT' IN BACKGROUND TASK
              TABLES
                itab_std_format_inv = itab_std_format_inv
                itab_snapshot_inv = itab_snapshot_inv.
            COMMIT WORK.
    If I put the breakpoint in the CALL FUNCTION line and execute the program, the debugger does not take me to the valled function module. This may be because I am running the function module as background task.
    I cannot comment this  "IN BACKGROUND TASK" statement as well since i am debugging in Quality system where I don't have change access.
    So how to DEBUG a function module running in background mode? Please help!
    Thanks
    Gopal

    Hi,
    You could try to use the following trick:
    (1) Put an endless loop into the coding of your function module where you want to start debugging, e.g.
      DATA:
        lx_exit_loop(1)     TYPE c.
      lx_exit_loop = ' '.
      DO.
        IF ( lx_exit_loop = 'X' ).
          EXIT.
        ENDIF.
      ENDDO.
    (2) Call your function module in background task
    (3) Call transaction SM50 and search for the background process.
    (3) Choose from menu Program/Mode -> Program -> Debugging
    Now you the debugger should bring you right to your endless loop. Set lx_loop_exit = 'X' in the debugger and continue (F5 or F6).
    <b>Reward points</b>
    Regards

Maybe you are looking for

  • Date and time fields are not getting updated in database

    Hi, I am Using the bapi SD_SHIPMENT_HEADER_CHANGE in my program ... I  am using bapi_shipemnt_create for creating shipment document but, trying to enter the date fileds using this bapi . can anybody please tell me how shud i pass this variables exact

  • Can anyone help me building an Photoshop extention?

    I am a webdesigner / crossmedia designer (Netherlands) and after using the font icon PS extension for Font Awesome i got frustrated it would not let me manage my own icon fonts. So i came up with a solution. But is is very hard to find someone to dev

  • Issue in FTP to FTP scenairo

    Hi all, In the FTP to FTP scenario, the source file is not picked up, but in communication channel monitoring for the sender channel the status says, Polling stated,  file processed successfully. It doesn't show a link, for the source message. It imp

  • How I can import a .tpl file in Photoshop Elements 13?

    I have downloaded a brush set as .tpl-file. How I can it install in Photoshop Elements 13?

  • Can't re-download my movies I PURCHASED ALREADY!!

    People of apple store, itunes store, and all the apple company, Why can't you put an option to download my PURCHASED MOVIES!??? Because I spend a lot of money buying a lot of movies and I change my computer and now I can't download again my PURCHASED