FileName in ABAP XSLT Mapping

Dear SDN,
In an integration scenario we are using sender File Adapter and a  ABAP XSLT Mapping.
Is there any way to get the source FileName from such mapping.  Im trying to use the adapter-specific message attributes, but it doesn't work, and I didn´t find an example, probably I and doing somthing wrong.

Thank you for your help,
I just try to access the adapter-specific attibutes using:
<xsl:stylesheet version="1.0"
<xsl:variable name="filename"  select="key:create('', 'Directory')" />
but the following error raised:
<SAP:Stack>Error while calling mapping program YXSLT_TEST (type Abap-XSLT, kernel error ID CX_XSLT_RUNTIME_ERROR) Call of unknown function</SAP:Stack>
have you had this situation?

Similar Messages

  • Reg ABAP-XSLT mapping

    Hi All,
           One of my inetrfaces i am using ABAP-XSLT mapping some times i am getting the following erre "Error while calling mapping program ZXXXX_XXX (type Abap-XSLT, kernel error ID CX_XSLT_RUNTIME_ERROR) No valid source context supplied"
    What does it mean and what is the reason for that error.
    Edited by: Ramakrishna Balusu on Oct 27, 2009 1:35 PM
    Edited by: Ramakrishna Balusu on Oct 27, 2009 1:36 PM

    Check this discussion:
    XI Error

  • ABAP-XSLT mapping.

    Hi ALL,
              I am using i scinario in my project of type IDOC to PI to SOAP . In this one my mapping is of type ABAP-XSLT . the interface is runnign fine for all the idocs except one idoc. When that particula idoc comming from r/3 it is giving short dump and the message is staying at queue as scheduled. When i am trying to reprocess the message it is giving the same dump. In the ST22 t code it is saying the XSLT_RUNTIME_ERROR and the error is XSLT "xxxx"program was termintaed scince it encounterd a statement that could not be executed. I tried to monitor the trace for the both successful messages on the same inteface. But the both the traces are same it seems. what could be the reason how to eliminate.

       I think there is an option to debug the XSLT programs that are generated using call transformation command:
    Can you try debugging the XSLT program?
    Also check if there are any invalid characters like angled braces, ampersands etc in your IDOC data.
    It might sometimes create issues.
    Ravi kanth Talagana

  • Call RFC  In ABAP XSLT

    Hello Experts,
          I have a requirement where in i need to call RFC(Which is created in R/3 system) In ABAP XSLT Mapping(defined iN xi system).
    Can some one help me to achieve this??
    **ITS URgent****
    Thanks and Regards,
    Prakash Babu.

    Hi James,
             Check here............
    /message/5182263#5182263 [original link is broken]
    RFC connections
    /message/5102602#5102602 [original link is broken]

  • XSLT Mapping with Java Enhancement

    Hi All
    I am working on XSLT Mapping with Java Enhancement.
    To do this scenario i have followed the following link.
    As per the above link I have created Source and Target Data Types , Message Types , Mesage Interfaces, XSLT Mapping (using the transaction XSLT_TOOL) and Interface Mapping part and configred a simple file to file scenario in the ID part.
    Apart from this I have wirte the java code, compile the java code, create the jar file using .java and .class file and after creating the jar file import the .jar file in the imported archive of the IR..
    when I am trying to execute the scenario I am getting the successful message in SXMB_MONI but the target file is having the payload as given below.
    <?xml version ="1.0" encoding="UTF-8"?>
    <name xmlns:javamap=""/>
    And as per the XSLT mapping the payload should be as below
    <?xml version ="1.0" encoding="UTF-8"?>
    <name>Rinku Gangwani</name>
    I have also followed the following blog link but still i am getting the same issue
    could you please tell me what can be the reason that i am getting the blank targt field values in the payload.
    Rinku Gangwani

      The Transaction code XSLT_TOOL for ABAP xslt mapping.But the Java Enhancement is used for normal xslt mapping which we created using Stylus Studio.You can not access the Java Enhancement in ABAP xslt mapping.
    If you want to use Java Enhancement in xslt mapping then create a xslt mapping using Stylus Studio and save the file as .xsl and zip the .xsl and import to import archive.
    Edited by: prakasu on May 28, 2009 1:46 PM

  • XSLT-Mapping oder Message Mapping (grafisches Mapping)?

    which mapping type is the best? xslt oder message mapping?

    In terms of perfromance , XSLT is supposed to be very bad and is to be avoided whenever possibl.e
    Graphical Mapping is the best when it comes to performance of the mapping.
    But , there are a few features, which are not possible using graphical in which case you might have to go for JAVA/ ABAP / XSLT mapping.

  • ABAP , JAVA And XSLT Mapping Doc's

    I am new to SAP XI Any body please send me the Doc's Related to ABAP, JAVA And XSLT Mappings. Thanks in Advance.

    Refer to
    ABAP mapping:
    How to Use ABAP Mapping in XI 3.0
    JAVA mapping: (Java mapping)
    XSLT mapping:
    XSLT Mapping with java enhancement
    XSLT - /people/dirk.roeckmann/blog/2006/07/26/grouping-xml-with-xslt--from-muenchian-method-to-xslt-20
    Reward points if helpful!!

  • XSLT mapping to retrieve FileName from FILE SENDER adapter

    I have an File Sender adapter scenario where I have switched on Adapter-specific message attributes (FileName).
    In my XSLT mapping program I need to RETRIEVE the filename and map it. Can anyone help please?
    Thx in advance

    Hi Bohamo
    Refer the following link.It provides the required solution for you.

  • XSLT Mapping on ABAP Engine

    Hi All,
    I am trying to implement an XSLT mapping on the ABAP Engine. I went to the Transformation Workbench(SE80).I have created 4 levels of packages (Structure->Main->then 2 more levels) and  included Package Interface SAI_TOOLS in 'Use Accesses' tab.
    I have also set|Abap-class;R3_XSLT|XSL (ABAP Engine)
    in the Exchange Profile.
    Now I want to create the tranformation (ST or XSLT) so that I can see it in the Repository.
    At which package level(1st to 4th), should I right-click and go to 'Create->More->Transformations' so that I can see this XSLT  Mapping program in the repository?
    I have followed all the links from but I am unable to get the desired result, i.e. see my Mapping in the Repository when I choose Mapping Program of type  'XSL->ABAP Engine', from the drop-down box in Interface Mapping.
    Kindly help.

    Hi Naveen,
    I did as you told, i.e. keyed in the name of the ABAP Transformation program (mapping) name.I have not written any namespace for the Mapping program in the Interface Mapping Design, just the Program name.
    When I execute my mapping from se80, it works perfectly.
    I created this Transformation program at the topmost level (i.e. Structure package level).
    But when I execute my scenario, I get the following runtime error in sxmb_moni:
    Error in mapping program zpc_transfom2 (type R3_XSLT, kernel error ID UNCAUGHT_EXCEPTION).
    What is wrong? Did I create the transformation program at the wrong level?

  • Need Filename in XSLT Mapping.

    Hi ,
    I am doing File to IDOC scenario.
    I am using XSLT mapping.
    My Target fielld is having  " File Name " field.
    I need to pass the source file name to that field.
    I am using XSLT Mapping.
    How to call the Filename and map the value to that field in XSLT.
    Jayasimha Jangam

    This is one of the better part of the online help:
    Just replace 'Directory' with 'FileName'.
    I have used that, it works fine.

  • Graphical Mapping Vs XSLT mapping Vs Java Mapping Vs ABAP Mapping

    Hi Experts,
              I have a question regarding different message mapping options available in XI namely
    Graphical Mapping
    XSLT mapping
    Java Mapping
    ABAP Mapping
    Q1: Which amoung the above mappings is the best and why?
    Q2: On what cases Graphical, XSLT, Java and ABAP Mapping should be used?
    Q3: Is it true that graphical and XSLT mappings are converted into Java class internally?
    Kindly help!
    Message was edited by:
            gopalkrishna baliga

    There is no hard and fast rule for using the mapping techniques.
    Graphical Mapping is used for simple mapping cases. When, the logic for your mapping is simple and straight forward and it does not involve mult hiearchical mapping requirement. and context handling.
    Java and XSLT mapping are used when graphical mapping cannot help you.
    When the choice is between Java And XSLT, XSLT is simpler than java mapping and easier. But, it has its drawbacks.  XSLT can lead to a bad perfrormance if the Source XML is huge.
    Java Mapping uses 2 types of parsers. DOM and SAX. DOM is easier to use with lots of classes to help you create nodes and elements, but , DOM is very processor intensive.
    SAX parser is something that parses your XML one after the other, and so is not processor intensive. But, it is not exaclty easy to develop either.
    For further info on each of the mapping, refer to these links,
    Graphical Mapping,
    XSLT Mapping
    Java Mapping
    DOM parser API
    Also, check this thread for more info,
    Different types of Mapping in XI
    Am not sure about XSLT , but , yes graphical mapping is converted into java classes internally and these classes use SAX parsing as well.

  • Calling abap method in xslt mapping?

    I need to call abap method in my xslt mapping , i tried with
    <sap:external-call >and <sap:external-function> .
    But it is giving short dump error.
    Can anybody give me proper syntax..

    Please see the code below.
    This is how u call
      <sap:external-function class="ZTEST_CLASS" kind="class" method="GETRECORDCOUNT" name="ns0:GetRecordCount">
        <sap:argument param="XXXX" type="string"/>
        <sap:argument param="YYYY" type="string"/>
        <sap:result param="ZZZZ" type="string"/>
      <xsl:template match="/">
        <xsl:param name="Counter">
    *And this is how u call below...
    <xsl:value-of select="ns0:GetRecordCount(A,B)"/>

  • Java ,abap and XSLT mapping

    Hi all,
               can any one provide some material on java ,ABA and XSLT mapping(as i got requirement on my current project)..
    thanks in advance.

       All mapping related links
    There is no hard and fast rule for using the mapping techniques.
    Graphical Mapping is used for simple mapping cases. When, the logic for your mapping is simple and straight forward and it does not involve any complex logic.
    Java and XSLT mapping are used when graphical mapping cannot help you and you have multilevel hierarchy structure data.
    When the choice is between Java and XSLT, XSLT is simpler than java mapping and easier. But, it has its drawbacks. One among them being that you cannot use Java APIs and Classes in it. There might be cases in your mapping when you will have to perform something like a properties file look up or a DB lookup, such scenarios are not possible in XSLT and so, when you want to use some specific Java API's you will have to go for Java Mapping.
    Java Mapping uses 2 types of parsers. DOM and SAX. DOM is easier to use with lots of classes to help you create nodes and elements, but, DOM is very processor intensive.
    SAX parser is something that parses your XML one after the other, and so is not processor intensive. But, it is not exactly easy to develop either.
    To know more about each of them please go thru the following links. And if you ask me your which is better, it depends basically on the scenario you implementing and the complexity involved. Anyways please go thru the following links:
    Graphical mapping
    XSLT mapping
    JAVA mapping
    DOM parser API
    ABAP mapping
    To know more about the value mapping tools for the SAP Exchange Infrastructure (XI), please go thru the following link:
    To get an idea as to what value mapping is, please go thru the following links:
    most of the links that I have provided also helps you get the step by step procedure of doing the same. And also involves the procedure to implement certain advanced features.
    And please go through this link which clearly explains the 3 types of mappings.

  • Raise error in an external-function of XSLT-mapping (ABAP)

    we implemented a xslt-mapping (ABAP) in PI with external-functions.
    It's a great feature and works fine.
    Now, we have to implement an error handling:
    The external-functions are reading data from an abap table. We have to stop the mapping (if a value in the table is missing).
    We wanna show an error inside the PI-Monitoring (red flag) with a valid error text.
    How can I raise an error inside an external-function?
    Wolfgang Hummel

    Hi Michal,
    thanks a lot for your answer.
    Can I set dynamic configuration inside an external funktion of an ABAP-XSLT?
    I added the CX_MAPPING_FAULT-Exception to my external-function method and raised an exception inside my external-funktion ... and I got an "UNCAUGHT_EXCEPTION" inside my mapping - bad

  • Message Mapping ...  ABAP ,XSLT and JAVA

    HI Friends
    I have a general question ... but it will confuse me a lot ....
    my question is we have four types of message mappings
    1) GUI ( and UDFs)
    2) ABAP
    4) JAVA
    when we have plenty of options in GUI (and User defined functions also)  to define sender 2 receiver message mapping
    then what is need of JAVA,ABAP and XSLT Message Mapping and when we use these message mappings( exactly in which situation) and difference b/w them
    Thanks in Advance

    Green = recommended
    Yellow = Acceptable
    Red = not recommended
    In my experience.
    XSLT mapping: is confotable to convert to another format different to xml(when we do not have a complex logic)
    Java Mapping: is to implement complex logics(but the maintainbilityis not need a external tool)
    ABAP mapping: I think is the best option when the you have the skills on that technology but take account that is not portable neither good for usability.

Maybe you are looking for