Return an application exception from RFC

Hi,
my scenario is File -> XI -> RFC.
I want to send by email any application exception returning from the RFC call.
Since this is a Asynch call how do i implement it?

Hi Mushon,
ok. If i understood your scenario right, your message flow should be like:
File->BP (asynchronous)
BP<->RFC1 of R/3 (synchronous)
RFC1 <-> RFC2 (synchronous) inside of R/3
BP ->File / email (asynchronous)
Your oringinal RFC is RFC2. Copy it to wrapper RFC1.
Delete there source code and exceptions and put instead export parameter.
For source code use button "pattern" to call RFC2.
Fill the additional export parameters in the exceptions.
All other parameters are taken from RFC1.
Regards,
Udo

Similar Messages

  • Return User Defined Exceptions from SP

    Hi,
    Is it possible to return user defined business exceptions from a stored procedure to the dotnet app. through ODP. NET( equivalent to the throw keyword in Java)?
    I would prefer to handle all of the oracle expections in the try catch block of the C# code.
    Thanks,
    Peeyush

    Is your question how to return a custom exception from PLSQL? You'd use RAISE_APPLICATION_ERROR for that, and yes it would propagate via ODP to the calling application.
    Here's a simple dumb example:
    create or replace procedure raise_my_error as
    begin
    raise_application_error(-20001,'something bad happened');
    end;
    Hope it helps,
    Greg

  • Creating application service from rfc

    Hi all,
    I want to create a service which gives the data coming from an rfc. There is no input . how do i do it in CAF.
    Regards
    Rohit

    Hi,
    You can use external service in CAF two ways.
    1. Using the external serviec (BAPI/Web Service) which will be mapped with
        entity  service. Then craete an application service as a wrapper of entity service.
    2. Dirrectly use the external service from application service using code without using entity service.
    So if have no requirement to store data in CAF local Data base then you can use external service from only application service through code.
    If you need the code please let me know I will try to help you.
    Thanks
    Chandan

  • Nested exception from ejbStore

    I am throwing applicaton exceptions (subclasses of RuntimeException) from ejbStore - in case an update to the database fails because a unique constraint was violated. I get a weblogic.transaction.RollbackException back. I tried to use the getNested()method, but my import of the RollbackException class failed in compilation, even though the compilation classpath includes weblogic.jar. Also, I'd prefer not to use a vendor-specific exception if possible. When throwing the same application exceptions from ejbCreate, it was possible to catch a RemoteException and get the nested exception out of it. Thanks for any help!

    First, an application exception is hardly a subclass of
    RuntimeException. Application exceptions should derive from
    java.lang.Exception and for those the container would just throw the
    application exception to the caller. If you want to rollback the
    transaction you can do so by doing EjbContext.setRollbackOnly() and then
    throw the exception.
    Having said that you should still be able to extract the underlying
    exception from the javax.transaction.TransactionRolledbackException the
    container throws (I haven't heard of
    weblogic.transaction.RollbackException and even if such exists it should
    be a subclass of TransactionRolledbackException) by doing exception.detail .
    I've had some problems in 6.0 as in some cases it does not include the
    underlying exception but in 6.1 and probably in 7.0 (haven't used it a
    lot) it work fine.
    Regards,
    Dejan
    Paul Bennett wrote:
    I am throwing applicaton exceptions (subclasses of RuntimeException) from ejbStore - in case an update to the database fails because a unique constraint was violated. I get a weblogic.transaction.RollbackException back. I tried to use the getNested()method, but my import of the RollbackException class failed in compilation, even though the compilation classpath includes weblogic.jar. Also, I'd prefer not to use a vendor-specific exception if possible. When throwing the same application exceptions from ejbCreate, it was possible to catch a RemoteException and get the nested exception out of it. Thanks for any help!

  • Error getting application exception message from client EJB 3

    Hi, somebody nkow what is the error?
    I have this simple session bean deploy in a jboss 4.0.5 GA application server
    My interface:
    package server.ejb.usuarios;
    import javax.ejb.Remote;
    @Remote
    public interface Prueba {
         public void getError() throws Exception;
    }My Session bean implementation:
    package server.ejb.usuarios;
    import javax.ejb.Stateless;
    import server.ejb.usuarios.Prueba;
    public @Stateless class PruebaBean implements Prueba {
         public void getError() throws Exception {
              throw new Exception("Mensaje de error");
    }Simple, i can deploy this bean on my application server, now i have this client code:
    package clientold;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import server.ejb.usuarios.Prueba;
    public class MainPruebaError {
          * @param args
         public static void main(String[] args) {
              Context ctx;
              try {
                   ctx = getInitialContext();
                   Prueba pruebaSession = (Prueba) ctx.lookup("PruebaBean/remote");
                   pruebaSession.getError();
              } catch (NamingException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch(Exception e){
                   System.out.println("Get error from server: " + e.getMessage());
                   e.printStackTrace();
         private static Context getInitialContext() throws NamingException {
              Properties prop = new Properties();
              prop.setProperty("java.naming.factory.initial",
                        "org.jnp.interfaces.NamingContextFactory");
              prop.setProperty("java.naming.provider.url", "127.0.0.1:1099");
              prop.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");
              return (new InitialContext(prop));
    }and my client catch the exception but i can�t get the correct exception message. I need pass custom message from my server to my clients and wrap it in a exception, but when i run this example got the next output:
    Get error from server: [Ljava.lang.StackTraceElement;
    java.lang.ClassNotFoundException: [Ljava.lang.StackTraceElement;
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:50)
         at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:139)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
         at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1624)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
         at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
         at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
         at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
         at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
         at org.jboss.remoting.Client.invoke(Client.java:525)
         at org.jboss.remoting.Client.invoke(Client.java:488)
         at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:41)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
         at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:46)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
         at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:40)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
         at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:77)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:88)
         at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
         at $Proxy0.getError(Unknown Source)
         at clientold.MainPruebaError.main(MainPruebaError.java:21)What is the problem??, i must see on the output
    Get error from server: Mensaje de errorbut i have :
    Get error from server: [Ljava.lang.StackTraceElement;why???, is only a simple application exception and don,t work, somebody can help me??
    i have tried to use an interceptor class for get the exceptions and work, but without interceptor, dont work
    thanks

    I can resolve this problem change the JDK version used to develop my clint application and to run the jboss application server.
    Current, in JBoss 4.0.5, the JDK requirement is JDK 5, and i was using JDK 6.

  • SOAP Exception from XI to R/3 via RFC

    Hello,
    We have a scenario where we are mapping SOAP Exception to RFC Exception.
    Message status is application error in SXI_MONITOR and in payload,it shows correctly mapped RFC Exception (SOAP_EXCEPTION) with name and message.
    But this message doesn't reach R/3.
    Configuration is done as a registered server program in XI using a TCP/IP connection in R/3.
    Can anybody please let us know what could be wrong over here?
    Thanks.
    Regards,
    Shweta

    Hi Swarup,
    There is no error in RFC communication channel.
    The conditions are
    sy-subrc 1  for  Communication failure
    2 for system failure
    3 for SOAP_EXCEPTION (passed in name field from XI)
    but when I execute the report and this RFC is called,sy-subrc is always 0.
    What could be the reason for this?
    Thanks for the help.
    Regards,
    Shweta

  • Cast Exception from EJB returning Collection

    Still can't understand why I'm getting a cast exception when I call an object method when the object has been returned in a Collection from an EJB.
    The object CountryModel is a serialised object, returned in a Collection from home.findAllCountries.....
    I understood RMI returns the object in serialised form, why does called the CountryModel object method getCountryName() cause a ClassCast method? This object casting works ok for a non-rmi application.
    Collection boris = home.findAllCountries();
          Iterator i = boris.iterator();
          System.out.println( boris.size());              //gets right results
          while( i.hasNext()) {
            Object obj = i.next();
            CountryModel leModel = (CountryModel)obj;
            System.out.println(leModel.getCountryName());  //causes ClassCastException
          }Any help appreciated. Thanks, lebo

    Still can't understand why I'm getting a cast
    exception when I call an object method when the object
    has been returned in a Collection from an EJB.
    The object CountryModel is a serialised object,
    returned in a Collection from
    home.findAllCountries.....
    I understood RMI returns the object in serialised
    form, why does called the CountryModel object method
    getCountryName() cause a ClassCast method? This
    object casting works ok for a non-rmi application.
    Collection boris = home.findAllCountries();
    Iterator i = boris.iterator();
    System.out.println( boris.size());
    e());              //gets right results
    while( i.hasNext()) {
    Object obj = i.next();
    CountryModel leModel = (CountryModel)obj;
    System.out.println(leModel.getCountryName());
    ame());  //causes ClassCastException
    }Any help appreciated. Thanks, lebo
    Cast exceptions mostly occur when the same class is being loaded by two classloaders, and thus a conflict. I believe that the statement
    CountryModel leModel = (CountryModel)obj;
    is throwing the exception and not the method call.
    Kindly try to check that out.
    Moreover instead of using the iterator use the toArray method and then try to access the elements. This would give an indication as what is going wrong.
    Kindly do the above and update the topic.
    Regards
    Rohit Parik
    [email protected]

  • 32 bit Application calling 32 bit DLL "An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"

    Hi,
    I am developing an application in visual c# which loads few DLLs.
    While loading the DLLs I am getting this error
    "An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"
    Strange thing for me is that I don't get this error always. In most of the cases when I uninstall the application and reboot my PC again when I install again then problem is solved for few days.
    I have followed several threads all suggests that This error comes either "64 bit exe tries to load 32 dll" or "32 bit exe tries to load 64 bit dll". In my case i made sure that both the
    exe and dll are 32 bit.
    In Project property I selected Platform and Platform target to x86. But the problem still occurs.
    Some body please suggest some solutions and why this problem occur.
    Thanks
    Sujeet. 

    Hi,
    How do you load the DLLs? I assume you get an exception and do not call the LoadLibrary API function directly. The latter just returns NULL (Intptr.Zero) if you load a library with the wrong bitness. However, in this case, I do not get error 11 (= 0xB =
    ERROR_BAD_FORMAT), but I get error 193 (= ERROR_BAD_EXE_FORMAT), so I think something else is going on on your machine.
    So, do you get an exception, and which one? Can you catch and examine it? Does it provide details about which library can not be loaded?
    An option is using
    Process Explorer to find out which library can not be loaded by looking at which libraries are being accessed most recently.
    Another option is using Windbg.exe (from the Windows Debugging Tools). By default, it outputs all loaded modules so that the last one your application tries to load should be listed there, too. It should even be listed if it fails to load; at least that
    was the case in my tests.
    Sometimes, if no path is specified for the dll file, the dll can be loaded from the current directory. So depending on what happened at runtime before the library is being loaded, the current directory could have been changed so that you can get variable
    results during debugging.
    When you are saying "when I uninstall the application", do you mean your own application on your own PC? Does the problem (also) happen during debugging inside Visual Studio?
    Armin

  • Returning an array type from a local method in Web Dynpro Java application

    Hi,
    In my project, we have a requirement to display 18 rolling months along with the year, starting from current month.
    How I am going to approach is that I will get the system date and get the current month and send the month and year value to a local method which will return 18 rolling months along with the year.
    But, when I tried to create a new method there is no option to return an array type. It was greyed out.
    So, we can not return an array type from a method from Web Dynpro for Java application?
    If so, what is the alternative and how am I going to achieve it?
    I will appreciate your help!
    Regards
    Ram

    HI
    You can create new methods in
      //@@begin others
      private ArrayList MyMethod(){
           // ** Put your code here
           return new ArrayList();
      //@@end
    Other option are create a context node with cardinality 0...n with one or more attributes, and in your method create the needed registers into this node. To read this values, you only need to read your context node.
    Best regards
    Edited by: Xavier Aranda on Dec 2, 2010 9:41 AM

  • From RFC 2068 Error while testing ADF Application in Weblogic Server

    Hi All,
    Created an ADF application and Deployed this application to Weblogic server.
    I am getting the below error After deploy into weblogic server while running the application
    I am able to run this application well in JDeveloper using the IntegratedWebLogicServer.
    The Application is successfully deployed to the Web Logic server.
    While creating the domain, I have extended the Oracle JRF classes.
    Error
    Error 404--Not Found
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.4.5 404 Not Found
    The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
    If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.
    JDeveloper Version : 11.1.1.3.0
    Weblogic Version : 10.3.3.0
    Thanks
    Satish

    HI John,
    In The web.xml i added /faces/TestPG
    This is URL in Weblogic Server
    http://10.146.2.232:7001/TestDeployee-ViewController-context-root/faces/TestPG
    Thanks
    Sathish

  • Xmlgen.getxml("select * from table") returns null pointer exception

    I am running oracle 8i on solaris server and clinet on windows
    NT and i am this select statement
    select xmlgen.getxml("select * from table") from dual ,its
    returning null pointer exception,i have tried it through
    jdbc,even then its returning xml as
    <?xml version = '1.0'?>
    <ERROR>java.lang.NullPointerException</ERROR>
    can any body tell me the error.Help will be really appreciated.I
    need an urgent response,if some one can guide me please.
    My email is [email protected],if you can give me a quick
    response on this email,your effot will be appreciated.
    thanks
    Masood

    What is actually throwing the NullPointerException? rs.getMetaData() or table.setModel()?

  • Get Exception Information from RFC Response Message

    Hi All,
    I want to make RFC call from ABAP system to XI RFC Adapter. I found that on the caller side, the RFC has the following interface for RFC exception.
    Exception
    __Name
    __Text
    __Message
    ____ID
    ____Number
    __Attributes
    ____V1
    ____V2
    ____V3
    ____V4
    Can anybody tell me how to get the info contained by this exception structure from RFC caller side (ABAP program)?
    Thanks, Jerome

    Hi Madan,
    My problem is how to display the exception information on the caller side. The called side is able to throw exception now.
    Thanks, Jerome

  • Pass a table from my webdynpro JAVA application to an RFC in R/3

    Hi All,
    I need to Pass a table from my webdynpro JAVA application to an RFC in R/3. How can I do that?
    Regards
    Sarath

    Hi,
    Please have a look at this thread,
    Pass Table as Input to Adaptive RFC
    Regards,
    Saravanan K

  • While creating web application prokect getting error: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

    I am getting error on creating even the empty web application project. The error message is as given below:
    The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
    I am using following build of Visual Studio:
    Visual Studio Professional 2013. Version 12.0.30723.00 Update 3
    Looks like it is the problem with the installation of the visual studio. But I can't take risk of re-installing now because it would stop my going on development work.
    Any would help to resolve this would be appreciated.
    P.S. I am also having Visual Studio 2010 and Visual Studio 2012 Ultimate on my system.
    Regards, Randeep

    Hello Randeep,
    Will you get the same error when creating any other apps, like C# WinForm?
    If only web application project has the problem, you can try the following to reset the templates:
    Please open Windows Explorer, and navigate to  <Visual Studio Installation Path>\Common7\IDE (by default is C:\Program Files \Microsoft Visual Studio 12.0\Common7\IDE);
    Delete the ItemTemplatesCache, ProjectTemplatesCache folder;
    Open Visual Studio Tools/Developer Command Prompt for VS2013
    under Start menu -> All Programs -> Microsoft Visual Studio 2013 -> Visual Studio Tools (run it with Administrator privilege: right-click the program -> Run as administrator);
    Run the devenv /InstallVSTemplates switch;
    Run the devenv /Setup switch
    If all your projects get this error, please try repair the installaiton from control panel first. By the way, can you use Visual Studio Web projects before you get this error? And have you tried to use the Visual Studio Update 4, I see you still used
    Update 3, is there any reason for you to still use the Update 3 version?
    Best regards,
    Barry
    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.

  • Return a flat file from an RFC

    Hi,
    I have created a function module that at the moment returns 4 tables. I want to create a flat file based on these tables and return that file from the function instead of the tables. I can create a flat file using the function GUI_DOWNLOAD.
    Is there a way to return a flat file from the function?
    Regards,
    Mark

    No, but you can return all four tables in single flat table.   First you would need to create a structure in SE11,  it would have one field, of type string.  In your function module interface, you would have a tables parameter like the structure that you just created.  No in the code of the function module, instead of writing your data of each internal table to the corresponding tables parameter to update the one table with the flat structure. 
    Make Sense?
    Regards,
    Rich Heilman

Maybe you are looking for

  • SharePoint Foundation 2013 - Treeview current navigation linking to wrong page

    Good day, We are having issues with the OOTB tree view for SharePoint Foundation 2013. The client has a document library with a folder structure. Clicking on the first level folder (Private) navigates you to the wrong url, but when you navigate to on

  • Return Delivery with a Credit  Memo Request.

    Hello Gurus. I have been working on this issue for quite some time. I will explain the process that was provided by our installers. It doesn't seem to be adding up. Here is the situation, Product that was sent incorrectly was returned. According to o

  • Songs not playing correctly in playlist in iTunes Match - iPad

    I turned on iTM on my ipad and iphone.  It works great on my iphone.  All of my playists show up on both devices.  When I try and play music from a playist on my ipad, the song displayed is not the song that is playing.  When it goes to the next song

  • PC to Mac mini, help please

    Hi, I'm still new to Mac and even newer to things like networking. I have a PC that has over 800 songs that I want to transfer into my Mac mini before my iPod Shuffle arrives through the mail. The reason is the many problems that the Shuffle has when

  • How to Upload a PDF file into BLOB column in a table using Forms 6i

    Can anyone tell me how to upload a PDF file from client and store its content in BLOB column in a table. The file will be genered using reports and win be stored in db.The file to be uploaded will be in client side. Thank´s.