2 Replies Latest reply on Jan 6, 2016 5:21 PM by Hussein Sawwan-Oracle

    The file should be in XML-DATA-TEMPLATE format

    LokeshSurana

      Hi

       

      Am get error while uploading XML Data template.

       

      Please help me out for same.

       

      Below is My data template

      <?xml version="1.0" encoding="UTF-8" ?>

      <dataTemplate name="XX_ASSET_REPORT" description="XX_ASSET_REPORT" version="1.0">

      <parameters>

      <parameter name="P_DATE" dataType="date" />

      </parameters>

      <dataQuery>

      <sqlStatment name="Q_HDR">

      <![CDATA [SELECT distinct

      FAB.ASSET_TYPE ASSET_CLASS,

      FAB.ASSET_NUMBER  ASSET,

      FAB.SERIAL_NUMBER,

      FAB.ASSET_NUMBER ASSET_NAME,

      FAT.DESCRIPTION ASSET_DESCRITPION,

      FAB.attribute_category_code CATEGORY_CODE,

      FLK.CONCATENATED_SEGMENTS LOCATION_NO,

      (select DESCRIPTION from FND_FLEX_VALUES_VL where FLEX_VALUE_SET_ID=1012910 and flex_value=(

      select segment4 from GL.GL_CODE_COMBINATIONS

      where CODE_COMBINATION_ID=(select CODE_COMBINATION_ID from FA_DISTRIBUTION_HISTORY where asset_id=fat.asset_id)))LOCATION_NAME,

      FB.ORIGINAL_COST ASSET_COST,

      FDS.DEPRN_RESERVE ACCUMULATED_DEPRECIATION,

      GSOB.CURRENCY_CODE CURRENCY_CODE,

      FB.DATE_PLACED_IN_SERVICE,

      FDS.DEPRN_RUN_DATE LAST_POSTING_DATE,

      FAB.TAG_NUMBER ASSET_TAG,

      FAB.ASSET_ID ASSET_ID,

      FB.BOOK_TYPE_CODE BOOK,

      FAI.AP_DISTRIBUTION_LINE_NUMBER INVOICE_LINE,

      FAI.FIXED_ASSETS_COST INVOICE_LINE_AMOUNT,

      PV.VENDOR_NAME VENDOR,

      FAI.INVOICE_NUMBER APBILL

      FROM

      APPS.FA_ADDITIONS_B FAB,

      APPS.FA_ADDITIONS_TL FAT,

      APPS.FA_BOOKS FB,

      APPS.FA_DISTRIBUTION_HISTORY FDH,

      APPS.FA_LOCATIONS_KFV FLK,

      APPS.GL_CODE_COMBINATIONS_KFV GCCK,

      APPS.FA_DEPRN_SUMMARY FDS,

      APPS.GL_SETS_OF_BOOKS  GSOB,

      APPS.FA_ASSET_INVOICES FAI LEFT OUTER JOIN APPS.PO_VENDORS PV ON FAI.PO_VENDOR_ID =PV.VENDOR_ID

      WHERE

      FAB.ASSET_ID=FAT.ASSET_ID

      AND FAB.ASSET_ID=FDH.ASSET_ID

      AND FAB.ASSET_ID=FB.ASSET_ID

      AND FDH.DATE_INEFFECTIVE IS NULL

      AND FDS.ASSET_ID=FB.ASSET_ID

      AND FDS.BOOK_TYPE_CODE = FB.BOOK_TYPE_CODE

      AND FDS.DEPRN_SOURCE_CODE='DEPRN'

      AND FDS.PERIOD_COUNTER =(SELECT MAX(PERIOD_COUNTER) FROM APPS.FA_DEPRN_SUMMARY FDSS WHERE FDSS.DEPRN_SOURCE_CODE='DEPRN' AND FDSS.ASSET_ID=FB.ASSET_ID AND FDSS.BOOK_TYPE_CODE=FB.BOOK_TYPE_CODE)

      AND FB.TRANSACTION_HEADER_ID_IN=(SELECT MAX(TRANSACTION_HEADER_ID_IN) FROM APPS.FA_BOOKS FB1 WHERE FB1.ASSET_ID=FB.ASSET_ID AND FB1.BOOK_TYPE_CODE=FB.BOOK_TYPE_CODE)

      AND FB.PERIOD_COUNTER_FULLY_RETIRED IS NULL

      AND FDH.LOCATION_ID=FLK.LOCATION_ID

      AND GCCK.CODE_COMBINATION_ID = FDH.CODE_COMBINATION_ID

      AND GCCK.CHART_OF_ACCOUNTS_ID=GSOB.CHART_OF_ACCOUNTS_ID

      AND FAT.LANGUAGE = USERENV('LANG')

      AND FB.BOOK_TYPE_CODE= 'AE CORP BOOK'

      AND GSOB.CURRENCY_CODE='AED'

      And Fab.Asset_Id=Fai.Asset_Id

      and fai.DATE_INEFFECTIVE IS NULL

      AND FB.DATE_PLACED_IN_SERVICE &lt;=:P_DATE

      ORDER BY FAB.ASSET_ID,FB.BOOK_TYPE_CODE

      ]]>

      </sqlStatment>

      </dataQuery>

      <dataStructure>

      <group name="G_ASSET" source="Q_HDR">

      <element name="ASSET_CLASS" value="ASSET_CLASS"/>

      <element name="ASSET" value="ASSET"/>

      <element name="SERIAL_NUMBER" value="SERIAL_NUMBER"/>

      <element name="ASSET_NAME" value="ASSET_NAME"/>

      <element name="ASSET_DESCRITPION" value="ASSET_DESCRITPION"/>

      <element name="CATEGORY_CODE" value="CATEGORY_CODE"/>

      <element name="LOCATION_NO" value="LOCATION_NO"/>

      <element name="LOCATION_NAME" value="LOCATION_NAME"/>

      <element name="ASSET_COST" value="ASSET_COST"/>

      <element name="ACCUMULATED_DEPRECIATION" value="ACCUMULATED_DEPRECIATION"/>

      <element name="CURRENCY_CODE" value="CURRENCY_CODE"/>

      <element name="DATE_PLACED_IN_SERVICE" value="DATE_PLACED_IN_SERVICE"/>

      <element name="LAST_POSTING_DATE" value="LAST_POSTING_DATE"/>

      <element name="ASSET_TAG" value="ASSET_TAG"/>

      <element name="ASSET_ID" value="ASSET_ID"/>

      <element name="BOOK" value="BOOK"/>

      <element name="INVOICE_LINE" value="INVOICE_LINE"/>

      <element name="INVOICE_LINE_AMOUNT" value="INVOICE_LINE_AMOUNT"/>

      <element name="VENDOR" value="VENDOR"/>

      <element name="APBILL" value="APBILL"/>

      </group>

      </dataStructure>

      </dataTemplate>

       

      Thanks.