BDC failing at the statment "COMMIT WORK" in code

All,
     I am working on benefits (COBRA) and I had to create a BDC for transaction HRBENUSCOB02(COBRA letter generation). Everything is fine except it hits code COMMIT WORK(this is SAP code). The program does not go any further after COMMIT WORK but if I run the transaction by itself it works fine! Does BDC does not work with steament "COMMIT WORK"? Is this because it is asynchronous? This is my sample BDC code:
==============================================
perform bdc_dynpro      using 'RPUCOB02' '1000'.
  perform bdc_field       using 'BDC_CURSOR'
                                'PNPPERNR-LOW'.
  perform bdc_field       using 'BDC_OKCODE'
                                '=ONLI'.
  perform bdc_field       using 'PNPPERNR-LOW'
                                  '305968'.......................................more code, I just didn't eant to paste the whole code
l_opt-DISMODE = 'N'.
CALL TRANSACTION 'HRBENUSCOB02' USING bdcdata OPTIONS FROM l_opt.
=============================================
Please give me any feedback or information if anyone has any ideas.
Thanks.
Mithun

Thanks everyone for the time. Actually, I was doing trial and error and resolved this issue. There is one parameter "RACOMMIT", and I set it to TRUE and it worked!
l_opt-RACOMMIT = 'X'.
Thanks.
Mithun

