How to Alert RFC connection failure via message mapping? Kindly Help!

Hi Experts,
    I have a JMS - XI - RFC scenario.
JMS receives the Rosattenet PIP contents and sends it to RFC function module in remote SAP R/3 system.
   I have a requirement where I have to monitor RFC connection failure because of the remote R/3 system being down. I have to send a email alert where the subject contains the PIP number to understand for which PIP the connection failed.
  The PIP number exists in the PIP content at the interface.
  If I use the Alert configuration in the runtime workbench for monitoring then I cannot dynamically pass the PIP number.
  Only way I think of triggering alert is in the message mapping via a Java UDF.
  But I am not sure how can I do this? How do I check in the UDF if RFC connection has failed? Is this the correct approach?
  How to acheive my requirement? Note that my email subject content is dynamic bacause if PIP number.
Please help!
Thanks
Gopal
Message was edited by:
        gopalkrishna baliga

Hi Gopal,
what version/sps of XI are u running?
The easiest way to do what u want inside a UDF is to
1. use JCo to try estabilish a connection to the remote SAP System
2. if that fails, use JavaMail to send an email message
Let your UDF work on the PIP number, accepting it as input, and (maybe) returning it as output if everything goes ok. Otherwise break the mapping execution as described by Michal in one of his last weblog (using Dynamic Configuration).
Note that the above method doesn't guarantee that the message will be actually delivered, as some seconds could last between your check and the real RFC delivery operated by the Adapter Engine...
I am evaluating a way to do the same with Alert Framework. I will let you know the result!
Cheers,
Alex

