How  to debug function module in update task ?

Hi ,
          i have following code :
CALL FUNCTION 'ZSD_t_UPDATE' IN UPDATE TASK
             TABLES
                              it_xvbkd = xvbkd.
Inside this function module i have some code  to debug . How can i debug it ?
I put the breakpoint in it but its not working .
It is triggered on save of  a tcode .
Thanks and Regards .

My home-grown method:
Set your breakpoint in the FM.
In your transaction, just before you press save, enter hobble mode in your command box with '/h'.
press save.
In your first debug screen, toggle settings>system debugging ON (NetWeaver Drop-down menu) or see previous notes for earlier WebAS versions.
Select continue (F8).
The program should then stop at your break-point in the FM.

Similar Messages

  • Calling Function Module in Update Task

    Hello Experts,
                              Can anyone let me know about
    Calling Function Module in Update Task.
    Why do we use this " In Update Task "  ??
    How do we Use ??
    What is the Use... ??
    Kindly let me know....
    Thanks and Regards
    Pramod

    hi,
    Why do we use this " In Update Task " ??
    The main update technique for bundling database changes in a single database LUW is to use CALL FUNCTION... IN UPDATE TASK.
    How do we Use ??
    A typical R/3 installation contains dialog work processes and at least one update work process. The update work processes are responsible for updating the database. When an ABAP program reaches a COMMIT WORK statement, any function modules from CALL FUNCTION... IN UPDATE TASK statements are released for processing in an update work process. The dialog process does not wait for the update to finish. This kind of update is called asynchronous update.
    What is the Use... ??
    Asynchronous update is useful when response time from the transaction is critical, and the database updates themselves are so complex that they justify the extra system load
    Real time scenario.
    Suppose a user wants to change an entry in a database table, or add a new one. He or she enters the necessary data, and then starts the update process by choosing Save. This starts the following procedure in the ABAP program:
    Firstly, the program locks the database entry against other users, using the enqueue work process (or the message server in the case of a distributed system). This generates an entry in the lock table. The user is informed whether the update was successful, or whether the lock could not be set because of other users.
    If the lock is set, the program reads the entry that is to be changed and modifies it. If the user has created a new entry, the program checks whether a record with the same key values already exists.
    In the current dialog work process, the program calls a function module using CALL FUNCTION... IN UPDATE TASK, and this writes the change details as an entry in table VBLOG.
    When the program is finished (maybe after further dialog steps), a COMMIT WORK statement starts the final part of the SAP LUW. The work process that is processing the current dialog step starts an update work process.
    Based on the information passed to it from the dialog work process, the update work process reads the log entries belonging to the SAP LUW from table VBLOG.
    The update work process passes this data to the database for updating, and analyzes the return message from the database. If the update was successful, the update work process triggers a database commit after the last database change and deletes the log entries from table VBLOG.
    If an error occurred, the update work process triggers a database rollback, leaves the log entries in table VBLOG, flags them as containing errors, and sends a SAPoffice message to the user, who should then inform the system administrator.
    The corresponding entries in the lock table are reset by the update work process.
    Hope this is helpful, Do reward.

  • How to Debug Functional Module called via RFC?

    Hi Experts,
         Please, can someone explain to me how to debug functional module that is called via RFC? Thanks in advance.
      Best Regards,
    Aleksandar

    Hi Laxman,
       First of all thank you very much for giving attention to my post. Ok, I am trying to debug function module in RM-CA (FICA), function module is called by CRM system (via RFC) and in addition all this chain is triggered by WebClient.
         I have user that can login on the CRM as well as on RM-CA (ECC 6.0) system, but those users are different (unfortunately I do not have administration permission so I can’t change profiles of my users but I can ask for it). I can without any problem debug calls that come from WebClient, so setting an external break point in CRM system I can catch whatever I want but when process comes to point where actually call to back-end (RM-CA) takes place I simply can’t get into functional module, that resides on RM-CA side. Actually what happens is that processing continues as was chosen ‘NEXT STEP’ (F6).
         To resume, two systems and two different users. Where XCM user should be created? (on RM-CA system or CRM). Should I change something in Menu option Utilities -> Settings -> ABAP Editor tab -> Debugging tab, in field users?  If you need any additional info please tell me.
      Thanks again for your support.
    Aleksandar

  • Function module with UPDATE TASK

    All,
    Have a look at the below code. While debugging the control is not going inside the function module called using <b>call function ...... in update task</b> statement.
    I believe the function module is not executed immediately, but is scheduled for execution in a special work process (update work process). For this purpose, the name of the function module including the passed actual parameters is stored as a log record in the database table VBLOG. If the statement is executed during the update task, the addition IN UPDATE TASK is ignored.
    The actual execution is triggered by the statement COMMIT WORK which is not happening in this case. The formal parameters of the function module receive the values of the actual parameters from table VBLOG. How can I read the entries in VBLOG? Why the function module is not executed? Please suggest.
    PERFORM bte_publish ON COMMIT LEVEL 9.
    * syncron update
        COMMIT WORK AND WAIT.
    *       Publish business transaction events. The function module have
    *       to call as last update module!
    FORM bte_publish.
      IF NOT gvt_nodes IS INITIAL.
        CALL FUNCTION 'CUSTOMER_HIERARCHY_THROW_BTE' IN UPDATE TASK
             EXPORTING
                  ffi_valid_on    = knvh-datab
                  fti_event_list  = gvt_nodes
                  fti_event_listx = gvt_nodesx.
      ENDIF.
    ENDFORM.                               " BTE_PUBLISH
    Thanks,

    Right Naren. But I need to check inside the update function module, whether it is calling the BTE function module I had configured and the code which I had put in it. Any ideas?
    The COMMIT WORK is returning 4 and hence I believe it is not popping up another debuggin session in which the update FM runs.
    Thanks,
    Message was edited by: Somen

  • Function module In Update Task is called more than once

    Hi experts!!
    I had a requirement to Create a Customer ( i will call it B) when another Customer (A)  is created (ON SAVE).
    I used a Badi to implement the requirement, and inside my Badi i have 2 Function Calls in Update Task.
    The first one to create Customer B and the second one to send Customer's B data to another System.
    Even though the second function call is inside an IF-ENDIF condition ( so that only Customer's B data are sent) the function is called twice sending the same data. My guess is that since the First Function saves the Customer to the database, that is the reason why the second Function is called twice.
    Is there any way i can control how many times a Function In Update Task is called????
    Please help!!
    Thank you in advance!!

    Hi BreakPoint & thank you for your reply!!
    I tried your suggestion but even if i fill the flag during the first call the function is called twice. Looks like during the second database commit the function is called with the correct conditions met but twice.
    Also while debugging it looks like it is only called once. It s very strange!
    Any other ideas???

  • Regarding function module in update task

    Hi,
    I have a function module(Zxxx) which is update type. i have called the fun.module in my program (Zyyy) using the syntax CALL FUNCTION ZXXX IN UPDATE TASK. As I suppose to debug the function module, I activated the update debugging in the debugging screen. But the controll still not goen into the function module. Please let me know solution.
    Thanks & regards,
    Suresh

    >
    sureshkumar vaniyasekar wrote:
    > I activated the update debugging in the debugging screen. But the controll still not goen into the function module.
    Hello Suresh,
    What do you mean by not going?
    If you are trying to do an F5 at the function call, the debugger is not "enter" into the FM. This is because at this point the function call is registered but the FM is not executed.
    Update FM calls registered in a particular LUW are executed(in a special "UPD" workprocess) when there is a COMMIT encountered(may be explicit or implicit).
    Did you read the online help on [Update Debugging|http://help.sap.com/saphelp_NW70EHP1core/helpdata/en/c6/617d0ce68c11d2b2ab080009b43351/content.htm] & [Breakpoint behaviour during Update Debugging|http://help.sap.com/saphelp_NW70EHP1core/helpdata/en/c6/617cbee68c11d2b2ab080009b43351/content.htm]?
    BR,
    Suhas

  • Difference between Function module in Update task

    Hi folks,
    What is the difference between
    1. A function module calling in 'update task'( if attributes not set for update mode).
    2.A function module's attributes set to update mode, but while calling not specified 'Update task'.
    Please clarify this doubt.
    Thanks in advance.
    Bhavani

    CALL FUNCTION func IN UPDATE TASK.
    Additions:
    1. ... EXPORTING  p1 = f1     ... pn = fn
    2. ... TABLES     p1 = itab1  ... pn = itabn
    Effect
    Flags the function module func for execution in the update task. It is not executed at once, but the data passed with EXPORTING or TABLES is placed in a database table and a subsequent COMMIT WORK then causes the function module to be executed by the update task. Update function modules must be flagged as such in the Function Builder
    The return value is not set.
    Addition 1
    ... EXPORTING p1 = f1 ... pn = fn
    Effect
    Values of fields and field strings specified under EXPORTING are passed from the calling program to the function module. In the function module, the formal parameters are defined as import parameters. In the interface definition, default values must be assigned to all import parameters of the update function module.
    Addition 2
    ... TABLES p1 = itab1 ... pn = itabn
    Effect
    TABLES passes references to internal tables. All table parameters of the function module must have values.
    Note
    With update function modules, both import parameters and exceptions are ignored when the call is made.
    Administration transaction
    Related
    COMMIT WORK, SET UPDATE TASK LOCAL
    regards,
    kartikey.

  • Function modules in Update task

    Hi Folks,
    What is the difference between
    1.If a function module contains in attributes 'Update mode ' and run( without 'update task - keyword).
    2.call function ' fun2' in update task.
    In this case, do we need to set the attributes must be 'Update task'?
    Please help me.
    Thanks in advance
    Bhavani

    From F1 Help...
    <i>
    This statement registers the update function module specified in update_function. update_function must be a character-type field, which during execution of the statement contains the name of an update function module in uppercase letters.
    <b>An update function module is a function module, for which in the Function Builder the property update module is marked. The registration of an update function module is an essential part of the update task.</b>
    The function module is not executed immediately, but is scheduled for execution in a special work process (update work process). For this purpose, the name of the function module including the passed actual parameters is stored as a log record in the database table VBLOG. If the statement is executed during the update task, the addition IN UPDATE TASK is ignored.
    </i>
    Regards,
    Rich Heilman

  • How to use function module to update data

    Hello ,
    Can any body have idea how we can use function module SAVE_TEXT to update the master recipe header and operation long text.
    I want to use this functional module to update the master recipe long text
    step by step procedure is highly appreciated
    thanks & regards
    siddhasrth

    Hi
    SAVE_TEXT
    SAVE_TEXT writes a text module back to the text file or the text memory, depending on the storage mode of the corresponding text object.
    You can use this module either to change existing texts or to create new texts. If you know for sure that the text is new, use the parameter INSERT to indicate this. The system then does not have to read the text first, which improves the performance of the function module.
    If the lines table passed with the function module is empty, the system deletes the text from the text file.
    Function call:
    CALL FUNCTION 'SAVE_TEXT'
    EXPORTING CLIENT = SY-MANDT
    HEADER = ?...
    INSERT = SPACE
    SAVEMODE_DIRECT = SPACE
    OWNER_SPECIFIED = SPACE
    IMPORTING FUNCTION =
    NEWHEADER =
    TABLES LINES = ?...
    EXCEPTIONS ID =
    LANGUAGE =
    NAME =
    check thi sample code
    CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
    CLIENT = SY-MANDT
    HEADER = t_header
    SAVEMODE_DIRECT = 'X'
    * OWNER_SPECIFIED = ' '
    * LOCAL_CAT = ' '
    * IMPORTING
    * FUNCTION =
    * NEWHEADER =
    TABLES
    LINES = t_long
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    OBJECT = 4
    OTHERS = 5
    Reward all helpfull answers
    Regards
    Pavan

  • Function module in update task

    hello!
    i am using userexit mv50afz1 in the FORM USEREXIT_SAVE_DOCUMENT.  i am using transaction vl09
    and thourgh this transaction  i am using a bi for updating a field in transaction vl02n.
    since both transactions are connected i used the fm in update task.
    i have two problems:
    1.when i am trying to debugg the fm i dont see the debugger go into it. i know that i should switch something on but i dont know what.
    2. after i cancel the post good issue and push enter i get the following message
    Express document "Update was terminated" 
    what exactly is it?

    Hi!
    1. You can switch on 'update debugging' in menu point 'settings'. Normally second session appears where update execution will run. If you have problems, try break-point at commit work and execute this command with F5. That works for sure.
    2. You have a wrong program design. With an additional commit work you have corrupted the transaction logic -> now your logical unit of work was splitted into two (or more) parts and something like 'cancel' leads to inconsistencies.
    3. You can make your changes 'later' (outside of this transaction). Create some change pointers, which will build a todo-list. A separate report can read them, call transaction and mark the pointers as 'obsolete' (with 'X').
    Have a look at the following posts, to get an idea of 'how to':
    Asynchronous function
    regarding reports
    WE81 BD50
    Kind regards,
    Christian

  • Call function module in update task

    Hi
    I am using the follwoing logic in my prog
    CALL FUNCTION 'Z_Update _Task'    In update task
      EXPORTING
        t_vbak        =  t_vbak.
    But the program goes to dump at call function
    Please let me know if the syntax i am using is correct.
    Edited by: kittu reddy on Feb 28, 2008 5:29 AM

    It might be the type conflict . Please check once .
    Here am giving some information abt UPDATE TASK.
    Why do we use this " In Update Task " ??
    The main update technique for bundling database changes in a single  
    database LUW is to use CALL FUNCTION... IN UPDATE TASK.
    How do we Use ??
    A typical R/3 installation contains dialog work processes and at least one update work process. The update work processes are responsible for updating the database. When an ABAP program reaches a COMMIT WORK statement, any function modules from CALL FUNCTION... IN UPDATE TASK statements are released for processing in an update work process. The dialog process does not wait for the update to finish. This kind of update is called asynchronous update.
    What is the Use... ??
    Asynchronous update is useful when response time from the transaction is critical, and the database updates themselves are so complex that they justify the extra system load
    Thanks
    Jagadeesh

  • How to create function module to update z tables?

    Hi,
    I am new to ABAP. I checked the forum but did not find relevant solutions.
    I have 2 z tables - ZFLIGHT and ZCUSTOMER. I have a few entries in each table.
    I want to write a report to update the entries in the table using function modules. For that I have created a function module - zflight_fm and also a function group- zflight_fg and assigned the function group to the Fm. I do not know how to proceed further, what to put as import, export parameters, tables, changing etc. Further I want exceptions to handle the successful update of the entries.
    Thanks and regards,
    Smruthi

    Steps:
    1) Changing --->a) Zflight TYPE ZFLIGHT(DDIC Ref) OR  Zflight TYPE  ANY TABLE
                           b) ZCustomer TYPE ZFLIGHT(DDIC Ref) OR  ZCustomer TYPE  ANY TABLE
    2) Execptions:
         a) Upload_failed_Flight
         b) Upload_Failed_Customer
    3) Exporting ---> a) Information what rows are uploaded
    Source Code:
    Insert Zflight from Zflight(changing parameter).
    If insert failed
    RAISE  Upload_failed_Flight.
    endif.
    Insert ZCustomer from ZCustomer(changing parameter).
    If insert failed
    RAISE  Upload_failed_Customer.
    endif.
    Regards,
    Gurpreet

  • Regarding Error in Function Module in Update Task

    Hi All,
    If a function module is called in Update Task and there is some error generated from it, it comes as an exit message unlike in a normal function module.
    Is there any possible way to avoid such an exit message?
    Thanks in advance.
    Regards,
    Garima

    Hi,
    The problem is I am updating Z tables in a function and also calling a function in Update task to update a different set of tables.
    Now, if for some reason there is an error in Update Function module, then my requirement is that rather than throwing an Exit message (which it is presently doing) the errors coming from the function should be captured so that the user knows what was wrong with the data he entered.
    Is there any work around to the above requirement? Either all the tables should be updated or none of them should be updated.
    Regards,
    Garima Thapar.

  • How to debug Function Modules from ISA!!!

    Hi Gurus,
                     How to debug the function modules from ISA.
    For Ex:If i am in shopping cart or product catalog,e.t.c..i need to know which FM is calling from backend, how to debug the FMs/Bapis related to that from ISA side.
    direct me to all the possible ways.
    Regards,
    Anil.

    Hello Anil,
    There are a few things you need to look at when trying to debug .
    1. The function module needed ( you can do a trace to see which one is called.)
    2. The user that is been user With statefull and stateless connection the FM can be called by either the JCO user or the internet user. This will need to be considered when setting your external break point.
    3. The server been used, You will need to check the XCM to see which server is been used ie are you using a group connect of a specific server , You need to make sure that you are setting the breakpoint on the server that is specified in the XCM.
    Have a look at note [871907|https://service.sap.com/sap/support/notes/871907]   the attachment to the note may help you a lot. .
    Hope this helps.
    Regards
    Mark
    Edited by: Mark Foley  on Feb 11, 2009 11:10 AM

  • Function module in updated task

    hello,
          i am using user exit for providing a user my own screen for accepting some values from the user, it is working fine but i didnot find a user exit where it will stop after the invoice number is generated. so i created a function as a updated moule and executed as update task. the fucntion module is excuted correctly but i am not able to catch the invoice number , eventhough my fucntion module is getting triigeered after the commit.
    cheers

    Hi rajani
    have you passed the parameters to the functional module or pass the internal table which contains the invoice number. there you can get the invoice number
    regards
    kishore

Maybe you are looking for

  • ICal calendar color won't change

    I've tried changing the color for my Work calendar in iCal multiple times.  I've done it on my iPad, iMac and finally at the iCloud website.  Each time I try to change it, it defaults to purple.  Any ideas about this?  Thanks in advance.

  • Faulty P4N Diamond need RMA.

    Hello, I live in the UK & I have a P4N Diamond motherboard which no longer works. Pc powers but that is all, no post or anything. I have taken the board to be tested & confirmed it is not working. I think the warranty is 3yrs & the board is a 2005 mo

  • EO entity level validations being executed multiple times

    Hi, I'm using JDev 10.1.3.4, BC, JSF I have defined multiple entity level method validators in my entity object. On commit I get the desired results except for the fact that each of my method validators runs multiple times when they should only run o

  • How to retrive data from SQL or any database.

    Hi Experts,                   I am integrating FTP, DATABASE and SAP R/3 system.  1. FTP system stores xml files processed by customer requesting account info. 2. Database system ( SQL/Oracle)  consists of Details about Customer accounts. 3. Finally

  • Hi friends, pls explain What is DB lookups in xi

    1)pls explain What is DB lookups in xi. how many types ?