Simple Transformation with very long XML element names

I am trying to write a program to deserialize XML documents using the Simple Transformation technique.  There are many optional elements in the XML document, so I need to have conditional statements statements to avoid trying to process elements that are not in the document.  The XML document, however, has several Element Names that are greater than 30 characters in length.  The Simple Transformation technique seems to require ABAP data dictionary structures that mirror the schema of the XML document.  But one cannot create structure component names that are greater than 30 characters in length.  We don't have any control over the XML schema as the XML documents come from the US government.  The ST fragment below shows the statement that I want to write, but since the ABAP Structure PlasticCardInformationGroup cannot have a component AuthorizationResponseInformation, the ST syntax checker yields an "Illegal Reference ADDITIONALPLASTICCARDINFORMATION" error message.
Does anyone know a way to avoid this error?
<tt:d-cond check="exist(TRS_TradingPartner_Agreement.TRS_FinancialTransaction.PlasticCardInformationGroup.AdditionalPlasticCardInformation)">
<ns2:AdditionalPlasticCardInformation>
<tt:attribute name="CardNetworkType" value-ref="TRS_TRADINGPARTNER_AGREEMENT.TRS_FINANCIALTRANSACTION.PLASTICCARDINFORMATIONGROUP.ADDITIONALPLASTICCARDINFORMATI.CARDNETWORKTYPE"/>
<tt:attribute name="DraftLocatorNumber" value-ref="TRS_TRADINGPARTNER_AGREEMENT.TRS_FINANCIALTRANSACTION.PLASTICCARDINFORMATIONGROUP.ADDITIONALPLASTICCARDINFORMATI.DRAFTLOCATORNUMBER"/>
</ns2:AdditionalPlasticCardInformation>

could anyone help me?

