0SD_C03 transformation error

Hi,
i installed 0SD_C03 cube from business content. iam converting updaterules of 2LIS_11_VAITM
into transformations. while activating transformations i got the following error.
E:The data object "COMM_STRUCTURE" does not have a component called NET_VALUE.
but in my info source i found the field.
Please let me know how to resolve it?

my code is like this
$$ end of 2nd part global - insert your code only before this line   *
      CLASS routine IMPLEMENTATION
CLASS lcl_transform IMPLEMENTATION.
  METHOD compute_0SUBTOT_1S.
  IMPORTING
    request     type rsrequest
    datapackid  type rsdatapid
    SOURCE_FIELDS-DOC_NUMBER TYPE /BI0/OIDOC_NUMBER
    SOURCE_FIELDS-LOC_CURRCY TYPE /BI0/OILOC_CURRCY
    SOURCE_FIELDS-RATE_TYPE TYPE /BI0/OIRATE_TYPE
    SOURCE_FIELDS-STAT_CURR TYPE /BI0/OISTAT_CURR
    SOURCE_FIELDS-DOC_CATEG TYPE /BI0/OIDOC_CATEG
    SOURCE_FIELDS-SUBTOTAL_1 TYPE /BI0/OISUBTOTAL_1
    SOURCE_FIELDS-EXCHG_STAT TYPE /BI0/OIEXCHG_STAT
    SOURCE_FIELDS-ST_UP_DTE TYPE /BI0/OIST_UP_DTE
    SOURCE_FIELDS-DOC_CURRCY TYPE /BI0/OIDOC_CURRCY
    SOURCE_FIELDS-EXCHG_RATE TYPE /BI0/OIEXCHG_RATE
   EXPORTING
     RESULT type tys_TG_1-SUBTOT_1S
    DATA:
      MONITOR_REC    TYPE rsmonitor.
$$ begin of routine - insert your code only below this line        -
  Data:
    COMM_STRUCTURE   type tys_SC_1__RULE_23,
    l_subrc          type sy-tabix,
    l_abort          type sy-tabix,
    ls_monitor       TYPE rsmonitor,
    ls_monitor_recno TYPE rsmonitors.
  REFRESH:
    MONITOR.
Runtime attributs
    SOURCE_SYSTEM  = p_r_request->get_logsys( ).
    MOVE-CORRESPONDING SOURCE_FIELDS to COMM_STRUCTURE.
Migrated update rule call
  Perform routine_0007
  USING
    COMM_STRUCTURE
  CHANGING
    RESULT
    l_subrc
    l_abort.
*-- Convert Messages in Transformation format
    LOOP AT MONITOR INTO ls_monitor.
      move-CORRESPONDING ls_monitor to MONITOR_REC.
      append monitor_rec to MONITOR.
    ENDLOOP.
    IF l_subrc <> 0.
      RAISE EXCEPTION TYPE cx_rsrout_skip_val.
    ENDIF.
    IF l_abort <> 0.
      RAISE EXCEPTION TYPE CX_RSROUT_ABORT.
    ENDIF.

