Give exception on RFC

Hi Experts
i have used RFC in CRM dev system to get the data from R/3 system as follows:
  CALL FUNCTION 'ZCTP_BP_READ_CONTACT_DATA'
    DESTINATION w_r3
    TABLES
      t_parnr     = t_parnr
      t_knvk      = t_knvk
      t_adcp_cust = t_adcp_cust
      t_adcp_cont = t_adcp_cont
      t_adrp      = t_adrp_r3
      t_adr2      = t_adr2_r3
      t_adr3      = t_adr3_r3
      t_adr6      = t_adr6_r3
      t_adrc      = t_adrc_r3
      t_adrct     = t_adrct_r3.
But no exception is raised right now and error shown like CALL_FUNCTION_REMOTE_ERROR message so we need to add exception on it.
Thanks in Advance.
Thanks & Regards
Puneet

Hi Vinod
Thanks for the quick reply!!!
you mean to say that i used exception as follows:
  CALL FUNCTION 'ZCTP_BP_READ_CONTACT_DATA'
    DESTINATION w_r3
    TABLES
      t_parnr            = t_parnr
      t_knvk             = t_knvk
      t_adcp_cust        = t_adcp_cust
      t_adcp_cont        = t_adcp_cont
      t_adrp             = t_adrp_r3
      t_adr2             = t_adr2_r3
      t_adr3             = t_adr3_r3
      t_adr6             = t_adr6_r3
      t_adrc             = t_adrc_r3
      t_adrct            = t_adrct_r3
    EXCEPTIONS                                             
      systen_error       = 1                               
      connection_failure = 2.                             
  IF NOT sy-subrc IS INITIAL.                             
    MESSAGE e000(38) WITH 'System Or Connection failure'.  
  ENDIF.                                                   
Thanks in Advance
Puneet

