XML Data  conversion

where will XML data is converted?
Thanks

Hi,
The adapters in the adapter engine will converts the source message to the xml message.
Thanks
SaNv...

Similar Messages

  • XML Data Conversion Problem

    Hi,
    Am facing problem in flex that using web services am getting the data in xml format (below provided) am not able to provide the data from xml to datagrid. Am getting the data in datagridcolumn with the tag also. I need only data to be displayed without the child tag in the datagrid.
    XML Format output as below:
    <UDSObjectList>
    <UDSObject>
    <Handle>cr:400503</Handle>
    <Attributes>
    <Attribute DataType="2005">
    <AttrName>ref_num</AttrName>
    <AttrValue>671</AttrValue>
    </Attribute>
    <Attribute DataType="2005">
    <AttrName>impact</AttrName>
    <AttrValue>5</AttrValue>
    </Attribute>
    <Attribute DataType="2005">
    <AttrName>priority</AttrName>
    <AttrValue>1</AttrValue>
    </Attribute>
    </Attributes>
    </UDSObject>
    </UDSObjectList>
    Attached the screenshot of output for your reference. The screenshot showing the datawith tag and here is other problem is for request id and impact and priority columns showing three columns data in all the columns.
    Actual data is as below:
    Request Id is 671
    Impact is 5
    Priority is 1
    but the data is shown in all the columns not shown in related columns.
    Thanks in advance..........

    Can anyone provide a solution. As this problem was facing since long time.
    Thanks

  • Issue with Date Conversion when loading XML File into Oracle 10g Database

    Hello all,
    I have the interface shown in the screenshot below. In it, amongst other actions, I'm mapping an XML file element representing a date to an Oracle table column defined as DATE. The source and target columns are highlighted in the screenshot.
    !http://img223.imageshack.us/img223/1565/odiscr275.jpg!
    When I execute the interface, I get the following error message:
    java.lang.IllegalArgumentException at java.sql.Date.valueOf(Date.java:103)
    I'm assuming this refers to the date conversion!
    I've already tried replacing SRC_TRADES.DEAL_DATE with TO_DATE( SRC_TRADES.DEAL_DATE, 'DD/MM/YYYY' ) in the Implementation tab. This function was not recognised when I executed the interface, so it didn't work! The date value in the XML file is in DD/MM/YYYY format.
    I'm guessing that Oracle SQL Date functions don't work in the Implementation tab. Please could somebody let me know:
    1. Which Date Conversion function I could use instead?
    2. Where I can find a reference for the methods/functions I can use in the Implementation tab (if such a reference exists)?
    Cheers.
    James

    Hi.
    Try to change the execution area to staging area. After You change it, write in the mapping box just SRC_TRADERS.DEAL_DATE. When You use TO_DATE, the source field typu should be varchar2, not date (as it is in your source datastore)

  • Executing xml sql using jdbc adapter for date conversion

    Hi experts,
    I am following the fllowing blog for date format conversion for a jdbc receiver.
    /people/alessandro.berta/blog/2005/10/04/datetime-datatypes-and-oracle-database
    I constructed my graphical mapping to generate the following query
    DateField in receiver structure = TO_DATE('2008-03-24','DD-MON-YY')
    attribute hasQuot = No
    The result that i want is 24-MAR-08
    I am getting the error in communication channel monitoring as does not match string format.
    The database gets successfully updated without this date conversion. But when i try to use this, it give the above error.
    Is there any other configuration to be done to make the adapter execute this statement?
    Regards,
    Shamly

    The issue is solved.
    The SQL statement was wrong.
    The correct version is,( as was specified in the blog ) :-
    DateField in receiver structure = TO_DATE('2008-03-24','YYYY-MM-DD')
    Automatically in the database it is converted to 24-MAR-2008
    Edited by: Shamly MM on Mar 27, 2008 8:01 AM

  • Print-time XML data update?

    We're researching our options to print artwork with dynamic (i.e. data driven) elements inline with our production process.  We have a packaging machine that has an integrated inline printer and we want to send print jobs that contain dynamic data such as part number, lot number, expiration date, description, etc.  In the past we have used barcoding and marking software for this as it's designed to be either autoamted by a third party application or to pull data from a database itself.  On this new project we're looking to deliver or more graphically rich result.  We thought InDesign with it's XML backed frames may be an interesting option to explore.
    Something like:
    Production management system (PMS) generats the backing XML file with the job specific data
    PMS then retrieves the appropriate InDesign template file for the product being produced
    PMS prints the InDesign template file and the XML data is pulled in
    Keep in mind that workflow is based on reading the product specs and a few blog posts about InDesign, we are NOT InDesign users (yet).  There are a couple areas I see problems and I wanted to ask the community if you happen to know if they are real issues or not.
    I suspect we would need a full InDesign license on the PMS system in order to print the ID template files.  We would want to make tis all command line if possible, we don't want a tech to use InDesign but still I think a license would be needed, even just for printing.  Update:  I have since found InDesign Server and it sounds like it may be an option for this concern.
    If command line printing IS an option, will such an operation cause the template to pull in the XML data that was generated by the PMS?  In other words, the PMS generates an XML file in a location that the InDesign template is expecting, will InDesign pull in that data when the file is sent to the printer?
    Actually, is it even possible to command line print an InDesign template file or do we need to go through a pre-print processing stage to generate a PDF or some other file?
    I hope that these questions aren't too vague and that you understand what we're hoping to accomplish.
    Regards,
    Steve

    Hi Chorko,
    When you do your Conversion to Dynamic data, make sure you check your Start Time as Now.
    Hope that helps!
    Kalin T.
    National Instruments

  • Problem in coverting XML data to Interal Table.

    Hello,
    I have to write an application which converts an Internal Table Data to XML String and then from XML String to an Internal Table.
    The reason for doing is that I am using an RFC Function module and the internal table is dynamically generated one.
    But somehow the XML data is not getting converted to Internal Table.
    The RFC returns Internal Table Data as XML and the Field Catalogue table
    Now in the application which calls RFC, I am trying to convert XML data to a dynamic Internal table
    CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'
      CALL FUNCTION 'SCMS_BINARY_TO_STRING'
    Now convert XML String to Internal table
    Using FMs 'SCMS_STRING_TO_XSTRING'
    "Now XString to Binary
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    CALL FUNCTION 'TEXT_CONVERT_XML_TO_SAP'
        EXPORTING
          i_tab_raw_data             = lt_xml_data
          i_totalsize                = lv_file_size
        TABLES
          i_tab_converted_data       = <fst_dyn_table>
       EXCEPTIONS
         conversion_failed          = 1
         OTHERS                     = 2
    In the FM 'TEXT_CONVERT_XML_TO_SAP' I am getting error Conversion failed.
    Now I tried with transformations.
    Here also my table is a dynamically created Internal table.
    TRY.
          CALL TRANSFORMATION ('ID')
           SOURCE root = lt_zmt_tdm_fmap
              RESULT XML lv_output_str.
        CATCH cx_root INTO gs_rif_ex.
          gs_var_text = gs_rif_ex->get_text( ).
          MESSAGE gs_var_text TYPE 'I'.
      ENDTRY.
    Now the lv_output_str gets populated with data
    But when I call Transformation again to convert XML to internal table, it does not throw error, but does not return any data also.
    TRY.
          CALL TRANSFORMATION ('ID')
          SOURCE XML = lv_output_str
          RESULT ref = <fst_dyn_table> .
        CATCH cx_root INTO gs_rif_ex.
          gs_var_text = gs_rif_ex->get_text( ).
          MESSAGE gs_var_text TYPE 'I'.
      ENDTRY.
    How can this be resolved.
    As pointed I am using RFC Function module, the parameters will be
    1) XML String with Internal table data
    2) Field Catalogue for Internal Table to be created dynamically.
    Regards,
    Vikas

    >
    Vikas Sridharan wrote:

    >       CALL TRANSFORMATION ('ID')
    >       SOURCE XML = lv_output_str "<============ ERRONEOUS = HERE
    >       RESULT ref = <fst_dyn_table> .
    >
    Remove the "=" sign, this code will work :
          CALL TRANSFORMATION ('ID')
          SOURCE XML lv_output_str
          RESULT ref = <fst_dyn_table> .

  • PARSE_APPLICATION_DATA Error during XML = ABAP conversion: Response Message; CX_ST_DESERIALIZATION_ERROR in /1SAI/SAS0446CC11CC6EC1AD4789 Line 24 An error occurred when deserializing in the simple transformation program /1SAI/SAS0446CC11CC6EC1AD4789

    Hi Experts ,
    i have a scenario proxy to soap  where i am getting error while getting the response .
    we are sending the request successfully and getting response .some times we are getting in proxy level error below
    PARSE_APPLICATION_DATA Error during XML => ABAP conversion: Response Message; CX_ST_DESERIALIZATION_ERROR in /1SAI/SAS0446CC11CC6EC1AD4789 Line 24 An error occurred when deserializing in the simple transformation program /1SAI/SAS0446CC11CC6EC1AD4789 (Cha
    Please help us to fix this bug in proxy response.
    Regards
    Ravi

    Hello Ravinder,
    Can you please post the complete stack trace, it seems to be some fields are getting truncated i,e data sent from the program to the proxy object might be violating some length restrictions.
    Please check your message interface field lengths and what is being passed to the proxy.
    Regards,
    Ravi.

  • Filling PDF Form with XML data file

    Hello everybody.
    I need help.
    I created a form with LiveCycle Designer. I filled it and generated a XML data files. Now, I would like to fill the same blank PDF form with this XML data file.
    I know that I can do it with Adobe 8.0 but I must do it in an C# / .NET application that I have to create.
    (Forms I'm creating are not for me, I create the forms. Client uses them form but he don't have Adobe Acrobat 8.0, so he can't realise the automatic PDF filling with Adobe Acrobat 8.0)
    So I am looking for help with ".NET" "COM" or other library to help me to do it. If someone has other idea just give it.
    Thanks for your reply
    Jean Pierre (sorry for my bad English)

    Hello Mike
    Thank's for your reply. I used XPAAJ and it works very well but my company his develloping software with C# langage.
    I tried to convert XPPAJ to C#, I did it with the Java Langage Conversion Assistant but "Adobe Library" included in jar files cannot be translated to C#/.NET library. So, I can't use it.
    I found some C#/.NET API on the NET but they are very expensive and my company don't want to pay. They want me to create my own solution with library given by Adobe when you buy Adobe 8. So I am looking for this library.
    Is there an Adobe LiveCycle Designer SDK to help me.
    Thank you in advance for your reply
    Jean Pierre (student developing with LiveCycle Designer)

  • XML data encoding iso-8859-1 . Currently utf-16 is default encoding

    Hello ABAP Gurus ,
    Need a help from you .
    Scenario : We have SAP4.7 enterprise version which we have now converted to Unicode system . There is a BSP application which talks to an external web application (Non Unicode) thru HTTP protocol and sends data thru XML.
    Problem : Problem is at the time when BSP application prepares the XML While preparing XML data , before converting to Unicode environment the encoding was "iso-8859-1" . But now after Unicode conversion , the encoding is "UTF-16".
    The XML data looks like
    <?xml version="1.0" encoding="utf-16"?><DATA><ACTION>CREATE_TICKET</ACTION><CRI
    I have tried replacing "utf-16" by "iso-8859-1 " . The interface works . But at the recieving end , ie external web application , the German umlauts appear as some garbage values .
    I know we need to enforce encoding . I have tried with the following code but could not suceed . The encoding appears as "utf-16".
    Following is the section of code which I have written in BSP application.
      Daten in DOM-Baum wandeln
        CALL FUNCTION 'SDIXML_DATA_TO_DOM'
          EXPORTING
            name        = 'DATA'
            dataobject  = ls_cr_xml
          IMPORTING
            data_as_dom = if_dom
          CHANGING
            document    = if_document
          EXCEPTIONS
            OTHERS      = 1.
        IF sy-subrc NE 0.
          error_out text-f47 text-f48 space space.
        ENDIF.
      DOM-Baum in Character-Stream wandeln
        if_pixml = cl_ixml=>create( ).
        IF if_pixml IS INITIAL.
          error_out text-f50 text-f53 space space.
        ENDIF.
        if_pstreamfact = if_pixml->create_stream_factory( ).
        IF if_pstreamfact IS INITIAL.
          error_out text-f51 text-f53 space space.
        ENDIF.
        if_postream = if_pstreamfact->create_ostream_cstring( string = xml_doc ).
        IF if_pstreamfact IS INITIAL.
          error_out text-f52 text-f53 space space.
        ENDIF.
    --Encoding--
    data: gv_str type string.
    data: gv_l_xml_encoding type ref to if_ixml_encoding.
    data gv_l_resultb type boolean.
    gv_str = 'ISO-8859-1' .
    clear gv_l_xml_encoding.
          call method if_pixml->create_encoding
            EXPORTING
              byte_order    = 0
              character_set = gv_str
            RECEIVING
              rval          = gv_l_xml_encoding.
          clear gv_l_resultb.
          call method gv_l_xml_encoding->set_character_set
            EXPORTING
              charset = gv_str
            RECEIVING
              rval    = gv_l_resultb.
            call method if_document->set_encoding
            EXPORTING
              encoding = gv_l_xml_encoding.
    ----Append child -
    CALL METHOD if_document->append_child
          EXPORTING
            new_child = if_dom
          RECEIVING
            rval      = lv_return.
        IF lv_return NE 0.
          error_out text-f47 text-f49 space space.
        ENDIF.
    --Render the XML data to output stream--
        CALL METHOD if_document->render
          EXPORTING
            ostream = if_postream.
    After this section of code is executed , the variable xml_doc  gets filled up with XML data .
    <?xml version="1.0" encoding="utf-16"?><DATA><ACTION>CREATE_TICKET</ACTION><CRI
    Can anybody help how to enforce encoding ?
    Regards,
    Laxman Nayak.

    Hi Aslam Riaz,
    Did you find any solution..?
    Kindly help me on this issue.
    Thanks and Regards,
    Shailaja Chityala

  • Can a Java Mapping be used on non-xml data

    I would like to use a java mapping to transform non-xml formatted data to an IDOC or XML format.
    1) Does the input or output of a Java Map have to be XML.
    2) If possible can the test feature be used to load and test a non-xml data file.
    3) Any comments or lessons learned in this area.

    Hi Johan,
    below are some suggestions for your scenario:
    <i>
    1) Structured flat picked up using J2EE FTP adapter.</i>
    Indeed; you can use the file adapter to receive/retrieve this file from "any" third party system.
    <i>2) Structured flat converted to XML (Using JAVA mapping?)</i>
    When you send any message to XI, it's the adapter's task to convert this message into a XI understandable format i.e. SOAP. So the flat file to XML conversion is not your concern.
    However, if you need to perform any data transformation (input file to IDOC) then you can opt for XSLT (XML stylesheets),  Java mappings or the XI mapping tool within the repository. Based on my own experience with IDOC mapping, I can tell you that XSLT and/or Java mapping is the best way to achieve this kind of mapping.
    <i>3) XML mapped to SAP IDoc using graphical editor.</i>
    See comments point 2)
    Cheers,
    Rob.
    Message was edited by: Rob Viana

  • Data template - no xml data?

    Hello,
    I have a data template that does not seem to want to display my data. I am at a loss as to why… The select works and returns the data correctly.
    Data I get when I run the select is from SQL Developer:
    01-JAN-08     Hourly     1155     31     0
    01-JAN-08     Salary     269     1     0
    01-FEB-08     Hourly     1196     56     2
    01-FEB-08     Salary     271     0     2
    01-MAR-08     Hourly     1396     45     0
    01-MAR-08     Salary     316     6     0
    My data template is here:
    <dataTemplate name="AZZ_HR_TURNOVER">
         <!-- Confidential and Copyright AZZ Inc. -->
         <properties>
              <property name="xml_tag_case" value="upper"/>
         </properties>
         <parameters>
              <parameter name="P_START_DATE" dataType="date"/>
              <parameter name="P_END_DATE" dataType="date"/>
         </parameters>
         <dataQuery>
              <sqlStatement name="Q_AZZ_HR_TURNOVER">
                   <![CDATA[
    SELECT TURNOVER_MONTH AZZ_TURNOVER_MONTH,
    decode(pay_basis, 'CAN Hourly', 'Hourly', 'CAN Salary', 'Salary', pay_basis) AZZ_PAY_BASIS,
    COUNT(
    CASE
    WHEN pps_date_start <= trunc(TURNOVER_MONTH,'MM')
    AND pps_actual_termination_date IS NULL OR pps_actual_termination_date >= trunc(TURNOVER_MONTH,'MM')
    THEN 1 --active during period
    END) EE_ACTIVE,
    COUNT(
    CASE
    WHEN pps_actual_termination_date IS NOT NULL
    AND pps_actual_termination_date BETWEEN trunc(TURNOVER_MONTH,'MM') AND last_day(TURNOVER_MONTH)
    THEN 'T' --term during period
    END) EE_TERM,
    COUNT(
    CASE
    WHEN pps_date_start BETWEEN trunc(TURNOVER_MONTH,'MM') AND last_day(TURNOVER_MONTH)
    THEN 'N' --new hire
    END) EE_NEWHIRE
    FROM (
    SELECT ppb.name pay_basis,
    pps.date_start pps_date_start,
    pps.actual_termination_date pps_actual_termination_date,
    TURNOVER_MONTH
    FROM per_all_people_f ppf,
    per_periods_of_service pps,
    per_all_assignments_f asg,
    hr_soft_coding_keyflex hsck,
    hr_all_organization_units hou_gre,
    hr_all_organization_units hou,
    per_person_type_usages_f pptu,
    per_person_types ppt,
    per_pay_bases ppb,
    hr_lookups hrl_l,
    (SELECT DISTINCT(TRUNC(to_date(substr(:p_start_date,1,10),'YYYY-MM-DD') + rownum -1, 'MM')) turnover_month
    FROM all_objects
    WHERE rownum <= to_date(substr(:p_end_date,1,10),'YYYY-MM-DD') - to_date(substr(:p_start_date,1,10),'YYYY-MM-DD') + 1)
    WHERE ppf.person_id = pps.person_id
    AND ppf.person_id = asg.person_id
    AND asg.pay_basis_id = ppb.pay_basis_id
    AND pps.period_of_service_id = asg.period_of_service_id
    AND asg.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id
    AND hsck.segment1 = hou_gre.organization_id
    AND hsck.enabled_flag = 'Y'
    AND asg.primary_flag = 'Y'
    AND asg.assignment_type = 'E'
    AND asg.organization_id = hou.organization_id
    AND ppf.person_id = pptu.person_id
    AND pptu.person_type_id = ppt.person_type_id
    AND user_person_type IN ('Employee','Ex-employee')
    AND hrl_l.lookup_type(+) = 'LEAV_REAS'
    AND hrl_l.lookup_code(+) = pps.leaving_reason
    AND date_start = (SELECT MAX(date_start)
    FROM per_periods_of_service pps1
    WHERE pps1.period_of_service_id = pps.period_of_service_id
    AND date_start <= last_day(TURNOVER_MONTH) )
    AND ppf.effective_start_date = (SELECT MAX(effective_start_date)
    FROM per_all_people_f ppf1
    WHERE ppf1.person_id = ppf.person_id
    AND effective_start_date <= last_day(TURNOVER_MONTH) )
    AND asg.effective_start_date = (SELECT MAX(effective_start_date)
    FROM per_all_assignments_f asg1
    WHERE asg1.person_id = asg.person_id
    AND effective_start_date <= last_day(TURNOVER_MONTH) )
    AND pptu.effective_start_date = (SELECT MAX(effective_start_date)
    FROM per_person_type_usages_f pptu1,
    per_person_types ppt1
    WHERE pptu1.person_id = pptu.person_id
    AND pptu1.person_type_id = ppt1.person_type_id
    AND ppt1.user_person_type IN ('Employee','Ex-employee')
    AND effective_start_date <= last_day(TURNOVER_MONTH) )
    AND last_day(TURNOVER_MONTH) BETWEEN NVL(hou.date_from,last_day(TURNOVER_MONTH)) AND NVL(hou.date_to, last_day(TURNOVER_MONTH))
    AND last_day(TURNOVER_MONTH) BETWEEN NVL(hou_gre.date_from,last_day(TURNOVER_MONTH)) AND NVL(hou_gre.date_to, last_day(TURNOVER_MONTH))
    AND last_day(TURNOVER_MONTH) BETWEEN NVL(hsck.start_date_active,last_day(TURNOVER_MONTH)) AND NVL(hsck.end_date_active, last_day(TURNOVER_MONTH))
    AND TRUNC(pps.date_start) != TRUNC(NVL(pps.actual_termination_date, to_date('31-DEC-4712','DD-MON-YYYY')))
    WHERE pps_date_start <= trunc(TURNOVER_MONTH,'MM')
    AND (pps_actual_termination_date IS NULL OR pps_actual_termination_date >= trunc(TURNOVER_MONTH,'MM'))
    GROUP BY TURNOVER_MONTH,
    decode(pay_basis, 'CAN Hourly', 'Hourly', 'CAN Salary', 'Salary', pay_basis)
    ORDER BY TURNOVER_MONTH,
    decode(pay_basis, 'CAN Hourly', 'Hourly', 'CAN Salary', 'Salary', pay_basis)
    ]]>
              </sqlStatement>
         </dataQuery>
         <dataStructure>
              <group name="G_TURNOVER_MONTH" dataType="varchar2" source="Q_AZZ_HR_TURNOVER">
                   <element name="AZZ_TURNOVER_MONTH" dataType="varchar2" value="AZZ_TURNOVER_MONTH"/>
                   <group name="G_AZZ_PAY_BASIS" dataType="varchar2" source="Q_AZZ_HR_TURNOVER">
                        <element name="AZZ_PAY_BASIS" dataType="varchar2" value="AZZ_PAY_BASIS"/>
                        <group name="G_AZZ_EE_COUNT" dataType="varchar2" source="Q_AZZ_HR_TURNOVER">
                             <element name="EE_ACTIVE" dataType="varchar2" value="EE_ACTIVE"/>
                             <element name="EE_TERM" dataType="varchar2" value="EE_TERM"/>
                             <element name="EE_NEWHIRE" dataType="varchar2" value="EE_NEWHIRE"/>
                        </group>
                   </group>
              </group>
         </dataStructure>
         <dataTrigger name="afterReportTrigger" source="AZZ_HR_TURNOVER.afterreport()"/>
    </dataTemplate>
    And the only output I am getting are my parms and my first group:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <AZZ_HR_TURNOVER>
    <P_START_DATE>2008-01-01 00:00:00.0</P_START_DATE>
    <P_END_DATE>2008-07-15 00:00:00.0</P_END_DATE>
    <LIST_G_TURNOVER_MONTH />
    </AZZ_HR_TURNOVER>
    Any asistance is much appreciated.
    Scott

    Thanks, but I just found the problem... Never trust Oracle to handle date conversions, esp in BIP. The corrected template below -- only change was the dataType of my parms to char (!)
    Scott
    <dataTemplate name="AZZ_HR_TURNOVER">
         <!-- Confidential and Copyright AZZ Inc. -->
         <properties>
              <property name="xml_tag_case" value="upper"/>
         </properties>
         <parameters>
              <parameter name="P_START_DATE" dataType="char"/>
              <parameter name="P_END_DATE" dataType="char"/>
         </parameters>
         <dataQuery>
              <sqlStatement name="Q_AZZ_HR_TURNOVER">
                   <![CDATA[
    SELECT substr(to_char(TURNOVER_MONTH),1,10) AZZ_TURNOVER_MONTH,
    decode(pay_basis, 'CAN Hourly', 'Hourly', 'CAN Salary', 'Salary', pay_basis) AZZ_PAY_BASIS,
    COUNT(
    CASE
    WHEN pps_date_start <= trunc(TURNOVER_MONTH,'MM')
    AND pps_actual_termination_date IS NULL OR pps_actual_termination_date >= trunc(TURNOVER_MONTH,'MM')
    THEN 1 --active during period
    END) EE_ACTIVE,
    COUNT(
    CASE
    WHEN pps_actual_termination_date IS NOT NULL
    AND pps_actual_termination_date BETWEEN trunc(TURNOVER_MONTH,'MM') AND last_day(TURNOVER_MONTH)
    THEN 'T' --term during period
    END) EE_TERM,
    COUNT(
    CASE
    WHEN pps_date_start BETWEEN trunc(TURNOVER_MONTH,'MM') AND last_day(TURNOVER_MONTH)
    THEN 'N' --new hire
    END) EE_NEWHIRE
    FROM (
    SELECT ppb.name pay_basis,
    pps.date_start pps_date_start,
    pps.actual_termination_date pps_actual_termination_date,
    TURNOVER_MONTH
    FROM per_all_people_f ppf,
    per_periods_of_service pps,
    per_all_assignments_f asg,
    hr_soft_coding_keyflex hsck,
    hr_all_organization_units hou_gre,
    hr_all_organization_units hou,
    per_person_type_usages_f pptu,
    per_person_types ppt,
    per_pay_bases ppb,
    hr_lookups hrl_l,
    (SELECT DISTINCT(TRUNC(to_date(substr(:p_start_date,1,10),'YYYY-MM-DD') + rownum -1, 'MM')) turnover_month
    FROM all_objects
    WHERE rownum <= to_date(substr(:p_end_date,1,10),'YYYY-MM-DD') - to_date(substr(:p_start_date,1,10),'YYYY-MM-DD') + 1)
    WHERE ppf.person_id = pps.person_id
    AND ppf.person_id = asg.person_id
    AND asg.pay_basis_id = ppb.pay_basis_id
    AND pps.period_of_service_id = asg.period_of_service_id
    AND asg.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id
    AND hsck.segment1 = hou_gre.organization_id
    AND hsck.enabled_flag = 'Y'
    AND asg.primary_flag = 'Y'
    AND asg.assignment_type = 'E'
    AND asg.organization_id = hou.organization_id
    AND ppf.person_id = pptu.person_id
    AND pptu.person_type_id = ppt.person_type_id
    AND user_person_type IN ('Employee','Ex-employee')
    AND hrl_l.lookup_type(+) = 'LEAV_REAS'
    AND hrl_l.lookup_code(+) = pps.leaving_reason
    AND date_start = (SELECT MAX(date_start)
    FROM per_periods_of_service pps1
    WHERE pps1.period_of_service_id = pps.period_of_service_id
    AND date_start <= last_day(TURNOVER_MONTH) )
    AND ppf.effective_start_date = (SELECT MAX(effective_start_date)
    FROM per_all_people_f ppf1
    WHERE ppf1.person_id = ppf.person_id
    AND effective_start_date <= last_day(TURNOVER_MONTH) )
    AND asg.effective_start_date = (SELECT MAX(effective_start_date)
    FROM per_all_assignments_f asg1
    WHERE asg1.person_id = asg.person_id
    AND effective_start_date <= last_day(TURNOVER_MONTH) )
    AND pptu.effective_start_date = (SELECT MAX(effective_start_date)
    FROM per_person_type_usages_f pptu1,
    per_person_types ppt1
    WHERE pptu1.person_id = pptu.person_id
    AND pptu1.person_type_id = ppt1.person_type_id
    AND ppt1.user_person_type IN ('Employee','Ex-employee')
    AND effective_start_date <= last_day(TURNOVER_MONTH) )
    AND last_day(TURNOVER_MONTH) BETWEEN NVL(hou.date_from,last_day(TURNOVER_MONTH)) AND NVL(hou.date_to, last_day(TURNOVER_MONTH))
    AND last_day(TURNOVER_MONTH) BETWEEN NVL(hou_gre.date_from,last_day(TURNOVER_MONTH)) AND NVL(hou_gre.date_to, last_day(TURNOVER_MONTH))
    AND last_day(TURNOVER_MONTH) BETWEEN NVL(hsck.start_date_active,last_day(TURNOVER_MONTH)) AND NVL(hsck.end_date_active, last_day(TURNOVER_MONTH))
    AND TRUNC(pps.date_start) != TRUNC(NVL(pps.actual_termination_date, to_date('31-DEC-4712','DD-MON-YYYY')))
    WHERE pps_date_start <= trunc(TURNOVER_MONTH,'MM')
    AND (pps_actual_termination_date IS NULL OR pps_actual_termination_date >= trunc(TURNOVER_MONTH,'MM'))
    GROUP BY TURNOVER_MONTH,
    decode(pay_basis, 'CAN Hourly', 'Hourly', 'CAN Salary', 'Salary', pay_basis)
    ORDER BY TURNOVER_MONTH,
    decode(pay_basis, 'CAN Hourly', 'Hourly', 'CAN Salary', 'Salary', pay_basis)
    ]]>
              </sqlStatement>
         </dataQuery>
         <dataStructure>
              <group name="G_TURNOVER_MONTH" dataType="varchar2" source="Q_AZZ_HR_TURNOVER">
                   <element name="AZZ_TURNOVER_MONTH" dataType="varchar2" value="AZZ_TURNOVER_MONTH"/>
                   <group name="G_AZZ_PAY_BASIS" dataType="varchar2" source="Q_AZZ_HR_TURNOVER">
                        <element name="AZZ_PAY_BASIS" dataType="varchar2" value="AZZ_PAY_BASIS"/>
                        <group name="G_AZZ_EE_COUNT" dataType="varchar2" source="Q_AZZ_HR_TURNOVER">
                             <element name="EE_ACTIVE" dataType="varchar2" value="EE_ACTIVE"/>
                             <element name="EE_TERM" dataType="varchar2" value="EE_TERM"/>
                             <element name="EE_NEWHIRE" dataType="varchar2" value="EE_NEWHIRE"/>
                        </group>
                   </group>
              </group>
         </dataStructure>
         <dataTrigger name="afterReportTrigger" source="AZZ_HR_TURNOVER.afterreport()"/>
    </dataTemplate>

  • XML Date File into PDF

    I have an XML data file that I want to use to populate a pdf fill-out form. There is enough data in the file to populate several forms. Is there a way of moving each set of data from this XML file into a seperate pdf fill-out form?

    Hi,
    There are many ways to convert XML files to PDFs through java.
    One of the easiest way is by using iText.jar which have classes for conversion.
    The following are the required steps
    1. Create a document object for the XML file ( Using DOM or SAX parser).
    2. Parse the xml document and extract the content to write in PDF.
    3.Create a itext Document object.
    4.Get a PdfWriter instance for the PDF file.
    5.Write in the pdf the extracted text using the document object.
    Refer <a href="http://itextdocs.lowagie.com/examples/com/lowagie/examples/general/HelloWorld.java">here</a> for a simple pdf writer example.
    Refer <a href="http://java.sun.com/developer/codesamples/xml.html">here</a> for examples of XML Parsers.
    Regards,
    Uma

  • Loading XML Data into Relational Table

    Hello,
    I receive an XML file generated from another tool (on Windows), I am trying to create a Linux shell script that will gather the needed XML file from my Linux database server, then have Oracle use this file to load the XML data into a relational table. This activity & data will be needed on an ongoing basis.
    I have tried this two ways. First, I loaded the XML document into the database and tried to extract the data directly from the document, but that is not working. Now I want to try to read the data directly from the file on the server via select, however I am not getting any data returned. In the Select statement below, I am simply trying to query the data to see what is returned for my testing.
    Create Table ci_results_table (transactionID Varchar2(100), //transactionID should be PrimaryKey but was getting NULL value errors during insert test, so removed PK
    message Varchar2(200),
    ci Varchar2(50),
    processeddate xmltype,
    status Varchar2(50),
    sourcefile VarChar2(100));
    select x.*
    from XMLTable(
         'TSPLoadResults/Results'
         PASSING xmltype(bfilename('CMDB_DEVADHOCRESULTS_DIR','LoadResults-HP_146.results.xml'), nls_charset_id('AL32UTF8'))
         COLUMNS
           transactionID Varchar2(100) PATH 'TransactionID',
           Result XMLType PATH 'Result',
           Message Varchar2(200) PATH 'Message',
           PrimaryKey Varchar2(50) PATH 'PrimaryKey',
           ProcessedDate date PATH 'ProcessedDate',
           Status Varchar2(50) PATH 'Status',
           SourceFile VarChar2(100) PATH 'SourceFileName'
       ) x
    Eventually I will need to build on this to limit the data returned to those records where SourceFileName is like 'HPDS%' and insert what is returned in to the ci_results_table. Attached is a sample Results XML file I am trying to load, It is named "ResultsTransformedtoUnix" because I used dos2Unix to convert it to Unix which may be right or wrong. (The output file I send out has to be transformed to DOS format before the other application can read it). Original file (before Unix conversion) named in script is also attached.
    Please help. Thank you!

    Hi,
    I see some wrong things in your query.
    1) The obvious one, explaining why you're not getting any data : there's a typo in the XQuery expression, it's "Result" not "Results"
    2) ProcessedDate cannot be extracted as a date (at least not directly) since it actually represents a timestamp, use TIMESTAMP WITH TIME ZONE datatype and cast back to DATE in the SELECT clause
    3) transactionID is an attribute, it must be accessed with '@' (or 'attribute::' axis)
    4) If the file encoding is truly ISO-8859-1 as the prolog suggests, then do not use AL32UTF8 but the corresponding charset name : WE8ISO8859P1
    Here's the working query :
    select x.transactionID
         , x.Message
         , x.Primarykey
         , cast(x.ProcessedDate as date) ProcessDate
         , x.Status
         , x.SourceFile
    from XMLTable(
           '/TSPLoadResults/Result'
           PASSING xmltype(bfilename('XML_DIR','LoadResults-HP_146.results.xml'), nls_charset_id('WE8ISO8859P1'))
           COLUMNS
             transactionID Varchar2(100)            PATH '@transactionID',
             Message       Varchar2(200)            PATH 'Message',
             PrimaryKey    Varchar2(50)             PATH 'PrimaryKey',
             ProcessedDate timestamp with time zone PATH 'ProcessedDate',
             Status        Varchar2(50)             PATH 'Status',
             SourceFile    VarChar2(100)            PATH 'SourceFileName'
         ) x
    Using this query directly over the file will only perform decently (for large files) on 11.2.0.4 and onwards.
    On prior versions, first load the file in a (temporary) XMLType column with Binary XML storage and SELECT from there.
    because I used dos2Unix to convert it to Unix which may be right or wrong.
    This conversion shouldn't be necessary.

  • Can Discoverer be used as an XML Data source for XMLP ?

    I am wondering if Discoverer can generate an XML Data Source for XMPL.
    I have heard that Discoverer Viewer can have XML as an output. Is there a way of using this XML output with XMLP and, if yes, how to batch both steps ?

    Hi
    My understanding is that Discoverer does not generate XML data as an ouput that XMLP can consume. The XML is does generate is actually an XML RDF for Oracle Reports.
    XMLP is integrated thou, when you export your Disco report to PDF thats XMLP doing the conversion to PDF for you.
    Regards, Tim

  • Error during XML = ABAP conversion, empty tag

    Hi.
    Im sending data from a Data Base to a proxy using BI.
    But when I get an empty response from the data base wich gives me an empty XML tag the proxy shows me an error:
    -PARSE_APPLICATION_DATA Error during XML => ABAP conversion (Response  Message; error ID: CX_ST_MATCH_ELEMENT;
    -Error during XML => ABAP conversion (Response Message; error ID: CX_ST_MATCH_ELEMENT;
    -System expected the end of the element 'STMT_DC_response'          
    This is the message that originates the fail:
    <?xml version="1.0" encoding="utf-8" ?>
    <ns0:MT_PRV23_BS_desg_response xmlns:ns0="urn:tompla-com:xi:ventas_SD">
    <STMT_response>
      <row>
       <TIPO>P</TIPO>
       <NUM_OT>55062330</NUM_OT>
       <NUM_DESGLOSE>1</NUM_DESG>
       <CANT_DESG>1724000</CANT_DESG>
      </row>
    </STMT_response>
    <STMT_DC_response />
    </ns0:MT_PRV23_BD_desg_response>
    In case that the tag is filled runs ok
    <?xml version="1.0" encoding="utf-8" ?>
    <ns0:MT_PRV23_BD_desg_response xmlns:ns0="urn:tompla-com:xi:ventas_SD">
      <STMT_response>
       <row>
        <TIPO>P</TIPO>
        <NUM_OT>55062330</NUMERO_OT>
        <NUM_DESG>1</NUM_DESG>
        <CANT_DESG>1724000</CANT_DESG>
       </row>
      </STMT_response>
      <STMT_DC_response>
       <row>
        <TIPO>P</TIPO>
        <NUMERO_OT>55062330</NUMERO_OT>
        <NUMERO_DESGLOSE />
        <COD_CAR_ADICIONA>8</COD_CAR_ADICIONA>
        <PORC_CAR_ADICION>1</PORC_CAR_ADICION>
      </row>
      </STMT_DC_response>
    </ns0:MT_PRV23_BD_desg_response>
    The definition for the data is:
    STMT_DC_response        0..1
      row                               0..n
        tipo                             0..1
    Thanks for the help you can give me about my problem with empty tags.

    I moved this question to other forum
      Expert Forums  » SAP NetWeaver  » Exchange Infrastructure 

Maybe you are looking for

  • SQL Server 2005 to Oracle via OLE DB

    I've got a project where I need to access several tables in an Oracle (9i) database from SQL Server 2005. I installed the Oracle OLE DB provider and the Oracle 9i client. I can access the tables via the Oracle client without issue. I tried creating a

  • Looking for Quality 3rd Party Monitors

    We have an office of 15 or so Macs and are slowly moving to dual display. We are replacing our 27 inch Macs with 21.5 inch - then with a 2nd monitor. Can anybody recommend any top quality third party monitors? a)  That have a resolution that doesn't

  • Units of measure and conversion factor

    while executing a session, I get the message 'Please check units of measure and conversion factor', what does it indicate? there are fields like order unit, conversion (purchasing) in creating info records transaction ME11.

  • Elements 13 will not open slideshows from Elements 11

    Upgraded to Photoshop/Premiere Elements 13 and when I try to open slide shows created in Elements 11 and edit them I get a message "Please select some media." Slideshows still open and work in Elements 11.  Thanks

  • Samsung SE-506BB Blu-Ray Player/Writer no longer working after latest OS X update

    Since downloading the latest OS X update ("Command Line Developer Tools for OS X Mavericks") that rolled out today, I've discovered that my external Samsung SE-506BB Blu-Ray player will no longer read any discs and that ejecting and restarting the de