Quantcast
Channel: SCN : Unanswered Discussions - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 6719

Converting a flat file to nested xml structure in FCC

$
0
0

Hi All,

 

I am required to convert the below flat file structure into nested xml structure as below. Do I need and intermediate structure or FCC parameters in the File adapter is enough to convert it?

 

Flat File Structure: Has a File Header (5 fields), Document Header (10 fields), Items with respect to the Document Header (12 fields)and Footer of 3 fields

Sample Source Flat File Structure:

HEADER,ABC GL DAILY,20150208,0108251.0

H,YYYYMMDD,YYYYMMDD,A1,1100,USD,,,P-YYYYMMDD-1,SDRECONYYYYMMDD,

I,10,1234567,10241420.25,10241420.25,,,12345,ACC K,ACC P,ACC20130527,RECONKEY

I,20,1234567,10241420.25,10241420.25,,,12345,ACC K,ACC P,ACC20130527,RECONKEY

 

Target XML Structure:

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

<ns0:MT_GL_DATA xmlns:ns0="urn:abc.com:ABC_To_SAPGL">

   <GL_DATA>

      <FILE_HEADER>

         <RECORD_TYPE>HEADER</RECORD_TYPE>

         <INTERFACE_NAME>ABC GL DAILY</INTERFACE_NAME>

         <CREATE_DATE>20150208</CREATE_DATE>

         <CREATE_TIME>010825</CREATE_TIME>

         <VERSION>1.0</VERSION>

      </FILE_HEADER>

      <DOCUMENT_HEADER>

         <RECORD_TYPE>H</RECORD_TYPE>

         <DOCUMENT_DATE>20150208</DOCUMENT_DATE>

         <POSTING_DATE>20150208</POSTING_DATE>

         <DOCUMENT_TYPE>A1</DOCUMENT_TYPE>

         <COMPANY_CODE>1100</COMPANY_CODE>

         <CURRENCY_KEY>USD</CURRENCY_KEY>

         <EXCHANGE_RATE/>

         <TRANSLATION_DATE/>

         <REF_DOC_NUMBER>P-20150131-1</REF_DOC_NUMBER>

         <DOC_HEADER_TEXT>SDRECON20150208</DOC_HEADER_TEXT>

         <ITEMS_RECORD>

            <RECORD_TYPE>I</RECORD_TYPE>

            <POSTING_KEY>10</POSTING_KEY>

            <ACCOUNT>1234567</ACCOUNT>

            <AMOUNT_DOC_CURR>10364721.15</AMOUNT_DOC_CURR>

            <AMOUNT_LOC_CURR>10364721.15</AMOUNT_LOC_CURR>

            <COST_CENTER/>

            <PROFIT_CENTER/>

            <ASSIGNMENT_NO>12345</ASSIGNMENT_NO>

            <REF_KEY_1>ACC K</REF_KEY_1>

            <REF_KEY_2>ACC V</REF_KEY_2>

            <REF_KEY_3>ACC20150131</REF_KEY_3>

            <RECON_KEY/>

         </ITEMS_RECORD>

         <ITEMS_RECORD>

            <RECORD_TYPE>I</RECORD_TYPE>

            <POSTING_KEY>20</POSTING_KEY>

            <ACCOUNT>1234567</ACCOUNT>

            <AMOUNT_DOC_CURR>10364721.15</AMOUNT_DOC_CURR>

            <AMOUNT_LOC_CURR>10364721.15</AMOUNT_LOC_CURR>

            <COST_CENTER/>

            <PROFIT_CENTER/>

            <ASSIGNMENT_NO>12345</ASSIGNMENT_NO>

            <REF_KEY_1>ACC K</REF_KEY_1>

            <REF_KEY_2>ACC V</REF_KEY_2>

            <REF_KEY_3>ACC20150131</REF_KEY_3>

            <RECON_KEY/>

         </ITEMS_RECORD>

      </DOCUMENT_HEADER>

   </GL_DATA>

</ns0:MT_GL_DATA>

 

Thanks,

Rajendra


Viewing all articles
Browse latest Browse all 6719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>