Similar Messages

  • XI exception in RFC adapter

    Hi,
    I have CRM (RFC) -> XI -> Third Party (HTTP call) scenario. Its a synchronous call in which the third party send a response back. My question is as below -
    Suppose call gets triggered from CRM successfully and it reaches the third party. The third party sends back a success response to XI. In XI the message fails in the mapping (or any other error). Generally I will catch the exception in RFC and i will know that the call failed in XI.
    But is there a way to know in CRM that the call has actually failed on the response leg and the request leg was successful? This is important to know because in this case the third party system has actually processed the message and the message should not be retriggered.
    The exception I get from RFC is same for both request and response failures in XI but I want to differenciate it in CRM.
    I know we can do it  using BPM. But i wanted to know is there other way of achieving this? I can define the Fault messages but they really are for the expections raised by third party. Here its not an exception from third party. The exception is from XI response leg of the sync message.
    Any help will be appreciated.
    Thanks,
    Rahul.

    Hi,
    Thanks for your response.
    Its not an mapping error. If it was, we would have fixed it as suggested by you
    Its failing with error - HTTPIO_PLG_CANCELED. And this is not a persistent error as far as I could figure out. (After few messages failed with this error, suddenly the interface started to work again). We are trying to get a permanent fix for that.
    But in any case, issues like these might come for various reasons. Hence I want to ensure that the source system (CRM) is notified of the 'real' error (stating that the message has actually reached the third party). We already have alerts for the failure notifications. But what we want to know in CRM is that the call has been processed in 3rd party system and it should not be retriggered from CRM.
    We can build 'manual procedures' around it so that first we check in XI and third party before re-triggering the call but wanted to know if we can get that message back to CRM.
    Is it possible to get such response if we use Proxies instead of RFCs?
    Thanks again.
    Regards,
    Rahul

  • PreparedStatement in batched mode gives Exception

    Hi
    I have a problem.
    I am running PreparedStatement in batched mode, actually I am using Springs BatchSQLUpdate component.
    Now i am creating a batch of about 10000 inserts / updates. However if any single of these inserts / updates fails, it gives exception with DataIntegrityViolation, BadSQLGrammer etc.
    I am also maintaining a parallel cache of the values that I am using to bind the preparedstatements.
    So for statement 1 in the batch, i know what values are being used.
    My question is when the batch update fails, how can we identify which SQL statement, i mean which index in the batch caused the issue?
    Please help me as I am stuck and need to build some robust exception handling for PreparedStatement batch loads.
    Niki

    Niki-Nono wrote:
    The insertPreparedStatements.get() in my code returns a BatchSqlUpdate object which has already been assigned a statement and also have passed the array of object values to it.
    I have done this using batchSqlUpdate.update(objects); where objects is an array of values.
    THe code block that I executes the flush(). This throws an exception. In some cases it is a BadSQLGrammerException for cases where we try to insert alphabets in integer columns or in some cases DataIntegrityViolation where the batch has 2 sets of values with same primary key.
    The results array is null when i check the value in the catch block.
    And the flush() does not proceed with execution of the complete batch in fact it aborts when even 1 statement fails.
    I hope it is clearer now.
    However, if all the statements go through, I have seen that the results array has correct values as to how many rows were updated / inserted.
    Please let me know.OK, I really wasn't sure about what it did on flush, as there's no explicitly stated exception and nothing in the method description. The array will be null since it hasn't been set with the return value from flush since an exception was thrown.
    From what I can tell this Spring class uses, under the hood, the batch functionality from JDBC. So the particular exceptions you;re getting will have started life as SQLExceptions...which themselves will be of the BatchSQLException I mention in my first post. I'm wondering if the Spring exceptions contain the SQLException. I would hope so, and I have a vague recollection that the original is wrapped so you should be able to do something along the lines of:
    catch (DataAccessException ex)
        SQLException ex = ex.getCause();
        if (ex instanceof java.sql.BatchUpdateException)
            // Get the info from here.
    }Now, this is only a concept, and I haven't tested it or anything, but I would hope something along these lines should get you to the data you're after.

  • AMFConnection never give exception,why?

    This is my simple code
    import flex.messaging.io.amf.client.AMFConnection;
    import flex.messaging.io.amf.client.exceptions.ClientStatusException;
    public class AMFClient {   
        public AMFClient() {        
        public static void main(String[] args) {        
            AMFConnection amfConnection = new AMFConnection();
            String url = "http://192.168.0.199:9081/testApp/messagebroker/amf";       
            System.out.println("AMF Client Test");
            try
                amfConnection.connect(url);
            catch (ClientStatusException cse)
                System.out.println(cse);
                return;
    The program never give exception if I give a non-existed url,why?Please help
    Thanks
    Mark

    If you have an iPad 1, the max iOS is 5.1.1. For newer iPads, the current iOS is 6.0.1. The Settings>General>Software Update only appears if you have iOS 5.0 or higher currently installed.
    iOS 5: Updating your device to iOS 5 or Later
    http://support.apple.com/kb/HT4972
    How to install iOS 6
    http://www.macworld.com/article/2010061/hands-on-with-ios-6-installation.html
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    If you are currently running an iOS lower than 5.0, connect the iPad to the computer, open iTunes. Then select the iPad under the Devices heading on the left, click on the Summary tab and then click on Check for Update.
    Tip - If connected to your computer, you may need to disable your firewall and anitvirus software temporarily.  Then download and install the iOS update. Be sure and backup your iPad before the iOS update. After you update to iOS 6.x, the next update can be installed via wifi (i.e., not connected to your computer).
     Cheers, Tom

  • Handle timeout exception in rfc call

    Dear SAP Experts,
    I have been searching for a while and could not find a satisfactory answer to my problem.
    I use SAP - CRM and call other SAP and non-SAP systems via RFC.
    I need to handle all exceptions, otherwise WEB UI displays a full page exception details, which is unacceptable on a production system.
    I have the following piece of code:
    CALL FUNCTION FUNCTION_NAME DESTINATION DEST
        EXPORTING
          S_IMPORT              = INPUT_DATA
        IMPORTING
          S_EXPORT              = OUTPUT_DATA
        EXCEPTIONS
          SYSTEM_FAILURE        = 1  MESSAGE err_msg " catch system failure
          COMMUNICATION_FAILURE = 2  MESSAGE err_msg " catch communication errors
          OTHERS                = 99.                " catch everything else
    It handles most of exceptions, however, it cannot process timeouts. Is there a way to handle timeout in ABAP RFC call? Is timeout exception uncatchable? If so is there a way around?
    Can you please suggest some solution as I am running out of ideas.
    Regards,
    Dominik

    I have found a solution. To approach this I use asynchronous function call.
    TRY.
        CALL FUNCTION ZZ_TEST_TIMEOUT' DESTINATION lv_dest STARTING NEW TASK 'TIMEOUT_TASK'
        CALLING me->callback ON END OF TASK
            EXCEPTIONS
              SYSTEM_FAILURE        = 1  MESSAGE err_msg " catch system failure
              COMMUNICATION_FAILURE = 2  MESSAGE err_msg " catch communication errors
              OTHERS                = 99.                " catch everything else
            WAIT UNTIL READY EQ 'X' UP TO 55 SECONDS.
            IF READY NE 'X'.
              RAISE EXCEPTION TYPE CX_TIMEOUT.
            ELSE.
              WRITE / 'success'.
            ENDIF.
      CATCH CX_ROOT INTO OREF.
       WRITE / 'TIMEOUT EXCEPTION'.
    ENDTRY.
    callback sets variable READY to abap_true when data is received.
    The trick is to use  UP TO 55 SECONDS. after wait, which is shorter than the server timeout. This terminates function call and gives opportunity to code your own timeout behavior.

  • REG : Null Pointer Exception for RFC values

    Hi All,
    I am facing peculiar erro in code.I need to check the null entries in SAP server then it should be replaced by space and if not null then should be replaced by the value in backend.But it is throwing null pointer exception
    I am using equalsignore case(null) and trim for space.
    I am not getting why its is throwing null pointer  exception.Kindly advise
    Regards,
    Anupama

    Hi
    Use
    String f = null ;
    if(f!==null)
    Wdcomponent.getMessageManager.ReportException ("this will cause null pointer exception  "+ f.length());
    Better to give it any Constant like
    priveate static final String NULL_CHECK  = "DEL_VAL12";
    rather than space ,at the time of chceking see if it has  DEL_VAL12 if true then put the actual data else let it be there.
    Best Regards
    Satish Kumar

  • Exception in RFC Lookup

    Hi Experts,
    I have a query in Graphical RFC Lookup function.
    I am working on Pi 7.1 and scenario is File to Idoc.
    In the file, material number is coming, and I have to find out the corresponding Customer number from ECC table using RFC Lookup.
    I know how to use RFC lookup.
    But here issue is, if Customer Number is not maintained in the ECC table for the incoming material number, then exception should be thrown and processing should be stopped at that moment.
    Please tell me how to throw this exception and hence fail the mapping.
    -Supriya.

    Hi ,
    I guess you want to fail the message transformation at Message mapping level with Red Error in Monitoring , If LOOKUP return Nothing ...
    What You can Do Is , Instead of RFC LOOKUP Function , Use UDF Based RFC LOOKUP , and Inside UDF you can easily raise exception.
    Or
    In Grapphical Message mapping pass the result from RFCLOOKUP To a 1..1 Target , if during transfermation if 1..1 node will not get any value , so mapping will get failed automatoicaly ..
    hope the idea Helps
    regards
    PS

  • Exception class: RFC not found

    Hi,
    Do you know whether there is an exception class in web dynpro java that i can catch in case the RFC is not found in the backend system?
    Thanks and regards,
    Nada

    Thank you!
    Are the mentioned exceptions general exceptions if something is going wrong with the execute() method or they are specific for the problem 'RFC not found in the backend).
    So I need this specfic information that the RFC is not found in the backend.

  • Incorporate exception in RFC

    Dear all,
    I have created a RFC function module to display the sales order data. Now there is a requirement to add exceptions in that. Is there any standard exceptions we need to incorporate or create the new. Please suggest how to go about it?
    Thnaks,
    Anup.

    Hi Anup,
    You can code your own exceptions in the RFC function module based on the requirements. You have to maintain the two exceptions in the RFC function module as decribed below.
    http://help.sap.com/saphelp_nw04/helpdata/en/13/90a594a1ab0841bbb731bdec1a7fd7/content.htm
    Thanks
    Vinod
    Message was edited by: Vinod C

  • 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

  • Button actionListener gives exception

    Dear All,
    I have created a sample page in jsf2.0 in netbeans6.9 which gives me following error when i click the submit button.. I am quite confused because my code seems correct.
    registration.jsp
    <h:form>
    Name:
    <h:inputText value="#{loginBean.userName}" label="Name"></h:inputText>
    <h:message for="Name" ></h:message>
    Password:
    <h:inputSecret value="#{loginBean.password}" label="Password"></h:inputSecret>
    <h:message for="Password" ></h:message>
    <h:commandButton value="Login" actionListener="#{loginBean.processAction}">
    </h:commandButton>
    </h:form>
    faces-config.xml
    <faces-config>
    <managed-bean>
    <managed-bean-name>loginBean</managed-bean-name>
    <managed-bean-class>com.beans.LoginBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    </faces-config>
    backing bean class
    package com.beans;
    import javax.faces.application.FacesMessage;
    import javax.faces.context.FacesContext;
    import javax.faces.event.AbortProcessingException;
    import javax.faces.event.ActionEvent;
    import javax.faces.event.ActionListener;
    public class LoginBean{
    private String userName;
    private String password;
    /** Creates a new instance of LoginBean */
    public LoginBean() {
    public String getPassword() {
    return password;
    public void setPassword(String password) {
    this.password = password;
    public String getUserName() {
    return userName;
    public void setUserName(String userName) {
    this.userName = userName;
    public void processAction(ActionEvent event) {
    if(userName.equals("sa") && password.equals("sa")){
    FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Login sucessfull."));
    Exception
    org.apache.jasper.JasperException: /registration.jsp(31,12) A literal value was specified for attribute actionListener that is defined as a deferred method with a return type of void. JSP.2.3.4 does not permit literal values in this case
    at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
    Please can any one put some light in this problem..
    Regards,
    Santosh
    NetBeans IDE 6.9.1
    Server : Apache Tomcat 6.0.29

    I don't see anything wrong. The problem may be somewhere else, such as in the deployment or in the web.xml.

  • POTS Sample gives exception

    I am trying to follow the POTS Sample code, specifically the PotsOrderConsumer class. This compiles but when invoked gives the following error:
    Exception creating order:153:Request parameter error:No legacy data found.  Namespace and Version need to be supplied.
    How do I specify the Namespace and Version?
    Many thanks
    ~Richard

    Hi Joseph
    Thanks a lot !!
    Now I am able to run that application till card request is acceping for localsystems if i run sample demo jcwde jcwde.app.Now i need info that i am using ChipDrive Micro 100 card reader and microprocessor card (MPCOS EMV)on my windows2000 machine.I installed the relavant PC drivers .Just i want to check this ReadFile application with my card.what all i need to do.

  • Executing RC4Cipher using JCSI com.dstc Package Gives Exception

    Hello,
    I am trying to encrypt/depcrypt using RC4Cipher.java and the code gives me following exception .Could anyone tell me what is missing in this.
    Looking forward for ur suggestions.
    Thanx
    Sekhar.
    Exception in thread "main" com.dstc.security.util.licensing.InvalidLicense: Erro
    r verifying license: Need a non-JCSI DSA Signature for licence checking
    at com.dstc.security.util.licensing.LicenseValidator.verifyLicense(Licen
    seValidator.java:133)
    at com.dstc.security.util.licensing.LicenseValidator.check(LicenseValida
    tor.java:273)
    at com.dstc.security.provider.symm.Licensed.<clinit>(Licensed.java:60)
    at com.dstc.security.provider.symm.RC4.<clinit>(RC4.java:284)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:195)
    at javax.crypto.Util.getClassForName(Util.java:39)
    at javax.crypto.Cipher.getInstance(Cipher.java:211)
    at javax.crypto.Cipher.getInstance(Cipher.java:131)
    at RC4Cipher.encrypt(RC4Cipher.java:59)
    at RC4Cipher.main(RC4Cipher.java:121)

    I am trying to encrypt/depcrypt using RC4Cipher.java
    a and the code gives me following exception .Could
    anyone tell me what is missing in this.
    Looking forward for ur suggestions.DSTC's (or rather, Wedgetail's) stuff isn't free. Sounds like one of three things:
    1) Your academic license has expired - call Wedgetail for help.
    2) Your license setup is screwed up - call Wedgetail for help.
    3) You're cheating on the license - hope no-one from Wedgetail reads this message.
    You can reach Wedgetail at [email protected], or at +61 7 3023 5100.
    Grant
    (PS - no, I don't work for Wedgetail, nor do I use the DSTC package. Just busy with Google this morning...)

  • Invoking Partner link bpel gives "exception on JaxRpc.....No route to host"

    Hi,
    I have developed a bpel process on oracle soa suite 10g; which invokes a webservice;
    The webservice method is getting invoked properly by SOAP-UI but the bpel process fails to invoke the same method and gives the following error:
    exception on JaxRpc invoke: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: No route to host: connect
    Kindly let me know how did you resolved this issue.
    In one of the threads(URL given below); I learned that its because I don't have access to the port from the BPEL server .
    If that is the issue then how do I resolve that.
    Re: Connection issue: No route to host
    Regards,
    Anurag

    also check for firewalls on the server - a good test would be to an attempt to telnet into webservice hostname and portnumber from the SOA Server.
    Regards,
    Shanmu.

  • String.contains gives exception

    if(selectedReport.contains("Sales")){
                   String reportModule = "Sale";
                   }gives the exception09:03:56,609 ERROR [Engine] StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: java.lang.String.contains(Ljava/lang/CharSequence;)Z
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    ...........................................What can be the reason?
    Thanks and Regards,
    Anees

    There should be something further down that says something like "caused by" or "wrapped exception." My guess is it'll say NullPointerException and that selectedReport is null.

Maybe you are looking for