XSLT transformation in binding editor

Hi,
In the new version of the workflow builder we are so lucky, that not only can we use programmed bindings but also XSLT transformation.
I have tried to create a XSLT that transforms the wf XML container to the Step XML container, but it does not change the containervalue as i hoped. Does anyone have experience with XSLT in the binding editor?
What format/schema should I end up the in the stepcontainer?
Hopy you can help?
Kind regards
Mikkel

By the way, this is the XSLT transformation that works fine if we remove that ":ns4" from the attribute name:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:source="/com/grifols/gds/webapp/inventoryCount/units/queries/common/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.0">
<xsl:output method="xml" encoding="iso-8859-1" indent="yes"/>
<xsl:template match="source:*">
<xsl:element name="{local-name()}" namespace="http://www.something.else">
<xsl:apply-templates select="@*|node()"/>
</xsl:element>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

Similar Messages

  • How to activate New Editor for XSLT Transformations?

    Hello Everyone!
    I am currentlyworking on some Simple Transformations (Txn STRANS). As I am very happy with the New Frontend Editor, I would like to use the new Editor for editing Simple Transformations, like I do, when editing usual ABAP Code.
    Where can I activate the New Editor fpr XSLT Programs? I have already set the Flag to use the new editor when editing ABAP Code, but this Flag unfortunately has to influence on the editor used for XSLT programs... ;-(
    Greetings
    --MIKE

    Hi all,
    How to use conditions in XSLT Transformation,
    Thanks
    Reddy.n.l

  • JAXP XSLT transformation UTF-8 issue

    Hi all,
    I have XML file generated from Java app. File is valid and is in UTF-8.
    I have XSLT template created with Altova StyleVision. Template is to produce RTF output file from above XML.
    I Java app there are two variant for XSLT transformation - with and without Saxon. I have simplified the code and it is almost the same in two variants.
    File outputFile = new File("path");
    *if (saxonToBeUsed) {*
    ClassLoader saxonClassLoader = SaxonLoader.getInstance(saxonPath);
    TransformerFactory transFact = TransformerFactory.newInstance("net.sf.saxon.TransformerFactoryImpl", saxonClassLoader); //$NON-NLS-1$
    Transformer trans = transFact.newTransformer(xsltSource);
    trans.setOutputProperty("encoding", "UTF-8"); //$NON-NLS-1$
    StreamResult res = new StreamResult(outputFile);
    trans.transform(xmlSource, res);
    *} else {*
    TransformerFactory transFact = TransformerFactory.newInstance();
    Transformer trans = transFact.newTransformer(xsltSource);
    trans.setOutputProperty("encoding", "UTF-8"); //$NON-NLS-1$
    StreamResult res = new StreamResult(outputFile);
    *// Same result -> StreamResult res = new StreamResult(new OutputStreamWriter(new FileOutputStream(outputFile), "UTF-8"));*
    *// Same result -> StreamResult res = new StreamResult(new PrintWriter(new OutputStreamWriter(new FileOutputStream(outputFile), "UTF-8")));*
    trans.transform(xmlSource, res);
    XML file contains Arabic or Chinese text. RTF is generated.
    When RTF and XML are opened with text editor or web browser Arabic/Chinese whatever text is readable.
    The issue is that when RTF is opened with MSWord/WordPad/Open Office Writer :
    - Saxon generation -> RTF file can be opened and Arabic/Chinese text is normal i.e readable. English language is readable too.
    - JAXP generation -> RTF file can be opened but Arabic/Chinese is scrabmbled, messed up. English language is readable.
    All three files (XML,XSLT,RTF) are in UTF-8
    I have installed Chinese and Arabic true type fonts. When I create manual MSWord doc i can write some of their symbols.
    Please suggest some solution.
    Thanks

    Hi jtahlborn,
    I found the difference between two RTFs. This is one table cell containing random Arabic text
    XSLT 1.0 generated:
    {\*\bkmkstart محمود_شمام_لرويترز:_القذافي_قتل_في_هجوم_للمجلس_الانتقالي}{\fs16 محمود شمام لرويترز: القذافي قتل في هجوم للمجلس الانتقالي}
    XLST2.0 generated:
    {\*\bkmkstart محمود_شمام_لرويترز:_القذافي_قتل_في_هجوم_للمجلس_الانتقالي} {\fs16\u1605?\u1581?\u1605?\u1608?\u1583?\u32?\u1588?\u1605?\u1575?\u1605?\u32?\u1604?\u1585?\u1608?\u1610?\u1578?\u1585?\u1586?\u58?\u32?\u1575?\u1604?\u1602?\u1584?\u1575?\u1601?\u1610?\u32?\u1602?\u1578?\u1604?\u32?\u1601?\u1610?\u32?\u1607?\u1580?\u1608?\u1605?\u32?\u1604?\u1604?\u1605?\u1580?\u1604?\u1587?\u32?\u1575?\u1604?\u1575?\u1606?\u1578?\u1602?\u1575?\u1604?\u1610?}
    But I don't know how to fix it. Both files are generated with Saxon, same Java code, only XSLTs are different.
    Any ideas ?

  • Container to Container binding in Workflow binding editor

    Hi all,
    I have an issue using Container --> Container binding in the Workflow binding editor (transaction SWF_BAM). What I want to do is to be able to extend the data provided by the event (i.e call a BAPI using values supplied) before assigning it to the target structure.
    This is what I have done:
    - Created an entry in Event Linkage: Application Object to Message Proxy, where the object type is BUS2005 (event RELEASED)
    and proxy is a generated proxy.
    - In the binding editor, I clicked in the Binding Instruction selection and chose Container --> Container as Binding Instruction.
    Now I have created my own class that implements the interface IF_SWF_IFS_BIND_TRANSFORM_CONT, so this class shows up in the drop down list under a section called Enhancement.
    - The class I created and implemented the interface, now contains three methods, where Transform is one. I have put a break point in this method and when I trigger the event (transaction SWUE) the debugger stops. So, the call to the method works fine.
    My problem is, that I cannot access the values provided by the event (these are supplied in parameter SOURCE_CONTAINER).
    Is there anyone who have used this technique and could supply some example code? Is there another technique that I can use to obtain the same result?
    Best regards
    Patrik Donaldson

    Hi to the both of you!
    Thanks for you answer. I will try to elaborate.
    My scenario is as follows. I want to react on the event CHANGED, of business object BUS2032 (SalesOrder). The information (field values) supplied by the container under EVTOBJECT (in the binding editor) does not fully correspond to what I need to populate in the receiver interface. I would like to send out i.e SalesOrderNumber and PricingProcedure to the receiver interface.
    Now, SalesOrderNumber is supplied by the container (_EVT_OBJECT-SalesDocument, as seen in the binding editor), but hte PricingProcedure would have to be looked up in table VBAK using SalesOrderNumber as a key.
    Issue 1: How do I get hold of the value of field SalesDocument in my class? (as I mentioned earlier I have created a class which references interface IF_SWF_IFS_BIND_TRANSFORM_CONT, so I have the transform method and I can put code there. I have put a break point, so I know processing stops there).
    I tried to following:
    CALL METHOD source_container->if_swf_ifs_parameter_container~get(
            EXPORTING
              name = 'SALESDOCUMENT'
            IMPORTING
              value = l_vbeln ).
    No, success (cx_swf_cnt_elem_not_found). Makes me think that SalesDocument is not a parameter of the event but something else.
    Issue 2: Once I have solved issue 1 and also lookup up the PricingProcedure. How do I go about setting my values in the receiver interface. I know I also have a reference to TARGET_CONTAINER in the TRANSFORM method, but where to go from there?
    Any clues would be grately appreciated. Being successful with this scenario, would open for many interesting possibilities.
    Best regards
    Patrik Donaldson

  • How to iterate through each node in REPLACE stage/XSLT transform/OSB

    I need to iterate through a xml document in a 'REPLACE' stage in a OSB message flow and have each <courseTemplate> transformed into a new xml document. The XSLT transform works correctly using the XSLT Resource Tester so I know the stylesheet works.
    ex: input data:
    <enterprise>
    <courseTemplate><sourcedId>100001-01</sourcedId><label><language>en-US</language><text>100001-01</text></label><title><language>en-US</language><text>Lower Division General Credit</text></title><catalogDescription><shortDescription>Lower Division General Credit</shortDescription><longDescription>Lower Division General Credit</longDescription></catalogDescription><courseNumber><language>en-US</language><text>XFCR 2999SA</text></courseNumber><status>Active</status><dataSource>CS</dataSource><extension><extensionField><fieldName>Mode</fieldName><fieldType>String</fieldType><fieldValue>C</fieldValue></extensionField></extension></courseTemplate>
    <courseTemplate><sourcedId>100001-02</sourcedId><label><language>en-US</language><text>100001-02</text></label><title><language>en-US</language><text>Lower Division General Credit</text></title><catalogDescription><shortDescription>Lower Division General Credit</shortDescription><longDescription>Lower Division General Credit</longDescription></catalogDescription><courseNumber><language>en-US</language><text>XFCR 2999TC</text></courseNumber><status>Active</status><dataSource>CS</dataSource><extension><extensionField><fieldName>Mode</fieldName><fieldType>String</fieldType><fieldValue>C</fieldValue></extensionField></extension></courseTemplate>
    </enterprise>
    1) the output data should look like:
    <enterprise      xsi:noNamespaceSchemaLocation="import_xml4.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <group      recstatus="2">
         <sourcedid>
         <id>100001-01</id>
         </sourcedid>
         <grouptype>
         <typevalue      level="4">Course Template</typevalue>
         </grouptype>
         <description>
         <short>100001-01</short>
         <long>Lower Division General Credit</long>
         </description>
         <relationship      relation="1">
         <sourcedid>
         <id>Uh</id>
         </sourcedid>
         <label/>
         </relationship>
         <extension>
         <path/>
         </extension>
         </group>
         <group      recstatus="2">
         <sourcedid>
         <id>100001-02</id>
         </sourcedid>
         <grouptype>
         <typevalue      level="4">Course Template</typevalue>
         </grouptype>
         <description>
         <short>100001-02</short>
         <long>Lower Division General Credit</long>
         </description>
         <relationship      relation="1">
         <sourcedid>
         <id>Uh</id>
         </sourcedid>
         <label/>
         </relationship>
         <extension>
         <path/>
         </extension>
         </group>
    </enterprise>
    2) what is happening is the first node is being repeated:
    <enterprise      xsi:noNamespaceSchemaLocation="import_xml4.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <group      recstatus="2">
         <sourcedid>
         <id>100001-01</id>
         </sourcedid>
         <grouptype>
         <typevalue      level="4">Course Template</typevalue>
         </grouptype>
         <description>
         <short>100001-01</short>
         <long>Lower Division General Credit</long>
         </description>
         <relationship      relation="1">
         <sourcedid>
         <id>Uh</id>
         </sourcedid>
         <label/>
         </relationship>
         <extension>
         <path/>
         </extension>
         </group>
         <group      recstatus="2">
         <sourcedid>
         <id>100001-01</id>
         </sourcedid>
         <grouptype>
         <typevalue      level="4">Course Template</typevalue>
         </grouptype>
         <description>
         <short>100001-01</short>
         <long>Lower Division General Credit</long>
         </description>
         <relationship      relation="1">
         <sourcedid>
         <id>Uh</id>
         </sourcedid>
         <label/>
         </relationship>
         <extension>
         <path/>
         </extension>
         </group>
    </enterprise>
    3) here is what I am using in the replace stage:
    XPath Expression Editor      : Request Pipeline - replace
    //enterprise/courseTemplate
    //enterprise/courseTemplate
    in variable: body with Xslt: SAIP_OSB_Requester/CourseTemplateSAIP_XSLT
    Input Document: $body
    Variable Names And Bindings: saipCourseTemplatesParam - $body
    4) can you see what I need to change?
    Edited by: user11960867 on Jul 5, 2011 10:58 AM

    Here is the stylesheet I am using. I wonder if it is wrong if I am working with each current node:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output method="xml" indent="yes" />
    <xsl:variable name="saipCourseTemplates" />
    <xsl:param name="saipCourseTemplatesParam" />
         <xsl:template match="/enterprise">
              <enterprise xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="import_xml4.xsd">
                   <xsl:apply-templates select="courseTemplate" />
              </enterprise>
         </xsl:template>
         <xsl:template match="courseTemplate">
              <group recstatus="2">
                   <sourcedid>
                        <id>
                             <xsl:value-of select="sourcedId" />
                        </id>
                   </sourcedid>
                   <grouptype>
                        <typevalue level="4">Course Template</typevalue>
                   </grouptype>
                   <description>
                        <short>
                             <xsl:value-of select="sourcedId" />
                        </short>
                        <long>
                        <xsl:value-of select="catalogDescription/longDescription" disable-output-escaping="no" />
                        </long>
                   </description>
                   <relationship relation="1">
                   <sourcedid>
                   <id>Testing</id>
                   </sourcedid>
                   <label></label>
                   </relationship>
                   <extension>
                   <path></path>
                   </extension>
              </group>
         </xsl:template>
    </xsl:stylesheet>

  • 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

  • Error when applying a XSLT transformation: No valid XSLT pro

    Dear All,
    I am getting following error when opening the "General Supplier Data" from Pre-Select Supplier.
    Error Message: "Error message: Error when applying a XSLT transformation: No valid XSLT program supplied"
    I have already read the related threads on SDN and checked the SAP Note 883896 and others. Even tried running the program UXS_DEL_NAVIGATION_NODE and UXS_ADD_MISSING_XSLT_NAME. But not able to solve the issue.
    Kindly Help.
    Regards,
    Sagar

    Hi Masa,
    Thanks for reply. I have checked this note. As note suggests, S_DEVELOP auth object is assigned to the user. and it has value *.
    Do I need to check anything else?
    Regards,
    Sagar

  • Error when applying a XSLT transformation

    central instance
    transaction SURVEY
    Extras->Target Group Hierarchy-> Import from file
    select file
    Error when applying a XSLT transformation
    dialog instance working

    Hello Andrey Kuryanov,
    Could make sure you describe the problem more clear as much as you can so that community can help you better.
    Please provide more details with more detailed steps and actual error messge.
    Thanks
    Raja Pamireddy
    Moderator

  • UTF-8 encoding in XSLT transformation

    Hello,
    I have a problem with a transformation of an ABAP structure into XML. I use the XSLT transformation for this.
    My XSLT starts like this:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:strip-space elements="*"/>
      <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
        <asx:values>
    I tried many settings I could find posted on the internet, but I did not find one that would allow encoding to UTF-8.
    It always encodes to iso-8859-1 which my interface partner cannot read.
    Does anyone know a way to force encoding to UTF-8?
    Adding a command like <xsl:output encoding="utf-8"/> did not help.
    Thanks a lot!
           J. Euler

    Hello!
    I think I just solved the problem taking a different approach.
    In a note here on SDN, a guy from SAP wrote, that the SAP XSLT processor is not able to code anything but the system's default to a string, BUT that it is able to code it to an xstring.
    All I did now is add the tag  
    <xsl:output encoding="utf-8" indent="yes" method="xml"/>
    to my xslt program and change the coding in the program accordingly.
    The program code is now:
      DATA: tempxstring TYPE xstring,
            temp_length TYPE i,
            conv      TYPE REF TO cl_abap_conv_in_ce.
      CLEAR tempxstring.
      TRY.
          CALL TRANSFORMATION
              zxxje_tst_xslt
            SOURCE omsregdatawebservice = wa_data
            RESULT XML tempxstring.
        CATCH cx_sy_conversion_base64.
        CATCH cx_sy_conv_illegal_date_time.
      ENDTRY.
      IF tempxstring IS NOT INITIAL.
        CLEAR: conv, temp_length, string_xml_result.
        conv = cl_abap_conv_in_ce=>create( input = tempxstring ).
        conv->read( IMPORTING data = string_xml_result len = temp_length ).
      ENDIF.
    Thanks anyways for all your help!
    regards,
          Johannes Euler

  • 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

  • XSLT transformation in XML to ABAP: special characters issue

    Hi,
    I am parsing well-formed XML file that has the following data (:
    <projects><project><name>Wallis &amp; Futuna</name></project></projects>
    I use XSLT transformation:
    <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="projects">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
            <PROJECTS>
              <xsl:for-each select="project">
                <PROJECT>
                  <NAME>
                    <xsl:value-of select="name"/>
                  </NAME>
                </PROJECT>
              </xsl:for-each>
            </PROJECTS>
          </asx:values>
        </asx:abap>
      </xsl:template>
    </xsl:transform>
    If I use the above example without &amp;amp; everything works fine, but the original XML fails with exception CX_XSLT_DESERIALIZATION_ERROR and message "Error during deserialization". Googling around did not give an answer.
    Any words of wisdom?
    Edited by: Alexei Isaev on Apr 26, 2011 5:04 AM
    Edited by: Alexei Isaev on Apr 26, 2011 5:05 AM

    Hi,
    Please visit the following link for reference.
    http://help.sap.com/abapdocu_70/en/ABAPCALL_TRANSFORMATION.htm
    Thanks & Regards,
    Harish

  • XSLT Transformation problem

    Hi,
    hope anybody can help.
    I try to transform a object to another object via XSLT transformation.
    Here is my coding :
      DATA: wa_transformation TYPE y0dpl_structures.
      DATA: obj_import TYPE abap_trans_srcbind_tab,
            wa_import TYPE abap_trans_srcbind.
      DATA: obj_export TYPE abap_trans_resbind_tab,
            wa_export TYPE abap_trans_resbind.
      DATA: obj_data TYPE REF TO data.
    * Get transformation data
      SELECT SINGLE *
      INTO wa_transformation
      FROM y0dpl_structures
      WHERE filetype = i_file_type.
    * Create table with internal structure
      CREATE DATA e_data TYPE (wa_transformation-structure_name).
      wa_import-name = 'IMPORT'.
      GET REFERENCE OF i_data INTO wa_import-value.
      APPEND wa_import TO obj_import.
    * Call transformation
      CALL TRANSFORMATION (wa_transformation-transformation)
      SOURCE (obj_import)
      RESULT (obj_export).
    i_data is a import parameter from type "ref to data".
    My problem is, that "Call transformation" makes a shortdump when calling them.
    Regards,
    Anton

    Found a solution for my problem. Now it works!
      DATA: wa_transformation TYPE y0dpl_structures.
      DATA: obj_import TYPE abap_trans_srcbind_tab,
            wa_import TYPE abap_trans_srcbind.
      DATA: obj_data TYPE REF TO data.
      DATA: wa_return TYPE bapiret2.
      FIELD-SYMBOLS: <data> TYPE ANY TABLE.
    * Get transformation data
      SELECT SINGLE *
      INTO wa_transformation
      FROM y0dpl_structures
      WHERE filetype = i_file_type.
      IF sy-subrc IS INITIAL.
    * Create table with internal structure
        CREATE DATA e_data TYPE STANDARD TABLE OF (wa_transformation-structure_name).
        ASSIGN i_data->* TO <data>.
        wa_import-name = 'IMPORT'.
        GET REFERENCE OF <data> INTO wa_import-value.
        APPEND wa_import TO obj_import.
    * Call transformation
        CALL TRANSFORMATION (wa_transformation-transformation)
        SOURCE (obj_import)
        RESULT export_data = e_data.
      ELSE.
        MOVE:  'Y0_DPL' TO wa_return-id,
               'E'      TO wa_return-type,
               '108'    TO wa_return-number.
        APPEND wa_return TO e_return.
        CLEAR: wa_return.
      ENDIF.

  • BI Admin Tool and XSLT transformation for XML data source - How it works ?

    Hello,
    There is a possibility to import data from XML data source using BI Admin Tool.
    In the import window we can point XSLT file. What is the purpose of that XSLT field?
    Why I am asking ?
    I thought it is smth like XSLT processor, but simply it doesnt work.
    What I did:
    - I pointed XML data source file
    - I pointed XSLT transformation file
    - Click OK, and still get the message that the XML file structure is not supported
    After that I transformed that XML file with some desktop XSLT processor using the same XSLT file, and I tried to connect that file directly using BI Admin tool.Then it works. So it means that the transformation is ok.
    So basically one question comes to my mind in that situation:
    What is the purpose of XSLT field in BI Admin Tool when it comes to XML data source ?
    (it doesnt look like XSLT processor)
    Greetings
    /Michal

    Hi Mariano
    Why you need to use XSLT for transforming XML file into ABAP table
    Code is a part of some ABAP report. Looks like it is reading a file from file system and updating table after transformation
    If you have requirement like you need to read XML file and then insert the data into a SAP table
    You can use
    File to RFC
    File to Proxy scenario using SAP PI.
    Please provide more inputs on requirement to help
    Thanks
    Gaurav

  • XSLT transformation for XML to ABAP internal table

    Hi, can anyone please tell me how it should be the xslt tranformation to conver this xml
    <Embargos_ARBA_DOC>
         <ns:Embargos_ARBA_MT
              xmlns:ns="un:swissmedical:sap:proxy:embargos_arba:file">
              <Embargos_ARBA_MT>
                   <FECHA>20081101</FECHA>
                   <CUIT>50000002124</CUIT>
                   <MONTO>0000013794090</MONTO>
                   <RAZON_SOCIAL>RAUL ARMANDO CUNQUEIRO S.A.C.I.</RAZON_SOCIAL>
              </Embargos_ARBA_MT>
              <Embargos_ARBA_MT>
                   <FECHA>20081101</FECHA>
                   <CUIT>55000001456</CUIT>
                   <MONTO>0000001144410</MONTO>
                   <RAZON_SOCIAL>PARODI ESTEBAN ARMANDO</RAZON_SOCIAL>
              </Embargos_ARBA_MT>
         </ns:Embargos_ARBA_MT>
    </Embargos_ARBA_DOC>
    to this abap Table....
      DATA: BEGIN OF i_embargos_arba_doc occurs 0,
              fecha TYPE d,
              cuit TYPE char11,
              monto TYPE char13,
              razon_social(120),
            END OF i_embargos_arba_mt.
    so i can transform it with this sentence
          CALL TRANSFORMATION ('embargos_transformation')
            SOURCE XML source
            RESULT Embargos_ARBA_DOC = embargos.
    pls i need help because i am unable to create this xslt transformation...
    I will give the highest rewards points to the one who can help me.
    thanks!
    mariano

    Hi Mariano
    Why you need to use XSLT for transforming XML file into ABAP table
    Code is a part of some ABAP report. Looks like it is reading a file from file system and updating table after transformation
    If you have requirement like you need to read XML file and then insert the data into a SAP table
    You can use
    File to RFC
    File to Proxy scenario using SAP PI.
    Please provide more inputs on requirement to help
    Thanks
    Gaurav

  • XSLT Transformation

    Hi,
    I am trying to upload one xml file and filling an internal table with the content and a XSLT transformation. After uploading the file and make the first transformation i obtein one string with all the fields without tags and separated by #. so when i try to call transformation for filling the internal table i obtein the exception cx_xslt_exception with the message 'No valid source context supplied'.
    I would like to know if i am having poroblems with unicode characters. Is there any example made in sap that i can test or does anybody have had any similar problem?.
    My string
    <?xml version="1.0" encoding="utf-16"?>#######S####L####08##2######
    Thanks in advance
    regards

    Hi Verma,
    You're not transforming anything from your input to the output shown. You're actually constructing a new Output. I don't see anything being transformed from input to output.
    Anyway, if you need a XSLT to be used to get the above Output in map, following XSLT shall help you:
    <?xml version="1.0" encoding="UTF-16"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var s0" version="1.0" xmlns:s0="http://xmlns.service/1" xmlns:ns1="http://xmlns.types/1.0" xmlns:ns0="http://xmlns.OutService/2">
    <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
    <xsl:template match="/">
    <xsl:apply-templates select="/s0:Request" />
    </xsl:template>
    <xsl:template match="/s0:Request">
    <Output xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://xmlns.OutService/2">
    <outContext xmlns:ns0="http://xmlns.OutService/2" xsi:type="ns0:ReferenceContext" xmlns="http://xmlns.types/1.0" />
    </Output>
    </xsl:template>
    </xsl:stylesheet>
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

Maybe you are looking for

  • A better way to find tracks on a Zen pla

    Large capacity portable players have created a user interface challenge: You have long lists of items (I have almost 5500 tracks stored in my Zen Xtra), and all you have to interact with the player is a rocker switch and a couple of up/down controls.

  • Idea Centre K only starts up 50% of the time; I am confused.

    Hello: I have a new Lenovo Idea Centre K desktop with 64bits and Windows Vista. Unfortunately, the computer only makes it past the "Lenovo" booting screen about half the time. The computer freezes on this screen, I must hold down the power button, th

  • MOTION 4 KEEPS CRASHING ON STARTUP

    Motion keeps crashing on startup...this is the error log i get....HELP!!!!! Process: Motion [383] Path: /Applications/Motion.app/Contents/MacOS/Motion Identifier: com.apple.motion Version: 4.0.0 (687) Build Info: Motion-6870000~22 Code Type: X86 (Nat

  • Mac book pro connected to tv flatscreen

    i have a mac book pro 1.5 yars old and i got the cable to connect to flatsreen samsung via a adaptor and pc input cable for the tv i had a great picture right away but no sound is there a sound suppose to be or not ?or do i need a different cable con

  • Is there a way to make firefox open hyperlinks to local files?

    My company has a custom developed ticketing system and of course its developed for IE but none of the engineers like IE. We all use and want to continue using Firefox. One of the sections in the ticketing system has a spot for links to local files on