cancel
Showing results for 
Search instead for 
Did you mean: 

File content conversion for Idoc Structure

Former Member
0 Kudos

Hi Experts,

We have a scenario where we have to write Idoc Structure to a flat file with required format from where it will be picked up by third party.

the strcuture is like this:

- <IDOCNAME>

- <IDOC BEGIN="1">

- <EDI_DC40 SEGMENT="1">

<TABNAM />

<MANDT />

<DOCNUM />

....other fields

- <E1EDK01 SEGMENT="1">

<BELNR>0000000779</BELNR>

</E1EDK01>

<E1EDK01 SEGMENT="1">

<BELNR>0000000780</BELNR>

</E1EDK01>

- <E1EDP01 SEGMENT="1">

<WERKS>2000071687</WERKS>

<MENGE>1800.0</MENGE>

<MENEE>PCE</MENEE>

<POSEX>00010</POSEX>

- <E1EDP02 SEGMENT="1">

<QUALF>001</QUALF>

<BELNR>5000000825</BELNR>

<ZEILE>00010</ZEILE>

</E1EDP02>

- <E1EDP02 SEGMENT="1">

<QUALF>066</QUALF>

<BELNR>0000000779</BELNR>

<ZEILE>000010</ZEILE>

</E1EDP02>

- <E1EDP02 SEGMENT="1">

<QUALF>083</QUALF>

<BELNR>2000071687</BELNR>

</E1EDP02>

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

This blog also can be useful for you,

/people/krishnakumar.ramamoorthy3/blog/2007/01/27/generic-mapping-to-convert-nested-xml-to-flat--receiver-file-adatper

Regards,

Madhav

Note: Points If Useful.

former_member206760
Active Contributor
0 Kudos

Dear Jyoti,

FCC supports structures only upto 3 levels:

/people/shabarish.vijayakumar/blog/2007/08/03/file-adapter-receiver--are-we-really-sure-about-the-concepts

so i suggest you use the following blog to implement your scenario.

/people/stefan.grube/blog/2006/09/18/collecting-idocs-without-using-bpm

or else modify your target structure to support the FCC.( if your target sys guys agree that is)...

just a word of caution.....this is a very tricky requirement that you are talking about....just implement a prototype ..get yourself clear with the requirements...

prateek
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Experts,

I was not able to post the full question.

Please find the full question.

We have a scenario where we have to write Idoc Structure to a flat file with required format from where it will be picked up by third party.

the strcuture is like this:

- <IDOCNAME>

- <IDOC BEGIN="1">

- <EDI_DC40 SEGMENT="1">

<TABNAM />

<MANDT />

<DOCNUM />

....other fields

- <E1EDK01 SEGMENT="1">

<BELNR>0000000779</BELNR>

</E1EDK01>

<E1EDK01 SEGMENT="1">

<BELNR>0000000780</BELNR>

</E1EDK01>

- <E1EDP01 SEGMENT="1">

<WERKS>2000071687</WERKS>

<MENGE>1800.0</MENGE>

<MENEE>PCE</MENEE>

<POSEX>00010</POSEX>

- <E1EDP02 SEGMENT="1">

<QUALF>001</QUALF>

<BELNR>5000000825</BELNR>

<ZEILE>00010</ZEILE>

</E1EDP02>

- <E1EDP02 SEGMENT="1">

<QUALF>066</QUALF>

<BELNR>0000000779</BELNR>

<ZEILE>000010</ZEILE>

</E1EDP02>

- <E1EDP02 SEGMENT="1">

<QUALF>083</QUALF>

<BELNR>2000071687</BELNR>

</E1EDP02>

all other segments

we would nee the output from fcc as

EDI_DC40 4000000000032957472700 0312 IDOCNAME

E1EDK01 400000000003295747200000100000001 XUSD 6.66667 ZP60

E1EDP01 40000000000329574720000180000000200010 0010X100.000 PCE100.000 PCE 0.99 1 99 151 KGM 305 1 1 2383 901

E1EDP02 4000000000032957472000019000018030054600002428 00010

so on

please advise as how to approach and what parameters we need to use

we have used in our fcc recordset structure as

EDI_DC40,E1EDK01,E1EDP01,E1EDP02,other segments

and used

EDI_DC40,fieldseparator as Tab(used hex code for Tab)

EDI_DC40.endseparator as 'nl'

so on for other segments

we are not getting the output as we need with the segment names as well

Please advice.

Many thanks.

Regards,

J

prateek
Active Contributor
0 Kudos

Create a file port in SAP system and try to send an idoc to it. A file would get created. Check if that structure is similar to what you require in your case. If yes, then proceed as I replied in first case. Otherwise or in any case, you cannot use FCC as you cannot convert multiple heirarchy structures to flat file using FCC.

Regards,

Prateek