PI 7.0 - UDF to access runtime constants

Hi experts,
I've created some user-defined functions to use in my Message Mappings. I'm particularly interested in having Message Mappings that allow me to send error e-mails everytime an integration process fails.
So, in every Message Mapping I've created an UDF with the following code (saw this on SAP Help):
MappingTrace trace;
String constant;
java.util.Map map;
trace = container.getTrace();
// get constant map
map = container.getTransformationParameters();
constant = (String) map.get(
        StreamTransformationConstants.INTERFACE_NAMESPACE);
trace.addInfo("INTERFACE_NAMESPACE:" + constant);
return constant;
Now, almost everything is working fine. I'm receiving some error e-mails with the correct namespace, but the rest of them comes with a "null" instead of namespace - this is only happening in some Message Mappings - I have MM_A and MM_B of the same interface responsible for sending e-mails on diferent stages of the integration process; The e-mail received from MM_A contains the correct namespace but the other don't (comes with null).
Can you help me on this?
Thanks in advance.
Regards,
Ricardo Inácio

PI is available in the options during the install of ECC.

Similar Messages

  • ** Not able to access Runtime Constants in ABAP XSL

    Hi friends,
    We have written one ABAP XSLT program. (XSLT program runs in ABAP Engine). This program is for the interface Mapping in XI. Source Interface occurrence is 1 and target interface occurrence is 0..unbounded. ie. We use Message Split to send source messages to multiple target messages. For this we have written one ABAP XSLT program. To find Value mappings we use 'SenderService' Runtime Constant to determine Sender Service (for Source Agency) at runtime. But the problem is,  inside template the constant $SenderService did not have the value.  I have given below the coding
    <xsl:param name = 'SenderService'/>
    <xsl:template match="/">
         <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
                 <ns0:Message1>          
                  <ns1:employeeDemographicsRequest xmlns:ns1="http://aprilbiztec.com">
    <!-- here we are $SenderService did not receive the value -->
    Friends, Could you kindly help me to solve this problem ? (ie how to access Runtime Constants in ABAP XSLT when use message Split)
    Thanks in advance.
    Kind Regards
    Jeagthees P.
    Note :
    1) In normal ABAP XSLT, we are able to access Runtime Constant.
    2) For the same scenario, if we use normal XSLT ie. JAVA XSLT, we are able to access Runtime Constant.

    Hi,
    As far as I know you cannot access Runtime constants if there is a message split.
    Regards,
    Kumar

  • Accessing Runtime Constants in PCK

    Hi all
    Anybody tried accessing runtime constants such as message ID  in PCK, successfully?
    I have written a java mapping using StreamTransformationConstants class to retrieve MessageId value. The same java mapping works fine in XI, but not PCK.
    Any idea?
    Many thanks.
    YJ

    to the target  date mapping we have created a userdefined fuction fileName which is failing the error message when we  test the interface mapping is Runtime exception occurred during execution of application mapping program com/sap/xi/tf/_XI_ERP_FI_BAPI_ACC_DOCUMENT_POST_REQ_MM_: com.sap.aii.utilxi.misc.api.BaseRuntimeException; RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns1:BAPI_ACC_DOCUMENT_POST/DOCUMENTHEADER/HEADER_TXT. The message is: Exception:[java.lang.NullPointerException] in class com.sap.aii.mappingtool.flib3.TextFunctions method substring[null, com.sap.aii.mappingtool.tf3.rt.Context@0000000000000]
    is this help full
    when it is succesfull the input <HEADER_TXT>Payroll for 01/2008</HEADER_TXT>
    <DOC_DATE>20080131</DOC_DATE> 
                                                    when it is failed the input is
    <HEADER_TXT>Payroll for 20/08.t</HEADER_TXT>
    <DOC_DATE>08.t20</DOC_DATE>
    thanks and regards
    sandeep
    thanks
    sandeep

  • Accessing runtime constants with XSLT doesn't work

    Hi PI-experts,
    I'm trying to insert the Message ID from my message in a XSLT Mapping. I followed the description in SAP Help:
    First declare a param:
    <xsl:param name="MessageId"/>
    Later, use it:
    <MESSAGE_ID><xsl:value-of select="$MessageId"/></MESSAGE_ID>
    But the field MESSAGE_ID is always empty.
    Any explanations ?
    What do I need to do, to make it work ?

    Hi Udo and all,
    i have a bpm, where i first collect some messages and then execute a transformation step, which calls a XSLT Mapping to merge multiple messages into one. After this Transformation Step i added another Transformation Step, which calls a Message Mapping. This Message Mapping is a one to one mapping (every field in the source gets mapped to its twin in the target structure, both messages are the same). Only one field is changed, i wrote user-defined function as proposed in Michal's blog, retrieve the MessageID and set it to this field. I tested the BPM and it definitly works, the Message ID is set to the correct value.
    Is this a different behaviour than you have experienced in the past?
    I'm running on PI 7.0 with SP 16.
    Best Regards
    Sven

  • Mapping runtime constant to get system details of the XI box

    Hi
       We have a need to get the XI system details ( sysid and the client) at runtime - when executing a mapping that we designed using Message mapping . Is there any runtime constant/udf that we  can use to retrieve this information ?
    We are on XI 3.0 SP23.

    Hi,
    refer this blog by Michal..
    /people/michal.krawczyk2/blog/2005/06/11/xi-how-to-retrieve-messageid-from-a-bpm
    just ignore the BPM part...you will need only the mapping logic and your target message will have the necessary value...also refer this link for the list of parameters that you can access:
    http://help.sap.com/saphelp_nwpi71/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm
    http://help.sap.com/saphelp_nwpi71/helpdata/en/78/b4ea10263c404599ec6edabf59aa6c/frameset.htm
    Regards,
    Abhishek.

  • Reg problem in Runtime Constants $SenderService

    Hi
          Have a problem , I am using ABAP XSLT Processor  mapping (I have used message split for this particular scenario i.e. input is single file and output is multiple file)
    Instead of hard coding the sender service i tried to use Runtime Constants $SenderService but this was not working .
    For one to one scenrio it is working fine ,also in JAVA XSLT Processor  it is working fine ....
    can any one help on this
    Ramamurthy

    are you testing your XSL program in XI or outside ?
    These runtime consants can be accessed only inside XI.
    also,
    <i>
    If you want to access one of the constants in the XSLT program, you first have to declare the constant as a parameter, for example:
    <xsl:param name="MessageId" /></i>
    ref: more @
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm

  • Selection dynamic Mapping Runtime Constant with a qualifier

    Hello all,
    i want to access a Mapping Runtime Constant out of a message mapping specified with a qualifier.
    In the Integration Directory i specified in the identifier tab the following Value Pairs:
    Agency               Scheme          Name
    http://Sap.com/xi/XI    XIParty         ABC
    R3D_310                 Partner         111
    R3T_310                 Partner         222
    R3P_310                 Partner         333
    In the message mapping i want to have the Name for the agency "R3T_310".
    I know i can access the Name with:
    constant = (String) map.get(StreamTransformationConstants.SENDER_PARTY);
    But i getting everytime the name "ABC", which i don't want.
    At this point i need your help, to find out how i can dynamically get the correct one??
    many thanks for your help
    ilka

    Ilka,
    You can also access other Mapping Runtime constants. For example, SENDER_PARTY_AGENCY.
    If needed, you can also access SENDER_PARTY_SCHEME and SENDER_SERVICE.
    The SAP Help link for all the Mapping Runtime constants accessible with StreamTransformationConstants is:
    http://help.sap.com/saphelp_nw04/helpdata/en/78/b4ea10263c404599ec6edabf59aa6c/frameset.htm
    Hope this helps,
    Bhanu

  • Runtime Constant in XSLT :-(

    Hi together,
    I have one problem with constant at the runtime.
    The tag <RCVPRN> is empty, but I need this for my IDoc communication.
    In the SAP help stands this:
    Runtime Constants
    $ReceiverService
    Service on the receiver side that receives the message. For example, the name of a business system.
    As of SAP XI 3.0, use this constant instead of the constant RECEIVER_SYSTEM used previously.
    Yes
    See also: Service
    If you want to access one of the constants in the XSLT program, you first have to declare the constant as a parameter, for example:
    <xsl:param name="MessageId" />
    In my XSLT mapping I have this:
    <RCVPOR>empty</RCVPOR>
    <RCVPRT>LS</RCVPRT>
    <xsl:param name="ReceiverService"/>
    <RCVPRN>
    <xsl:value-of select="$ReceiverService"/>
    </RCVPRN>
    </EDI_DC40>
    But during the runtime the constant is empty
      <RCVPOR>empty</RCVPOR>
      <RCVPRT>LS</RCVPRT>
      <RCVPRN />
       </EDI_DC40>
    Have you an idea for my problem?
    Bye
    Stefan

    Hi Udo/all,
    Thank you for your answer.
    Please see in my last post:
    Idoc with XSLT Mapping ALE service error
    I mark in my channel:
    Take Sender from Payload and Take Receiver from Payload
    I must set control field by xslt maping, because the receiver is flexible.
    With your setting I became a converting error to an ALE logical system.
    I need the runtime constant in the xslt mapping.
    Idea?
    bye
    stefan

  • How to read runtime constants in ejb Module?

    Hi all,
    Anyone knows how to have special access to Runtime Constants at ejb Modules? I've searched and all I found is for Java and ABAP Mapping ...I hope it is possible! I want to read the interface name in order to choose which code my module should apply, as a case statement I mean.
    Thanks in advance,
    Ricardo.

    Hi Ricardo !
    Check these links:
    http://help.sap.com/saphelp_nw70/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm
    Parameter MessageId
    Regards,
    Matias.

  • XSLT mapping, how can I include a Runtime Constants in target message

    Hi, I would like in my XSLT mapping, to have an attribute include the MessageID.
    From my understanding of the online help [http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm|http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm], I have the following code in my XSL:
                   <xsl:param name="MessageId" />
                   <xsl:attribute name="filename">Output_<xsl:value-of select="$MessageId"/>.xml</xsl:attribute>
    But for now the result is to have a filename attribute that only contains: "Output_.xml" as if the $MessageId is empty.
    Anyone experienced successfully using one of those runtime constants with XSLT mapping ?
    Cheers,
    greg

    Hi, found the answer of why it was not running: I'm in a transform step of a BPM:
    For more info check this thread:
    [/message/435521#435521 [original link is broken]|/message/435521#435521 [original link is broken]]

  • Runtime constant: mapping-programm

    Hello,
    we got a exception branch for mapping errors in BPM.
    Now we want to inform the user, which mapping programm caused the error.
    Is there a runtime constant?
    I already analyzed:
    http://help.sap.com/saphelp_nw04/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm
    Regards Mario

    Hi Mario,
    You can raise alerts if mapping, receiver determination etc.. fails in the integartion engine. You need to configure alert rules for this. You can go to RWB->Alert Configuration->Where did the error occur? choose integration engine and you can see different error categories and error codes which can be configured using alert rules. Refer this michal's weblog for configuring the same..
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
    You can also raise an alerts from BPM for any mapping failures, send step system errors/application errors using fault messages (through exception branch).
    Refer this weblog for configuring an alert in the BPM
    /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
    In you BPM, You can add Container Variables to Messages by using Container Opertaions(Append/Assign)
    http://help.sap.com/saphelp_nw2004s/helpdata/en/59/e1283f2bbad036e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/33/4a773f12f14a18e10000000a114084/frameset.htm
    And also you can throw this exceptions via Alerts.
    Also go through these links....
    http://help.sap.com/saphelp_nw2004s/helpdata/en/33/4a773f12f14a18e10000000a114084/frameset.htm
    /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
    /people/sap.user72/blog/2005/02/23/raising-exceptions-in-sap-xi-mapping
    http://help.sap.com/saphelp_nw2004s/helpdata/en/80/942f3ffed33d67e10000000a114084/frameset.htm
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
    /people/aravindh.prasanna/blog/2005/12/23/configuring-scenario-specific-e-mail-alerts-in-xi-ccms-part--1
    Regards,
    Abhy
    Message was edited by: Abhy Thomas
    Message was edited by: Abhy Thomas

  • Jvm runtime constant pool

    Hi there,
    this is my query:
    As we know java builds a constant pool for all the symbols if a class in a class file. This class file when loaded by VM, the constant pool is translated into the runtime constant pool in the method area of the Heap.
    Does any one know if there is only 1 runtime constant pool per class or is it 1 per class instance(Object). The JVM spec did not clarify on this. Also if its 1 per class then how does the JVM know where all the instances of a class are while resolving references and also when garbage collecting???
    thank a lot.
    Rishabh.

    rishabhchandra wrote:
    As we know java builds a constant pool for all the symbols if a class in a class file. This class file when loaded by VM, the constant pool is translated into the runtime constant pool in the method area of the Heap.
    Symbols?
    It builds it for literals.
    Does any one know if there is only 1 runtime constant pool per class or is it 1 per class instance(Object). Certainly not by instance.
    And more likely it is per class loader. A class can't be unloaded unless its class loader is unloader so there would be no point in managing a pool per class when it could be managed via the class loader.
    The JVM spec did not clarify on this. Nor should it. That is an implementation detail of how the VM is implemented.
    Also if its 1 per class then how does the JVM know where all the instances of a class are while resolving references and also when garbage collecting???Not sure that question is sensical. The only reason it would need to know is because it is using the class. And the class might not own the pool, but it certainly references it.
    As for garbage collection that only occurs in the context of this question if the class loader is collected.

  • Deploying Office 2010 with SP2 / Access runtime 2010

    I am trying to install Office 2010 thru OCT / GPO. Starting a computerstartup script which runs a batchfile. The batchfile is starting the deinstalltion of Office 2003 and installs Office 2010. In the updates folder is also SP2 integrated so that SP2 is
    also installed.
    In another batchfile and another policy i also install Access Runtime 2010.
    The problem i have is that the installation of office 2010 is starting and installs, however the SP2 is often not. Sometimes it does and sometimes it don't. That is also the fact for Runtime 2010. Sometimes it does and sometimes not, then only Office 2010
    is installed without SP2.
    because he sometimes installes access runtime 2010 and Office 2010 SP2 it makes it more difficult. 
    The batchfiles are running in computer startup script so before the user can log in to their W7 systems.
    Here is part of the latest logfile from Office:
    MSI (s) (7C:24) [15:36:23:509]: Product: Microsoft Office Standard 2010. Bestand C:\Program Files\Microsoft Office\Office14\MAPISHELL.DLL wordt gebruikt door het volgende proces: naam: SearchFilterHost , id 2492.
    MSI (s) (7C:24) [15:36:23:713]: Product: Microsoft Office Standard 2010. Bestand C:\Program Files\Microsoft Office\Office14\OLMAPI32.DLL wordt gebruikt door het volgende proces: naam: SearchProtocolHost , id 3252.
    MSI (s) (7C:24) [15:36:23:729]: Product: Microsoft Office Standard 2010. Bestand C:\Program Files\Microsoft Office\Office14\MAPIPH.DLL wordt gebruikt door het volgende proces: naam: SearchProtocolHost , id 3252.
    MSI (s) (7C:24) [15:36:24:098]: Product: Microsoft Office Standard 2010. Bestand C:\Program Files\Common Files\Microsoft Shared\OFFICE14\MSO.DLL wordt gebruikt door het volgende proces: naam: SearchProtocolHost , id 3252.
    MSI (s) (7C:24) [15:36:24:231]: Product: Microsoft Office Standard 2010. Bestand C:\Program Files\Common Files\Microsoft Shared\OFFICE14\RICHED20.DLL wordt gebruikt door het volgende proces: naam: Skype , id 344.
    MSI (s) (7C:24) [15:36:24:232]: Product: Microsoft Office Standard 2010. Bestand C:\Program Files\Common Files\Microsoft Shared\OFFICE14\RICHED20.DLL wordt gebruikt door het volgende proces: naam: SnagitEditor , id 2592.
    MSI (s) (7C:24) [15:36:26:675]: Error: cannot register 64 bit component {C2B260C7-949D-4BCB-9572-99A3F39A4E5A} on 32 bit system. KeyPath: C:\Program Files\Microsoft Office\Office14\
    MSI (s) (7C:24) [15:36:27:406]: Product: Microsoft Office Standard 2010 - Update 'Service Pack 2 for Microsoft Office 2010 (KB2687455) 32-Bit Edition' kan niet worden geïnstalleerd. Foutcode: 1603. Meer informatie is beschikbaar in logboekbestand C:\Windows\TEMP\MSI3e356.LOG.
    MSI (s) (7C:24) [15:36:27:407]: Een update is geïnstalleerd. Productnaam: Microsoft Office Standard 2010. Productversie: 14.0.7015.1000. Producttaal: 0. Fabrikant: Microsoft Corporation. Naam van update: Service Pack 2 for Microsoft Office 2010 (KB2687455)
    32-Bit Edition. Status van geslaagde/mislukte installatie: 1603.
    MSI (s) (7C:24) [15:36:27:407]: Product: Microsoft Office Standard 2010 -- Configureren mislukt.
    MSI (s) (7C:24) [15:36:27:408]: Het product is opnieuw geconfigureerd. Productnaam: Microsoft Office Standard 2010. Productversie: 14.0.7015.1000. Producttaal: 0. Fabrikant: Microsoft Corporation. Status van geslaagd/mislukt opnieuw configureren: 1603.
    freddie

    Nobody has a idea why the update is goiing wrong?
    freddie

  • Unable to access Runtime Services with admin user

    Hi all,
    Trying to access runtime services with admin user returns a "Authentication Denied
    The username or password has been refused by Runtime Services. Please try again."
    Credentials are correct. It seems to be some kind of lockout. I´ve copied this admin user entry in ldap and named it admin2, this "new" user can perfectly log.
    As it could be a lockout I have unlocked the user although the proper tab said there was no locked user.
    The realm is in a openldap.
    Any hint would really be appreciated.

    Hi all,
    Trying to access runtime services with admin user returns a "Authentication Denied
    The username or password has been refused by Runtime Services. Please try again."
    Credentials are correct. It seems to be some kind of lockout. I´ve copied this admin user entry in ldap and named it admin2, this "new" user can perfectly log.
    As it could be a lockout I have unlocked the user although the proper tab said there was no locked user.
    The realm is in a openldap.
    Any hint would really be appreciated.

  • Disable macros warning on Access Runtime 2003 via gpo

    Hi guys,
    My users are using Microsoft Access Runtime 2003 to access our database and I was wondering if there is a way to disable the warning message through a group policy?
    Thanks!
    Ro
    This topic first appeared in the Spiceworks Community

    You should be able to do this by a GPO by adding a new registry item as below.
    32-bit OS:
    [HKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0\Access\Security]
    "Level"=dword:00000001
    64-bit OS:
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\11.0\Access\Security
    "Level"=dword:00000001
    See https://technet.microsoft.com/en-gb/library/cc753092.aspx for info on how to this (if you require it)

Maybe you are looking for

  • Since I loaded V5 firefox disappeared and won't open at all. I'm here via explorer I reloaded v4 but nothing opens at all.

    I have been using V4 it was slowing down quite a bit so loaded V5. Since then no firefox will open at all. I redownloaded V4 but it makes no difference. I click on the shortcut and the hour glass comes on for about a second and no more. nothing happe

  • Nio udp with selectors

    Hello, Ive been looking for implementation of nio udp sockets with selectors all over the internet but i didnt get much. Does anyone here know of any websites with simple examples on nio udp sockets with selectors? (server + client), thanks. Paul

  • Struts 2 default language

    Hi everyone, I'm using Struts 2 and currently trying to get the default language that struts is using. What I want to do is load some images on the jsp end of the application. Because the website should be available in multiple languages I need to "i

  • Using Min and MAX function on Bit Field

    Hi All, I am trying to write a SQL Query where i want to aggregate a bit field along with some  other numerical fields I  have a Field of type Bit and it can contain data like Scenario 1:              MyBit Field                    Row1      Null    

  • IPAD problems - last IOS vresion is 5.1.1

    Hi I bought my IPAD in 2011, but currently I'm having problems with some apps. The last IOS version installed is 5.1.1. It means that doesn't support the most recent versions? And I need to buy a most recent IPAD to work with IOS7? Please help me. th