Similar Messages

  • How to change the order of target message? kindly help

    Hi Experts,
              I have a source message with fields EmpNo, EmpName, Dept and joining date. The target message has the same structure but fields are in different order. That is, EmpName, Dept, EmpNo and joiningdate.
    How to achive the target message with message mapping and without using a different message type for target?
    Kindly help
    Thanks
    Gopal

    Hi Gopal,
    Try this one.
    1. Create Only one message type of target type.
    2. Go to XSD tab and export the "XSD" of the message type.
    3. Change the <xsd:sequence> element to <xsd:all>
    4. Then import the "xsd" in external definitions.
    5. Use the imported "xsd" and create Message mapping. Give both source and target the same message type from XSD.
    6. just Map one to one.
    Now you can get ur required target structure. Since it is <xsd:all> it will accept ur input file.
    Regards,
    P.Venkat

  • How to alert with new window when message is comming like MSN

    Please tell me .How to alert with new window when message is comming like MSN?

    Why is it the first think everyone wants to do in JSP is write a chat application?
    Not really an easy way to do this, as HTTP is a "pull" model. You send a request, the server sends a response. The server can't send anything unless you ask for it. That kindof puts a damper on things like instant messaging.
    A couple of workarounds
    1 - refresh the page every once in a while to check for new messages. An easy solution but nowhere near optimal.
    2 - check out pushlets www.pushlets.com
    Cheers,
    evnafets

  • How to debug RFC connection using RfcOpenEx?

    Hi,
    I use COOPC1 to test a RFC connection and this transaction uses RfcOpenEx which fails.
    How can I debug this connection?
    Best regards
    Marty

    Hi,
    in fact the conection from SAP to the destination works using SM59. but the system reply with a connection using RfcOpenEx but this function fails because there is a mixup with the parameters maybe a wrong type.
    I will try to debug from the tcode COOPC1 when I start a subscription.
    Thanks
    Marty

  • How to setup RFC Connection for SAPOSS?

    Dear Experts,
    I tried to setup the RFC connection for SAPOSS based on the following settings, but when I test connection, it failed.
    Target system : OSS
    Msg. Server : ... ( this where I stuck which I'm not sure what to fill in)
    Group : EWA
    Client : 001
    User : OSS_RFC
    Password : CPIC
    Does anyone know the right settings?
    Regards,
    Abraham

    Hi all,
    Do I really need to setup our own SAProuter if our firewall doesn't block any outbound IP address?
    I've tried the following settings in OSS1 but still failed to connect.
    SAProuter at SAP :-
    Name : sapserv3 ( or sapserv7 or sapserv2)
    IP address : 147.204.2.5   (or 194.39.134.35 or 194.39.131.34)
    Instance no : 99
    SAPNet Message Server
    Name : oss001
    DB Name : 001
    Instance No : 01
    I left the SAProuter1 and SAProuter2 (at customer site) blank.
    Did I miss out anything?

  • How to close RFC connections

    The RFC connections to the R/3 backend system are not closed when I close my iviews which are created in the Visual Composer. Each time the iview is reloaded, an additional RFC connection is opened...
    Has someone a solution for this problem?
    Kind regards
    Frank

    Hi Frank,
    The connector pool keep the connection alive to be reused by the model iViews datasource, those connections will be closed at the timeout or when CLEANUP runs.
    It's not a problem is the way how the connector framework works
    You can adapt the timeout according SAP Notes 913483 & 314530
    Best Regards, Luis

  • How to close RFC connection in one script coding

    In one script, I am using the REF command to call another 2 scripts and these called scripts shd be run on same C36 ( test system). I shd close RFC connection between these 2 scripts.
    That is , once the 1s script over the RFC shd be closed and the user has to give usename and pwd  then  2nd script shd run.
    I have tried with the following code…. But it says RFC is not open……
    REF ( Y04S_FC_RM_CJ88_112 , Y04S_FC_RM_CJ88_1 , C36_999 ).   (when execute this script RFC to C36 will be created and after execution that RFC shd be closed so I included following ABAP code)
    ABAP.
      data : dest type RFCDEST.
      move 'S4_SAPC36999' to dest.                                       
      move dest to v_dest.
    *--Close the connection before opening it incase it is opened
              call function 'RFC_CONNECTION_CLOSE'
                   exporting
                        destination          = dest
                   exceptions
                        destination_not_open = 1
                        others               = 2.
              if sy-subrc <> 0.
              endif.
              move sy-subrc to v_subrc.
    ENDABAP.
    REF ( Y04S_FC_RM_CJ44_112 , Y04S_FC_RM_CJ44_1 , C36_999 ). (here agagin the RFC will be created and this script will be exectued.)

    In one script, I am using the REF command to call another 2 scripts and these called scripts shd be run on same C36 ( test system). I shd close RFC connection between these 2 scripts.
    That is , once the 1s script over the RFC shd be closed and the user has to give usename and pwd  then  2nd script shd run.
    I have tried with the following code…. But it says RFC is not open……
    REF ( Y04S_FC_RM_CJ88_112 , Y04S_FC_RM_CJ88_1 , C36_999 ).   (when execute this script RFC to C36 will be created and after execution that RFC shd be closed so I included following ABAP code)
    ABAP.
      data : dest type RFCDEST.
      move 'S4_SAPC36999' to dest.                                       
      move dest to v_dest.
    *--Close the connection before opening it incase it is opened
              call function 'RFC_CONNECTION_CLOSE'
                   exporting
                        destination          = dest
                   exceptions
                        destination_not_open = 1
                        others               = 2.
              if sy-subrc <> 0.
              endif.
              move sy-subrc to v_subrc.
    ENDABAP.
    REF ( Y04S_FC_RM_CJ44_112 , Y04S_FC_RM_CJ44_1 , C36_999 ). (here agagin the RFC will be created and this script will be exectued.)

  • How to solved RFC connection (EarlyWatch)

    Hi,
    I having problem in Solution Manager 4.0 (EarlyWatch Report)
    R/3 landscape (NDV,NQA,NPR)
    NDV and NPR does works fine and getting EWA everyweek which is schedule every week
    NQA does not work at all
    Screenshot here:
    http://www.flickr.com/photos/25222280@N03/2586790185/sizes/o/
    1. I check RFC connection in solution manager (sdccn)
    Selected NQA, and click RFC button
    Login NQA tr: sdccn --> taskLog --> from menu GOTO --> setting --> Processor task
    Checkhosts then double click (RFC destination) I got error: "no host fulfils the requirements of service data control center"
    Is there any problem please let me know
    Screenshot here:
    http://www.flickr.com/photos/25222280@N03/2586794197/sizes/o/
    2. Goto SM59 --> under R/3 connection --> check connection "SM_NSMCLIENT100_BACK" does works fine...
    screenshot here:
    http://www.flickr.com/photos/25222280@N03/2586794219/sizes/o/
    Question: please let me know where and what i am missing or wrong ?
    Thanks in Advanced

    Hi Issue,
    These can solved in two ways.
    1. You dont need an trusted RFC for EWA. You can get the reports w/o TRUSTED. if you really need this, then follow option 2.
    2. Add S_RFC & S_RFCACL autorization objects to your ID in both systems. Solman & Target system.
    This will solve your issue.
    Thanks,

  • How to find rfc connection exist between R/3 and APO ?

    Hi all,
    i wanted to find out...
    rfc connection exist between R/3 and APO ?
    kindly help in this regard..
    Thanks
    Joshi

    Hi Sridhar,
    If u have access to SM59 transaction then u can check and test the connection there it self.
    If u don't have access then check the table RFCDES where all RFC destinatios defined for your system is stored.
    Thanks,
    Vinod.

  • RFC Lookup's in message mapping fail with RuntimeException for no reason

    Hi guys,
    We have developed interfaces that execute a lot of RFC's from Message Mapping, by making use of RFC Lookup API.
    In ID, in the corresponding RFC Receiver Communication Channel we have set the number of maximum connections to 100.
    However, when a big number of Idocs with lots of items is sent to XI some messages fail in XI because mapping fails with a runtime exception that is not correct, since there is a return value found from the execution of the RFC function. And when I am testing the mapping in Test mode of XI IR, the mapping is executed successfully.
    Do you think that by increasing the maximum number of connections in Communication Channel, it will take effect?
    Evaggelos

    Hi Evaggelos,
    DECREASE, may be til 10.
    Regards,
    Udo

  • How to restrict usage of "Create Support Message" action in Help menu

    Dear Experts,
    hoping someone can help me to find a solution to this:
    in our company we are building a business process so that not everyone should be able to open a new support message under maintenance cycle, but only "Power Users" - we call them BPE for Business Process Experts.
    All the rest business comunity should filter their inquiries thru BPE's, and if BPE decides that Support Message is required, then (s)he will use the Create Support Message function under Help main menu.
    Is there any way in SAP to restrict usage of "Create Support Message" function to only a group of people (BPE) by security or other means, so that it's invisible (or not executable) by other people ?
    Thank you in advance
    Elena

    Hi,
    You can restrict the creation of support message thru the Auth Obj CRM_ORD_PR.
    Thnx,
    Waseem.

  • How can I use loop in graphical message mapping

    The source input XML is like:
    <bookstore>
      <book>
           <item1>xxx</item1>
           <item2>yyy</item2>
      </book>
      <book>
            <item1>zzz</item1>
           <item2>www</item2> 
    </book>
    </bookstore>
    I want to create an output XML like
    <output>
       <item>
            <item1>xxx</item1>
             <item2>yyy</item2>
        </item>
       <item>
            <item1>xxx</item1>
             <item2>www</item2>
        </item>
       <item>
            <item1>zzz</item1>
             <item2>www</item2>
        </item>
       <item>
            <item1>xxx</item1>
             <item2>yyy</item2>
        </item>
    </output>
    That means I want to do permutation and combination for all <item1> <item2> under <book>.
    Of course I can write a customer function to do it, but I want to basically use the buildin functions to do the graphical message mapping for this.
    Any idea?  thank you.

    well, I'm not very clear of those 2 English words
    What I want is to list all possible combination of item1 and item2 (and in fact, we have item3, item4, ....etc).
    example
    input: 
    <item>
              <item1> 111 </item1>
              <item2> 222 </item2>
              <item3> 333 </item3>
    </item>
    <item>
              <item1> aaa </item1>
              <item2> bbb </item2>
              <item3> ccc </item3>
    </item>
    I want to get
    <item><Item1>111>/item1> <item2>222</item2> <item3>333</item3> </item>
    <item><Item1>111>/item1> <item2>222</item2> <item3>ccc</item3> </item>
    <item><Item1>111>/item1> <item2>bbb</item2> <item3>333</item3> </item>
    <item><Item1>111>/item1> <item2>bbb</item2> <item3>ccc</item3> </item>
    <item><Item1>aaa>/item1> <item2>222</item2> <item3>333</item3> </item>
    <item><Item1>aaa>/item1> <item2>222</item2> <item3>ccc</item3> </item>
    <item><Item1>aaa>/item1> <item2>bbb</item2> <item3>333</item3> </item>
    <item><Item1>aaa>/item1> <item2>bbb</item2> <item3>ccc</item3> </item>

  • Message mapping logic help

    Hi All
    I have a source structure like this below. It's a big structure actually. I'm just pasting the relevant structure where I need your help.
    </root>
         <storage> 
             <id>AB</id>
             <Type>TY</storType>
             <Temp>100</Temp>
        </storage>
    ----</root>
    My requirement is to check the value coming in <Type> and if it is TY, then the target structure will be the exactly the same
    If it is XY, then the target structure will have one more field <celsius> and will look like this below.
    </root>
         <storage> 
             <id>AB</id>
             <Type>TY</storType>
             <Temp>100</Temp>
             <celsius>922</celsius>
        </storage>
    ----</root>
    The <storage> complex element with elements can repeat as many times in the source XML. But the values of <Type> will be either TY or XY and I have to create the target structure accordingly. Pls help. I am using graphical message mapping
    thx
    mike

    Hi Michael,
    Please try below mapping
    Regards,
    Krupa

  • Message mapping/UDF help..

    Hi experts,
    Can someone let me know whether there is a chance to fulfill the below requirement:
    Input file:
    In the Input CSV file, there is a fixed length field with length 9 char and has leading zeroes (ex: 000000650)
    Output file:
    In the O/p XML file, the corresponding value should be displayed as "6.50" (Have to remove the leading zeroes, right justified and the last two digits should be allocated for decimals)
    Can anyone let me know if we can handle in Message mapping or should we write a UDF? If so can you please provide the code..
    Any help would be highly appreciated !!
    Thnx
    - Ravi

    Hi Ravi,
    UDF:
    Create a function zerosuppress and take the cache as value and take one argument input. Then put the code below:
    //Put this code
    String output = input.replaceFirst("^0+","");
    return output;
    With this function your leading zeros will remove.
    Then map like this:
    source field --> zerosuppress (udf) --> divide by 100 --> target field.
    This should solve your issue.
    Regards,
    ---Satish

  • HOW to handle JCO connection failure

    if i have a JCO connection.....to process the RFC function...
    when i call the function...the job leave to R3 to do the rest...
    yet ..the connection broken..at this time..
    the is no result return..and consequency receive the
    RFC_ERROR_COMMUNICATION exception...
    how do i handle this kind of situation....
    what should R3 SHOULD DO..
    let's say i have a jco connection
    the connection broken during processing...how do i return the error message to the java program
    the error include....RFC_SYSTEM_FAILURE ,RFC_ERROR_COMMUNICATION
    Message was edited by:
            yzme yzme

    Yzme,
    You have already got answers how to catch this exception.
    Next processing depends on application-specific nature of RFC: whether or not call is idempotent, in simple words -- submitting same request doesn't hurt.
    This comes from the fact that network failure may occurs when transferring request (hence no background processing performed) or when returning response (hence function already executed).
    For idempotent calls there is also an option for automatic re-tries finite number of times. For non-idempotent calls the only option is to display error to user in friendly format.
    An idempotent call is a call that can be executed more than once on the server without undesirable side effects. Take for example Create / Read / Update / Delete operations. Obviously, read is idempotent while it doesn't alter data at all. You may treat Delete as idempotent up to certain extent -- just handle "record not exists" gracefully. Create and Update are not good candidates -- re-submitting same request typically leads to serious problems like duplicate entries or data inconsistency.
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

Maybe you are looking for

  • My MacBook Air freezes momentarily after update to 10.8.2

    My Trackpad/keyboard pointer freezes after I updated my MacBook Air 11 "2010, model A1370 to OS X 10.8.2. With a few minutes intervals the pointer freezes for approx. 5 seconds - quite annoying. Is there a solution to this problem - I have noticed a

  • UIX form need to clear cached data within session

    HELP! I have some UIX forms created with JHeadStart, thay work fine except but when the underling table data changes (from another user session or an update trigger from different table) the forms will NOT show refreshed data, unless I delete my brow

  • Trouble compiling GTK

    Hi everyone, I'm trying to compile gtk+ 2.13.7, but Make fails with an error about libcairo. As far as I know, I've successfully compiled all of gtk's dependencies, but for some reason gtk is looking for libcairo in my X11 directory instead of in my

  • How can I find and read emails that Thunderbird has downloaded to my computer?

    I have read that Thunderbird puts copies of emails into the profiles folder. On finding the folder I see what looks like the folder names I have made in Thunderbird and yet see no individual emails. When I try to open them Thunderbird wants to make t

  • PowerBook Alu-The painting flaked - Has anyone been in a similar situation

    NOTICE : English version follow Je recherche toute personne qui connait une situation similaire et/ou si une solution a été trouvé ou résolu entre Apple et vous ? Moins de 6 mois après l'achat de mon PowerBook, il est survenu un défaut dans le pannea