Similar Messages

  • File copy problems with very long DVD/CD names

    I can't copy any file from a very long named DVD to the desktop or any other part of the hd. Is there any way to solve it?
    Thanks in advance.

    Thanks again, Malcolm. I did try the disk image file from the DVD before asking in the forum and yes, it works but I was looking for a faster solution. It seems stupid that apple doesn't fix the bug that remains in leopard.
    I'll try with other user account but it seems to me a bit tiresome. I'm used to use one only account in my personal computer.
    Thank you very much for your help.
    Meanwhile I'm still waiting for an easy solution if any.

  • Files with "alien" names in directories with very long path names

    Hi all,
    first of all - I dont know if this is the right forum for my Question,
    but I could not find any better ;-)
    I have a problem with some files with "alien" names with MIXED characters from different foreign countries
    (e.g. "Φέτα (τυρί) 只有沙盒或您的用户页可以用作測試ורת המבחנים בחינוך פור.txt").
    Sometimes - whenn those files are exists in a directory with a very long path name,
    then the windows api fails to handle these files.
    For example GetFileAttributesW() returns error 2
    and ntQueryDirectoryFile does not return this file in the list (etc. pp.)
    I have this behaviour not with other files in those directories (e.g. "abc.txt")
    and also not when those names are a little bit shorter
    or the directorys name is not too long.
    So I guess, there is a bug either in the API or in the file system...?!
    I know that such a file name is a generic one,
    but I have a situation where I have to handle any file with any name -
    even in directories with very long path names...
    So please no suggestions like "use shorter paths" or "convert it to a short name"....
    thx in advance and Best regards,
    dp.

    No need to call, your MSDN subscription has few free support incidents.
    Chat with the rep to submit an incident.
    Or find their phone number
    here.
    Good luck,
    -- pa

  • Simple Transformation to deserialize an XML file into ABAP data structures?

    I'm attempting to write my first simple transformation to deserialize
    an XML file into ABAP data structures and I have a few questions.
    My simple transformation contains code like the following
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates"
                  xmlns:pp="http://www.sap.com/abapxml/types/defined" >
    <tt:type name="REPORT" line-type="?">
      <tt:node name="COMPANY_ID" type="C" length="10" />
      <tt:node name="JOB_ID" type="C" length="20" />
      <tt:node name="TYPE_CSV" type="C" length="1" />
      <tt:node name="TYPE_XLS" type="C" length="1" />
      <tt:node name="TYPE_PDF" type="C" length="1" />
      <tt:node name="IS_NEW" type="C" length="1" />
    </tt:type>
    <tt:root name="ROOT2" type="pp:REPORT" />
        <QueryResponse>
        <tt:loop ref="ROOT2" name="line">
          <QueryResponseRow>
            <CompanyID>
              <tt:value ref="$line.COMPANY_ID" />
            </CompanyID>
            <JobID>
              <tt:value ref="$line.JOB_ID" />
            </JobID>
            <ExportTypes>
              <tt:loop>
                <ExportType>
                   I don't know what to do here (see item 3, below)
                </ExportType>
              </tt:loop>
            </ExportTypes>
            <IsNew>
              <tt:value ref="$line.IS_NEW"
              map="val(' ') = xml('false'), val('X') = xml('true')" />
            </IsNew>
          </QueryResponseRow>
          </tt:loop>
        </QueryResponse>
        </tt:loop>
    1. In a DTD, an element can be designated as occurring zero or one
    time, zero or more times, or one or more times. How do I write the
    simple transformation to accommodate these possibilities?
    2. In trying to accommodate the "zero or more times" case, I am trying
    to use the <tt:loop> instruction. It occurs several layers deep in the
    XML hierarchy, but at the top level of the ABAP table. The internal
    table has a structure defined in the ABAP program, not in the data
    dictionary. In the simple transformation, I used <tt:type> and
    <tt:node> to define the structure of the internal table and then
    tried to use <tt:loop ref="ROOT2" name="line"> around the subtree that
    can occur zero or more times. But every variation I try seems to get
    different errors. Can anyone supply a working example of this?
    3. Among the fields in the internal table, I've defined three
    one-character fields named TYPE_CSV, TYPE_XLS, and TYPE_PDF. In the
    XML file, I expect zero to three elements of the form
    <ExportType exporttype='csv' />
    <ExportType exporttype='xls' />
    <ExportType exporttype='pdf' />
    I want to set field TYPE_CSV = 'X' if I find an ExportType element
    with its exporttype attribute set to 'csv'. I want to set field
    TYPE_XLS = 'X' if I find an ExportType element with its exporttype
    attribute set to 'xls'. I want to set field TYPE_PDF = 'X' if I find
    an ExportType element with its exporttype attribute set to 'pdf'. How
    can I do that?
    4. For an element that has a value like
    <ErrorCode>123</ErrorCode>
    in the simple transformation, the sequence
    <ErrorCode>  <tt:value ref="ROOT1.CODE" />  </ErrorCode>
    seems to work just fine.
    I have other situations where the XML reads
    <IsNew value='true' />
    I wanted to write
    <IsNew>
            <tt:value ref="$line.IS_NEW"
            map="val(' ') = xml('false'), val('X') = xml('true')" />
           </IsNew>
    but I'm afraid that the <tt:value> fails to deal with the fact that in
    the XML file the value is being passed as the value of an attribute
    (named "value"), rather than the value of the element itself. How do
    you handle this?

    Try this code below:
    data  l_xml_table2  type table of xml_line with header line.
    W_filename - This is a Path.
      if w_filename(02) = '
        open dataset w_filename for output in binary mode.
        if sy-subrc = 0.
          l_xml_table2[] = l_xml_table[].
          loop at l_xml_table2.
            transfer l_xml_table2 to w_filename.
          endloop.
        endif.
        close dataset w_filename.
      else.
        call method cl_gui_frontend_services=>gui_download
          exporting
            bin_filesize = l_xml_size
            filename     = w_filename
            filetype     = 'BIN'
          changing
            data_tab     = l_xml_table
          exceptions
            others       = 24.
        if sy-subrc <> 0.
          message id sy-msgid type sy-msgty number sy-msgno
                     with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        endif.

  • How to associate an xml from httpservice to datagrid if the xml element name contains periods in it

    Following is the xml from an http service, how to associate
    this xml to a data grid (employee name, number) since it contains
    periods(dots) in xml element name.
    An early help is appreciated.....
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <com.companyx>
    <person>
    <employee.data>
    <employee.name>mrx</employee.name>
    <employee.number>1001</employee.number>
    </employee.data>
    <employee.data>
    <employee.name>mry</employee.name>
    <employee.number>1002</employee.number>
    </employee.data>
    <employee.data>
    <employee.name>mrz</employee.name>
    <employee.number>1003</employee.number>
    </employee.data>
    <page>0</page>
    </person>
    </com.companyx>
    Thanks,
    Vijay Karthik

    HI
    GOOD
    IT IS POSSIBLE IN ABAP
    Extensible Markup Language (XML) is a simple, very flexible text format derived from SGML (ISO 8879). Originally designed to meet the challenges of large-scale electronic publishing, XML is also playing an increasingly important role in the exchange of a wide variety of data on the Web and elsewhere.
    XSD->
    XML Schemas express shared vocabularies and allow machines to carry out rules made by people. They provide a means for defining the structure, content and semantics of XML documents. in more detail.
    XDS->
    XDS can process data images from CCD-, imaging-plate, and multiwire-detectors in a variety of formats. Detector specific Input file templates greatly simplify the use of XDS; they are provided as part of the documentation.
    XDS runs under Unix or Linux on a single server or a grid of up to 99 machines of the same type managed by the MOSIX system; in addition, by using OpenMP, it can be executed in parallel on up to 32 processors at each node that share the same address space.
    http://www2.stylusstudio.com/SSDN/default.asp?action=9&fid=23&read=2926
    /people/r.eijpe/blog/2006/02/19/xml-dom-processing-in-abap-part-iiia150-xml-dom-within-sap-xi-abap-mapping
    THANKS
    MRUTYUN

  • Dynamically Using  XML Element name as column names

    I have a requirement where I need to show data for 31 days or days of the month based on the data in the xml result.
    Based on the month you are running the report, some may have 28 elements and some may have 31 elements in the data for days.
    How do I dynamically show 28 columns or 31 columns etc - the trick here is I have to use the name of the XML element and not the value for column names.
    My requirement is like this.
    Deal --------01 -------- 02 -------- 03 -------- 04 05 .upto ... 31days
    Deal 1 : 22218 : 32218 : 11918
    Deal 2 : Qty1 : Qty2 : Qty3
    I need to be able to use the XML Element names , Day01, Day02 etc as the column names in the report.
    How can I use the XML Element name - in this case I need to remove the "Day" and use just the number part for the column name.
    I can't have xml element names as numbers, thats why "Day" string is prefixed.
    <Row state="">
    <DEAL>Deal 1</DEAL>
    <PORTFOLIO>AM ST Prod PDP</PORTFOLIO>
    <CPTY>DTEGO</CPTY>
    <FACILITY>MICHCON</FACILITY>
    <POINT>100013 : Chestonia 17-Rec</POINT>
    <TYPE>Purchase</TYPE>
    <Day01>22218</Day01>
    <Day02>32218</Day02>
    <Day03>11918</Day03>
    <Day04>11918</Day04>
    <Day05>11918</Day05>
    <Day06>11918</Day06>
    <Day07>11918</Day07>
    <Day08>11918</Day08>
    <Day09>11918</Day09>
    <Day10>11918</Day10>
    <Day11>11918</Day11>
    <Day12>23238</Day12>
    <Day13>11918</Day13>
    <Day14>11918</Day14>
    <Day15>11918</Day15>
    <Day16>32328</Day16>
    <Day17>11918</Day17>
    <Day18>11918</Day18>
    <Day19>11918</Day19>
    <Day20>11918</Day20>
    <Day21>11918</Day21>
    <Day22>11918</Day22>
    <Day23>11918</Day23>
    <Day24>11918</Day24>
    <Day25>11918</Day25>
    <Day26>11918</Day26>
    <Day27>13511</Day27>
    <Day28>13550</Day28>
    <Day29>13550</Day29>
    <Day30>13550</Day30>
    </Row>

    I have a requirement where I need to show data for 31 days or days of the month based on the data in the xml result.
    Based on the month you are running the report, some may have 28 elements and some may have 31 elements in the data for days.
    How do I dynamically show 28 columns or 31 columns etc - the trick here is I have to use the name of the XML element and not the value for column names.
    My requirement is like this.
    Deal --------01 -------- 02 -------- 03 -------- 04 05 .upto ... 31days
    Deal 1 : 22218 : 32218 : 11918
    Deal 2 : Qty1 : Qty2 : Qty3
    I need to be able to use the XML Element names , Day01, Day02 etc as the column names in the report.
    How can I use the XML Element name - in this case I need to remove the "Day" and use just the number part for the column name.
    I can't have xml element names as numbers, thats why "Day" string is prefixed.
    <Row state="">
    <DEAL>Deal 1</DEAL>
    <PORTFOLIO>AM ST Prod PDP</PORTFOLIO>
    <CPTY>DTEGO</CPTY>
    <FACILITY>MICHCON</FACILITY>
    <POINT>100013 : Chestonia 17-Rec</POINT>
    <TYPE>Purchase</TYPE>
    <Day01>22218</Day01>
    <Day02>32218</Day02>
    <Day03>11918</Day03>
    <Day04>11918</Day04>
    <Day05>11918</Day05>
    <Day06>11918</Day06>
    <Day07>11918</Day07>
    <Day08>11918</Day08>
    <Day09>11918</Day09>
    <Day10>11918</Day10>
    <Day11>11918</Day11>
    <Day12>23238</Day12>
    <Day13>11918</Day13>
    <Day14>11918</Day14>
    <Day15>11918</Day15>
    <Day16>32328</Day16>
    <Day17>11918</Day17>
    <Day18>11918</Day18>
    <Day19>11918</Day19>
    <Day20>11918</Day20>
    <Day21>11918</Day21>
    <Day22>11918</Day22>
    <Day23>11918</Day23>
    <Day24>11918</Day24>
    <Day25>11918</Day25>
    <Day26>11918</Day26>
    <Day27>13511</Day27>
    <Day28>13550</Day28>
    <Day29>13550</Day29>
    <Day30>13550</Day30>
    </Row>

  • Simple transformation error in converting XML to internal table

    Hi Team,
    I have an issue, its working in Dev, QA, and Prod in PI 7.0, once we upgrade it to PI 7.1 I'm getting the  below mention error,   
    Unknown Simple transformation error in converting XML to internal table
    Application error in mapping program ZF_INT006_FILE_TO_SAP_FILE, error code: , error text: Unknown Simple transformation error in converting XML to internal table An exception has occurred.
    Can any one suggest related notes are suggestion.
    appericate in advance for the solutions which you all provide me
    Thank you
    Venkat Anil

    Check the flag "use SAP XML toolkit" for the operation mapping and try, if that works then.
    Check the flag for all XSLT and Java mappings which is migrated from PI 7.0

  • ABAP Simple Transformation - How to save XML to file with CL_FX_WRITER?

    Hello!
    When calling a Simple Transformation program for transformation from ABAP to XML, it is possible to specify RESULT XML rxml as a class reference variable of type CL_FX_WRITER, which points to an XML writer.
    How to handle CL_FX_WRITER in order to save XML to a file?
    Thanks and regards,
    Andrey

    Hallo Rainer!
    Many thanks. I have checked the profile parameter ztta/max_memreq_MB and it is set to 2048 MB in the development system. I hope, that won't be less on the client's machine. The only thing I did not clearly explained, is that I need to write XML data to the server. I am so sorry. Downloading to the local PC is very helpful for me also, but only for the test purposes.
    Regards,
    Andrey

  • CJK characters in xml element name

    Hi People,
    I have a question as it looks like I am doing something wrong, but I do not know what.
    I am trying to use CJK characters in the element name of an xml document and the element names are encoded/parsed using the default encoding and not the encoding specified at the xml document.
    This is the specific code
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
         document.appendChild(document.createElement("\ub3c4\uba54\uc778"));
         TransformerFactory tFactory = TransformerFactory.newInstance();
            Transformer transformer = tFactory.newTransformer();
            transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
            transformer.transform(new DOMSource(document), new StreamResult(baos));
            System.out.println(new String(baos.toByteArray(), "UTF-8"));
            System.out.println(new String(baos.toByteArray()));(you have to run this on a system that does not have UTF-8 as the default locale :-)
    The result of this is
    <?xml version="1.0" encoding="UTF-8" standalone="no"?><???/>
    <?xml version="1.0" encoding="UTF-8" standalone="no"?><&#46020;&#47700;&#51064;/>
    So the encoding of the element name is not UTF-8 but the default encoding.
    Just in case someone ask
    $ java -version
    java version "1.6.0_05"
    Java(TM) SE Runtime Environment (build 1.6.0_05-b13-120)
    Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_05-b13-52, mixed mode)
    Thanks,
    Lucas

    Hi Alpha.23,
    well I'm not sure, and maybe I'm totally wrong, but here is what I think about your problem.
    As there is no error while running the code, there should be no XML problem (so the characters you are using are XML compatible for tag names).
    I think the problem is the ability of any computer to display such chars. The questionmark often indicates that there is a char which cannot display correctly. This depends partitially on the font your are using.
    If I try to display the chars with simple System.out.println("\ub3c4\uba54\uc778"); I get those question marks too. So I guess the console of my IDE (eclipse) can't display these Korean symbols. But I haven't installed the specific language-support for any of the Asian languages (so I don't know what happend when they are installed, though I guess that doesn't solve the problem...).
    So my tip is first to look for a way to print these char in general (on the console, into a file, maybe try to create a word document because a unicode font -i.e. Arial Unicode- is able to print these - try ALT+47700 or ALT+46020).
    Best Wishes
    esprimo

  • Using Simple Transformations with Objects tt:copy .. results in Exception

    Question:
    How can I serialize an ABAP-Object-Instanz with my own simple transformation?
    In the sap-documentation I found the following solution for the serialisation of any data-objects.
    "z_steffens_simple_transf":
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="ROOT"/>
      <tt:template>
        <root>
          <tt:copy ref="ROOT"/>
        </root>
      </tt:template>
    </tt:transform>
    Following the example I wrote this report:
    report  zspahr_test_simple_transf.
    class serializable definition.
      public section.
        interfaces if_serializable_object.
        data attr type string value 'Attribute'.
    endclass.         
    method main_serializable.
        data: oref type ref to serializable,
              xmlstr type xstring.
        create object oref.
        call transformation id
          source root = oref
          result xml xmlstr.
        call function 'DISPLAY_XML_STRING'
          exporting
            xml_string = xmlstr.
        call transformation z_steffens_simple_object
          source root = oref
          result xml xmlstr.
        call function 'DISPLAY_XML_STRING'
          exporting
            xml_string = xmlstr.
      endmethod.                    "main_
    start-of-selection.
      demo=>main_serializable( ).
    Executing this report leads to an exception "CX_SY_REF_NOT_SUPPORTED".
    The "standard" transformation "ID" ist working an translates my object-instance into an asXML representation:
      <?xml version="1.0" encoding="utf-8" ?>
    - <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    - <asx:values>
      <ROOT href="#o3" />
      </asx:values>
    - <asx:heap xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:abap="http://www.sap.com/abapxml/types/built-in" xmlns:cls="http://www.sap.com/abapxml/classes/global" xmlns:dic="http://www.sap.com/abapxml/types/dictionary">
    - <prg:SERIALIZABLE xmlns:prg="http://www.sap.com/abapxml/classes/program/ZSPAHR_TEST_SIMPLE_TRANSF" id="o3">
    - <local.SERIALIZABLE>
      <ATTR>Attribute</ATTR>
      </local.SERIALIZABLE>
      </prg:SERIALIZABLE>
      </asx:heap>
      </asx:abap>
    How can I do this with my own Simple Transformation "ZSPAHR_TEST_SIMPLE_TRANSF" ?
    I want to serialize my object using my own xml-structure, not the asXML-structure !
    Regards
    Steffen

    Hi,
    try like this,i think it may help you.
    ABAP:
    CALL TRANSFORMATION ztrans_test
          SOURCE
               root = partab
         RESULT XML lv_xstring.
    Trnsformation:
    <tt:root name="ROOT" type="?"/>
    <tt:template>
    <VALUES>
    <VALUE_SOURCE>
            <tt:value ref=".ROOT"/>
    </VALUE_SOURCE>
    <VALUE_PARAM>
    <tt:value ref="NAME"/>
    <tt:value ref="VALUE"/>
    </VALUE_PARAM>
    </VALUES>
    Thanks,
    Rajesh.

  • Simple Transformation from ABAP to XML and back

    Hi experts,
    Can anyone provide me a simple example of a 'simple transformation' that will convert and internal table with more than one column into XML via a simple transformation.
    I've spend days now reading SAP help and e-learning examples, but this just won't work and I am getting short dumps saying 'The goal was to access variable "ROOT". However, this access was notv possible.'
    Here is my ABAP:
    data: begin of struc,
               counter type i,
               aname type string,
               aname2 type string,
          end of struc.
    data: cnt_c type c.
    data: itab like table of struc with HEADER LINE,
          xml_string type xstring.
    do 3 times.
         move sy-index to: itab-counter, cnt_c.
         concatenate 'nameA' cnt_c into itab-aname.
         concatenate 'nameB' cnt_c into itab-aname2.
         append itab.
    enddo.
    CALL TRANSFORMATION Z_ST_TEST5
           SOURCE  ROOT = itab
           RESULT XML xml_string.
    CALL FUNCTION 'DISPLAY_XML_STRING'
      EXPORTING
        XML_STRING            = xml_string.
    skip 1.
    and here is my ST:
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="ROOT"/>
        <tt:template>
         <TABLE>
          <tt:loop ref=".ROOT" name="line">
            <ITEM>
              <counter>
                <tt:value ref="$line.aname" />
              </counter>
              <name>
                <tt:value ref="$line.aname" />
              </name>
              <name2>
                <tt:value ref="$line.aname2" />
              </name2>
            </ITEM>
          </tt:loop>
         </TABLE>
        </tt:template>
    </tt:transform>

    Figured it out. The interla tables used in teh call transformation statement can never have a header line.

  • Simple Transformation from Adobe Form XML document to Dictionary structures

    I have an XML document that I am receiving via email (the XML document is generated from an Adobe Interactive form). I would like to write a simple transformation that will map that XML document to a structure and internal table in my ABAP program. I am new to Simple Transformations and I am having trouble working out how to write a simple transformation for this type of XML document. I would prefer to write a custom transformation rather than using the identity transformation (ID). I would appreciate any help you can provide.
    Please refer to the below for an example of the XML file.
    This maps directly to 2 dictionary structures that exist within our system containing all of the same components. PIM_REQUEST_HDR has a corresponding SAP dictionary structure Y_REQUEST_HDR and PIM_REQUEST_ITEMS has a corresponding SAP dictionary structure Y_REQUEST_ITEMS.
    Can anyone help with some instructions or examples of how to create the simple transformation?
    Thanks for your help! We are using ECC 6.0
    Sample XML to be transformed:
    <?xml version="1.0" encoding="UTF-8" ?>
    <data>
    <SFPSY>
      <DATE>2007-07-03</DATE>
      <TIME>07:25:21</TIME>
      <USERNAME>TLCITY</USERNAME>
      <SUBRC>0</SUBRC>
      </SFPSY>
    <PIM_REQUEST_HDR>
      <MANDT />
      <REQ_NUM />
      <REQ_DESC>blah blah blah</REQ_DESC>
      <PROC_AREA>CTC</PROC_AREA>
      <REQUESTED>2007-07-03</REQUESTED>
      <REQUIRED>2007-07-03</REQUIRED>
      <REQUESTOR>TLCITY</REQUESTOR>
      <MOD_TYPE>SAP Note manual changes</MOD_TYPE>
      <SAPNOTE_NUM>59549656</SAPNOTE_NUM>
      <SAPMSG_NUM>0000000000</SAPMSG_NUM>
      <TECH_SCRIPT />
      <REASON />
      <DEV_ENV>ECC6</DEV_ENV>
      <INSTALL_NO>2861655161</INSTALL_NO>
      <BASIS_REL>700</BASIS_REL>
      <REG_STATUS />
      <REJ_REASON />
      <APP_DATE />
      <REJ_DATE />
      <APPROVER />
      <REGISTRATOR />
      <REG_DATE />
      </PIM_REQUEST_HDR>
    <PIM_REQUEST_ITEMS>
    <DATA>
      <MANDT />
      <REQ_NUM />
      <PGMID>R3TR</PGMID>
      <OBJECT>PROG</OBJECT>
      <OBJ_NAME>RSDIJOIJSDOIF</OBJ_NAME>
      <ACCESSKEY />
      </DATA>
    <DATA>
      <MANDT />
      <REQ_NUM />
      <PGMID>R3TR</PGMID>
      <OBJECT>PROG</OBJECT>
      <OBJ_NAME>RRRSDIJOIJS03</OBJ_NAME>
      <ACCESSKEY />
      </DATA>
      </PIM_REQUEST_ITEMS>
      </data>

    I have solved this one with the help of another collegue.
    To simplify, we changed the XML to be as follows:
    [code]
    <?xml version="1.0" encoding="UTF-8" ?>
    <data>
    <PIM_REQUEST>
    <REQ_HDR>
      <MANDT />
      <REQ_NUM />
      <REQ_DESC>Key required for pricing routines</REQ_DESC>
      <PROC_AREA>SD</PROC_AREA>
      <REQUESTED>2007-07-30</REQUESTED>
      <REQUIRED>2007-08-02</REQUIRED>
      <REQUESTOR>TLCITY</REQUESTOR>
      <MOD_TYPE>SAP Note: Manual Changes</MOD_TYPE>
      <SAPNOTE_NUM>0000000000</SAPNOTE_NUM>
      <SAPMSG_NUM>0000000000</SAPMSG_NUM>
      <TECH_SCRIPT>TS-2498 Pricing Routines</TECH_SCRIPT>
      <REASON>New pricing routines required</REASON>
      <DEV_ENV>ECC6</DEV_ENV>
      <INSTALL_NO>029</INSTALL_NO>
      <BASIS_REL>700</BASIS_REL>
      <REG_STATUS />
      <REJ_REASON />
      <APP_DATE />
      <REJ_DATE />
      <APPROVER />
      <REGISTRATOR />
      <REG_DATE />
      </REQ_HDR>
    <KEY_DETAILS>
    <DATA>
      <MANDT />
      <REQ_NUM />
      <PGMID>R3TR</PGMID>
      <OBJECT>PROG</OBJECT>
      <OBJ_NAME>RVGHT902</OBJ_NAME>
      <ACCESSKEY />
      </DATA>
    <DATA>
      <MANDT />
      <REQ_NUM />
      <PGMID>R3TR</PGMID>
      <OBJECT>PROG</OBJECT>
      <OBJ_NAME>RVGHT901</OBJ_NAME>
      <ACCESSKEY />
      </DATA>
      </KEY_DETAILS>
      </PIM_REQUEST>
      </data>
    [/code]
    This maps directly to 1 dictionary structure that exists within our system containing all of the same components. PIM_REQUEST has a corresponding SAP dictionary structure Y_REQUEST_HDR which is a deep structure and has within it a structure REQ_HDR and a table KEY_DETAILS.
    The corresponding simple transformation we have then used is as follws:
    [code]
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="root"/>
      <tt:template>
        <data>
          <PIM_REQUEST>
            <tt:copy ref="root"/>
          </PIM_REQUEST>
        </data>
      </tt:template>
    </tt:transform>
    [/code]
    Alternatively the following 2 options also work:
    Option 2:
    [code]
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="root"/>
      <tt:template>
        <data>
          <PIM_REQUEST>
            <REQ_HDR>
              <tt:copy ref="root.REQ_HDR"/>
            </REQ_HDR>
            <KEY_DETAILS>
              <tt:loop name="KEY_DETAILS" ref="root.KEY_DETAILS">
                <DATA>
                  <tt:copy ref="$KEY_DETAILS"/>
                </DATA>
              </tt:loop>
            </KEY_DETAILS>
          </PIM_REQUEST>
        </data>
      </tt:template>
    </tt:transform>
    [/code]
    Option 3:
    [code]
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="root"/>
      <tt:template>
        <data>
          <PIM_REQUEST>
            <REQ_HDR>
              <MANDT tt:value-ref="root.REQ_HDR.MANDT"/>
              <REQ_NUM tt:value-ref="root.REQ_HDR.REQ_NUM"/>
              <REQ_DESC tt:value-ref="root.REQ_HDR.REQ_DESC"/>
              <PROC_AREA tt:value-ref="root.REQ_HDR.PROC_AREA"/>
              <REQUESTED tt:value-ref="root.REQ_HDR.REQUESTED"/>
              <REQUIRED tt:value-ref="root.REQ_HDR.REQUIRED"/>
              <REQUESTOR tt:value-ref="root.REQ_HDR.REQUESTOR"/>
              <MOD_TYPE tt:value-ref="root.REQ_HDR.MOD_TYPE"/>
              <SAPNOTE_NUM tt:value-ref="root.REQ_HDR.SAPNOTE_NUM"/>
              <SAPMSG_NUM tt:value-ref="root.REQ_HDR.SAPMSG_NUM"/>
              <TECH_SCRIPT tt:value-ref="root.REQ_HDR.TECH_SCRIPT"/>
              <REASON tt:value-ref="root.REQ_HDR.REASON"/>
              <DEV_ENV tt:value-ref="root.REQ_HDR.DEV_ENV"/>
              <INSTALL_NO tt:value-ref="root.REQ_HDR.INSTALL_NO"/>
              <BASIS_REL tt:value-ref="root.REQ_HDR.BASIS_REL"/>
              <REG_STATUS tt:value-ref="root.REQ_HDR.REG_STATUS"/>
              <REJ_REASON tt:value-ref="root.REQ_HDR.REJ_REASON"/>
              <APP_DATE tt:value-ref="root.REQ_HDR.APP_DATE"/>
              <REJ_DATE tt:value-ref="root.REQ_HDR.REJ_DATE"/>
              <APPROVER tt:value-ref="root.REQ_HDR.APPROVER"/>
              <REGISTRATOR tt:value-ref="root.REQ_HDR.REGISTRATOR"/>
              <REG_DATE tt:value-ref="root.REQ_HDR.REG_DATE"/>
            </REQ_HDR>
            <KEY_DETAILS>
              <tt:loop ref="root.KEY_DETAILS" name="KEY_DETAILS">
                <DATA>
                  <MANDT tt:value-ref="$KEY_DETAILS.MANDT"/>
                  <REQ_NUM tt:value-ref="$KEY_DETAILS.REQ_NUM"/>
                  <PGMID tt:value-ref="$KEY_DETAILS.PGMID"/>
                  <OBJECT tt:value-ref="$KEY_DETAILS.OBJECT"/>
                  <OBJ_NAME tt:value-ref="$KEY_DETAILS.OBJ_NAME"/>
                  <ACCESSKEY tt:value-ref="$KEY_DETAILS.ACCESSKEY"/>
                </DATA>
              </tt:loop>
            </KEY_DETAILS>
          </PIM_REQUEST>
        </data>
      </tt:template>
    </tt:transform>
    [/code]

  • Simple transformation with reference to ddic structures

    Hi, experts,
    we decide to use xml as the format when exchanging massive data with other applications. and we want to use simple transformation because according to the document it's more fast.
    actually our file structure is determined by certain ddic structures, one xml file main contain several ddic structures , and they are all flat one, not deep structure.
    the xml file may look like this:
    <data>
    <ddic1>[components of ddic structure 1 ]</ddic1>
    <ddic2>[components of ddic structure 2 ]</ddic2>
    </data>
    i am new to ST,i am wondering that is it possible to make the ST more easy with the help of ddic structure? do i still need to declare the components one by one in the ST program?
    BR.
    jun

    It only runs ok with 2 internal tables because of the way you set up the XML string.  It will run ok with 3 internal tables too.  If you strip out the '<C>' nodes or move the '<C>' nodes around, you'll see what I mean (move the C nodes to the last B node).  Each time you start a loop in a simple transformation, the internal table is initialized.  So, you need to form your sample XML string differently, declare your internal tables differently (nested), or use XSLT for a little more power.

  • XML element names required in lower case

    Hi,
    I am on release 4.6C
    I create an XML file from internal table using FM SDIXML_DATA_TO_DOM and SDIXML_DOM_TO_XML.
    The internal table is defined such that the  fieldnames of internal table are same as element names in XML file.
    The XML file gets created properly, but the element names appear in upper case.
    The requirement is to have it in lower case.
    Does anybody have any idea about how to control the case here?

    Hi Sudhir
    you can convert field names manually using translate command to convert it to lower case.
    hope this helps.

  • Autotyping not preserving XML element names for use in Web service

    I am trying to generate a web service from an existing WSDL (ServiceOrderingContract.wsdl,
    attached). The WSDL contains as a message part with an element dsl_FirmOrderProvideRequest.
    Autotyping produces a corresponding class DSLFirmOrderProvideRequest. I use the
    output of autotyping to implement a web service corresponding to this WSDL. I
    then deploy this web service. The WSDL of the DEPLOYED webservice now has a message
    part with an element DSLFirmOrderProvideRequest, per the autotype, but in mismatch
    with the source WSDL. Of course, the clientgen from the source WSDL wont work
    against the latter deployed WSDL.
    Something is changing dsl_ to DSL in the autotyping process. Is this a bug? Or
    am I doing something wrong? Is there any option in autotype task to preserve element
    names?
    Thanks a lot.

    Hello,
    Take a look at the docs on roundtripping generated data types [1]
    Regards,
    Bruce
    [1]
    http://edocs.bea.com/wls/docs81/webserv/assemble.html#1074725
    Suteertha wrote:
    >
    This is in basic WLS 8.1 SP2.

Maybe you are looking for