Error in debugging tRFC Function module (in background task) in SM58

Hi,
I am trying to debug this statement:
CALL FUNCTION 'CRM_UPLOAD_TRIGGER'                 
  IN BACKGROUND TASK                               
  DESTINATION gv_smof_erpsh-rfcdest AS SEPARATE UNIT
I have followed these steps:
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.
but still i cant find any entry in SM58.
Can anybody help me out in this?
Thanks a lot.
Best Regards,
Shweta

HI,
When the COMMIT WORK statement is executed, the function modules registered for the current SAP-LUW are started in the order in which they were registered. ROLLBACK WORK deletes all previous registrations for the current SAP-LUW.
If the specified destination is not available when COMMIT WORK is executed, an executable program called RSARFCSE is started in background processing. By default, this tries to start the function modules registered for a SAP-LUW in their destination every 15 minutes and up to 30 times. These parameters can be changed in the transaction SM59. If the destination does not become available within the defined time, it is recorded in the database table ARFCSDATA as the entry "CPICERR". The entry in the database table ARFCSSTATE is deleted after a standard period of eight days

Similar Messages

  • Debugging the Functional Module in Background.

    I am calling a Custom Functional module in Background mode using the syntax CALL FUNCTION ZFM in background task.
    Can anyone tell how to debug the code using this..
    Thanks ,
    Yatish

    Hello Yatish
    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 <b>SM50</b> and search for the background process.
    (3) Choose from menu <i>Program/Mode -> Program -> Debugging</i>
    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).
    Regards
      Uwe

  • What is the use of CALL FUNCTION MODULE - AT BACKGROUND TASK?

    Hi experts,
    I found Call functional module in background task will make the FM run at the next commit work as some people said. So I have some questions:
    1 if we use COMMIT WORK commend, the pending FM will be called? If there are several FMs called at background task, what is the sequence of them? How many conditions will trigger the running of these FMs?
    2 Where can I find the log of this pending FMs? In SAP library, it says there are 2 tables. But I checked these tables and can only find the FM name and user of it. And I can not understand content of these tables. It seems one is for the main information of FM, and the other is for the data of the FM, maybe the parameters.
    3 If I call a FM in this way, Can I canncel it before the next commit work in some way?
    Finally, thanks for reading and help.

    HI,
    When the COMMIT WORK statement is executed, the function modules registered for the current SAP-LUW are started in the order in which they were registered. ROLLBACK WORK deletes all previous registrations for the current SAP-LUW.
    If the specified destination is not available when COMMIT WORK is executed, an executable program called RSARFCSE is started in background processing. By default, this tries to start the function modules registered for a SAP-LUW in their destination every 15 minutes and up to 30 times. These parameters can be changed in the transaction SM59. If the destination does not become available within the defined time, it is recorded in the database table ARFCSDATA as the entry "CPICERR". The entry in the database table ARFCSSTATE is deleted after a standard period of eight days

  • Function module in background task

    Hi,
    I have a user-exit, that must modify a value. But this value  have a lock entry (it's my own transaction that set this lock-entry). So I would like to call a function in background task to modify the value when the lock entry disapear.
    But ...
    I don't see anything append in the SM50.
    If I call the function not in background, I could debug the function.
    When I set background debugging nothing append.
    I have set the RFC option in the function module.
    CALL FUNCTION 'ZCALL_MB26_CONFIRMATION_OT'
      IN BACKGROUND TASK AS SEPARATE UNIT DESTINATION 'NONE'
    Rgd
    Frédéric

    Hello Fred,
    This is a sample code to wait for unlock (but if a user is in modification it can be endless).
      data : w_garg like  seqg3-garg.
      data : t_enq like seqg3 occurs 0.
      concatenate sy-mandt tplnr into w_garg.
      do.
        refresh t_enq.
        call function 'ENQUEUE_READ'
         exporting
           gclient                     = sy-mandt
           gname                       = 'IFLOT'
           garg                        = w_garg
      GUNAME                      = SY-UNAME
      LOCAL                       = ' '
    IMPORTING
      NUMBER                      =
      SUBRC                       =
          tables
            enq                         = t_enq
    EXCEPTIONS
      COMMUNICATION_FAILURE       = 1
      SYSTEM_FAILURE              = 2
      OTHERS                      = 3
        if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
        if t_enq[] is initial.
          exit.
        endif.
      enddo.
    David

  • Calling function module in background task

    Hello,
    There is one function module which is called in background task. Is there any chance that background task is not created and function module is not executed. That function module is supposed to send some outbound message. The FM is called in one user exit. I don't have any idea as why it is called as background task. The probem is that this message is not getting send sometimes.(sometimes it gets send ). Because of this I am not able to make any conclusion.
    Please respond if anyone has come across such scenario before.
    Thanks in advance,
    Minal

    Check the below link...it might be helpfull
    It should be executed....check it with different data as to what might fail
    http://help.sap.com/saphelp_nw04/helpdata/EN/8f/53b67ad30be445b0ccc968d69bc6ff/content.htm
    http://help.sap.com/abapdocu/en/ABAPCALL_FUNCTION_BACKGROUND_TASK.htm

  • Calling function modules in background task

    Hi All,
    I am creating a notification in the background and linking it to an order. This I am doing inside a function module which is called in background task as a separate unit. I should change the user status of this newly created notification. This I am doing in another FM called as a separate unit. Now my requirement is that, I need to perform the status change only after the new notification is committed to the database. I would like to know if i can provide some time lag between the 2 FM execution. Can anyone tell me how much time will be consumed to commit the data to the database tables irrespective of the length of the data. Say for example, if i have hundreds of notifications within the object list tab of an order, I want to know what is the maximum time it will take to commit this to the database table so that I can put a wait conditionat the stat of the second FM call.
    Thanks

    Ok thanks. But let me tell you 1 thing, actually I am calling these 2 FMs within an enhancement section just before another FM CO_ZV_ORDER_POST which is actually doing a commit work. So is it OK if I call the 1st FM in background task and the second FM in update task in the same place as I am calling the FMs now(i.e., before CO_ZV_ORDER_POST)?

  • Difference between calling a function module in background task and update

    Hi experts,
    Can someone explain me the basic difference between calling a FM in  background and update tasks?
    Also what is the advantage of using backgroud RFCs over the above 2.
    Thanks in advance,
    reddy

    This is essentially a difference of synchronization with the main program calling this FM.
    For Update task, we specify explicitely that we want to update some rows in a database table. But Update task is essentially for waiting that all tasks to do before are done and updating database at the end. The main point is that MF called in Update task wait for a COMMIT WORK to be executed.
    On the other hand FM in background task are executed immediatly and are not specific to updating database table : it can be a function that would return some values or something else like that.
    If you want to see more about difference between background jobs / update jobs, you can also have a look at transaction SM51. Here you will see all the servers composing your SAP instance and what kind of task they can execute :
    - background jobs corresponds to BATCH
    - update tasks corresponds to UPDATE
    Those 2 kinds of tasks stands not necessarily on the same server...
    Best regards,
    Samuel

  • 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

  • Jco Call a Function Module in BackGround

    Hello All.
    Some one can send me a simple exemplo how to call a ABAP Function Module in BackGround.
    Can i set this in Java side?
    ..or only set the BackGround Work Process in SAP side?
    In my java application call the Abap Function Module like this:
    client.execute(function);
    How to set parameters to execute the function in BackGround.
    My rpoblem is when the return the data to java side ...occurs the error TIME_OUT in Dialog WorkProcess.
    I need to call in background to better performance and to prevent the TIME_OUT.
    Best regards.
    Taylor.

    Hi.
    I don’t know how to do, but, you can do a previous RFC, this new RFC execute the original function in background mode. I did something like that:
    - JAVA: client.execute("RFC_FUNCTION", input, output);
    - SAP: RFC_FUNCTION:
    CALL FUNCTION func IN BACKGROUND TASK
                         [DESTINATION dest]
                         parameter_list
                         [AS SEPARATE UNIT].
    or
    CALL FUNCTION update_function IN UPDATE TASK
                                 [EXPORTING p1 = a1 p2 = a2 ...]
                                 [TABLES t1 = itab1 t2 = itab2 ...].
    I hope that help you

  • Function module in background work process

    Hi All,
    i'm using trfc for processing FM only in background work process
    CALL FUNCTION 'FUNCTION_MODULE' IN BACKGROUND TASK
    but when i execute FM it's occupying two work process one is dialog (running current FM )and another one is background( running SAPLERFC) .
    so pls suugest me how to avaiod FM to occupy dialog workprocess.
    Regards,
    Anuj jain

    Hi Anuj,
    It unfortunately means:
    start FM in a particular time in Dialog work process
    The BACKGROUND word in abap syntax is misleading.
    For true background processing, i.e. background WORK PROCESS (of type BGD in SM50)
    ONLY  ABAP PROGRAMS or Commands or External Programs
    can be run under background work process. (as per SM36)
    Here we are trying a function module, which is not supported. This is as per my understanding.
    regards,
    amit m.
    Edited by: Amit Mittal on Aug 17, 2010 2:03 PM
    Edited by: Amit Mittal on Aug 17, 2010 2:05 PM

  • Function module for background jobs email

    hi abaper's
                     i hace to create a function module for background jobs this function module have to send an email automatically when a background job is assigned or processed in background.
    thnks n regards
    pardeep kumar

    hi dear
    open this site
    https://weblogs.sdn.sap.com/pub/wlg/781. [original link is broken] [original link is broken] [original link is broken]
    <removed by moderator>
    Edited by: Mike Pokraka on Aug 8, 2008 12:48 PM

  • How can I debug a Function Module used by smartforms

    Hello everyone,
    i have a problem with the function module /1BCDWB/SF00000040.
    It's a module executed from a smartforms form. I need to debug this
    function module while printing an invoice. While printing it should jump
    to the place of the function module.
    Would be grateful if someone could help me.
    Best regards
    F. Hoppe

    This is exactly what i have done last time.
    The problem is that the breakpoint does not stay at the same place
    when i activate it in the module itself.
    Isn't there a transaction you can put breakpoints specific to a FM?

  • Error while activating the function module

    hi,
    am getting error while activating the function module i.e. program or report statement is missing.
    thank you in advance
    karthik

    hii vinu,
    hi there....
    make sure that the Processing type in Attributes tab is 'Normal function module'. Also chk the general data, it must be having some name in the Program Name and include name column.try checking the program names in se38, if the program is of type include or not. you can also chk by writting  a program call the function module and test it
    I hope this will solve the query. in my case, SAPLZ123 is the program name and LZ123U28 is the include name.
    or
    Its common prob with Function module.
    Goto SE80->Give Function group name->Right click on it->Activate.
    regards,
    Shweta

  • How to run ABAP Function Module in Background Wchich Takes Long Time to Run

    How to run ABAP Function Module in Background FOR LONG TIME
    I am not that experienced with ABAP. I am on SAP BI 7.0. I WANT TO RUN A FUNCTION MODULE
    RSDRT_INFOCUBE_DATA_COPY.
    I used SE37 and then executed the module, I supplied  the parameters on the form which opped-up and then  program started running. . Program was however interrupted after 10 minutes by ABAP. How can I run  it in background without interruption?
    THANKS A LOT.

    Hi,
    You can call this FM in a program and run that program in background.
    Regards,
    Raju

  • How to debug a function module using in the generic datasource?

    Hi all,
    We have created a generic data source using function modulle and have been extracting the data for a single customer it contains single records but it has pulled out more than 10,000 records. how to debug the function module used in the data source.
    since we schedule for extraction in bi and back ground job gets triggered in ecc for extraction,
    i know in se37 we can select the function module name and then debug but still need to check while the bacground job is trigered through bi.
    Thanks

    Yes you can debug the Function Module.
    Open the function module in SE37 and put a break point in the code where you want to check from, then come to RSA3 and give the datasource name and check the Debug check box on this screen, once you click on the start button it will take you the place where you have placed the break point in the FM, by pressing F5 you can see the flow of the FM.
    Let me know whether this solves your issue.

Maybe you are looking for