cancel
Showing results for 
Search instead for 
Did you mean: 

Idoc to Flat file Scenario - PI 7.1 EHP1

Former Member
0 Kudos

Hi Experts,

We are using PI 7.1 EHP1 SP09.

We have IDOC to FILE scneario where we want output file as Flat file (notepad).

Point is that generated SAP Idoc with its all segments and all fields needs to appear in notepad file.

Suggest what will be good approach in PI 7.1

ABAP MAPPING
Converting File Content in the Receiver Adapter
IDoc conversion adapter module

Suggest us right or different approach.

Thanks...

Accepted Solutions (1)

Accepted Solutions (1)

former_member184681
Active Contributor
0 Kudos

Hi,

You don't have to convert the IDoc to flat data manually with ABAP mapping or so, there are already some features available for your requirement. You have two options:

1. Use IDOCXmlToFlatConvertor adapter module bean to convert the IDoc XML to flat file, as described in 's blog:

William is our very own Member of the Month in SCN, and June is the Appreciation Month, so don't hesitate to like or rate the blog if you find is useful .

2. You can even achieve your scenario without using PI, simply define a file port in transaction we21 in ECC and assign this port in the outbound partner profile. The IDoc will be automatically output as a flat file by ECC, instead of passing it to PI.

Regards,

Greg

Former Member
0 Kudos

Greg, This logic worked for us.

Many Thanks to you and William.

Answers (1)

Answers (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Very simple. You need to create idoc to file scenario.  Use file content conversion on the receiver side. Import idoc as sender structure in ESR and construct flat file equivalent xml structure as receiver side structure. Pretty much same  as that of any scenario.

Integration Directory - Sender adapter is not required.  Because idoc is sent from the sap system.

Receiver side file adapter and message is content conversion. That's it.

You can search SCN for idoc sender scenario and fcc receiver scenario.

sample reference links:

http://scn.sap.com/people/shabarish.vijayakumar/blog/2007/08/03/file-adapter-receiver--are-we-really...

Hope this helps.

Former Member
0 Kudos

Hi Baskar,

Thanks for inputs. I followed the same. And output file structure is (as below) some how complex.

What would be Content conversion parameters in Receiver FCC ?

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

- <PEXR2002>

- <IDOC BEGIN="1">

+ <EDI_DC40 SEGMENT="1">

  <TABNAM>EDI_DC40</TABNAM>

  <MANDT>510</MANDT>

  <DOCNUM>0000000000199030</DOCNUM>

  <DOCREL>701</DOCREL>

  <STATUS>30</STATUS>

  <DIRECT>1</DIRECT>

  <OUTMOD>2</OUTMOD>

  <IDOCTYP>PEXR2002</IDOCTYP>

  <MESTYP>PAYEXT</MESTYP>

  <SNDPOR>SAPERQ</SNDPOR>

  <SNDPRT>LS</SNDPRT>

  <SNDPRN>ERQCLNT510</SNDPRN>

  <RCVPOR>PIQPORT</RCVPOR>

  <RCVPRT>B</RCVPRT>

  <RCVPRN>EDIDBCON</RCVPRN>

  <CREDAT>20120607</CREDAT>

  <CRETIM>111047</CRETIM>

  <SERIAL>20120607111046</SERIAL>

  </EDI_DC40>

- <E1IDKU1 SEGMENT="1">