Similar Messages

  • How can I display XSLT transformer errors on a web page ?

    Hi,
    I have some JSP pages that access DB, create an XML based on DB data and then transform it into HTML through an XSLT stylesheet. Developing the XSL code it's easy to make mistakes and generate errors on trasformation, but what I receive on the web page is only a "Could not compile stylesheet" TransformerConfigurationException, while the real cause of the error is displayed only on tomcat logs. This is the code for transformation:
    static public void applyXSLT(Document docXML, InputStream isXSL, PrintWriter pw) throws TransformerException, Exception {
            // instantiate the TransformerFactory.
            TransformerFactory tFactory = TransformerFactory.newInstance();
            // creates an error listener
            XslErrorListener xel = new XslErrorListener();
            // sets the error listener for the factory
            tFactory.setErrorListener(xel);
            // generate the transformer
            Transformer transformer = tFactory.newTransformer(new SAXSource(new InputSource(isXSL)));
            // transforms the XML Source and sends the output to the HTTP response
            transformer.transform(new DOMSource(docXML), new StreamResult(pw));
    }If an exception is thrown during the execution of this code, its error message is displayed on the web page.
    This is the listener class:
    public class XslErrorListener implements ErrorListener {
        public XslErrorListener() {
        public void warning(TransformerException ex) {
            // logs on error log
            System.err.println("\n\nWarning on XEL: " + ex.getMessage());
        public void error(TransformerException ex) throws TransformerException {
            // logs on error log
            System.err.println("\n\nError on XEL: " + ex.getMessage());
            // and throws it
            throw ex;
        public void fatalError(TransformerException ex) throws TransformerException {
            // logs on error log
            System.err.println("\n\nFatal Error on XEL: " + ex.getMessage());
            // and throws it
            throw ex;
    }When I have an error in the XSL stylesheet (for examples a missing closing tag), I can find on tomcat logs the real cause of the error:
    [Fatal Error] :59:10: The element type "table" must be terminated by the matching end-tag "</table>".
    Error on XEL: The element type "table" must be terminated by the matching end-tag "</table>".but on my web page is reported just the TransformerConfigurationException message that is:
    "Could not compile stylesheet".
    How can I display the real cause of the error directly on the web page?
    Thanks,
    Andrea

    This code is part of a bigger project that let developers edit XSL stylesheets through a file upload on the system and we can't impose the use of any tool for checking the xsl. So, I need to display the transformer error on the web page.I see. This code is part of an editorial/developmental tool for developers to create and edit XSL stylesheets.
    As part of the editorial process, XSL errors during editing can be considered a normal condition. In other words, it is normal to expect that the developers will generate XSL errors as they are developing stylesheets.
    In this light, handling the XSL transformation errors is a business requirement that you need to handle. Using the Java Exceptions mechanisms, e.g. try / catch are inappropriate to handle business requirements, in my opinion.
    I suggest that you look at how you handle the occurence of XSL errors differently than what you currently have. You need to:
    (1) capture the Transformation exception on the server;
    (2) extract the message from the exception and put it into a message that can be easily understood by the user;
    The current error message that you have going to the web browser is not useful.
    And you should not have the Transformation exception sent to the web browser either.
    What you are attempting to do with the exception is not appropriate.
    Handle the Transformation exception on the Business tier and use it to create a useful message that is then sent to the Presentation tier. In other words, do not send Java exceptions to web browser.
    />

  • XML to Internal table using XSLT by CALL TRANSFORMATION error

    Dear experts,
    I have to fetch the data from an XML file using XSLT into internal tables. The XML file is very big as following:-
    <?xml version="1.0" standalone="yes" ?>
    - <Shipment>
      <shipmentID>25091203S000778</shipmentID>
      <manifestDateTime>2009-12-03T20:16:52.00</manifestDateTime>
      <shipmentFacilityNumber>025</shipmentFacilityNumber>
      <shipmentFacilityAbbreviation>CHI</shipmentFacilityAbbreviation>
      <shipmentFacilityAddress1>810 KIMBERLY DRIVE</shipmentFacilityAddress1>
      <shipmentFacilityAddress2 />
      <shipmentFacilityCity>CAROL STREAM</shipmentFacilityCity>
      <shipmentFacilityState>IL</shipmentFacilityState>
      <shipmentFacilityPostalCode>601880000</shipmentFacilityPostalCode>
      <shipmentTruckCarrierCode>X150</shipmentTruckCarrierCode>
      <shipmentSourceCode>T</shipmentSourceCode>
      <userID>CAMPOSG</userID>
    - <Delivery>
      <primaryCustomerNumber>954371</primaryCustomerNumber>
      <primaryCustomerName>MIDWEST OFFICE SUPPLY</primaryCustomerName>
      <primaryCustomerAddress1 />
      <primaryCustomerAddress2>4765 INDUSTRIAL DR</primaryCustomerAddress2>
      <primaryCustomerCity>SPRINGFIELD</primaryCustomerCity>
      <primaryCustomerState>IL</primaryCustomerState>
      <primaryCustomerPostalCode>627030000</primaryCustomerPostalCode>
      <primaryCustomerPhoneNumber>2177535555</primaryCustomerPhoneNumber>
      <shuttleStopFacilityNumber />
      <billOfLadingNumber>25HZK99</billOfLadingNumber>
      <carrierProNumber />
      <shipmentTotalCartonCount>6</shipmentTotalCartonCount>
      <shipmentTotalWeight>266</shipmentTotalWeight>
    - <order>
      <orderNumber>25HZK99</orderNumber>
      <subOrderNumber />
      <dateProcessed>2009-12-03</dateProcessed>
      <primaryOrderNumber />
      <shipTruckCode>X150</shipTruckCode>
      <shipTruckDescription>UDS - ADDISON</shipTruckDescription>
      <shipTruckPriorityCode>01</shipTruckPriorityCode>
      <shipTruckGroupCode>01</shipTruckGroupCode>
      <shipTruckDepartureTime>20.00.00</shipTruckDepartureTime>
      <shipTruckDockID>07</shipTruckDockID>
      <ldpFacilityAbbreviation />
      <shuttleAvailableIndicator>N</shuttleAvailableIndicator>
      <shuttleMessageText />
      <crossDockFacilityCode />
      <crossDockTruckCode />
      <crossDockID />
      <subsidizedFreightTruckID />
      <customerPurchaseOrderNumber>623559</customerPurchaseOrderNumber>
      <headerTypeCode>P</headerTypeCode>
      <orderTypeID>RG</orderTypeID>
      <deliveryTypeID>DS</deliveryTypeID>
      <deliveryMethodCode />
      <customerBarCode />
      <customerReferenceData>25HZK99</customerReferenceData>
      <customerReferenceText />
      <customerRouteData>ZNED UNTED</customerRouteData>
      <customerRouteText>ROUTE</customerRouteText>
      <endConsumerPurchaseOrderNumber />
      <endConsumerPurchaseOrderText />
      <endConsumerName>CHARLESTON TRANS. FACILITY</endConsumerName>
      <endConsumerAddress1>HOMEWOOD DT PROGRAM DEPT. 3</endConsumerAddress1>
      <endConsumerAddress2>17341 PALMER BLVD.</endConsumerAddress2>
      <endConsumerAddress3 />
      <endConsumerCity>HOMEWOOD</endConsumerCity>
      <endConsumerState>IL</endConsumerState>
      <endConsumerPostalCode>60430</endConsumerPostalCode>
      <endConsumerCountryCode />
      <fillFacilityNumber>025</fillFacilityNumber>
      <shpFacilityNumber>025</shpFacilityNumber>
      <homeFacilityAbbrCode>STL</homeFacilityAbbrCode>
      <homeFacilityNumber>015</homeFacilityNumber>
      <multiCartonIndicator>Y</multiCartonIndicator>
      <primaryCustomerIndicator>Y</primaryCustomerIndicator>
      <shipToCustomerNumber>954371001</shipToCustomerNumber>
      <customerCompanyID>01</customerCompanyID>
      <customerTruckID>U888</customerTruckID>
      <customerTruckDescription>UDS - ADDISON</customerTruckDescription>
      <customerTruckDockID>13</customerTruckDockID>
      <thirdPartyBillCarrier />
      <thirdPartyBillID />
      <thirdPartyBillType />
      <qualityCheckIndicator>N</qualityCheckIndicator>
      <warehouseLaydownID />
      <packListPosition>I</packListPosition>
      <preferredPackingType>CTN</preferredPackingType>
      <preferredPackingMaterial>PAPER</preferredPackingMaterial>
      <preferedPackingInstructions />
      <totalOrderCartonQty>6</totalOrderCartonQty>
      <convertAddressIndicator>N</convertAddressIndicator>
      <dealerInstructionIndicator>Y</dealerInstructionIndicator>
      <dealerinstructions1>CPO#: 623559</dealerinstructions1>
      <dealerinstructions2>ATTN: DANA GRIFFIN</dealerinstructions2>
      <dealerinstructions3>INFO: 612</dealerinstructions3>
      <dealerinstructions4>ROUTE: ZNED UNTED</dealerinstructions4>
      <dealerinstructions5 />
      <dealerinstructions6 />
      <shippingInstructionsIndicator>N</shippingInstructionsIndicator>
      <shippingInstructions1 />
      <shippingInstructions2 />
      <shippingInstructions3 />
      <shippingInstructions4 />
      <shippingInstructions5 />
      <shippingInstructions6 />
      <specialInstructionsIndicator>N</specialInstructionsIndicator>
      <specialInstructions1 />
      <specialInstructions2 />
      <customeContainerDesc />
    - <carton>
      <deliveryCartonID>253370905995</deliveryCartonID>
      <shipIndicator>Y</shipIndicator>
      <deliveryPalletID>X150</deliveryPalletID>
      <consolidatedDeliveryCartonID />
      <scanDateTime>2009-12-03T19:36:12.00</scanDateTime>
      <cartonWeight>52</cartonWeight>
      <dropShipFlag>1</dropShipFlag>
      <carrierTrackingNumber />
      <carrierZoneID>0</carrierZoneID>
      <codAmount />
      <customerPackageAmount />
      <declaredValue />
      <residentialDeliveryIndicator />
      <serviceTypeCode>00</serviceTypeCode>
      <ssccCode>006860244400829393</ssccCode>
    - <Item>
      <shipPrefix>UNV</shipPrefix>
      <shipStockNumber>21200</shipStockNumber>
      <itemDescription>PAPER XERO/DUP WE LTR 20#</itemDescription>
      <orderQuantity>1</orderQuantity>
      <originalShipQuantity>1</originalShipQuantity>
      <shipQuantity>1</shipQuantity>
      <inventoryUnitCode>CT</inventoryUnitCode>
      <inventoryWeightQuantity>52.000</inventoryWeightQuantity>
      <upcNumber>00000000000000</upcNumber>
      <upcRetailCode>087547212004</upcRetailCode>
      <hazmatIndicator>N</hazmatIndicator>
      <serialRequiredIndicator>N</serialRequiredIndicator>
      <dealerMemoPO>S</dealerMemoPO>
      <cartonLineNumber>1</cartonLineNumber>
      <orderLineNumber>11</orderLineNumber>
      <originalOrderPrefix>UNV</originalOrderPrefix>
      <originalOrderStockNumber>21200</originalOrderStockNumber>
      <reasonCode />
    - <Item_Serial>
      <serialNumber />
      </Item_Serial>
        </Item>
      </carton>
       </order>
      </Delivery>
      </Shipment>
    This is not the complete XML file as it exceeds the 15000 characters and then I cann't post here. So I have deleted much part of it.
    The hierarchy is as following: Shipment->Delivery->Order->Carton->Item.
    I have created a XSLT for it which is working fine.
    But when I execute my report program it gives CX_SY_XSLT_FORMAT_ERROR saying that
    Transformation error:  Non-canonical structure of element name XML_OUTPUT.

    Dear experts,
    My report program is as following:-
    *& Report  Z_ASNTRNS
    REPORT  Z_ASNTRNS.
    *& Report  Z_ASNTRNS
    TYPE-POOLS: abap, ixml.
    TABLES: ZASN_SHIPMENT,ZASN_DELIVERY,ZASN_ORDER,ZASN_CARTON,ZASN_ITEM.
    *CONSTANTS gs_file TYPE string VALUE 'C:Documents and SettingsC5134126DesktopRajesh_kandakatlaSampleASNFile.xml'.
    This is the structure for the data from the XML file
    TYPES: BEGIN OF ts_item,
          ZSHIPMENT LIKE ZASN_ITEM-ZSHIPMENT,
          VBELN LIKE ZASN_ITEM-VBELN,
          ORDER_NUMBER LIKE ZASN_ITEM-ORDER_NUMBER,
          CARTON_ID LIKE ZASN_ITEM-CARTON_ID,
           ITEM LIKE ZASN_ITEM-ITEM,
           CARTON_LINE_NUM LIKE ZASN_ITEM-CARTON_LINE_NUM,
           CARTON_LINE_NUMBER LIKE ZASN_ITEM-CARTON_LINE_NUM,
          AEDAT(8),
          AEZET(6),
           ITEM_DESCRIPTION LIKE ZASN_ITEM-ITEM_DESCRIPTION,
           ORD_QTY(16),
           ORIGINAL_SHIP(16),
           SHIP_QTY(16),
           UPC_NUMBER LIKE ZASN_ITEM-UPC_NUMBER,
           DEALER_MEMO_PO(5),
           ORDER_LINE_NUM LIKE ZASN_ITEM-ORDER_LINE_NUM,
          STATUS LIKE ZASN_ITEM-STATUS,
           END OF ts_item.
    TYPES: BEGIN OF ts_carton,
          ZSHIPMENT LIKE ZASN_CARTON-ZSHIPMENT,
          VBELN LIKE ZASN_CARTON-VBELN,
          ORDER_NUMBER LIKE ZASN_CARTON-ORDER_NUMBER,
           CARTON_ID LIKE ZASN_CARTON-CARTON_ID,
          AEDAT(8),
          AEZET(6),
           SHIP_INDICATOR LIKE ZASN_CARTON-SHIP_INDICATOR,
           TRACKING_NUMBER LIKE ZASN_CARTON-TRACKING_NUMBER,
           ZZCARTON_WGT(18),
           Item type ts_item,
           END OF ts_carton.
    TYPES: BEGIN OF ts_order,
          ZSHIPMENT LIKE ZASN_ORDER-ZSHIPMENT,
          VBELN LIKE ZASN_ORDER-VBELN,
           ORDER_NUMBER LIKE ZASN_ORDER-ORDER_NUMBER,
          AEDAT(8),
          AEZET(6),
           SUB_ORDER LIKE ZASN_ORDER-SUB_ORDER,
           ORDER_DATE(8),
           PRIMARY_ORDER LIKE ZASN_ORDER-PRIMARY_ORDER,
           CUSTOMER_PO LIKE ZASN_ORDER-CUSTOMER_PO,
           PRIMARY_ID LIKE ZASN_ORDER-PRIMARY_ID,
           SHIP_TO LIKE ZASN_ORDER-SHIP_TO,
          ANZPK(5),
           carton type ts_carton,
           END OF ts_order.
    TYPES: BEGIN OF ts_delivery,
          ZSHIPMENT LIKE ZASN_DELIVERY-ZSHIPMENT,
          VBELN LIKE ZASN_DELIVERY-VBELN,
          AEDAT(8) TYPE C,
          AEZET(6) TYPE C,
           PRIMARY_CUSTOMER LIKE ZASN_DELIVERY-PRIMARY_CUSTOMER,
           BILL_OF_LADING LIKE ZASN_DELIVERY-BILL_OF_LADING,
           CARTON_COUNT(5),
           TOTAL_WEIGHT(18),
           order type ts_order,
           END OF ts_delivery.
    TYPES: BEGIN OF ts_shipment,
           ZSHIPMENT LIKE ZASN_SHIPMENT-ZSHIPMENT,
           MANIFEST_DATE_TIME(25),
          AEDAT(8) TYPE C,
          AEZET(6) TYPE C,
          SDATE(8) TYPE C,
          STIME(6) TYPE C,
           SFACILITY_NUMBER LIKE ZASN_SHIPMENT-SFACILITY_NUMBER,
           ZZCARRIERCODE LIKE ZASN_SHIPMENT-ZZCARRIERCODE,
           Delivery type ts_delivery,
           END OF ts_shipment.
    TYPES: BEGIN OF ts_shipment1,
           ZSHIPMENT LIKE ZASN_SHIPMENT-ZSHIPMENT,
           MANIFEST_DATE_TIME(25),
           SFACILITY_NUMBER LIKE ZASN_SHIPMENT-SFACILITY_NUMBER,
           ZZCARRIERCODE LIKE ZASN_SHIPMENT-ZZCARRIERCODE,
           PRIMARY_CUSTOMER LIKE ZASN_DELIVERY-PRIMARY_CUSTOMER,
           BILL_OF_LADING LIKE ZASN_DELIVERY-BILL_OF_LADING,
           CARTON_COUNT(5),
           TOTAL_WEIGHT(18),
           ORDER_NUMBER LIKE ZASN_ORDER-ORDER_NUMBER,
           SUB_ORDER LIKE ZASN_ORDER-SUB_ORDER,
           ORDER_DATE(8),
           PRIMARY_ORDER LIKE ZASN_ORDER-PRIMARY_ORDER,
           CUSTOMER_PO LIKE ZASN_ORDER-CUSTOMER_PO,
           PRIMARY_ID LIKE ZASN_ORDER-PRIMARY_ID,
           SHIP_TO LIKE ZASN_ORDER-SHIP_TO,
           CARTON_ID LIKE ZASN_CARTON-CARTON_ID,
           SHIP_INDICATOR LIKE ZASN_CARTON-SHIP_INDICATOR,
           TRACKING_NUMBER LIKE ZASN_CARTON-TRACKING_NUMBER,
           ZZCARTON_WGT(18),
           ITEM LIKE ZASN_ITEM-ITEM,
           CARTON_LINE_NUM LIKE ZASN_ITEM-CARTON_LINE_NUM,
           CARTON_LINE_NUMBER LIKE ZASN_ITEM-CARTON_LINE_NUM,
           ITEM_DESCRIPTION LIKE ZASN_ITEM-ITEM_DESCRIPTION,
           ORD_QTY(16),
           ORIGINAL_SHIP(16),
           SHIP_QTY(16),
           UPC_NUMBER LIKE ZASN_ITEM-UPC_NUMBER,
           DEALER_MEMO_PO(5),
           ORDER_LINE_NUM LIKE ZASN_ITEM-ORDER_LINE_NUM,
           END OF ts_shipment1.
    TYPES: BEGIN OF t_xml_line,
                 data(256) TYPE x,
               END OF t_xml_line.
    *Typdefinition für Airplus
    *READ THE DOCUMENTATION "LASG_XML_INVOICE_BTM"!!!
    VARs beginning with "a_" are ATTRIBUTES
    DATA: l_ixml            TYPE REF TO if_ixml,
          l_streamfactory   TYPE REF TO if_ixml_stream_factory,
          l_parser          TYPE REF TO if_ixml_parser,
          l_istream         TYPE REF TO if_ixml_istream,
          l_ostream         TYPE REF TO if_ixml_ostream,
          l_document        TYPE REF TO if_ixml_document,
          l_node            TYPE REF TO if_ixml_node,
          l_xml TYPE REF TO cl_xml_document,
          l_xmldata         TYPE string.
    DATA: l_xml_table       TYPE TABLE OF t_xml_line,
             l_xml_line        TYPE t_xml_line,
             l_xml_table_size  TYPE i.
    DATA: l_filename        TYPE string.
    DATA: xml_out TYPE string ,
          size type i.
    DATA: l_xml_x1   TYPE xstring.
    DATA: l_len      TYPE i,
              l_len2     TYPE i,
              l_tab      TYPE tsfixml,
              l_content  TYPE string,
              l_str1     TYPE string,
              c_conv     TYPE REF TO cl_abap_conv_in_ce.
             l_itab     TYPE TABLE OF string.
    DATA: BEGIN OF l_itab occurs 0,
          data(256) type c,
          end of l_itab.
    TYPES : BEGIN OF TY_TEXT,
              data(255) type C,
            END OF TY_TEXT.
    DATA: F_XML TYPE STRING.
    DATA : LT_TEXT_OUT type table of TY_TEXT with header line.
    tables
    DATA: it_shipment    TYPE STANDARD TABLE OF ts_shipment,
          wa_shipment    TYPE  ts_shipment.
    *Errorvariables
    DATA: xslt_err   TYPE REF TO cx_xslt_exception,
          err_string TYPE string.
    PARAMETERS: pa_file TYPE localfile OBLIGATORY
    DEFAULT 'C:Documents and SettingsC5134126DesktopRajesh_kandakatlaSampleASNFile.xml'.
    START-OF-SELECTION.
      Creating the main iXML factory
        l_ixml = cl_ixml=>create( ).
      Creating a stream factory
        l_streamfactory = l_ixml->create_stream_factory( ).
        PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
    here we use the CALL TRANSFORMATION method which calls
    the XSLT program "z_asnfile"
    TRY.
        CALL TRANSFORMATION ('Z_ASNFILE')
          SOURCE xml LT_TEXT_OUT[]
          RESULT xml_output = it_shipment
    catch any error, very helpful if the XSLT isn't correct
        CATCH cx_xslt_exception INTO xslt_err.
        err_string = xslt_err->get_text( ).
        WRITE: / 'Transformation error: ', err_string.
        EXIT.
      ENDTRY." setting a breakpoint to watch the workarea
    by the internal table "it_airplus"
           break-point.
      LOOP AT it_shipment INTO wa_shipment.
      ENDLOOP.
    *&      Form  get_xml_table
      FORM get_xml_table CHANGING l_xml_table_size TYPE i
                                  l_xml_table      TYPE STANDARD TABLE.
        l_filename = pa_file.
      upload a file from the client's workstation
        CALL METHOD cl_gui_frontend_services=>gui_upload
          EXPORTING
            filename   = l_filename
            filetype   = 'BIN'
          IMPORTING
            filelength = l_xml_table_size
          CHANGING
            data_tab   = l_xml_table
          EXCEPTIONS
            OTHERS     = 19.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    Convert binary to text.
    CALL FUNCTION 'SCMS_BINARY_TO_TEXT'
      EXPORTING
        INPUT_LENGTH          = 70000
                FIRST_LINE            = 0
                LAST_LINE             = 0
                APPEND_TO_TABLE       = ' '
                MIMETYPE              = ' '
        WRAP_LINES            = 'X'
              IMPORTING
                OUTPUT_LENGTH         =
      TABLES
        BINARY_TAB            = l_xml_table
        TEXT_TAB              = LT_TEXT_OUT
              EXCEPTIONS
                FAILED                = 1
                OTHERS                = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    "get_xml_table

  • XSLT Transformation error:  Non-canonical structure of element name

    Good day experts,
    I have recently started using xslt, and came upon the following demo in the sdn.
    http://wiki.sdn.sap.com/wiki/display/ABAP/XMLXSLTwith+ABAP
    I have retrieved the example xml files from airplus.com, as per the instructions, and implemented the code.
    When I test the xslt transformation in se80, it transforms correctly.
    However, when I run the program, I get the following error.
    CX_XSLT_FORMAT_ERROR
    Transformation error:  Non-canonical structure of element name XML_OUTPUT   
    Is there an error in the example that I am not aware of?
    Thanks in advance,
    Johan Kriek

    Found the solution.
    You rename the tag <XML_OUTPUT> to anything else like <TEST>. And Hurray!!! it works.
    It looks like SAP is using this name internally somewhere so we are getting error when we are using same name.
    Anyways the problem is solved.
    Regards,
    Jai

  • Detecting transform errors when using org.xml.sax.XMLFilter

    I am using javax.xml.transform.sax.SAXTransformerFactory.newXMLFilter to transform xml against a pipeline of stylesheets (See function testPipelineTransform in the example below). The process works okay, excepting that I cannot figure out how to detect errors in the transformation process.
    I would like to achieve the same result for the pipeline process as I would for a single transformation using javax.xml.transform.Transformer.setErrorListener. The example below demonstrates how the call to javax.xml.transform.Transformer.setErrorListener does not generate the same result when using org.xml.sax.XMLFilter as it does when using a single transformation.
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import org.xml.sax.SAXException;
    import org.xml.sax.InputSource;
    import org.xml.sax.XMLReader;
    import org.xml.sax.XMLFilter;
    import javax.xml.transform.ErrorListener;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.sax.SAXTransformerFactory;
    import javax.xml.transform.sax.SAXSource;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.transform.stream.StreamResult;
    import java.io.*;
    public class FilterChain {
        static private final String newline = System.getProperty("line.separator");
         public static void main(String argv[]) {
              System.out.println("Testing pipeline transform");
              testPipelineTransform();
              System.out.println("Testing single transform");
              testXsltSingleTransform();
         } // main
         static private void testPipelineTransform() {
              try {
                   // Set up the input stream
                   BufferedInputStream bis = new BufferedInputStream(
                             new ByteArrayInputStream(getExample().getBytes()));
                   InputSource input = new InputSource(bis);
                   // Set up to read the input file
                   SAXParserFactory spf = SAXParserFactory.newInstance();
                   SAXParser parser = spf.newSAXParser();
                   XMLReader reader = parser.getXMLReader();
                   // Create the filters
                   SAXTransformerFactory stf = (SAXTransformerFactory) TransformerFactory
                             .newInstance();
                   XMLFilter filter1 = stf.newXMLFilter(new StreamSource(new StringReader(getStylesheet1())));
                   XMLFilter filter2 = stf.newXMLFilter(new StreamSource(new StringReader(getStylesheet2())));
                   // Wire the output of the reader to filter1
                   // and the output of filter1 to filter2
                   filter1.setParent(reader);
                   filter2.setParent(filter1);
                   // Set up the output stream
                   StreamResult result = new StreamResult(System.out);
                   // Set up the transformer to process the SAX events generated
                   // by the last filter in the chain
                   Transformer transformer = stf.newTransformer();
                   transformer.setErrorListener(new ErrorListener() {
                        public void error(TransformerException te)
                                  throws TransformerException {
                             System.out.println("Transform generated Transform Error");
                             System.out.println(te.getMessage());
                        public void fatalError(TransformerException te)
                                  throws TransformerException {
                             System.out
                                       .println("Transform generated Transform Fatal Error");
                             System.out.println(te.getMessage());
                        public void warning(TransformerException te)
                                  throws TransformerException {
                             System.out.println("Transform generated Transform Warning");
                             System.out.println(te.getMessage());
                   SAXSource transformSource = new SAXSource(filter2, input);
                   transformer.transform(transformSource, result);
              } catch (TransformerConfigurationException tce) {
                   // Error generated by the parser
                   System.out.println("\n** Transformer Factory error");
                   System.out.println("   " + tce.getMessage());
                   // Use the contained exception, if any
                   Throwable x = tce;
                   if (tce.getException() != null)
                        x = tce.getException();
                   x.printStackTrace();
              } catch (TransformerException te) {
                   // Error generated by the parser
                   System.out.println("\n** Transformation error");
                   System.out.println("   " + te.getMessage());
                   // Use the contained exception, if any
                   Throwable x = te;
                   if (te.getException() != null)
                        x = te.getException();
                   x.printStackTrace();
              } catch (SAXException sxe) {
                   // Error generated by this application
                   // (or a parser-initialization error)
                   Exception x = sxe;
                   if (sxe.getException() != null)
                        x = sxe.getException();
                   x.printStackTrace();
              } catch (ParserConfigurationException pce) {
                   // Parser with specified options can't be built
                   pce.printStackTrace();
         static private void testXsltSingleTransform() {
              try {
                   BufferedInputStream bis = new BufferedInputStream(
                             new ByteArrayInputStream(getExample().getBytes()));
                   // Set up the output stream
                   StreamResult result = new StreamResult(System.out);
                   InputSource input = new InputSource(bis);
                   TransformerFactory factory = TransformerFactory.newInstance();
                   Source source = new StreamSource(new StringReader(getStylesheet2()));
                   Transformer stylesheet = factory.newTransformer(source);
                   stylesheet.setErrorListener(new ErrorListener() {
                        public void error(TransformerException te)
                                  throws TransformerException {
                             System.out.println("Transform generated Transform Error");
                             System.out.println(te.getMessage());
                        public void fatalError(TransformerException te)
                                  throws TransformerException {
                             System.out
                                       .println("Transform generated Transform Fatal Error");
                             System.out.println(te.getMessage());
                        public void warning(TransformerException te)
                                  throws TransformerException {
                             System.out.println("Transform generated Transform Warning");
                             System.out.println(te.getMessage());
                   SAXSource transformSource = new SAXSource(input);
                   stylesheet.transform(transformSource, result);
              } catch (Exception exc) {
                   exc.printStackTrace();
         private static String getStylesheet1() {
              return
                     "<?xml version='1.0' encoding='ISO-8859-1'?>" + newline
                   + "<xsl:stylesheet" + newline
                   + "xmlns:xsl='http://www.w3.org/1999/XSL/Transform'" + newline
                   + "version='1.0'>" + newline
                   + "<xsl:output method='xml'/>" + newline
                   + "<xsl:template match='/'>" + newline
                   + "<DontCareAboutContent></DontCareAboutContent>" + newline
                   + "</xsl:template>" + newline
                   + "</xsl:stylesheet>" + newline;
         private static String getStylesheet2() {
              return
                     "<?xml version='1.0' encoding='ISO-8859-1'?>" + newline
                   + "<xsl:stylesheet" + newline
                   + "xmlns:xsl='http://www.w3.org/1999/XSL/Transform'" + newline
                   + "version='1.0'>" + newline
                   + "<xsl:output method='html'/>" + newline
                   + "<xsl:template match='/'>" + newline
                  + "<html><body>" + newline
                 + "<xsl:message>" + newline
                 + "Error Message for the xslt processor" + newline
                 + "</xsl:message>" + newline
                 + "Dont care about the xslt content," + newline
                 + "The only significant part is the xsl:message element" + newline
                 + "which results in a error to be handled by the xslt" + newline
                 + "processor" + newline
                   + "</body></html>" + newline
                   + "</xsl:template>" + newline
                   + "</xsl:stylesheet>" + newline;
         private static String getExample() {
              return
                     "<?xml version='1.0' encoding='ISO-8859-1'?>" + newline
                   + "<DontCareAboutContent>" + newline
                   + "</DontCareAboutContent>" + newline;
    }

    I made the following change which solves the problem but the sollution is tightly coupled to Xalan. If anyone has any ideas, I would still like to find a way to achieve the desired result using JAXP API's.
                   XMLFilter filter1 = stf.newXMLFilter(new StreamSource(new StringReader(getStylesheet1())));
                   if (filter1 instanceof org.apache.xalan.transformer.TrAXFilter) {
                        ((org.apache.xalan.transformer.TrAXFilter)filter1).getTransformer().setErrorListener(...);
    ...

  • Runtime Mapping Transformation Error

    Hi Experts,
    I am doing a file to idoc scenario in which the sender system is MDM and the Idocs are to be received in the R/3 system.
    I have generated XSD from the IDOC itself , that is MATMAS05 and used it as the source structure by importing in External Definition and the targer is of course the Idoc.
    In SXMB_MONI i get the Runtime Mapping Transformation error. What can be the reason for this.I read somewhere that the XSD and the xml file that is being picked might have different structures.
    But i checked and they are same.
    Only the problem can be with the encoding part.
    In the XML structure of the Idoc , it is UTF-8 and also after exporting it to file it is UTF-8. But after importing it in the External Definition,it becomes ISO-8859-1 and we are unable to change it.
    Also, the xml file that is given from the MDM system has encoding as UTF-8.
    Kindly help.
    Thanks in Advance.
    -Shweta.

    Hi,
    1) check out imported xsd is correct , valid. Hope while importing you have used Type as "XSD" and then after importing, check out the messages tab to know this
    2) In the mapping, did you map all the madatory fields ? like some of the attributes like BEGIN? For this BEGIN attribute map with constant value. also check all the mandatory nodes/fields
    3) check the mapping in the mapping editor independently in Repository by picking the input xml from the SXMB_MONI. So that you can test the mapping
    Hope this will solve the mapping problem. btw, it is prefer to have exact error posted here.
    Regards, Moorthy

  • OSB transformation error- BEA-382513- Error parsing XML

    Hi Gurus -
    I am struggling to fix one OSB Xquery transformation error
    <con:errorCode>BEA-382513</con:errorCode>
    <con:reason>OSB Replace action failed updating variable "body": Error parsing XML: {err}FORG0005: expected exactly one item, got 0 items
    I am passing SIL formatted data to this transformation an expecting a transformation but its keep on failing, I have tested the transformation and thats looking good.
    This is my replace operation where I am doing transformation.
    Replace [ node contents ] of [ ./* ]
    in [ body ] with
    XQuery Resource: TestProject/Common/Transformation/XQJMS2DBTransformation
    Variable Names And Bindings:
    commonInterfaceLayout1 - $body/*:CommonInterfaceLayout
    transformation file
    (:: pragma bea:global-element-parameter parameter="$commonInterfaceLayout1" element="ns0:CommonInterfaceLayout" location="../../Common/Schema/CommonInterfaceLayout.xsd" ::)
    (:: pragma bea:global-element-return element="ns1:EaiAuditCollection" location="../../Common/Schema/XSD_InsertEAIAuditDBTable.xsd" ::)
    declare namespace ns1 = "http://xmlns.oracle.com/pcbpel/adapter/db/top/InsertEAIAuditDBTable";
    declare namespace ns0 = "http://eai.fpl.com/schema/CommonInterfaceLayout";
    declare namespace xf = "http://tempuri.org/ErrorHandlingR1V1/XQJMS2DB/";
    declare function xf:XQJMS2DB($commonInterfaceLayout1 as element(ns0:CommonInterfaceLayout))
    as element(ns1:EaiAuditCollection) {
    <ns1:EaiAuditCollection>
    <ns1:EaiAudit>
    <ns1:eaiAuditId></ns1:eaiAuditId>
    <ns1:messageId>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageId) }</ns1:messageId>
    <ns1:messageDate>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageReceivedDate) }</ns1:messageDate>
    <ns1:messageType>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageType) }</ns1:messageType>
    <ns1:messageSource>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageSource) }</ns1:messageSource>
    <ns1:messageTarget>{ data($commonInterfaceLayout1/ns0:Header/ns0:MessageTarget) }</ns1:messageTarget>
    <ns1:appUniqId>{ data($commonInterfaceLayout1/ns0:Header/ns0:ApplicationUniqueId) }</ns1:appUniqId>
    <ns1:payload>{ data($commonInterfaceLayout1/ns0:Body) }</ns1:payload>
    <ns1:componentName>{ data($commonInterfaceLayout1/ns0:Header/ns0:ComponentName) }</ns1:componentName>
    <ns1:clientId>{ data($commonInterfaceLayout1/ns0:Header/ns0:ClientId) }</ns1:clientId>
    <ns1:createDate>{ fn:current-date() }</ns1:createDate>
    <ns1:processFlag></ns1:processFlag>
    </ns1:EaiAudit>
    </ns1:EaiAuditCollection>
    declare variable $commonInterfaceLayout1 as element(ns0:CommonInterfaceLayout) external;
    xf:XQJMS2DB($commonInterfaceLayout1)
    pls advice whats wrong I am doing here.
    Edited by: KumarB on Feb 7, 2013 9:56 PM

    update - I dont see this error any more but transformation is not happening. as a result of transformation, i get same message as output .. no change in it.

  • After Upgrade to PI7.1 getting Simple transformation error

    HI Experts,
    I have an Issue, the scenario which i', working its working properly in DEV, QA, PROD in PI 7.0, We upgraded the system to PI7.1
    Unknown Simple transformation error in converting XML to internal table
    Application error in mapping program , 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

    What kind of mapping is that ? Graphical, Java, XSLT, ABAP ?
    The XML parser in 7.1 contains many subtle changes compared to 3.0
    But this error sounds like a bug. Is there something special in the XML input ? is it wellformed-XML ?
    CSY

  • 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

  • Inventory Transformation error

    Hi All
    I have loaded the Inventory data to the infocube 0IC_C03
    No my req is i need to add the infoobject 0VALSPECST in to cube. I done this now i am trying to activate the transformation but it is showing Start routine syntax errror
    E:In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter
    "SOURCE_PACKAGE" is incompatible with the formal parameter
    "DATA_PACKAGE".
    Can any one help me on this....
    Thanks in advance
    Raju

    Hi
    Remove that infoobject and try again..
    i think that it may be some system error..
    Refer to this thread..
    Re: How to add the field in infocube?
    It may help..
    Regards
    gaurav

  • SRM: Transformation Error

    Dear Experts,
    When activating the Transforamtions DSO--> Datasource.
    Error Message: Start Routine Syntax Error.
    I checked the syntax for the start routine
    Error Msg: In PERFORM or CALL FUNCTION "ROUTINE_9998", the actual parameter "SOURCE_PACKAGE" is incompatible with the formal parameter"DATA_PACKAGE".
    When I checked the ROUTINE_9998, no. of fields in datasource are not equal to no. of fields in target.
    I hope this is not the issue.
    Would anyone suggest on how to cope with this issue ??
    Regards
    KV

    Hi,
    The error "SOURCE_PACKAGE" is incompatible with the formal parameter "DATA_PACKAGE is a version problem.
    Take a look at your routine and use SOURCE_PACKAGE and ABAP OO instead of DATA_PACKAGE.
    or
    When getting an error 9998 in running means that your start routine encountered an abort command.
    Have you programmed an ABORT statement somewhere in your start routine yourself?
    Or is this a Compile error?
    By the way: your error message also seems to indicate a version problem.
    Data_package is 3.x language, source_package = 7.0 language.
    or
    think in function call of 'ROUTINE_9998' the parameter 'Source_package' is causing problem rather pass the parameter that is the technical name of the ods /bic/a*... try this
    or
    check the routine_9998...i guess there the parameter definition is for data_package but since u r using a transformation and sending the source_package..it is not accepting..compatilibity issue.
    Regards,
    MARASA.

  • How to Get a transformation Error from a previous step in cc BPM

    Hello gurus!
    I have an important situation, in a BPM step I make a SendSync Call, if there is an error, it goes to the exception branch, and then I do a transformation step (to assign some values to an Idoc) and then I send the Idoc to an R3 system to inform the error.
    Sometimes, for example in the sync call throws this error: (that can be seen in the abap monitor)
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Inbound Message --> <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1"><SAP:Category>XIAdapterFramework</SAP:Category><SAP:Code area="MESSAGE">GENERAL</SAP:Code><SAP:P1/><SAP:P2/><SAP:P3/><SAP:P4/><SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.net.UnknownHostException: safcc.pfc.gov.tt</SAP:AdditionalText><SAP:Stack/><SAP:Retry>M</SAP:Retry></SAP:Error>
    My need is to get the error message,and to map it in an idoc field (with an UDF in the transformation exception branch for example), the error is exactly in this part of the result:
    <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.net.UnknownHostException: safcc.pfc.gov.tt</SAP:AdditionalText>
    Is there any way to achieve this?
    Thanks in advance !
      Juan.

    You wont be able to get the error details....just an indication that an error has occured can be obtained (the exception branch)...no error text can be extracted.
    Regards,
    Abhishek.

  • XSL transformation error

    Hello everybody,
    I'm tryin' to transform a simple xml file via xslt within a simple java class. Following an excerpt of the java class.
    TransformerFactory factory = TransformerFactory.newInstance();
    Transformer transformer = null;
    Templates template = null;
    StreamSource xmlSource = null;
    StreamSource xslSource = null;
    StreamResult result = null;
    try {
         // a new StreamSource from a file name
         xmlSource = new StreamSource(new File("Y:\temp\input\index.xml"));
         xslSource = new StreamSource(new File("Y:\temp\transformation.xslt"));
         // a new StreamResult to a file name (it is automatically
         //closed on exit)
         result = new StreamResult("data/cars1.html");
         // get a new Templates object for this stylesheet
         template = factory.newTemplates(xslSource);
         // get a new Transformer from the Templates
         transformer = template.newTransformer();
         // perform the transformation
         transformer.transform(xmlSource, result);
    catch(Exception e){
    When debugging the class I receive the error message
    <b>ERROR:  'Syntax error in '($processedChildren, $nextChild)'.'
    FATAL ERROR:  'The template couldn't be compiled.'</b>
    The expression mentioned in the error message in an excerpt from the XSLT file. The entire expression in the file looks as follows
    <xsl:when test="empty(index-of($processedChildren,$nextChild))">
    I'm currently using NetWeaver 2004 with JDK 1.4.
    Anybody got any suggestions for this problem? Maybe it's due to the index-of function. I'm not quite sure if it's an XPath 2.0 function.
    Thanks in advance,
    Benjamin

    Hi Jens,
    processedChildren is a sequence of string objects, nextChild is a string. With the test I'm trying to check whether the string is contained in the sequence. If not, the function empty() returns true. Index-of returns the index numbers of the string, where the string occurs in the sequence.
    Both functions are part of the XPath 2.0 standard
    <a href="http://www.w3.org/TR/xpath-functions">http://www.w3.org/TR/xpath-functions</a>

  • XSL Transformation error source

    I am using MII 12.0 and I am getting the following error in the log file:
    javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sap.engine.services.servlets_jsp.server.exceptions.WebIOException: An attempt to write after the stream had been closed.
    The problem is that I am not using and XSL transforms that I know of. What BLS action might generate this error other than the obvious XSL Transformation Action?
    Thanks.
    ...Sparks

    I found this thread:
    [Re: IDOC error|Re: IDOC error]
    Is your system set up to receive any idocs?
    Edited by: Christian Libich on Feb 8, 2010 10:00 PM

  • SOAP Response XSLT Transformation Error

    I am doing a webservice call and trying to transform the SOAP Response using XSLT.
    I am getting the following error when the command CALL TRANSFORMATION Executes.
    The element abap was expected for the XML-ABAP transformation
    Please let me know if anyone ave received this error before and how did you solve it.
    Regards
    Sudhir Atluru

    Hi Petra
    for this Error  com.sap.aii.af.ra.ms.api.ConfigException
    check this Link
    experts needed! com.sap.aii.af.ra.ms.api.ConfigException
    http://help.sap.com/saphelp_nw04s/helpdata/en/78/20244134a56532e10000000a1550b0/frameset.htm
    also refer SAP Note 978606
    Regards
    Abhishek

Maybe you are looking for

  • Incompatible types in case statement

    I'm getting incompatible types inside this case statement : inString = s_in.readUTF();             switch (inString.substring(1,3))                 case nam:                     ChatClient.nameArea.append(inString);                     break;        

  • Creating a movie in widescreen format.

    Hello, I have a question, I'm hoping that someone can help me out. I have created a movie in iMovie, what I need is to create a file that I can transfer over to my PC and then play it on the PC. When I have done this, I have created a AVI file (4 min

  • Adaptive charging in "new" macbook air?

    Hi, I've seen many peoples wondering about the new macbook air's battery. But didn't clear me up. So I'm still wondering about the adaptive charging used in the macbook pro's. Does the new macbook air have adaptive charging or not? and if so, are the

  • App doesn't show up after it downloads.

    I rebooted the iPad but it still doesn't show up. What's the problem?

  • Upgrade from Flex 1 to 2

    Hello. I have an 'old' Flex 1.0 / 1.5 app that I want to upgrade to 2.0 and keep maintaining. 1) Is there an upgrade utility / script from Flex 1.0 / 1.5 to 2.x ? 2) What is the parallel of this entry: mx:Image height="45" source="@Embed('resources/l