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

Similar Messages

  • How to handle JCO Exceptions at JCO (RFC) function call

    Hello Forum,
    I am implementing an JCO Server scenario.
    I use dynamic repositories like Example7.java from the JCO documentation.
    Example7 throws an JCO.AbapException if anything went wrong, e.g. the function is not implemented.
    How to react on this AbapException?
    The examples in SAP Help documentation only catch
    SYSTEM_FAILURE and COMMUNICATION_FAILURE.
    All other RFC modules I have seen which declare the function modules to be used by dynamic JCO repositories (like Example7.java) do not define any other Exception parameters.
    But these two are only thrown and caught when something with communication went completely wrong, e.g. RFC not found.
    But when RFC can be reached and the JCO Server is executing the Java method, an AbapException could be thrown on error. How to react on this?
    In my implementation based on the examples I always get a ABAP dump. The dump says:
    Exception named  without message text. Why that name?
    How to handle this type of exception in order to avoid the dump?
    Can anyone post an example please?
    Thanks,
    Carsten
    Edited by: Carsten Schön on Apr 15, 2008 4:22 PM
    Edited by: Carsten Schön on Apr 15, 2008 4:24 PM

    Hi Micky,
    thanks for your quick response.
    If so, to throw JCO.AbapException on JCO Server side is not correct?
    What I do is throwing the JCO.AbapException (like in the JCO Example 7).
    At the RFC call in APAB I handle both exceptions SYSTEM_FAILURE and COMMUNICATION_FAILURE like
    CALL FUNCTION 'MY_JCO_FUNCTION_MODULE'
        DESTINATION JCO_DEST
        <...>
        EXCEPTIONS
          SYSTEM_FAILURE        = 1  MESSAGE RFC_MESS
          COMMUNICATION_FAILURE = 2  MESSAGE RFC_MESS.
    This works as far something with RFC is wrong, e.g. Server can not find the function or Server not reachable.
    But the AbapException thrown by the JCO Server (Java) is not handled that way. Why?
    Sorry if this is the wrong forum but I tried posting in Netweaver integration and got no answer for 1 week and because it's ABAP related I thought the topic suites here.
    Carsten
    Edited by: Carsten Schön on Apr 15, 2008 5:10 PM

  • How do I retrieve records from a table using JCO RFC Function Call

    Hi
    I am totally new to SAP Java Progamming. And I would like to know if I am writing code correctly. I read some tutorials in the Internet but I am still not sure if I am doing it the correct way.
    This is what my vendor has given me.
    My question is whether this is the correct optimum way to do get the customer detail based on an array of input values for the customer reference number.
    Input:
    I_CUSTNO - Any number customer IDs. This is a table similar to I_CUSTDETL
    Output:
    Structure name:  I_CUSTDETL
    Note: The CUSTID column has been added in the structure to identify the address of the relevant customer id
    Field details:
    Field Name  Data Type  Length
    CUSTID       Character   10
    COMPANYNAME   Character   40
    EMAIL        Character     40
    This is my code:
            JCoFunction function = connect.getFunction("Z_GET_CUSTOMER");
            JCoTable cust = function.getTableParameterList().getTable("I_CUSTNO");
            cust.appendRow();
            cust.setValue("CUSTID", "10000700");
            cust.appendRow();
            cust.setValue("CUSTID", "10000701");
            cust.appendRow();
            cust.setValue("CUSTID", "10000702");
    connect.execute(function);
            JCoTable table = function.getTableParameterList().getTable("I_CUSTDETL");
              System.out.println("Table size: " + table.getNumRows());
              for (int i = 0; i < table.getNumRows(); i++, table.nextRow()) {
                String custid= table.getValue("CUSTID").toString();
                String companyname = table.getValue("COMPANYNAME").toString();
                String email = table.getValue("EMAIL").toString();
                System.out.println("----
                System.out.println("Record Number::" + i + "::");
                System.out.println("----
                System.out.println("Value custidis::" + custid+ "::");
                System.out.println("Value companyname is::" + companyname + "::");
                System.out.println("Value email is::" + email + "::");

    Hi,
    Answer to your question :whether this is the correct optimum way to do get the customer detail based on an array of input values for the customer reference number? is
    YES.
    Regards,
    Ganga

  • Commit work in RFC function module

    hi all.
    What will happend if i give commit in the RFC function module .
    why we need to use BAPI_Commit after updating through BAPI function module.
    regards,
    Madhavi

    First read some documentation like [SAP LUW|http://help.sap.com/saphelp_bw/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/frameset.htm], [Transactional RFC (tRFC)|http://help.sap.com/saphelp_nwpi71/helpdata/en/22/042578488911d189490000e829fbbd/frameset.htm] or [Transaction Model for Developing BAPIs|http://help.sap.com/saphelp_46c/helpdata/en/a5/3ec8654ac011d1894e0000e829fbbd/frameset.htm]
    Regards,
    Raymond

  • How can I disable the double-tap to zoom in function?

    I play a game where I must click fast on a button, but tapping the button zooms in/out the screen all the time.
    I also don't need to zoom in. Thus, how can I disable the tap to zoom function?

    The double tap focuses on elements on the page and to zoom pinching in and out are the main features of zooming in Fennec. Currently there are no ways to disable this feature.

  • VoiceOver Accessibility, how can I disable the automatic speakerphone / handsfree in a phone call?

    The blind people use VoiceOver for use the iPhone, it's a fantastic assistive software.
    For me, there is a feature that would change.
    If VoiceOver is enable, in a call, the speakerphone / handsfree automatic enable with a proximity sensor. I find it uncomfortable!
    There is any way to disable this feature?
    Can I propose it for the next version of IOS?
    Thanks!

    Hi Zoltan,
    Glad to receive your reply.
    According to your description, could you please tell me where you disable the Intellisense option in VS IDE?
    In addition, I tried to reproduce your issue in my side, I found that when I disable the Intellisense by going to TOOLS->options->Text Editor -> C/C++ -> Advanced->IntelliSense->Set the Disable IntelliSense True.
    And then I type such as the If, there have no the if tabulator key in the code editor, so I suggest you can refer the following screen shot check your issue again.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How can SAP tRFC server tell client through JCo that function carried out?

    SAPs "Transactional RFC Technical Description" document (release 4.0) says in section Transactional RFC on page 6: "Finally, the server tells the client, that the function has been carried out and the client acknowledges this.".
    How can the server tell this to the client when the server communicates with the client through JCo (Java Connector)?

    System.out.println goes to console, which is not a file... This whole thing is much easier if you use standard logging:
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/5c830ca67fd842b2e87b0c341c64cd/frameset.htm

  • How can I disable the Commit icon in the toolbar from the fmb

    How can I disable the Commit icon in the toolbar from the fmb

    This may give you some answers, DEFAULT&SMARTBAR custom items . Refer to comments towards the end

  • How can I disable the Commit icon in the toolbar?

    How can I disable the Commit icon in the toolbar?

    Well actually my question was in a custom form can I disable the Save icon which we see in the frontend. Is there any function to disable it something app_special etc.....

  • How can i disable ipv6 in OL7?

    Hi everybody,
    how can i disable ipv6 on my OL7 box?
    In /etc/sysctl.d i have test it with the file: ipv6.conf:
    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.<interface>.disable_ipv6 = 1
    But this doesnt work.
    Does anybody know how can i disable IPv6 in Oracle Linux 7?

    What I would recommend is not to set implicit or redundant parameters:
    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1
    There is no need to disable the "default" interface, since it is already included in the "all" statement.
    I do not know, but there could be a possibility that such statements disable the network card in question, but in turn enable every other. In such case, your 2nd statement invalidates the first. Perhaps that was was part of the problem when using your other configuration.

  • BAPI Transaction commit in JCo

    Hi,
    I am posting a GL document via JCo (Java Program ) into SAP using the BAPI_ACC_DOCUMENT_POST and then calling the BAPI_TRANSACTION_COMMIT to commit the transaction so that it gets updated in SAP system.
    After i execute my program, i get the posting successful message and document number is returned to me. But when i look for this document in the SAP system, it is not found.
    Any help will be appreciated.
    Below is the piece of code where i execute the BAPI's in java after mapping the required data.
                     function.execute(destination);
                     System.out.println("Function BAPI_ACC_DOCUMENT_POST executed .");
                     commFunct.getImportParameterList().setValue("WAIT", "10");
                     commFunct.execute(destination);
                     System.out.println("Function BAPI_TRANSACTION_COMMIT executed .");
    Regards,
    Ganesh.

    Hi Ganesh,
    With JCo3 the connections are no longer stateful by default, so each RFC call is executed within it's own context. In your case though, you want the commit to occur in the same context where you posted the document. You can do this by adding the following static method calls:
    JCoContext.begin(destination);
    // Execute both RFC functions here
    JCoContext.end(destination);
    You can also check the Java API help for JCoContext, which explains this in more detail. Once you added the two lines (ideally end the context in a finally block), you should see the document in SAP.
    Cheers, harald

  • How can I disable POST GOODS RECEIPT button in transactions VL31N/VL32N .

    Hi ,
    How can I disable POST GOODS RECEIPT button in VL31N/VL32N . 
    Its because, we wanted to use VL06I  to do PGR insted of VL32N.
    Thanks in advance.
    Rays

    Hi,
    if you have a look at program SAPMV50A then you can see that routine cua_exclude_dynamic is used to disable buttons dynamically. If you are on ECC6.0 then you can use implicit enhancement point to exclude code WABU_T which corresponds to "Post Goods Receipt". You can simply add the following lines at the end of this routine using implicit enhancement point.
    IF sy-tcode EQ 'VL31N' OR sy-tcode EQ 'VL32N'.
      PERFORM cua_fcode_allow USING 'WABU_T' no.
    ENDIF.
    Cheers

  • How can I disable Firefox from automatically opening on system startup on my Mac - unchecking the "open at login" does not work?

    We have Firefox 10.o on our Macbook Pro OS X 10.5.8. I prefer using Firefox as my browser but my husband prefers Safari for now because of a long history of bookmarks and saved information he doesn't have time to re-do. He is tired of Firefox automatically opening when we start up the laptop, and even when we uncheck the "open at login" it still opens at login every time. He is about to uninstall it because of this. How can we disable? It does NOT show up in our account on the Mac OS as an application that starts at login, so we can't disable it there.

    For those of you running Windows, I found this on another site. (Unfortunately, not before getting totally disgusted and switching to chrome.)
    1. click start (or the windows flag button at the bottom left) 2. in the "search programs and files" or the RUN dialog box, enter "msconfig.exe" or "msconfig". 3. That should open the system configuration program. 4. click the "Startup" tab at the top of the opened program. 5. Under the "startup item" column, look for Mozilla firefox. 6. uncheck that one. 7. Click OK or apply. 8. click "exit without restart". 9. you're good to go.

  • How can I disable imessage from old phone?

    how can I disable imessage from old phone number / iphone I no longer have?

    iMesssage to old phone
    If you move to another phone and forget to turn off iMessage then read “if you no longer have the device in http://support.apple.com/kb/HT5661  If you still cannot resolve it call Apple http://support.apple.com/kb/HE57
    To deactivate iMessage http://support.apple.com/kb/ts5185
    Read http://m.samsung.com/us/support/SupportOwnersFAQPopup.do?faq_id=FAQ00053450&fm_s eq=62995

  • How can i disable imessage from automatically starting up when i turn on macbook air?

    how can i disable imessage from automatically starting up when i turn on macbook air? i dont know my imessages to pop up on my laptop when it turns on. But i dont want to disable imessage totally on my macbook.

    Welcome to the Apple Support Communities
    First of all, check that Messages is closed when you turn off your MacBook. This is so important because, by default, OS X will reopen all opened apps the next time you start your Mac.
    Apart from that, when you go to  > Shut Down, or  > Restart, in the window you see to restart or turn off your MacBook, unmark "Reopen windows when logging back in". This will avoid that your Mac opens all opened apps the next time you start the MacBook, so Messages won't start automatically at startup

Maybe you are looking for

  • Delivery without reference for stock transfer within the same plant 311

    Dear all, I need to create a delivery without reference for stock transfer within the same plant, movement 311,  i.e. just from 1 storage location to another storage location. I tried to use VL01NO with delivery type UL. Now my question is how can I

  • How do I redirect formula links in a duplicated table?

    I am putting together an annual accounts spreadsheet in Numbers. I have several worksheets with a set of tables for the first month. The final worksheet contains a summary table which gathers data from across all the tables on the other sheets. No pr

  • Need user-exit ....

    Hi Gurus, In vendor line item display(FBL1N) ,when i'm changing Reference no. by going through the Display doc. header button...and save it ,,,it will update in BKPF table...... But for some purpose of mine i need to update in RBKP table (Invoice hea

  • Image quality question on WVC54GCA

    The contrast ratio on this camera image seems way too high.  i.e. the sunlit areas are too bright and the shadowed areas are too dark.  Does everyone notice this on this camera or is it just me? If there is a way to upload an image to this post... pl

  • Lockbox Issue - No bank details/entry posted

    Hello Gurus - maybe someone can shed light on this: During one of the lockbox posting, the system only posted entries to the lockbock clearing a/c & the customer but DID NOT post entry to the bank g/l account. ___Ideal lockbox entry:___ Step 1: Dr ba