Similar Messages

  • How the Auto Commit works in APEX

    Hi,
    I have a PL\SQL Process which consist of suppose insert / update / delete statements.
    insert into emp ()
    values ()
    update emp
    set
    delete from emp
    where empno = Just want to know..when apex do the Auto Commit..I mean after each DML operation.
    Thanks,
    Deepak

    Thanks..Varad for the response.
    one more clarification.
    suppose I have a PL\Process and I am having the following DML in sequence, DML is for the same table EMP
    insert into emp (empno) values (1234)
    delete from emp where empno != 1234First I am inserting into EMP and based on that insert, I am doing some delete from the same table EMP.
    so when I come to delete part, the data '1234' into EMP table must be commited, so want to know if I have to issue a COMMIT after the insert statement.
    Thanks,
    Deepak

  • VISA (Serial port) commands fail in the VI, but work in VISA test panel

    Hi, I have an instrument which has a usb connection. When I connect it to a Windows 7 PC, it automatically picks up the driver and shows up as a "USB Serial Port (COM7) (Manufacturer is FTDI). 
    When I open up NI MAX, this device shows up as COM7 (ASRL7::INSTR) under "Serial and Parallel". And, when I click on Open VISA Test Panel, and try the "*IDN?" command, it works OK.
    However, the VI (which just sends a VISA command "*IDN?") gives me a time out error (0XBFF0015) or a device/resource not present error ( 0XBFFF0011). Attached is a screenshot of the VI. 
    Any ideas why?
    Thanks. 
    PS: I went through the process to create the VISA-USB driver, but that has some other issue, but I am trying to understand why this occurs. This device also has a GPIB port and when I use a USB-GPIB adapter, it works very well. 
    Solved!
    Go to Solution.
    Attachments:
    problem_vi.JPG ‏24 KB

    SysB1 wrote:
    Hi, I have an instrument which has a usb connection. When I connect it to a Windows 7 PC, it automatically picks up the driver and shows up as a "USB Serial Port (COM7) (Manufacturer is FTDI). 
    When I open up NI MAX, this device shows up as COM7 (ASRL7::INSTR) under "Serial and Parallel". And, when I click on Open VISA Test Panel, and try the "*IDN?" command, it works OK.
    However, the VI (which just sends a VISA command "*IDN?") gives me a time out error (0XBFF0015) or a device/resource not present error ( 0XBFFF0011). Attached is a screenshot of the VI. 
    Any ideas why?
    Thanks. 
    PS: I went through the process to create the VISA-USB driver, but that has some other issue, but I am trying to understand why this occurs. This device also has a GPIB port and when I use a USB-GPIB adapter, it works very well. 
    Look up the examples that ship with LabVIEW.  What you have there isn't quite complete - for serial VISA.  While GPIB will work great with what you have, serial VISA requires you to configure your serial port and is a little more complicated to read.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Commit work

    Hi all,
    Please help me in this issue,
    When we using Update ABAP statement what is the need of using again a commit statement if we dont use commit statement.
    Thanks & Regards
    Reddy

    Hello Reddy,
    COMMIT is used when you code directly in ABAP and make changes in the database and want to reflect in the database immediately.
    When you perform COMMIT , all the LUW s work will be reflected to the database,
    COMMIT WORK is the key word to make the database change. And whereas ROLLBACK is the opposite to commit work,
    This statement will apply any outstanding database updates and wait until they have actually been put on the database before proceeding to the next statement.
    An ordinary commit work will initiate the process to update the databases in a separate task and will press on in your abap.
    COMMIT WORK: ( Asynchronous)
    Your program does not wait for any acknowledgement. it just start executing the next statment after COMMIT WORK.
    <u><b>For your kind reference please check the below link</b></u>
    <b>http://help.sap.com/saphelp_erp2005vp/helpdata/en/fc/eb3b64358411d1829f0000e
    829fbfe/content.htm</b>
    <b>
    Reward points for all useful answers....
    Cheers !
    Moqeeth.</b>

  • 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

  • * Commit work on table  using UPDATE statement.*

    HI,
       This is Anil . I have problem regarding Commit work and Wait up to 2 seconds.
    I am using Commit work on one Update table statement but it is not working . While doing debugging it is working
    (means it is updating Table.) but while running the transaction directly it is not updating the table.
    Check the statements :
    Commit work.
    Some Select stmt on <table>.
    IF <condition.>
    Update  <table > statement.
    if sy-subrc EQ 0.
        Commit work . ( This is not working while running transaction mean it is not updating table. While debuggint it it updating table.)
         wait up to 2 seconds.
    endif.
    endif.
    Will that above Commit work causing any problem or  what is the reason it is not updating table.
    Please give some suggestion in this case.
    Regards,
    Anilreddy.

    Hi
    the below code with commit work is working finr for me.
    only thing i suggest is to check sy-subrc value.
    commit work.
    update spfli set test = '1234' where carrid = 'AA'.
    if sy-subrc eq 0.
    commit work.
    wait up to 2 seconds.
    endif.
    write: / sy-subrc.

  • Regarding COMMIT WORK

    Hi,
    I am using two BAPIs 'BAPI_ACC_ACTIVITY_ALLOC_POST' and 'BAPI_NETWORK_CONF_ADD' in my custom function module. These two BAPIs are used  as explained below:
    1) Fisrt the BAPI 'BAPI_ACC_ACTIVITY_ALLOC_POST'  is called. If sy-subrc NE '0', the error messages are read.
    2) Then the BAPI 'BAPI_NETWORK_CONF_ADD' is called. If sy-subrc NE '0', its error messages are read.
    3) If there is no error for the two BAPIs called above, then the actual posting is done by calling the BAPI
       'BAPI_ACC_ACTIVITY_ALLOC_POST'. If sy-subrc EQ 0, Commit work.
    I would like to know if the Commit work in third step will commit the changes of the steps 1 and 2 as the the statement COMMIT WORK completes the current SAP LUW.
    Or will it commit the step 3 only.
    Thanks & Regards,
    Soumya.

    Hi soumya,
    you can rollback for the step 1& 2 if sy-subrc ne 0.
    and then use the comit work if sy-subrc eq 0 for step 3.
    Hope this will help you.
    regards,
    Phani.

  • COMMIT WORK on BADI BUPA_GENERAL_UPDATE

    Hi all,
    We're trying to propagate partner functions from the BP to associated business transactions.
    We're using the instruction commit work in the BUPA_GENERAL_UPDATE. The problem comes when we propagate the partner functions more than once in the BP, because the first time works but the second causes a short dump (only in PC-UI, in SAP GUI it works properly).
    We need to commit to unlock the modified opportunities.
    Anyone knows the adecuate method to commit the work in PC-UI for transaction BP?
    Thanks in advance, any help will be appreciated.
    David

    Hi David,
    My first try would be to issue the COMMIT statement inside a Form (<i>commitroutine</i>)and call this form in as
    PERFORM <i>commitroutine</i> ON COMMIT.
    Let me know if it works.
    Hope it helps.
    Thanks, Debasish

  • Commit work and roll back with simple language and simple example

    hi guru
    commit work and roll back with simple language and simple example

    Hi,
    The statement COMMIT WORK completes the current SAP LUW and opens a new one, storing all change requests for the current SAP LUW in the process. In this case, COMMIT WORK performs the following actions:
    It executes all subroutines registered using PERFORM ON COMMIT.
    The sequence is based on the order of registration or according to the priority specified using the LEVEL addition. Execution of the following statements is not permitted in a subroutine of this type:
    PERFORM ... ON COMMIT|ROLLBACK
    COMMIT WORK
    ROLLBACK WORK
    The statement CALL FUNCTION ... IN UPDATE TASK can be executed.
    ROLL BACK:
    The statement ROLLBACK WORK closes the current SAP-LUW and opens a new one. In doing so, all change requests of the current SAP-LUW are canceled. To do this, ROLLBACK WORK carries out the following actions:
    1) Executes all subprograms registered with PERFORM ON ROLLBACK.
    2) Deletes all subprograms registered with PERFORM ON COMMIT.
    3) Raises an internal exception in the Object Services that makes sure that the attributes of persistent objects are initialised.
    4) Deletes all update function modules registered with CALL FUNCTION ...IN UPDATE TASK from the VBLOG database table and deletes all transactional remote Function Calls registered with CALL FUNCTION ... IN BACKGROUND TASK from database tables ARFCSSTATE and ARFCSDATA.
    5) Removal of all SAP locks set in the current program in which the formal parameter _SCOPE of the lock function module was set to the value 2.
    6) Triggers a database rollback, which also ends the current database-LUW.

  • How does the multicolumn listbox work?

    how does the multicolumn listbox work?

    Code attached
    [email protected]
    Ian F
    Since LabVIEW 5.1... 7.1.1... 2009, 2010
    依恩与LabVIEW
    LVVILIB.blogspot.com
    Attachments:
    Get_DlbClk_Row_ifk2003.vi ‏31 KB

  • BDC commit work issue.

    Hi all,
    Im facing a issue in BDC:
    In a loop there is a select query called and if sy-subrc = 0 the call transaction using mode N is called in the next step.
    first time if the sy-subrc is ne 0 then call transaction is done which updates( considered as new entry )
    the table used in the select query.
    when the loop executes the second time the sy-subrc is still 4 instead of 0( previous data is not updated in DB ).
    So after all the execution only the last record exists in the transaction,
    that is the table control index is always 1 due to the select query failure.
    Here the problem is when using mode N, when mode A is used its working fine.
    The data is not getting updated in db in first loop cycle, so the select query in second loop cycle fails.
    The select query gets executed for the same material no's.
    I have also tried with explicit commit and synchrounous update is used
    Thanks,
    Keshav

    Hi Suhas,
    This applies when we open a cursor for select, use fetch to get the data. Ater the fetch if we commit, then it closes all the open cursors. So next fetch on the previously opened cursor will lead to dump.
    Perfect example could be.
    SELECT......
    Do processing.
    COMMIT WORK.
    ENDSELECT.
    Keshav,
    I beleive you are not using SELECT ENDSELECT in your case. If it is SELECT SIGLE/SELECT INTO TABLE,  OPEN, FETCH and CLOSE CURSOR operations happens at the back end during the select query execution. ( We can see ST05 trace for this). So as per my understanding COMMIT after the CALL TRANSACTION shouldn't cause any problem.
    Please correct if i am wrong any where.
    Thanks,
    Vinod.

  • 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.

  • What exception should I use when commit work fails ?

    hi all:
        I create a class with methods to insert , modify and delete trasaction data, 
    when commit work fails, I want to throw an exception, what exception should I use
    for this case?

    In general, you should do your commit using CALL FUNCTION IN UPDATE TASK. As this runs in a different process, you will never be able to catch an exception in your main task, even if you throw one in the Open SQL code. What you should do is carefully validate your data before posting it to the database, so that commit cannot fail for data integrity reasons. If it fails for technical reasons (DB down etc.) there is nothing that your code could do about it anyway, so in this case even getting an exception would be no use. What exactly is it you are trying to accomplish?
    -- Sebastian

  • COMMIT WORK AND WAIT IN BDC

    All stock transfer order updates, generating deliveries and picking and post good issues(PGI) are done via BDC processing. That is we have BDC for tcodes: me22, ye02 and vl02.
    The issue is the deliveries are not picked and te PGI is completed. we have to use COMMIT WORK AND WAIT statement after every BDC processing.
    There is a form ' insert-transaction using tcode '
    This form calls BDC_OPEN GROUP, BDCINSERT and BDC_CLOSE_GROUP.
    So we write this COMMIT AND WAIT statement after call transaction <tcode>( eg call transaction me22) every time  or just after BDC_CLOSE _GROUP in  the form.

    Hi,
    you the call of BDC inside a loop and set the COMMIT WORK AND WAIT for the endloop.
    loop ...
      bcd-processing.
      COMMIT WORK AND WAIT
    endloop
    Regards
    Nicole

  • When logging in into yahoo mail after typing in password Firefox is adding something, login fails all the time. At yahoo mail Notepad does not work because it is impossible to close the list of items and they cover information, so I have to go to IE.

    When logging in into yahoo mail after typing in password Firefox is adding something, probably remembered password and login fails all the time. At yahoo mail Notepad does not work because it is impossible to close the list of items and they cover information, so I have to go to IE.

    Only when i go to a different browser (like IE) after i clear it , then all that shows up is the pages i visited in IE , that is what bugs me , why is IE browsing history sowing up in Firefox ??
    Basically , i can clear the history in Firefox , and then for a example , go to Craigslist , using IE7 (launching it from a complete different Icon , in other words at that time i never open Firefox) , then after closing out , or even leaving open as it does not seem to matter , i go into Firefox , and hit History , and there is every place i visited in IE7 , on my History in Firefox

Maybe you are looking for

  • IPod Nano 5G Backlight Remains On

    I have a 5th generation iPod Nano, and recently bought new headphones that have an in-line mic/remote. They work fine with my phone, but when plugged into my ipod the screen's backlight remains on indefinitely, and the click wheel stops functioning p

  • Order Number is not appearing in Asset PR

    Hi, At the time of creation of Asset PR, the order number is not appearing. I had already assigned the order number in "origin" tab in Asset Master. Please find below details: 1) Creation of Asset with AS01 2) Creation of Order with KO01 3) Assign th

  • No option to set password for login

    my macbook doesn't ask me for my password when i log on, and when i go to my system preferences and go under security, there is no option for me to set the password, that is, there is no button to click that allows me to disable automatic login. help

  • IMovie crashes soon after loading

    I'm new here, and I'm kinda new with iMovie. I've been working on a 7 minute project with some friends, doing some voiceovers and adding in audio tracks. As we added in audio tracks it seemed to be getting a bit slower and less responsive, but it was

  • Using the 6500c with HP iPAQ

    I need to use the modem from the 6500c to connect to the Internet with the iPAQ. The correct parameters are entered on the telephone which work with a telephone from Ericsson.