cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help in Sender File Content Conversion

phanikumar_akella
Participant
0 Kudos

Hi All,

I request your expert advice on Sender File content Conversion. I need to process the below pasted file. I was able to achieve this by keeping a offset of 6 in Sender PI File Adapter (PI 7.1) to ignore first 6 lines and used a Unix script to remove last line"END OF REPORT".

Now my new requirement is I need to capture the date "DECEMBER 2009" from line 3. How can I do this. I have set offset as 6 so Adapter will start processing from line 7. If I don't set offset Interface fails. Please suggest. Thank you.

ABC LAB XYZ LIMITED"

TRIAL BALANCE"

FOR THE PERIOD ENDED DECEMBER 2009"

"TEST Bank","101000",-1589365.58,0.00,738295.08,0.00

"TEST Bank Clearing A/c","101200",0.00,0.00,14848018.55,0.00

"TEST Bank Sweeps","101250",104315957.19,0.00,7571985482.08,0.00

"TEST Receipts","101260",0.00,0.00,19788596.15,0.00

"TEST Corporate Deposits","101270",-7776629.87,0.00,-135914980.50,0.00

"SHARES","00SH",0.00,0.00,-7869890086.22,0.00

"","",,,,

"","",,,,

"END OF REPORT"

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

>

> Hi All,

>

> I request your expert advice on Sender File content Conversion. I need to process the below pasted file. I was able to achieve this by keeping a offset of 6 in Sender PI File Adapter (PI 7.1) to ignore first 6 lines and used a Unix script to remove last line"END OF REPORT".

>

> Now my new requirement is I need to capture the date "DECEMBER 2009" from line 3. How can I do this. I have set offset as 6 so Adapter will start processing from line 7. If I don't set offset Interface fails. Please suggest. Thank you.

>

>

>

> ABC LAB XYZ LIMITED"

> TRIAL BALANCE"

> FOR THE PERIOD ENDED DECEMBER 2009"

>

>

>

> "TEST Bank","101000",-1589365.58,0.00,738295.08,0.00

> "TEST Bank Clearing A/c","101200",0.00,0.00,14848018.55,0.00

> "TEST Bank Sweeps","101250",104315957.19,0.00,7571985482.08,0.00

> "TEST Receipts","101260",0.00,0.00,19788596.15,0.00

> "TEST Corporate Deposits","101270",-7776629.87,0.00,-135914980.50,0.00

> "SHARES","00SH",0.00,0.00,-7869890086.22,0.00

> "","",,,,

> "","",,,,

> "END OF REPORT"

Will the structure be always similar to the above?

If so you can easily code a module which will remove the first 2 lines and the blank lines after the third header.

Then use message transformbean to do the FCC.

You can then handle the rest in your mapping.

Answers (1)

Answers (1)

former_member556603
Active Contributor
0 Kudos

Dear Phani,

Please go through the below blogs:

File content conversion sites

/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1

/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter

/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1

/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter

/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns

/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

Please see the below links for file content conversion..

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC

File Content Conversion for Unequal Number of Columns

/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns - FCC

Thanks,

Satya

phanikumar_akella
Participant
0 Kudos

Hi Satya,

Thanks for the blogs. If possible can you please go through the issues I am facing and kindly suggest your design.

Thank you.

Former Member
0 Kudos

Hi

Instead of setting the offset 6. Try change your sender structure

Header,3,blank,3,items,*

Header.fieldSeparator "

Header.endSeparator 'nl'

blank.fieldSeparator 'nl'

blank.endSeparator 'nl'

then include your already exiting FCC for the line items

Regards

Ramg