Continue behind COMMIT WORK.

Hi all,
I am facing problem with COMMIT WORK in my STANDARD SAP modification for executing ABAP Proxy. The problem is that the program doesnt continue after COMMIT WORK (messages, screens), but return to the initial screen.
Is there any way to commit data sent via proxy and then continue (with next proxy calling, processing screens etc)?
Thank you very much.
Frantisek Holas, CZ

Hi,
I solved the problem myself.
http://help.sap.com/saphelp_nw70/helpdata/EN/41/7af4e3a79e11d1950f0000e82de14a/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/EN/41/7af4e3a79e11d1950f0000e82de14a/frameset.htm
The point of solve the problem is place certain statements following with commit into standalone report, that you can call with SUBMIT command, passing value from ABAP memory or via select-option, as explained in documentation for SUBMIT STATEMENT.
The trick of this solution is that calling new report via submit creates new SAP LUW, which can contain COMMIT WORK, that commit ONLY SAP LUW of the called report. When the report finishes and you return to the calling report/fm/trasaction/..., the SAP LUW of the calling rept/fm/transaction/... continue not affected by this COMMIT.
It helped me to solve my problem.

Similar Messages

  • COMMIT WORK AND WAIT does not work

    Hello,
    I know this question has been asked many times in various forums. But the fact remains that there is no definitive solution found for this problem which does not involve WAIT UP TO n SECONDS or SELECT until the DB commit has been completed.
    We have an IDoc based inbound interface for creating Project Defintion and WBS Elements. Here is how the code looks like in the processing function module:
    * Create Project Defintion
    CALL FUNCTION 'BAPI_PROJECTDEF_CREATE'
      EXPORTING
        project_definition_stru = lwa_proj_bapi
      TABLES
        e_message_table         = lt_messages.
    * If no errors
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait = 'X'.
    * Other code
    * Create WBS Element (BAPI could not be used because not all fields are allowed to be updated)
    CALL TRANSACTION 'CJ11'
    Now while creating the WBS Element, transaction CJ11 returns an error that 'Project does not exist'. This is not correct because the same Project was successfully created in the previous step.
    It is clear that the problem is because of the delay in database commits.
    This happens only with few IDoc's and not all of them. And of course, the problem does not occur if I induce WAIT UP TO n SECONDS after BAPI_TRANSACTION_COMMIT. But this is not the best practice.
    The question is why BAPI_TRANSACTION_COMMIT does not wait even though we are forcing it to?
    Thanks in advance
    Sagar Acharya

    Suhas wrote:
    But i am baffled that although the COMMIT has happened earlier why is the data not updated in the DB ?
    Well, it's just a [COMMIT WORK|http://help.sap.com/abapdocu_70/en/ABAPCOMMIT.htm] and not a [COMMIT WORK AND WAIT|http://help.sap.com/abapdocu_70/en/ABAPCOMMIT.htm#@@AND%20WAIT@@COMMIT%20WORK@@]. Let me quote the ABAP help:
    If you do not specify the addition AND WAIT, the program does not wait until the update work process has executed it (asynchronous updating), but instead is resumed immediately after COMMIT WORK. However, if the addition AND WAIT is specified, program processing after COMMIT WORK will not continue until the update work process has executed the high-priority update function modules (synchronous updating).
    @Sagar Acharya: Well, I thought you were looking for an explanation why sometimes the project isn't created (and you only had posted coding that showed details for step 1) - I'm trying hard, but my mind reading skills are rather limited yet...
    So let's think about step 2 and 3: I assume that you made sure that your coding always references the correct WBS element. Again the commit (without wait) is done already via CJ11 (e.g. check form BUCHEN in SAPLCJWB). I'd expect though that the synchronous update mode should make this work. Since it doesn't, I'd try local update mode, which is what I'd choose in your case anyhow.
    Apart from that my mind is pretty blank, except for the usual silly things to check. E.g. are you sure you're coding is correct, you are handling all return messages and log them for inspection later (e.g. application log), you are certain that the WBS was actually created by the same IDoc that throws the fit (and IDoc was not reprocessed), etc.
    So maybe somebody else has better ideas...

  • ABAP Dump on "COMMIT WORK"

    The abap dump is occured in function module when the COMMIT WORK statement is executed.
    This function module updates a custom table.
    When creating a invoice through VF01 transaction this abap dump is occured.
    But for the next time the invoice is created successfully.
    What is the reason behind this.

    Hi,
      Refer
    https://forums.sdn.sap.com/click.jspa?searchID=11053241&messageID=5085300
    Regards
    Kiran Sure

  • Differences between Commit work, Logical Unit of Work and Roll back work

    Hi all,
    Can any one explain me in details what is the difference between Commit Work, Logical Unit of Work and Roll back work. Pls explain by providing some example.
    and also explain me where and when these are used and what are the importance of using these.
    Thanks in advance.
    Regards
    Ramana Prasad.T

    Hi Ramana Prasad,
    A Logical Unit of Work (LUW or database transaction) is an inseparable sequence of database operations which must be executed either in its entirety or not at all. For the database system, it thus constitutes a unit.
    LUWs help to guarantee database integrity. When an LUW has been successfully concluded, the database is once again in a correct state. If, however, an error occurs within an LUW, all database changes made since the beginning of the LUW are canceled and the database is then in the same state as before the LUW started.
    An LUW begins
    o each time you start a transaction
    o when the database changes of the previous LUW have been confirmed (database
    commit) or
    o when the database changes of the previous LUW have been cancelled (database rollback)
    An LUW ends
    o when the database changes have been confirmed (database commit) or
    o when the database changes have been canceled (database rollback)
    COMMIT WORK.
    Executes a database commit and thus closes a logical processing unit or Logical Unit of Work ( LUW ) (see also Transaction processing ). This means that
    all database changes are made irrevocable and cannot be reversed with ROLLBACK WORK and
    all database locks are released.
    COMMIT WORK also
    calls the subroutines specified by PERFORM ... ON COMMIT * executes asynchronously any update requests (see CALL FUNCTION ... IN UPDATE TASK ) specified in these subroutines or started just before,
    processes the function modules specified in CALL FUNCTION ... IN BACKGROUND TASK ,
    cancels all existing locks (see SAP locking concept ) if no update requests exist,
    closes all open database cursors (see OPEN CURSOR ) and
    resets the time slice counter to 0.
    COMMIT WORK belongs to the Open SQL command set.
    Return code value
    The SY-SUBRC is set to 0.
    ROLLBACK WORK.
    Closes a logical processing unit by reversing all database changes made since the last COMMIT .
    You use this statement if you cannot be certain that all the database changes have been executed correctly.
    The update routines are not performed.
    ROLLBACK WORK belongs to the Open SQL command set.
    Note
    If the ROLLBACK statement occurs within a SELECT loop, the processing cannot continue because the database cursor is invalid. After the ROLLBACK statement, you should therefore ensure that all SELECT processing has been explicitly terminated.
    <b>Plz. Avoid Duplicate Threads.</b>
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • Commit work not working in Routine for Transaction because of LUW

    Hi all,
    i have req to send adobe PDF as attachement by email.
    Basically i am calling adobe from output type of VL02n .
    Inside this i can not use commit work because of LUW.Please suggest what should i do.
    so not able to send email in green status.
    i am using below code
    TRY.
          zlcl_send_request->set_document( zlcl_document ).
        CATCH cx_send_req_bcs INTO zicl_oref_cast.
          CLEAR gv_text_cast .
          gv_text_cast = zicl_oref_cast->get_text( ).
      ENDTRY.
    Email sender
      TRY.
          zlcl_sender =  cl_sapuser_bcs=>create( sy-uname ).
        CATCH cx_address_bcs INTO zicl_oref_cast.
          CLEAR gv_text_cast .
          gv_text_cast = zicl_oref_cast->get_text( ).
      ENDTRY.
      TRY.
          CALL METHOD zlcl_send_request->set_sender
            EXPORTING
              i_sender = zlcl_sender.
        CATCH cx_send_req_bcs INTO zicl_oref_cast.
          CLEAR gv_text_cast .
          gv_text_cast = zicl_oref_cast->get_text( ).
      ENDTRY.
    Create the Reciever address
      TRY.
          zlcl_recipient = cl_cam_address_bcs=>create_internet_address(
                                             gv_email ).
        CATCH cx_address_bcs INTO zicl_oref_cast.
          CLEAR gv_text_cast .
          gv_text_cast = zicl_oref_cast->get_text( ).
      ENDTRY.
      TRY.
          zlcl_send_request->add_recipient( EXPORTING i_recipient =
          zlcl_recipient ).
        CATCH cx_send_req_bcs INTO zicl_oref_cast.
          CLEAR gv_text_cast .
          gv_text_cast = zicl_oref_cast->get_text( ).
      ENDTRY.
      TRY.
          zlcl_send_request->set_send_immediately( gc_x ).
        CATCH cx_send_req_bcs INTO zicl_oref_cast.
          CLEAR gv_text_cast .
          gv_text_cast = zicl_oref_cast->get_text( ).
      ENDTRY.
    Send the mail
      TRY.
          zlcl_send_request->send( ).
        CATCH cx_send_req_bcs INTO zicl_oref_cast.
          CLEAR gv_text_cast .
          gv_text_cast = zicl_oref_cast->get_text( ).
      ENDTRY.

    Hi
    From abap help:
    SY-ONCOM
    On Commit flag. This system field is set to different values depending on the call status of an ABAP program. Of these, only the value of u2018Pu2019 is guaranteed. If at all, SY-ONCOM must only be queried for u2018Pu2019.
    The value 'P' means that the program is already executing a subroutine started using PERFORM u2026 ON COMMIT and therefore a
    further subroutine call using PERFORM ... ON COMMIT would cause a runtime error.
    That means the variable SY-ONCOM has the information if a process "ON COMMIT" is working and so it determines if a dump has to be raised.
    Now it's clear the meaning of that correction: if before calling a new commit the value of SY-ONCOM is changed the dump will be avoided.
    I've done the following texts:
    REPORT  ZCOMMIT.
    WRITE: 'Calling routine on commit'.
    PERFORM DO_SOMETHING ON COMMIT.
    COMMIT WORK.
    FORM DO_SOMETHING.
      DATA: ONCOM TYPE SY-UCOMM.
      MOVE SY-ONCOM TO ONCOM.
      SY-ONCOM = 'S'.
      COMMIT WORK.
      MOVE ONCOM TO SY-ONCOM.
    ENDFORM.
    The code above is very dangerous, because it triggeres a ricorsive loop: no dump, but the form is continuously called, just as help says SY-ONCOM is equal to P
    REPORT  ZCOMMIT.
    WRITE: 'Calling routine on commit'.
    CALL FUNCTION 'Z_MAX_COMMIT' IN UPDATE TASK.
    COMMIT WORK.
    FUNCTION Z_MAX_COMMIT.
      DATA: ONCOM TYPE SY-UCOMM.
      MOVE SY-ONCOM TO ONCOM.
      SY-ONCOM = 'S'.
      COMMIT WORK.
      MOVE ONCOM TO SY-ONCOM.
    ENDFUNCTION.
    I expected the same behavior as above, but here no dump and no infinite loop, SY-ONCOM = V
    Now your process working in update task, but probably many function are called, I mean the system creates a queue of functions to be run in update task, so what happens here?
    I've tried this:
    FUNCTION Z_MAX_COMMIT.
    *"*"Function module di reg.:
    *"*"Interfaccia locale:
    *"  IMPORTING
    *"     VALUE(NO_COMMIT) TYPE  FLAG DEFAULT SPACE
      CHECK NO_COMMIT IS INITIAL.
      DATA: ONCOM TYPE SY-UCOMM.
      MOVE SY-ONCOM TO ONCOM.
      SY-ONCOM = 'S'.
      COMMIT WORK.
      MOVE ONCOM TO SY-ONCOM.
    ENDFUNCTION.
    REPORT  ZCOMMIT.
    WRITE: 'Calling routine on commit'.
    CALL FUNCTION 'Z_MAX_COMMIT' IN UPDATE TASK
      EXPORTING
        NO_COMMIT = 'X'.
    CALL FUNCTION 'Z_MAX_COMMIT' IN UPDATE TASK.
    CALL FUNCTION 'Z_MAX_COMMIT' IN UPDATE TASK
      EXPORTING
        NO_COMMIT = 'X'.
    COMMIT WORK.
    Here no dump and no infinite loop too, but also no impact on the rest of the functions,
    I can suppose the impact will be on the saving of data on database only, because your COMMIT ends the LUW, so it's very important the routine for printing is called at the end, after all saving routines.
    Max

  • COMMIT WORK AND WAIT USE

    Hi Friends,
    what is mean by COMMIT WORK AND WAIT.
    when we use ths syntax...??
    situation pls.
    regards,
    venu.

    Hi,
    To apply the changes made to the runtime objects of persistent classes to the actual persistent objects in the database, execute the COMMIT WORK statement. (Alternatively, use COMMIT WORK AND WAIT or SET UPDATE TASK LOCAL). Unless you are executing an object-oriented transaction from within the Transaction Service, you must include the COMMIT WORK statement explicitly in the program. Otherwise, it is encapsulated in the Transaction Service. (If you explicitly include the COMMIT WORK statement as described here, the t op-level transaction runs in compatibility mode).
    The function of the COMMIT WORK statement is extended when you use it in conjunction with Object Services. Before COMMIT WORK closes the SAP LUW and triggers an update, it calls internal methods of the Persistence Service. These methods bundle the changes made to managed objects of the Persistence Service and pass them to a special update function module using CALL FUNCTION ... IN UPDATE TASK. Thus the Persistence Service works with traditional update methods. The update module is usually registered after any update modules that have already been registered. The update is then triggered and the update task executes the update module in the order in which they were registered.
    After the system executes the COMMIT WORK statement, it sets the attributes of each persistent object in the ABAP program to initial. (That is, it calls the IF_OS_STATE~INVALIDATE method).
    Local Update
    If you want to change managed objects directly, rather than using the update module, you must change the update mode of the implicitly used Transaction Service. That is, the following statements must be executed before the COMMIT WORK statement:
    DATA TM type ref to IF_OS_TRANSACTION_MANAGER.
    DATA T type ref to IF_OS_TRANSACTION.
      TM = CL_OS_SYSTEM=>GET_TRANSACTION_MANAGER( ).
    T = TM->GET_CURRENT_TRANSACTION( ).
    T->SET_MODE_UPDATE( OSCON_DMODE_DIRECT ).
    COMMIT WORK.
    To ensure database consistency, the local update is activated internally using SET UPDATE TASK LOCAL. In such cases, the system raises an exception if there are already update modules registered in the update task. You can only register additional classical update modules after setting the mode. They will then also be updated locally.
    COMMIT
    Basic form
    COMMIT WORK.
    Addition
    ... AND WAIT
    Effect
    Executes a database commit and thus closes a logical processing unit or Logical Unit of Work ( LUW ) (see also Transaction processing ). This means that
    all database changes are made irrevocable and cannot be reversed with ROLLBACK WORK and
    all database locks are released.
    COMMIT WORK also
    calls the subroutines specified by PERFORM ... ON COMMIT ,
    executes asynchronously any update requests (see CALL FUNCTION ... IN UPDATE TASK ) specified in these subroutines or started just before,
    processes the function modules specified in CALL FUNCTION ... IN BACKGROUND TASK ,
    cancels all existing locks (see SAP locking concept ) if no update requests exist,
    closes all open database cursors (see OPEN CURSOR ) and
    resets the time slice counter to 0.
    COMMIT WORK belongs to the Open SQL command set.
    Return code value
    The SY-SUBRC is set to 0.
    Notes
    All subroutines called with PERFORM ... ON COMMIT are processed in the LUW concluded by the COMMIT WORK command. All V1 update requests specified in CALL FUNCTION ... IN UPDATE TASK are also executed in one LUW . When all V1 update requests have been successfully concluded, the V2 update requests ("update with start delayed") are processed, each in one LUW . Parallel to this, the function modules specified in CALL FUNCTION ... IN BACKGROUND TASK are each executed in one LUW per destination.
    COMMIT WORK commands processed within CALL DIALOG processing
    - execute a database commit (see above),
    - close all open database cursors,
    - reset the time slice counter and
    - call the function modules specified by CALL FUNCTION IN
    BACKGROUND TASK in the CALL DIALOG processing.
    However, subroutines and function modules called with PERFORM ... ON COMMIT or CALL FUNCTION ... IN UPDATE TASK in the CALL DIALOG processing are not executed in the calling transaction until a COMMIT WORK occurs.
    Since COMMIT WORK closes all open database cursors, any attempt to continue a SELECT loop after a COMMIT WORK results in a runtime error. For the same reason, a FETCH after a COMMIT WORK on the now closed cursors also produces a runtime error. You must therefore ensure that any open cursors are no longer used after the COMMIT WORK .
    With batch input and CALL TRANSACTION ... USING , COMMIT WORK successfully concludes the processing.
    Addition
    ... AND WAIT
    Effect
    The addition ... AND WAIT makes the program wait until the type V1 updates have been completed.
    The return code value is set as follows:
    SY-SUBRC = 0 The update was successfully performed.
    SY-SUBRC <> 0 The update could not be successfully performed.
    Note
    Runtime errors
    COMMIT_IN_PERFORM_ON_COMMIT : COMMIT WORK is not allowed in a FORM callled with PERFORM ... ON COMMIT .
    COMMIT_IN_POSTING : COMMIT WORK is not allowed in the update task.
    if its useful reward points

  • BCS Email and Commit Work

    I created a small email class that is basically a wrapper around the BCS document classes.  Everything works fine when used in normal programs.  Then, I tried to update some code that was behind a smartform for our order confirmations.  When I tried to test this, I got a dump because of the Commit Work after the send.  The error I got was that I was doing a commit work during an update task, which SAP doesn't like.  Apparently the commit work is needed for the BCS send method.  Does anyone have any ideas I can get around this?  Any idea would be appreciated.
    Thanks in advance,
    Curtis

    What i understand is that your code is getting executed in an Update Work Process & as you've guessed SAP doesn't allow COMMIT WORK to be used inside an Update Task.
    What Gaurav is trying to suggest is may be there are some Implicit Commits later on which might trigger your email.
    Without further inputs it's difficult to analyse.
    BR,
    Suhas

  • Commit work functionality

    Hello all,
    can anyone explain me what is commit work mean.
    Thanks & Regards
    venkata prasad

    Hello
    Check this
    Syntax Diagram
    COMMIT
    Basic form
    COMMIT WORK.
    Addition:
    ... AND WAIT
    Effect
    Executes a database commit and thus closes a Logical Unit of Work ( LUW) (see also Transaction Processing). This means that
    all database updates are made irrevocable and cannot be reversed with ROLLBACK WORK and
    all database locks are released.
    COMMIT WORK also
    calls the subroutines specified by PERFORM ... ON COMMIT,
    executes asynchronously any update requests (see CALL FUNCTION ... IN UPDATE TASK) specified in these subroutines or started just before,
    processes the function modules specified in CALL FUNCTION ... IN BACKGROUND TASK,
    closes all open database cursors (see OPEN CURSOR) and
    resets the time slice counter to 0.
    COMMIT WORK belongs to the Open SQL command set.
    The return code SY-SUBRC is set to 0.
    Notes
    All subroutines called with PERFORM ... ON COMMIT are processed in the LUW concluded by the COMMIT WORK command. All V1 update requests specified in CALL FUNCTION ... IN UPDATE TASK are also executed in one LUW. When all V1 update requests have been successfully concluded, the V2 update requests ("update with start delayed") are processed, each in one LUW. Parallel to this, the function modules specified in CALL FUNCTION ... IN BACKGROUND TASK are each executed in one LUW per destination.
    COMMIT WORK commands processed within CALL DIALOG processing
    - execute a database commit (see above),
    - close all open database cursors,
    - reset the time slice counter and
    - call the function modules specified by CALL FUNCTION IN
    BACKGROUND TASK in the CALL DIALOG processing.
    However, subroutines and function modules called with PERFORM ... ON COMMIT or CALL FUNCTION ... IN UPDATE TASK in the CALL DIALOG processing are not executed in the calling transaction until a COMMIT WORK occurs.
    Since COMMIT WORK closes all open database cursors, any attempt to continue a SELECT loop after a COMMIT WORK results in a runtime error. For the same reason, a FETCH after a COMMIT WORK on the now closed cursors also produces a runtime error. You must therefore ensure that any open cursors are no longer used after the COMMIT WORK.
    With batch input and CALL TRANSACTION ... USING, COMMIT WORK successfully concludes the processing.
    Addition
    ... AND WAIT
    Effect
    The addition ... AND WAIT makes the program wait until the type V1 updates have been completed.
    The return code is set as follows:
    SY-SUBRC = 0:
    The update was successfully performed.
    SY-SUBRC <> 0:
    The update could not be successfully performed.
    Note
    Runtime errors:
    COMMIT_IN_PERFORM_ON_COMMIT: COMMIT WORK is not allowed in a FORM called with PERFORM ... ON COMMIT.
    COMMIT_IN_POSTING: COMMIT WORK is not allowed in the update task.
    Additional help
    Making Database Changes Permanent
    If useful reward.
    Vasanth

  • Commit work sets sy-subrc 0

    I
    Commit work sets sy-subrc always to zero.
    In this case how can we know if commit work fails.
    Please provide more details and efficient usage of commit statements in a report

    Hi,
    Usage of commit statements is as follows:
    COMMIT WORK.
    Addition
    u2026 AND WAIT
    Effect
    Executes a database commit and thus closes a logical processing unit or Logical Unit of Work ( LUW ) (see also Transaction processing ). This means that
    all database changes are made irrevocable and cannot be reversed with ROLLBACK WORK and
    all database locks are released.
    COMMIT WORK also
    calls the subroutines specified by PERFORM u2026 ON COMMIT ,
    executes asynchronously any update requests (see CALL FUNCTION u2026 IN UPDATE TASK ) specified in these subroutines or started just before,
    processes the function modules specified in CALL FUNCTION u2026 IN BACKGROUND TASK ,
    cancels all existing locks (see SAP locking concept ) if no update requests exist,
    closes all open database cursors (see OPEN CURSOR ) and
    resets the time slice counter to 0.
    COMMIT WORK belongs to the Open SQL command set.
    Return code value
    The SY-SUBRC is set to 0.
    Notes
    All subroutines called with PERFORM u2026 ON COMMIT are processed in the LUW concluded by the COMMIT WORK command. All V1 update requests specified in CALL FUNCTION u2026 IN UPDATE TASK are also executed in one LUW . When all V1 update requests have been successfully concluded, the V2 update requests (u201Dupdate with start delayedu201D) are processed, each in one LUW . Parallel to this, the function modules specified in CALL FUNCTION u2026 IN BACKGROUND TASK are each executed in one LUW per destination.
    COMMIT WORK commands processed within CALL DIALOG processing
    - execute a database commit (see above),
    - close all open database cursors,
    - reset the time slice counter and
    - call the function modules specified by CALL FUNCTION IN
    BACKGROUND TASK in the CALL DIALOG processing.
    However, subroutines and function modules called with PERFORM u2026 ON COMMIT or CALL FUNCTION u2026 IN UPDATE TASK in the CALL DIALOG processing are not executed in the calling transaction until a COMMIT WORK occurs.
    Since COMMIT WORK closes all open database cursors, any attempt to continue a SELECT loop after a COMMIT WORK results in a runtime error. For the same reason, a FETCH after a COMMIT WORK on the now closed cursors also produces a runtime error. You must therefore ensure that any open cursors are no longer used after the COMMIT WORK .
    With batch input and CALL TRANSACTION u2026 USING , COMMIT WORK successfully concludes the processing.
    Addition
    u2026 AND WAIT
    Effect
    The addition u2026 AND WAIT makes the program wait until the type V1 updates have been completed.
    The return code value is set as follows:
    SY-SUBRC = 0 The update was successfully performed.
    SY-SUBRC <> 0 The update could not be successfully performed.
    Note
    Runtime errors
    COMMIT_IN_PERFORM_ON_COMMIT : COMMIT WORK is not allowed in a FORM callled with PERFORM u2026 ON COMMIT .
    COMMIT_IN_POSTING : COMMIT WORK is not allowed in the update task.
    Hope it will help you.
    Feel free to ask any doubt.
    Regards
    Aparna

  • Problem with COMMIT WORKS command

    Hello all,
    I’ve a little problem. It seams that I don’t understand how ‘commit work’ command works. When I’m calling transaction with USING parameter:
    CALL TRANSACTION 'FPSA' USING itab_bdcdata.
    When inside of that transaction ‘Commit works’ occur, than commit is being executed and transaction is ending which is not good, because there is still code left that should be executed.
    When I run transaction without USING
    CALL TRANSACTION 'FPSA'
    Everything works fine. I’ve tried using UPDATE addition in CALL FUNCTION, but without result. Does anybody know what is the problem?

    This is meant to work exactly as you described:
    A transaction called with CALL TRANSACTION USING returns right after COMMIT occurs - if you don't provide any additional options.
    There is a way to make such transaction continue with the code after the commit. You just have to use "OPTIONS FROM" addition of the "CALL TRANSACTION" statement - parameter RACOMMIT.
    For more information put the cursor on CALL TRANSACTION statement in your abap code and press F1.
    regards
    good luck

  • CO54: Message is not sent to any destination: Commit Work is getting failed

    Hello,
    While processing the Messages from XFP to SAP Update is getting terminated due to the use of Commit Work. SAP Note 147467 - Update termination when sending process messages has been referred which is for 4.6C, but we are in ECC6.0.
    While processing the message in second iteration Commit Work triggres and Update happens in the data base.
    Following Issue is only concerned with Nested HUs
    T-Code used CO54
    Following are the analysis:
    it looks like u201CCreate and Post a Physical Inventory Docu201D is failing in the initial processing because the inventory doc is created when the Transfer Order to the PSA (or the TO from the PSA) is not yet completed (quant is still locked somehow).
    CO54, process message category=ZHU_CONS: HU to be consumed is a nested pallet (unpacking/ repacking and TOs to/from) and qty to consume is greater that HU qty in SAP (creation of a physical inventory doc is required).
    1. The error occurs while clearing the inventory posting for the physical inventory document.
    2. The surprising factor is the u201CProcess Messageu201D is not processed correctly for the first time.
    3. Indeed it is successfully processed without any error if you do process it second time.
    Error Log from C054 T-Code.
    02.08.2010                                         Dynamic List Display                                                1
    Type
    Message text
    LTxt
    Message category: ZHU_CONS ---    Process message: 100000000000000621   "Send to All Destinations" Is Active
    Message to be sent to destination:
    ZHGI ZPP_0285_XFP_GOODSISSUE Individual Processing Is Active
    => Message will be sent to destination (check log for destination)
    Message category: ZHU_CONS ---    Process message: 100000000000000621   "Send to All Destinations" Is Active
    Message destination ZPP_0285_XFP_GOODSISSUE triggered COMMIT WORK
    Input parameters OK, passed to source field structure
    Step 0: Now checking if scenario with HU
    Step 2: Scenario with HU, Now checking if HU nested
    Step 3: HU nested, checking if HU in repack area
    Step 4: HU not in repack area, moving it to repack area
    HU moved to repack area, TO number 0000000873
    Step 5: Depacking nested HU...
    Nested HU depacked, HU pallet n°: 00176127111000461994
    Steps 6-7: Moving back HUs to supply storage type / bin...
    HU 00376127111000462001 moved back to original area with TO number 0000000875
    Steps 6-7: Moving back HUs to supply storage type / bin...
    No need to move back HU 00176127111000461994 (not in table LEIN)
    Step 8: Checking if HU fully used and quantity matches HU system quantity
    HU not fully used but picked quantity > HU quantity: inventory necessary
    Step 9: Inventory needed, creating physical inventory document...
    Physical inventory document 0000000126 created
    Step 10: Adding weighted quantity on inventory document...
    Weighted quantity entered in document 0000000126
    Step 11: Posting rectification in inventory document 0000000126...
    Physical inventory document 0000000126 rectified
    Error: rectification for doc 0000000126 not updated in DB!
    => Destination ZHGI ZPP_0285_XFP_GOODSISSUE can currently not process the message
    => Message is not sent to any destination
    The errors in SM13 for this contain the program SAPLZPP_0285_HUINV_ENH (creating/changing the HUM physical inventory doc). WM Function module L_LK01_VERARBEITEN is also involved.
    From SM13, it displays the following piece of code in include LL03TF2M (read the LEIN table=Storage Units table):
    WHEN CON_LK01_NACH.
           IF (LEIN-LGTYP = LK01-NLTYP AND         
                 LEIN-LGPLA = LK01-NLPLA) OR
                  NOT P_LEDUM IS INITIAL.
           ELSE.
    Das ist der Fall einer TA-Quittierung wo Von-Hu = Nach-HU ist und sofort die WA-Buchung erfolgt. Dann steht die HU noch auf dem Von-Platz, daher darf hier kein Fehler kommen, sondern es wird ein. Flag gesetzt, daß verhindert daß die LE fortgeschrieben wird.
             FLG_NO_LE_UPDATE = CON_X.
            MESSAGE A558 WITH P_LENUM.
           ENDIF.
    Translation in English of the German text via Google:
    "This is the case where confirmation of a TO source-HU = destination-HU, and now the WA (Good Issue?)- made book. Then, the HU is still on the From-space may therefore come here not a mistake, but it sets a flag that prevents that the LE is updated."
    Thanks and Regards,
    Prabhjot Singh
    Edited by: Prabhjot  Singh on Aug 2, 2010 4:39 PM

    Hope you have carried out following things in Production ( Please refer to SAP help before actually doing it in production).
    1. Transport the predefined characteristics from the SAP reference client (000) to your logon client.
    2. Adopt Predefined Message Categories - In this step, you copy the process message categories supplied by SAP from internal tables as Customizing settings in your plants.

  • My USB port on my Macbook Pro stopped working and i tried the SMC reset and the one closest to the SD port still continues to not work. Is there anything i can do besides bringing it in?

    My USB port on my Macbook Pro stopped working and i tried the SMC reset and the one closest to the SD port still continues to not work. Is there anything i can do besides bringing it in?

    I would do another SMC reset. If nothing changes you should take the computer in to an Apple store for a free diagnostic. You should make an appointment.
    http://www.apple.com/retail/geniusbar/

  • Reg. commit work in a follow-up action

    friends
       i am using the following approach to solve a requirement which is posted in this thread..How to send a mail after a usage decision is made in QA11?
    got a nice reply too
      i have defined a follow-up action and assigned a customized mail-sending fm to it..my doubts are, i am on 4.7..am able to send the mail to an internal id, but the problem is without using commit work and submit rsconn01 commands, am failing in doing the same...i have read in a thread that commit work or submit (if the called program uses commit work) will cause data inconsistencies and will trigger locks if it's used in any user-exit or badi...but in my case, when will a follow-up action actually take place? will it happen after all the database commits? if so, then i believe that even i use commit work and submit commands in my z mail sending fm, it wouldn't cause any problems...am just sort of afraid whether this approach is the correct one? or triggering the mail code from the last user exit or badi itself will solve the purpose? i believe not..please guide me on this friends...helpful replies will be appreciated and awarded..thanks in advance
    Regards,
    Sathish. R

    less views and no answers:-(

  • My HD died on my iMac. I replaced it and lost everything that was on it. I found my source disks from my original purchase for Final Cut Express HD 3.5.  I now have Maverick ISO and it will not let me load my software so I can continue my film work. ???

    My HD died on my iMac. I replaced it and lost everything that was on it. I found my source disks from my original purchase for Final Cut Express HD 3.5.  I now have Maverick ISO and it will not let me load my software so I can continue my film work. How do I get it too recover it without paying for it again since I paid for it already and have projects in progress that need to be completed?

    1) Partition your hard drive or add an external drive and install Snow Leopard (with the Optional Rosetta) into it and then you can dual-boot (System Preferences:Startup Disk) into Snow Leopard and run FCE 3.5 there.
    2)  Use one of the following methods to install FCE 3.5 into Mavericks:
    a)  Pacifist:  http://www.charlessoft.com/
    b)  Jeremy Johnstone's Terminal method:  http://www.jeremyjohnstone.com/blog/2012-03-11-installing-final-cut-pro-studio-2 -0-on-mac-os-x-10-7-lion.html
    Reports on this forum seem to confirm that Final Cut Studio 2 will continue to operate in Mavericks once it is functionally installed, albeit some plug-ins may fail to function.  FCE 3.5 is the same generation as FCS2, and presumably will continue to operate in Mavericks, as well.

  • How to execute Update Module FM after final commit work for a T-code.

    Hello Folks,
    I have a bit complex issue with my current object.
    We have modified MM41/MM42 transactions and added a subscreen to fulfill the requirement.
    We have designed the subscreen and embedded the same to MM41/MM42 through SPRO configuration.
    Now for update business logic,i am trying to execute one Function module(Update Module) in update Task...so that it will be executed once after the final commit work will be done for MM41/MM42.
    But its not executing.
    To fulfill my requirement i need to execute the FM only after Final Commit work for MM41/MM42.
    Please suggest in this regard.
    Even i can see few BADI's which are triggering through MM01/MM02 but not through MM41/MM42.
    BADI_ARTICLE_REF_RT
    BADI_MATERIAL_CHECK
    BADI_MAT_F_SPEC_SEL
    Code with which i am trying is given below.
    After PAI event of the subscreen---
    1:        MODULE USER_COMMAND_9001.
    2:       MODULE user_command_9001 INPUT.
                        PERFORM sub_save_mara ON COMMIT.
              ENDMODULE.
    3:       FORM sub_save_mara.
                         CALL FUNCTION 'ZMMUPDATE_MARA_APPEND_STRUCT' "IN UPDATE TASK
                                        EXPORTING
                                                 materialno = gv_matnr
                                                 appendmara = ty_zzmara.
             ENDFORM.                    "sub_save_mara
    4:                FUNCTION zmmupdate_mara_append_struct.
                      ""Update Function Module:
                       ""Local Interface:
                      *"  IMPORTING
                   *"     VALUE(MATERIALNO) TYPE  MATNR
                   *"     VALUE(APPENDMARA) TYPE  ZZMARA
    Data Declaration for Local use
      DATA : w_mara TYPE mara.
    Selecting the latest values for the material.
      SELECT SINGLE * FROM mara INTO w_mara WHERE matnr = materialno.
      IF sy-subrc = 0.
      Move the ZZMARA values to structure MARA
        MOVE-CORRESPONDING appendmara TO w_mara.
      Update the values in table MARA.
        MODIFY mara FROM w_mara.
      ENDIF.
    ENDFUNCTION.
    Kindly suggest.Thanks in advance.
    Regards
    Ansumesh

    Hi..
    The code given by me will work fine provided the Final commit should happen.
    Because to execute FM with update task,final commit work should happen which is mandatory and after that it will call the update task.
    In my case final commit work was not happeneing because..SAP standard program was not able to detect wether there is any change in my sub-screen or not as the standard program & my custom program,subscreens are different.
    As it was not able to detect the change,so final commit was not happening and hence update task also.
    To provide the reference of change in my subscreen to standard program ,i set a flag as per the change in the subscreen
    And exported the same to memory.
    Then Implemented one enhacement spot in MATERIAL_CHANGE_CHECK_RETAIL Fm where i have Imported the flag value.
    Based on my custom flag value,i have set one standard flag FLG_AENDERUNG_GES which tells SAP standard program for MM42 wether any change has happened or not.
    The above solved my purpose.
    Regards
    Ansumesh

Maybe you are looking for

  • Unable to watch YouTube video

    I am noble to watch YouTube videos.  This is just a recent problem.  Any fixes please?

  • Transformation in combination with a search query

    Using DPS 6.3 I have merged an Active Directory and Domino Directory. This all seems to work fine. The only issue I still have is that for some reason the transformations are not applied when performing a search query. An example: In AD groups can be

  • My sound keep shutting down on my DAW.

    I have read some threads on this. Most pointo to Motu. But I am having te same issue with my Presonus Firepod, My Sony DSR 11. A Matter of fact I'm having issues with all my firewire devices. Last but not lease I have recently gotten they dreaded gre

  • Raw use of Generics

    Something which makes me wonder: When I use own generic classes in a raw manner, I usually get the following warning: Type safety: The method myMethod() belongs to the raw type Generic. References to generic type Generic<T> should be parameterizedWhe

  • I've downloaded Retrogamer toolbar and get a message that the add-on is disabled, how do I enable it?

    I've been instructed to manage an add-on which has been disabled after downloading retrogamer toolbar. There are many add-ons and plug-ins disabled. How do I determine which one to enable? What would happen if I just enable all of them? Would this ca