Re: perform on commit

Hello Friends,
I want to write perform on commit. 
but can anyone tell me what is the syntax whils writing it as perform?
and while writing form and endform.
it's urgent , plz.

In your BADI submit a function module [IN BACKGROUND TASK|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&query=inBACKGROUNDTASK&adv=false&sortby=cm_rnd_rankvalue] to update the second infotype via FM [HR_INFOTYPE_OPERATION|https://www.sdn.sap.com/irj/scn/advancedsearch?query=hr_infotype_operation&cat=sdn_all] (create a RFC enabled Z-FM that call the standard FM)
Regards

Similar Messages

  • BI ABAP Issue regarding perform on commit statement

    Hi,
    I have a requirement like below.
    I have a test to see if SAP issues a COMMIT WORK at the end of the datapacket, and allows update tasks to be executed .and check whether the second datapacket succeed in getting the lock, or fail because it has not been dequeued.
    For this i have written code in the end routine of DTP like below.
    1. Called enqueue fm
    2. Created a custom table and taken loop at result_package and get the values to the internal table.
    3. I have created an updated function module to call perform on commit inside the function module. Since we canu2019t directly call the commit work in the end routine of DTP. And in the form endform i am updating the custom table from internal table.
    4. Called dequeued fm.
    But the issue is i am notable to bedug the code (perform <form name> on commit) (cursor is not going to the inside the perform) inside the function module even though i enabled the update task in debugger setting and used F9 to set the FM for debug.
    Can any body help me on this
    Thanks,
    Nagendra

    did you try by setting a manual break-point inside the code and then going step by step (by pressing F5) ?

  • Issue regarding perform on commit statement

    Hi,
    I have a requirement like below.
    I have a test to see if SAP issues a COMMIT WORK at the end of the datapacket, and allows update tasks to be executed .and check whether the second datapacket succeed in getting the lock, or fail because it has not been dequeued.
    For this i have written code in the end routine of DTP like below.
    1. Called enqueue fm
    2. Created a custom table and taken loop at result_package and get the values to the internal table.
    3. I have created an updated function module to call perform on commit inside the function module. Since we canu2019t directly call the commit work in the end routine of DTP. And in the form endform i am updating the custom table from internal table.
    4. Called dequeued fm.
    But the issue is i am notable to bedug the code (perform <form name> on commit)  (cursor is not going to the inside the perform) inside the  function module even though i enabled the update task in debugger setting and used F9 to set the FM for debug.
    Can any body help me on this
    Thanks,
    Nagendra

    did you try by setting a manual break-point inside the code and then going step by step (by pressing F5) ?

  • Nested perform on commit error

    hi all,happy new year 2006
    in my custom transaction upon save,
    iam calling a Func module in update task passing all the internal tables which contain the update data.
    inside this FM iam doing table updates without commit and also calling change document funcs ( open,single/multiple case/close) to update the CDHDR and CDPOS tables.
    iam also calling BAPI_SALESORDER_CHANGE inside this update task FM. after the call iam calling BAPI_TRANSACTION_COMMIT.
    Iam getting an update task termination message saying that there are nested perform on commit statements happenening in some some SAP prog call and therefore it causes a dump. i have seen that the fm 'CHANGEDOCUMENT_CLOSE' calls a 'perform on commit'.
    but not able to figure out where exactly is the problem.
    any suggestions.
    thanks a lot.

    Hi KP!
    I'm sure you can't call BAPI_TRANSACTION_COMMIT in an update task - there a commit is a forbidden statement.
    I had a short look at CHANGEDOCUMENT_CLOSE:
    *    don't call this form on COMMIT when you are already in a form on
    *    commit
        IF sy-oncom = 'P'.
          PERFORM swe_event_create_changedocumnt.
        ELSE.
          PERFORM swe_event_create_changedocumnt ON COMMIT.
        ENDIF.
    At least here (and on release 640, ERP 5.0) a different coding for update tasks is executed.
    Do you have a shortdump, where you can check exact place of the nested call? Or is this a generation error -> again try to check exact place.
    Regards,
    Christian

  • Perform ON COMMIT doesn't work (Try it)

    Has anyone tried a PERFORM ON COMMIT within a BADI? It doesn't work and i don't know why.
    I am working with the HR Module, and i have a BADI, which is fired when the user hits the 'SAVE' button (PA30 Transaction).. when this happens, i execute a PERFORM ON COMMIT and the subroutine is never called...
    Does anyone know anything about this?
    Regards

    In your BADI submit a function module [IN BACKGROUND TASK|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&query=inBACKGROUNDTASK&adv=false&sortby=cm_rnd_rankvalue] to update the second infotype via FM [HR_INFOTYPE_OPERATION|https://www.sdn.sap.com/irj/scn/advancedsearch?query=hr_infotype_operation&cat=sdn_all] (create a RFC enabled Z-FM that call the standard FM)
    Regards

  • Perform on commit

    Hi,
    can you show me an example of "perform on commit" with variables.

    Hi,
    PERFORM ON COMMIT routines are not executed in the dialog module.
    You must ensure that any subroutines called using ON COMMIT can be delayed until the next COMMIT WORK in the calling program. Remember that the global data of the dialog module is destroyed along with the internal session when control returns to the calling program. Consequently, subroutines called using PERFORM ON COMMIT must not use this global data.
    The statement PERFORM ON COMMIT calls a subroutine in the dialog work process. However, it is not executed until the system reaches the next COMMIT WORK statement. Here, as well, the ABAP statement COMMIT WORK defines the end of the SAP LUW, since all statements in a subroutine called with PERFORM ON COMMIT that make database changes are executed in the
    database LUW of the corresponding dialog step.
    The advantage of this bundling technique against CALL FUNCTION... IN UPDATE TASK is better performance, since the update data does not have to be written into an extra table. The disadvantage, however, is that you cannot pass parameters in a PERFORM... ON COMMIT statement. Data is passed using global variables and ABAP memory. There is a considerable danger of data inconsistency when you use this method to pass data.
    You can also put the CALL FUNCTION IN UPDATE TASK into a subroutine and call the subroutine with:
    <b>PERFORM SUBROUT ON COMMIT.</b>
    If you choose this method, the subroutine is executed at the commit. Thus the request to run the function in the update task is also logged during commit processing. As a result, the parameter values logged with the request are those current at the time of the commit.
    Ex.
    a = 1.
    PERFORM F ON COMMIT.
    a = 2.
    PERFORM F ON COMMIT.
    a = 3.
    COMMIT WORK.
    FORM f.
    CALL FUNCTION 'UPD_FM' IN UPDATE TASK EXPORTING PAR = A.
    ENDFORM.
    In this example, the function module UPD_FM is carried out with the value 3 in PAR. The update task executes the function module only once, despite the two PERFORM ON COMMIT statements. This is because a given function module, logged with the same parameter values, can never be executed more than once in the update task. The subroutine itself, containing the function module call, may not have parameters.
    Regards,
    Bhaskar

  • Is It Possible to use Call Function in update task in perform on commit

    Hi Friends,
    I have to send an email once the commit work is done. so i am writing code like this,
    Perform send_email on commit.
    form send_email.
    call function 'SO_NEW_DOCUMENT_SEND_API1' in update task
    endform.
    endform.
    .... ( Some other code)
    commit work.
    But, I am getting error saying Update task is not possible. Please suggest me how to solve this.
    Thanks in Advance,
    Phani.

    Hi Phani,
          Check whether <b>COMMIT Work</b> has be performed. I think this might be the problem.
    Regards,
    Prashanth

  • Wat is perform on commit

    Plz give reply to me

    Hi
    This is used to commit the changes to the database
    when you write some code in the PERFORM ..ON COMMIT
    subroutine, all the statements reagrding database update are committed only when you write explicit COMMIT WORK  and for Roll back  ROLLBACK  has to be used.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Interrupt a perform-on commit.

    Hi all,
    How to interrupt a perform which is done on ON-COMMIT statement.
    Will the ROLLBACK WORK will effect..
    Thanks & Regards,
    Neslin.

    Hi,
    You can use the abort message to stop processing..
    MESSAGE A208(00) WITH 'PERFORM FAILED'.
    Thanks,
    Naren

  • Perform a COMMIT during a DB lock

    Hi experts,
    I have locked certain fields of a DB table using a lock object (called the FM ENQUEUE_XXXX). After successfully executing the FM,  I need to update a table which is not affected by the lock object and save the changes with a COMMIT WORK. Things are not working as I wish because in debugging mode I have observed that the table is updated after I release the lock object (call FM DEQUEUE_XXXX). Can it be that I'm setting a wrong parameter during the call of the FM ENQUEUE_XXXX? The lock type I'm setting is E.
    Thanks in advance for your help,
    Jaime

    Moderator message - Welcome to SCN.
    SAP locks using ENQUEUE and DEQUEUE FMs are logical locks not physical. But a COMMIT is hard. once you do a COMMIT, the database should be updated. How do you tell that it is not?
    Rob

  • Nested perform on commit

    How do I figure out where the program is being commited at?
    Technical information about the message:
    Message class....... 00
    Number.............. 081
    Variable 1.......... "NESTED_PERFORM_ON_COMMIT"
    Variable 2.......... "caller: SAPLCRM_BUPA_CRMD_DIALOG"
    Variable 3.......... "program: SAPLCRM_BUPA_CRMD_DIALOG"
    Variable 4.......... "form: BAPI_SAVE_BUFFER"

    I don't have access to CRM System, but my guess is the abort happens somewhere within CALL METHOD lv_global_memory->save_to_database chain. I'd try to do the following:
    1) go to SE91 and do a where used list for message number 081 of message class 00; you should find two uses in program SAPMSSY0; it's the first one, in subroutine %_order_form_level, that is of interest;
    2) set the break-point on the message x081(00) with mpar1 mpar2 mpar3 mpar4 statement or just before it (it's the line number 89 of program SAPMSSY0 in my system);
    3) enable System Debugging and Update Debugging via Debugger menu Settings->Change Debugger Profile/Settings
    4) run the logic that triggers shortdump; debugger should open just before shortdump and hopefully you should be able to figure out the call chain that leads to this error
    What's MSA? Edit in: Ok, I found what's MSA Does that mean you will not be able to debug what's happening in CRM..? Then I'm out of ideas, unfortunately...
    cheers,
    Janis

  • Commit after insertion

    I use Oracle 10G Rel2. I'm trying to improve the performance of my database insertions. Every two days I perform a process of inserting 10000 rows in a table. I call a PL/SQL procedure
    for inserting every row, which checks data and perform the insert command on the table.
    Should I commit after every call to the procedure ??
    Is it better to perform a commit at the end of calling 10000 times to the insertion procedure?? So the question is : is "commit" a cheap operation ??
    Any idea to improve performance with this operation ??

    > So the question is : is "commit" a cheap operation ??
    Yes. A commit for a billion rows is as fast as a commit for a single row.
    So there are no commit overheads for doing a commit on a large transaction versus a commit on a small transaction. So is this the right question to ask? The commit itself does not impact performance.
    But HOW you use the commit in your code, does. Which is why the points raised by Daniel is important.. how the commit is used. In Oracle, the "best place" is at the end of the business transaction. When the business transaction is done and dusted, commit. That is after all the very purpose of the commit command - protecting the integrity of the data and the business transaction.

  • Can we disable implicit DB commit in JCO RFC function call?

    I called RFC function provided by ABAP from JCo connection, found that each RFC function is a db LUW itself. All the db access sql in RFC function is implicit commited.
    Till now, to wrap the db access sql in seperate "Update function module" or "Perform on commit" seems to be a choice for me (like most BAPI doing so). But is it the only choice?
    The point is, can we disable(or bypass) the implicit DB commit while calling a RFC function from JCo connection?

    Hi Guru,
    Yes you approach is correct, make sure commit/rollback is possible only when a change is/was made in database.
    Go through these links will be helpful,
    BAPI_TRANSACTION_COMMIT with Web AS/SOAP Interface
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/d352a790-0201-0010-5082-b1a608d22b6c
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/d352a790-0201-0010-5082-b1a608d22b6c
    Hope that solves your problem.
    Thanks & Regards,
    Kathirvel

  • Commit after every 1000 records

    Hi dears ,
    i have to update or insert arround 1 lakhs records every day incremental basis,
    while doing it , after completing all the records commit happens, In case some problem in between all my processed records are getting rollbacked,
    I need to commit it after every frequency of records say 1000 records.
    Any one know how to do it??
    Thanks in advance
    Regards
    Raja

    Raja,
    There is an option in the configuration of a mapping in which you can set the Commit Frequency. The Commit Frequency only applies to non-bulk mode mappings. Bulk mode mappings commit according the bulk size (which is also an configuration setting of the mapping).
    When you set the Default Operating Mode to row based and Bulk Processing Code to false, Warehouse Builder uses the Commit Frequency parameter when executing the package. Warehouse Builder commits data to the database after processing the number of rows specified in this parameter.
    If you set Bulk Processing Code to true, set the Commit Frequency equal to the Bulk Size. If the two values are different, Bulk Size overrides the commit frequency and Warehouse Builder implicitly performs a commit for every bulk size.
    Regards,
    Ilona

  • Help required in commit operation

    hello ,
    i have written on procedure , in Which i am selecting the data from table1 and then insert the data into table 2 and then i am applying a commit.
    the table 1 contains more tha 4 laks(0.4 million) records.
    now i really need your suggection about the commit operation to be takes palce?
    can i perform commit after the insertion of 4 Lc record OR can i perform the commit after every 10,000 insertion of record?
    Thanks in advance for your suggestion. also let me know the reason also.
    thanks,
    prashant

    923315 wrote:
    hello ,
    i have written on procedure , in Which i am selecting the data from table1 and then insert the data into table 2 and then i am applying a commit.
    the table 1 contains more tha 4 laks(0.4 million) records.
    now i really need your suggection about the commit operation to be takes palce?
    can i perform commit after the insertion of 4 Lc record OR can i perform the commit after every 10,000 insertion of record?
    Thanks in advance for your suggestion. also let me know the reason also.
    thanks,
    prashantWhen you say you are doing it in a procedure, are you doing an insert .. select .. from ..
    or are you selecting from your source table in a loop and insert single rows at a time into the target table?

Maybe you are looking for