Errorhandling with Piers' RFC library

Hi together,
I was playing around with getting some error messages back from the backend, if any.
I was able to do <i>rescue RuntimeError</i> to handle errors like wrong user name or pwd or using a wrong function module name.
However some errors occur in the background and I found them listed in the trc file (e.g. like RFC_INVALID_HANDLE).
Is there an overview about what kind of errors are raised, that I can rescue the different errors a different way?
Further does a mapping exists between abap errors and ruby error types with regards to RFCs?
Is there an easy way to get the error messages from the trc file into my ruby code?
Thanks for you answer.
Best,
Stefan
Message was edited by:
        Stefan Huettenrauch

Hi -
On connect(), and discover() you get a rb_eRuntimeError with the string containing the group, key, and message.
On call() you get a StandardError which can be trapped like this:
[code]
   i = @rfc.discover("STFC_EXCEPTION")
    begin
      @rfc.call(i)
    rescue StandardError => e
      $stderr.print "error: #{e.message.inspect}\n"
    end
[/code]
Cheers.

Similar Messages

  • I::001 Only available with the RFC library from 4.0C onwa

    Hello all!
    I'm using SAP .NET Connector for integration between .NET application and SAP System.
    When I try to work with standard document bapi methods like  BAPI_DOCUMENT_CHECKIN or BAPI_DOCUMENT_CHECKOUTVIEW, I get an error in out RETURN parameter - I::001 Only available with the RFC library from 4.0C onwa
    Please, help if you know how to solve this issue. Any help appreciated, and thanks in advance for the help.
    Best regards,
    Alex

    Hello,
    Is the function module remote enabled? Check the attributes of the function module, see
    [remote enabled function module|http://help.sap.com/saphelp_nw04/helpdata/EN/22/0425f2488911d189490000e829fbbd/frameset.htm]
    Next step to figure out this problem will be calling the function module remote and debugging it, see...
    [external breakpoints|http://help.sap.com/saphelp_nw70/helpdata/en/af/0cb5403fd63426e10000000a1550b0/frameset.htm]
    Regards,
    Marcel

  • RFC Problem:"I::001 Only available with the RFC library from 4.0C onwards."

    Hello,
    Ihave a VBA code that calls a BAPI via RFC to checkout a document. The Problem is that I get an error like in the subject. Here is my Code
    Private Declare Sub RfcAllowStartProgram Lib "librfc32.dll" (value As Any)
    Sub checkout_file()
    Dim oDocument As Object
    Dim oDocumentFile As Object
    Dim oDocumentFiles As Object
    Dim oReturn As Object
    Dim oBAPICtrl As Object
    'Creating BAPI object
    Set oBAPICtrl = CreateObject("SAP.BAPI.1")
    Set oConnection = oBAPICtrl.Connection
    If oConnection.Logon(0, False) = False Then
    MsgBox "No access to R/3 System"
    Exit Sub 'Programm beenden
    End If
    RfcAllowStartProgram ByVal 0&
    'Creating lokal instance of BO "Draw"
    Set oDocument = oBAPICtrl.GetSAPObject("DRAW", "PM2", "A5N00030059989", "D", "000")
    If Err.Number <> 0 Then
    MsgBox "No local BO 'Draw' created!"
    Exit Sub
    End If
    Set oDocumentFile = oBAPICtrl.DimAs(oDocument, "CheckOutView2", "DocumentFile")
    oDocumentFile("WSAPPLICATION") = "DOC"
    oDocument.CheckOutView2 OriginalPath:="D:\test\", _
    DocumentFile:=oDocumentFile, _
    DOCUMENTFILES:=oDocumentFiles, _
    DocumentStructure:=oDocumentStructure, Return:=oReturn
    MsgBox oDocumentFiles.RowCount
    MsgBox oReturn("MESSAGE")
    Set oConnection = Nothing
    Set oBAPICtrl = Nothing
    End Sub
    I have the newest librfc32.dll in my System32 folder (Version 7110.0.46.6208). Where is the problem? Can it be a problem on the application server or something?
    Thank you,
    Thomander

    Hi Thomander,
    Note 885058 indicates that the problem is resolved with the latest    
    RFC and ICU files. The RFC library is contained in the RFCSDK, please 
    ensure that you are using the latest SDK, it can be downloaded from the
    following location:                                                                               
    Support Packages and Patches                                          
        ==> Additional Components                                         
              ==> SAP NW RFC SDK                                          
                   ==> SAP NW RFC SDK 7.10                                
                        ==>Your OS                                                                               
    ICU libraries can be downloaded from service market place as part of  
    sap kernel. There are contained in the complete package sapexe.car    
    & in a seperate package UCLIB.sar                                     
    -> service.sap.com/patches                                           
    -> Entry by application group                                         
    -> additional component                                              
    -> SAP Kernel [ select the correct versions] & download the file                                                                               
    The naming convention of the library files varies depending on the    
    operating system, they may be called                                  
    "libicuuc.so.26", "libicuuc.sl.26", "libicuuc26.so" or "icuuc26.dll", 
    for example. You must therefore adjust the unpacking statements       
    accordingly.                                                                               
    Unpack the library to the temporary directory & then move it to the   
    kernel directory ("/usr/sap/<SID>/SYS/exe/run").                                                                               
    Caution: Make sure that the libicu* libraries do not overwrite any    
    existing files.                                                                               
    Once you are using the latest RFC and ICU files you should be ok.
    Maybe the information in the following link could also be useful for this kind of error:
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/plm/i001Win32error+2
    Best regards,
    Christoph

  • Rfc Library Call to SXMI_XMB_SYSLOG_READ : INVALID_DATE_TIME error

    I have a distributed NetWeaver 2004S Environment: Main SAP Instance and Database are located in a CST Time Zone on the same machine. A dialog SAP instance, installed on an HP-UX Itanium Host, is located in a PST Time Zone, but, the system clock set for CST time - 2 hours behind the main SAP instance host system clock time.
    My application is installed on the HP-UX Itanium Host and connects to the local (dialog) SAP instance, and makes RFC library calls to collect data. For Syslog data, the RfcCallReceive call is made to function SXMI_XMB_SYSLOG_READ with all the required input parameters. This call succeeds for the first time, but, fails all subsequent times if the call is repeated at 1 minute interval. Following error message is returned:
    gid:105 key:INVALID_DATE_TIME
    The date times on start and stop times are correct - they match very well with the system clock time.
    Now, if I increase the repetition interval from 1 minute to 5 minute, the Rfc call to the function SXMI_XMB_SYSLOG_READ succeeds for the repeated calls.
    Please note that the Rfc application was compiled on an HP PA-RISC development machine, and, uses ARIES emulator to run on HP Itanium Host.
    There is another piece of information I can provide here if that helps: I am able to make 1 minute spaced repeated Rfc call to SXMI_XMB_SYSLOG_READ function with success on a PA-RISC dialog instance of another SAP deployment that has the main SAP instance plus database on one machine in a CST time zone, and, the dialog SAP instance hosting the application on PA-RISC host on a different machine, but, in the same CST time zone.

    Hi Manoj,
    The Application and the dialog instance are on the same machine - HP-UX IA64. This is what TZ has on this host
    TZ=CST6CDT
    How do I synchronize the application and the SAP dialog instance  - they are located on the same physical machine?
    The main instance and the database are on another machine - SunOS5.10 sparc. This is what TZ has on that host
    TZ=US/Central
    The date on HP-UX IA64 (dialog instance) is
    date
    Fri Nov 21 13:13:35 CST 2008
    The date on SunOS5.10 sparc (Main Instance + Database) is
    date
    Fri Nov 21 13:13:35 CST 2008
    Please note that the dialog instance and the main instance are located geographically in PST and CST time zones - being 2 hours apart.
    I appreciate very much your effort. Looking forward to the follow-up.
    Thanks

  • 'Classic' RFC library - password limited for rfc calls ?

    Hi ,
    we are using the 'classic'  RFC library to connect  to SAP for calling RFC function modules. Due to the fact that there are often older SAP systems involed, we use only passwords with 8 digits. But now we have the requirement to use passwords for the rfc user with more than 8 digits.  According to my todays knowlede, the password is limited to 8 digits with the standard rfc lib.
    Can the newer SAP NW RFC lib handle a password with more than 8 digits ?
    But  am i right that the SAPNW RFC lib is unable to handle rfc calls with opening a SAPGUI ?
    thx
    Heike

    Hi,
    thank you for your answer!
    I have investigated something new yesterday:
    I thought at the beginning, that the problem just occurs, when the system work processes are reached. The system has for example set up 15 dialog processes and the external server is calling the function 20 times in parallel. Then we normally need 5 dialog processes more. The system is taking then all 15 dialog processes and the locks got stucked.
    That means, that I´ll maybe only get 4 or 5 uploads, which have really been updated the tables. All the others couldn´t get the table locked for their process.
    But if I now let the server call the function just about 13 times in parallel, nearly all uploads have been updated the table!
    From my point of view, the lock from SAP gets stucked, when the limit of dialog processes is reached. It´s not working in the right way anymore...
    The same is happening, when you set up in the system, that only 10 work proecesses can be used by RFC. If I have more than 10, it´s going to be critical with the locks....
    WEIRD!
    Can anybody help me out of trouble?
    Thank you!

  • After purchasing songs at the itunes store, ipod touch will no longer synch with the itunes library at all. Also a lock symbol is now on the ipod touch. How do I fix this

    After purchasing songs at the itunes store,  my ipod touch will no longer synch with the itunes library at all. It won't send the purchases to the device and it won't synch any other music to the device. Also a lock symbol is now displayed at the top of the ipod touch. How do I fix this.
    This was the first purchase I made.

    Are you following these instructions?
    iTunes: Syncing media content to iOS devices and iPod
    Where is the lock icon on the screen?

  • Since reinstalling itunes i can no longer sync. Error message says already synced with another itunes library. I get a blank sync - no songs, photos ect as it comes up with this error whenever try to select what is to be synced. Help - lost everything

    Since reinstalling itunes i can no longer sync. Error message says already synced with another itunes library. I get a blank sync - no songs, photos ect as it comes up with this error whenever try to select what is to be synced. Help - lost everything. Complete nightmare - Apple sort a fix NOW, but will take any help

    Plawexki wrote:
    ...  do you know if the contacts, photos, messages etc will be wiped?
    Yes... Everything will be Wiped and Replaced with what is currently on Your Mac.
    SYNCING with iTunes
    See here  >  http://support.apple.com/kb/HT1386
    From Here  >  http://www.apple.com/support/iphone/syncing/
    You may find this information of interest...
    Have a read here...
    https://discussions.apple.com/message/18409815?ac_cid=ha
    And See Here...
    How to Use Multiple iDevices with One Computer

  • My ipod says it was et up with another itunes library, it wasn't, and when I add songs to my library when I go back into it they are all gone, please help im going in circles

    Please help, I am constanly re importing songs, I have to re sync my ipod to my library each time i plug it in, and I am unable to import songs from my media player, any ideas?

    When I plug it in I get the **'s ipod is already synced with another itunes library so do I want to erase & sync message
    Even though it is the same music in iTunes, iTunes does not see it as the exact same library because you had to re-add all the songs to it.
    You will need to erase and sync and you iPod will simply end up as it is now.
    It's like of your house burns down and you rebuild it exactly the same, it is still not the "same" house it was.

  • Trying to sync iPod with library, but receive this message, "The iPod is synced with another itunes library.  Do you want to erase this ipod and sync with this itunes library".  I do not want to erase my iPod... Any suggestions??  Please help!!

    Trying to sync ipod with itunes library, but I keep getting this message, "  The ipod is synced with another itunes library.  Do you want to erase this ipod and sync with this i tunes library?" 
    I do not want to erase my ipod!!!  Any suggestions?? please help!

    Another way. You can use a USB flash drive & the camera connection kit.
    Plug the USB flash drive (works the same with an SD card) into your computer & create a new folder titled DCIM. Then put your movie/photo files into the folder. The files must have a filename with exactly 8 characters long (no spaces) plus the file extension (i.e., my-movie.mov; DSCN0164.jpg).
    Now plug the flash drive into the iPad using the camera connection kit. Open the Photos app, the movie/photo files should appear & you can import. (You can not export using the camera connection kit.)
    Using The iPad Camera Connection Kit
    http://support.apple.com/kb/HT4101
     Cheers, Tom

  • Help please - cannot synch ipod video with my itunes library

    i just cannot get my ipod sync'd with my updated library.i have updated to itunes 8.0 and thought it may be a problem with my vista o/s.so i tried going back to v 7.0. but this did not help.
    my itunes library works fine..i can put new media on and play via my computer without problems.my ipod is recognised when i connect it,but i cannot get it to sync.
    i'm really going crazy with it now and don't know what else to do...please can somebody help me?

    Hello LunaDeluxe,
    The following article provides tips and information that can help get iTunes and your iPod working together again.
    iPod not recognized in My Computer and in iTunes for Windows
    http://support.apple.com/kb/TS1369
    Cheers,
    Allen

  • New computer--do i erase ipod and sync with new itunes library?

    I downloaded itunes on my ancient pc and that's where I synced my ipod. i finally put that pc out to pasture and now have a new laptop. i downloaded itunes to the new computer, and when i hooked up my ipod i got the message "the ipod is synced with another itunes library. Do you want to erase this ipod and sync with this itunes library?" So do I want to erase and sync or not? I'm scared I'm going to mess everything up if I erase it.
    One more question: my daughter got a new ipod; once i figure out this syncing issue with my existing ipod, do I need to set up a new account for the new ipod, or can i sync it with the account i already have?
    sorry for all the questions--I'm a newbie and want to get this right. Thanks for your help!

    Hello. I recently had to restore my computer (as if it was new due to, to many viruses) Afterwards itunes was still there but the music i have on my ipod was not previously purchased through itunes but they were on my computer and placed in itunes library and sent to my ipod. Well after restoring my pc, itunes opened up when i connected my ipod and it asked me to update. So i updated to itunes 10. Now it is telling me that this ipod is registered to my fiance' and it is running off a different itunes library, and that I would either need to erase and sync to the new library in itunes 10, or transfer to itunes 10 library. I tried transfer and restarted itunes, but it just asked me the same questions again. It wouldnt let me create new place lists either. im scared to erase bc i have so many songs i wont remember what there all were to go back and download if it actually erases all my current songs or applications. I assumed when itunes updated to itunes 10, it would update with all my information. And although the ipod is registered in his name or however he did that, I also have sum form of account with apple/itunes because it uses my email address and my credit card during purchases for this ipod (his name is just there). i dont understand what I am suppose to do to fix this problem. These songs are still on my computer and the program where i downloaded them from but since i had to restore the whole computer, its like they are probably hidden files and arent being detected i guess. I really dont know. I have been reading and I see many ppl with the same issue. Any suggestions that wont cost me anything or a little of nuthing to resolve? I heard of Tansee Ipod Transfer but it charges you to move your files from your ipod, into a folder, to your computer, and then to be added to your itunes. Any suggestions would be appreciated.
    Thanks...Lana

  • I have all my music on an external hard drive. I just transferred all my files to a new hard drive . How do I sync all my files with my itunes library without losing all my playlists etc and keep everything intact?

    I have all my music on an external hard drive. I just transferred all my files to a new hard drive . How do I sync all my files with my itunes library without losing all my playlists etc and keep everything intact?

    Launch iTunes with the Option key held down, click on Choose Library, and specify it. If the external drive doesn't contain the iTunes database files, create a new library there and import that music.
    If the library contains any rented movies, they won't play on a different computer.
    (109334)

  • How can i transfer my music from iphone to itune. currently itune wouldnt allow this as i have also used my ipad? the message i get it says: the iphone is synced with another itunes library. do you want to erasethis iphone and sync with this itune?

    an iphone can be synced with one itune library at one time. erasing and syncing replaces the contents of this iphone with the contents of this itune library!!
    apple..... ypu sale these gadgets which i love but I dont want to earse the music on my iphone i would like to save them into my library, how can i do this? most of the music i have bought and i dont want to loose any of it!!!
    Please someone help me.

    The iphone is not a storage/backup device.  The sync is one way - computer to iphone.  The exception is itunes purchases:  File>Transfer Purchases
    Copy everything from your other library/computer, or your backup copy, to your new library/computer

  • Why does it tell me my ipad is synched with another itunes library and wants to erase the thing when I want to synch it?  I haven't synched it with any other mac but my own.

    why does it tell me my ipad is synched with another itunes library and wants to erase the thing when I want to synch it?  I haven't synched it with any other mac but my own.

    Hi Lisa,
    I know from experience that this must be a frustrating situation for you especially if you don't want to loose the music/video content that is currently on your ipod. Unfortunately though you may have to consider re-syncing it as it thinks its currently synced with another computer.
    If you bought any music that is on the ipod through itunes you can opt to right click the ipod in itunes and 'transfer purchases' if you authorise your library in the 'Store' menu in itunes. Some reasons for this happening may include some of the following:
    Deleting and reinstalling your itunes on the computer.
    Removing the account you had on the computer you used itunes in and making a new one. (User account, eg: Lisa).
    Changing computers in the past.
    A friend or family member syncing it on their computer to give you there music.
    A sign of a failing iPod.
    Alternatively you can opt to not sync it and keep the music that is on your ipod there but this means you will never be able to update your ipod.
    Hope this helps!

  • I bought a new laptop and used Windows Easy Transfer cable and moved all files from one computer to another. I installed iTunes and found my iTunes music Library.  However, when I plug in my iPod it says it is already synced with another iTunes Library.

    I bought a new laptop and used Windows Easy Transfer cable and moved all files from one computer to another. I installed iTunes and found my iTunes music Library.  However, when I plug in my iPod it says it is already synced with another iTunes Library. 
    I don't see anything in Help that shows when you already have transfered all the files over.  Why would it want to erase and sync when I already have all the music folder copied over?  I didn't have an issue when I had another technician copy from one laptop to another.  Home sharing is also on but not being recognized.

    I suspect you only migrated the media folder instead of the complete working library. Either review the transfer process and copy over the entire iTunes folder from your old profile's music folder or see Recovering your iTunes library from your iPod or iOS device.
    tt2

Maybe you are looking for