Abap-Xslt , XSLT

Hi Experts,
                       Can anybody send me step by step procedure of ABAP-XSLT Mappings.
                  What is difference between Abap-Xslt and Xslt?
Thanks

Hi
ABAP XSLT mappings are developed in
the transformation editor in the ABAP Workbench. Such XSLT mappings are also
executed on the ABAP Engine of the Integration Server at runtime.
It is not possible to write messages to the trace in ABAP-XSLT mappings because
it is not technically possible to transfer a trace object during the call.
But XSLT mappings are developed externally in an appropriate XSLT editor before importing it to the Enterprise Services Repository.
Before SAP NW PI 7.1, XSLT programs were executed using the SAP XML
Toolkit. This became obsolete when version 5 of the Java Development Kit
was introduced.
Steps for ABAP-XSLT:
Start the ABAP Workbench by calling transaction SE80.
Implement the ABAP-XSL mapping in the transformation.
Reference your ABAP-XSL mapping in your operation mapping
Regards
Monika

Similar Messages

  • 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.
    regards,
    GP

    Thank you for your help,
    I just try to access the adapter-specific attibutes using:
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
    <xsl:variable name="filename"  select="key:create('http://sap.com/xi/XI/System/File', 'Directory')" />
    </xsl:stylesheet>
    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?

  • 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]
    Regards,
    Vijay.

  • 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.
    Regards,
    Rama
    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
    Regards,
    ravi

  • 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.
    Regards,
    Rama

    Hi,
       I think there is an option to debug the XSLT programs that are generated using call transformation command:
    http://help.sap.com/saphelp_nw70/helpdata/en/07/88273c3f2b3c7ce10000000a11402f/content.htm
    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.
    Regards,
    Ravi kanth Talagana

  • ABAP XSLT Extensions or XSLT (XI imported archive)?

    Hi all,
    I would like to know which is having better performance in a scenario with a significant number of messages.
    I know that ABAP XSLT Extensions is based in XSLT 1.0 and have some features of XSLT 2.0. So, for me it means some limitations and a disadvantage compared with all of XSLT 2.0 “standard” can offer.
    But, my question is related with performance and I just want to know which is faster.
    Thanks in advance,
    Cheers,
    Ricardo.

    Hi Ricardo,
    abap xslt has one great advantage
    abap stack does not have to communicate with
    java stack to perform the - so no RFC calls for mapping
    with many messages that might influence their flows
    but it wuold be best if you could just test it
    in YOUR environment (there are many test tools -
    like Loadrunner from Mercury) or you can write your own scripts
    and just test in your particular examle which one is better
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Looking for example - abap xslt - that uses xslt document() function

    Hello,
    I'm looking for an example that shows the use of abap xslt with the xslt document() function.  Using the xslt document() function seems like a straightforward way to use xslt to create a result xml document by processing the content of two or more
    source documents.  For example, if source document A.xml and aux.xml are available in  memory as xstringand using stylesheet ztransformwhat would be the argument for the document() function to associate aux.xml.  Thanks for any insight.
    Regards,
    jb10809

    Hi,
    Sorry, perhaps I should have been clearer! The function that I picked just to test what you need to do just happened to return a string that contains SPAN tags with style attributes. The actual function code is:
    create or replace FUNCTION out_string_fn
       RETURN VARCHAR2
    IS
       CURSOR emp_cur
       IS
          SELECT ename
            FROM emp;
       v_string   VARCHAR2 (4000);
    BEGIN
       v_string := ' ';
       FOR c IN emp_cur
       LOOP
          v_string :=
                v_string
             || '&lt;SPAN style="font-weight:bold;color:green"&gt;'
             || c.ename
             || '&lt;/SPAN&gt;'
             || ', &lt;/br&gt;&lt;/br&gt;';
       END LOOP;
       RETURN v_string;
    END;And this returned a naff list in green (see [http://apex.oracle.com/pls/otn/f?p=55041:57] and click the Test button) - but it does show that you can style the validation error messages
    Andy

  • Abap XSLT Exception block messages in SMQ2

    Hello Community,
    I have a XSLT ABAP transformation calling some ABAP objects and it's working well. I just need to handle some applications exceptions.
    I wrote an ABAP Class that raise an exception in this way:
    RAISE EXCEPTION TYPE cx_mapping_fault
            EXPORTING
              error_text = l_error.
    The problem is that the message appears canceled in SMQ2 and I need to show the error status in the Integration Engine
    I have tried with the <xsl:message>:
    <xsl:message terminate="yes">Error</xsl:message>
    But it didn't work. Exception isn't thrown in the Integration Engine. The message status is processed successfully.
    Your help would be appreciated.
    Regards,
    Yuván>

    Hello VJ,
    Thanks for your answer. I'm not using BPM in this scenario. I don't understand why messages that throw some exception in XSLT ABAP lock SMQ2. Because this doesn't happen when I use an ABAP-CLASS or message mapping as mapping programs. The lock is just using XSLT ABAP.
    Is this normal...?....is there anyway to avoid the lock and change the status to error in the integration engine..?
    Regards.
    Yuvan,

  • Error in ABAP XSLT transformation

    Hi,
    Im trying to upload some data from XML to abap. But Im getting an error while transforming xml data to internal table.
    Here are the details.
    XML:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
      <!--  Edited by XMLSpy® -->
    <?xml-stylesheet type="text/xsl" href="ABAP1.xsl"?>
    <conceptRevDecisionXml>
    <projectInfo>
    <projectId>P000755</projectId>
    <stage>CON</stage>
    <country>Ethiopia</country>
    <region>AFRICA</region>
    <teamleader>Priya Agarwal</teamleader>
    <teamleaderfirstname>Priya</teamleaderfirstname>
    <teamleaderlastname>Agarwal</teamleaderlastname>
    <actionType>X</actionType>
    </projectInfo>
    </conceptRevDecisionXml>
    XSLT: Transformation
    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:sapxsl="http://www.sap.com/sapxsl"
    >
    <xsl:strip-space elements="*"></xsl:strip-space>
    <xsl:template match="/">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <PROJID>
              <xsl:apply-templates select="//conceptRevDecisionXml"></xsl:apply-templates>
            </PROJID>
          </asx:values>
        </asx:abap>
    </xsl:template>
    <xsl:template match="conceptRevDecisionXml">
          <xsl:for-each select="projectInfo">
           <xsl:value-of select="projectId"></xsl:value-of>
           <xsl:value-of select="stage"></xsl:value-of>
           <xsl:value-of select="country "></xsl:value-of>
           <xsl:value-of select="region"></xsl:value-of>
           <xsl:value-of select="teamleader"></xsl:value-of>
           <xsl:value-of select="teamleaderfirstname"></xsl:value-of>
           <xsl:value-of select="teamleaderlastname"></xsl:value-of>
            <xsl:value-of select="actionType"></xsl:value-of>
            </xsl:for-each>
        </xsl:template>
    </xsl:transform>
    Once I run the program...Im getting an error saying...ABAP XML Formatting error in XML node..
    Im new to ABAP-XML parsing..Pls help me where Im going wrong..
    Thanks in advance.
    Regards,
    Priya

    Hi Priya,
    you can try with the below,
    1) Create a local ITAB with the structure of the XML,
    TYPES: BEGIN OF t_data,
            projectid           TYPE char30,
            stage               TYPE char30,
            country             TYPE char30,
            region              TYPE char30,
            teamleader          TYPE char30,
            teamleaderfirstname TYPE char30,
            teamleaderlastname  TYPE char30,
            actiontype          TYPE char30,
           END OF t_data.
    2) Create an XSLT prog in "STRANS" with the below code,
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    <asx:values>
    <L_DATA>
    <xsl:apply-templates select="//projectInfo"/>
    </L_DATA>
    </asx:values>
    </asx:abap>
    </xsl:template>
    <xsl:template match="projectInfo">
    <conceptRevDecisionXml>
    <PROJECTID>
    <xsl:value-of select="projectId"/>
    </PROJECTID>
    <STAGE>
    <xsl:value-of select="stage"/>
    </STAGE>
    <COUNTRY>
    <xsl:value-of select="country"/>
    </COUNTRY>
    <REGION>
    <xsl:value-of select="region"/>
    </REGION>
    <TEAMLEADER>
    <xsl:value-of select="teamleader"/>
    </TEAMLEADER>
    <TEAMLEADERFIRSTNAME>
    <xsl:value-of select="teamleaderfirstname"/>
    </TEAMLEADERFIRSTNAME>
    <TEAMLEADERLASTNAME>
    <xsl:value-of select="teamleaderlastname"/>
    </TEAMLEADERLASTNAME>
    <ACTIONTYPE>
    <xsl:value-of select="actionType"/>
    </ACTIONTYPE>
    </conceptRevDecisionXml>
    </xsl:template>
    </xsl:transform>
    3) Call the transformation as shown below,
    CALL TRANSFORMATION zxslt_project ---> "Name of the XSLT prog created above
    SOURCE XML l_xml_str                           ---> Source XML string
    RESULT l_data = l_data.                          ---> ITAB as in step 1 above
    Regards,
    Chen

  • 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
    3)XSLT
    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
    Mahesh

    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 good...you 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.
    Regards
    Ivan

  • ABAP XSLT transformation - XML to deep structure/nested standard table

    Hi all,
    I was struggling with this topic recently and couldn't find a single working example or description of a possible solution. So now that I've sorted it out, I did a quick example to elustrate how it works. Here is the code with XML embeded in it and the XSLT follows:
    <HR>
    <PRE>
    *& Report  Z_XML2ABAP
    *& Author: Jayanta Roy
    *& Date: 03/02/2010
    REPORT  z_xml2abap.
    DATA input_xml TYPE string.
    TYPES: BEGIN OF t_address,
            house_no TYPE string,
            street_name TYPE string,
            city_name TYPE string,
            phone_no TYPE string,
          END OF t_address.
    TYPES: t_addresses TYPE STANDARD TABLE OF t_address with NON-UNIQUE KEY house_no.
    TYPES: BEGIN OF t_person,
            firstname TYPE string,
            surname TYPE string,
            addresses TYPE t_addresses,
          END OF t_person.
    input_xml = '&lt;Friends&gt;' &&
      '&lt;People&gt;' &&
        '&lt;FirstName&gt;Homer&lt;/FirstName&gt;' &&
        '&lt;Surname&gt;Simpson&lt;/Surname&gt;' &&
          '&lt;Address&gt;' &&
            '&lt;HouseNo&gt;123&lt;/HouseNo&gt;' &&
            '&lt;Street&gt;Evergreen Terrace&lt;/Street&gt;' &&
            '&lt;City&gt;Springfield&lt;/City&gt;' &&
            '&lt;PhoneNo&gt;011212321&lt;/PhoneNo&gt;' &&
          '&lt;/Address&gt;' &&
          '&lt;Address&gt;' &&
            '&lt;HouseNo&gt;7G&lt;/HouseNo&gt;' &&
            '&lt;Street&gt;Neuclear Power Plant&lt;/Street&gt;' &&
            '&lt;City&gt;Spring Field&lt;/City&gt;' &&
            '&lt;PhoneNo&gt;911&lt;/PhoneNo&gt;' &&
          '&lt;/Address&gt;' &&
      '&lt;/People&gt;' &&
      '&lt;People&gt;' &&
         '&lt;FirstName&gt;Bart&lt;/FirstName&gt;' &&
         '&lt;Surname&gt;Simpson&lt;/Surname&gt;' &&
           '&lt;Address&gt;' &&
             '&lt;HouseNo&gt;123x&lt;/HouseNo&gt;' &&
             '&lt;Street&gt;Evergreen Terracex&lt;/Street&gt;' &&
             '&lt;City&gt;Springfieldx&lt;/City&gt;' &&
             '&lt;PhoneNo&gt;011212321x&lt;/PhoneNo&gt;' &&
           '&lt;/Address&gt;' &&
       '&lt;/People&gt;' &&
    '&lt;/Friends&gt;' .
    DATA lt_person TYPE STANDARD TABLE OF t_person.
    TRY.
        CALL TRANSFORMATION xslt_person
        SOURCE XML input_xml
        RESULT  all_people = lt_person.
      CATCH cx_root.
        WRITE 'Problemo!'.
    ENDTRY.
    WRITE 'Now, debug the program to see the values read from the XML'.
    </PRE>
    <HR>
    and here is the XSLT Transformation program (xslt_person):
    <HR>
    <PRE>
    &lt;xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                        xmlns:sap="http://www.sap.com/sapxsl" version="1.0"&gt;
      &lt;xsl:strip-space elements="*"/&gt;
      &lt;xsl:template match="/"&gt;
        &lt;asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"&gt;
          &lt;asx:values&gt;
            &lt;ALL_PEOPLE&gt;
              &lt;xsl:apply-templates select="//People"/&gt;
            &lt;/ALL_PEOPLE&gt;
          &lt;/asx:values&gt;
        &lt;/asx:abap&gt;
      &lt;/xsl:template&gt;
      &lt;xsl:template match="People"&gt;
        &lt;ALLMYFRIENDS&gt;  &lt;!This element name is not relevent... needed to just group the loop&gt;
          &lt;FIRSTNAME&gt;
            &lt;xsl:value-of select="FirstName"/&gt;
          &lt;/FIRSTNAME&gt;
          &lt;SURNAME&gt;
            &lt;xsl:value-of select="Surname"/&gt;
          &lt;/SURNAME&gt;
          &lt;ADDRESSES&gt;
            &lt;xsl:for-each select="Address"&gt;
              &lt;ADDRESS&gt; &lt;!This element name is not relevent... needed to just group the loop&gt;
                &lt;HOUSE_NO&gt;
                  &lt;xsl:value-of select="HouseNo"/&gt;
                &lt;/HOUSE_NO&gt;
                &lt;STREET_NAME&gt;
                  &lt;xsl:value-of select="Street"/&gt;
                &lt;/STREET_NAME&gt;
                &lt;CITY_NAME&gt;
                  &lt;xsl:value-of select="City"/&gt;
                &lt;/CITY_NAME&gt;
                &lt;PHONE_NO&gt;
                  &lt;xsl:value-of select="PhoneNo"/&gt;
                &lt;/PHONE_NO&gt;
              &lt;/ADDRESS&gt;
            &lt;/xsl:for-each&gt;
          &lt;/ADDRESSES&gt;
        &lt;/ALLMYFRIENDS&gt;
      &lt;/xsl:template&gt;
    &lt;/xsl:transform&gt;
    </PRE>
    <HR>
    HTH,
    Jayanta.

    thanks a LOT Jayanta..
    I was looking for an XSLT example for some time.. this one atleast got me started in the right direction..
    THANKS

  • ABAP / XSLT

    Hi,
    I want to use XSLT in my abap program : CALL TRANSFORMATION 'name of the XSLT program'.
    where should i code the XSLT ? i'm using sap 4.6c.
    Thanks
    Ihsen

    Hi,
    Kindly check the following thread:
    Re: Problem converting XML back to structure using XSLT
    look for your answer in the last part of the thread
    best regards,
    Thangesh

  • Execute a query using ABAP  (XSLT transformation issue)

    Hello,
    I made the steps from this blog (part I, II and III).
    /people/durairaj.athavanraja/blog/2005/12/05/execute-bw-query-using-abap-part-iii
    When trying to run the XSLT transformation, I got the message that : XML invalid source file.
    I am not sure what are the steps for running a transformation, or running it for this case ,maybe something it's not ok. I just run it, did not provide any information.
    Any suggestions ? Did anyone use the function module described in this blog ?
    Thank you very much in advance.

    try giving
    CALL TRANSFORMATION (`ID`)
    SOURCE meta = meta_data[]
    output = <ltable>[]
    RESULT XML xml_out
    OPTIONS xml_header = 'NO'.
    and check - sometimes the codepages configured in the BW system tend to cause an issue... I am not sure if the syntax is right though - but you are basically trying to bypass any encoding that is happening in the query transformation....
    http://www.sapetabap.com/ovidentia/index.php?tg=fileman&sAction=getFile&inl=1&id=4&gr=Y&path=ABAP%2FABAPENANGLAIS&file=ABAP-XML+Mapping.pdf&idf=41
    Edited by: Arun Varadarajan on May 18, 2009 11:28 PM

  • ABAP XSLT Transformation using element include

    Hi there,
    I am trying to convert data from SAP-DATA -> DOM over XSLT to a Stream.
    For achieving this I have to use certain modularized XSL-Files which will later be accessible over http. At the moment however, those files are on my local hard drive (client) only. I tried to access these files using:
    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:sap="http://www.sap.com/sapxsl"
    >
    *<xsl:include href="D:\XSL\include.xsl"/>*
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
    </xsl:template>
    </xsl:transform>
    I get the message "D:\XSL\include.xsl doesn't exist" when checking the syntax. When I test this in my OS however, it works perfectly. Being an SAP- and XML-Newbie my question is the following: Does SAP not know my hard drive mappings while I'm in a transformation or can i only access directories over al11/http. Or is it complete nonsense at all? 
    Regards, Lukas
    Edited by: Lukas Weigelt on Jun 9, 2010 4:18 PM

    Hi,
    according to:
    >
    Michal_Krawczyk_PIXI wrote:
    > as per:
    > http://help.sap.com/saphelp_470/helpdata/EN/84/2e4d3ce624b800e10000000a114084/frameset.htm
    > "The href attribute no longer applies in this case."
    it appears the include element only works with the repository.... I tried
    <xsl:include sap:name="<Name_of_the_Transformation_in_Repository>"/>
    and it works.
    However this would mean, all includes i have to make have to be imported to the repository. If that's really the case, it'll be a huge problem, because the xsl-files i want to include are outside of my reference
    Regards, Lukas

  • Give me description for ABAP and XSLT and JAVA Mapping

    i want detailed description for XSLT AND ABAP,JAVA Mapping and where they require coding and some examples for this items and differences for these mappings and message mapping and some examples which shows difference between these items

    Hi,
    Java mapping:
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    ABAP Mapping:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    XSLT mapping
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    ABAP XSLT mapping
    /people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping
    Regards
    Vijaya

Maybe you are looking for