cancel
Showing results for 
Search instead for 
Did you mean: 

FILE TO IDOC MAPPING Query

Former Member
0 Kudos

Hi Experts

I have facing some confusion when i am doing mapping for my scenario FILE to IDOC.

The IDOC Structure is as follows

HeaderRecord 0-1

DataRecord1 0-unbounded

(Subnode)DataRecord2 0-unbounded

(Subnode)DataRecord4 0-unbounded

DataRecord5 0-unbounded

(subnode) DataRecord6 0-unbounded

TrailerRecord 0-1

when the DataRecord1 is executed, an idoc is generated and all the DataRecord2,DataRecord4,DataRecord6 shld come under that particular Idoc. And when another Idoc is generated,all the DataRecord2,DataRecord5,DataRecord6 shld come under that particular Idoc.

How to achieve mapping for this??

please help me out.

Edited by: vemuganti naga phalguna on Oct 27, 2010 7:56 AM

Edited by: vemuganti naga phalguna on Oct 27, 2010 7:59 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Yr Requirement is not clear.

1. What is Source file structure?

2. What is IDOC generation logic? Do you wnat to post 1 IDOC for every file or there can be multiple IDOCs for 1 file?

3. How are you generating IDOC Header and how do you want details nodes to be executed.

Plz provide this info to help further. Thanks.

-Gouri

Former Member
0 Kudos

Hi

1) Source file is Text File.

sample source data.

A|20101006142345|SAPQMP|40|

B|5999|R00003D||N|20072008|Unknown|

C|T0014|M1556||colourless Pale yellow||Receipt-Bulk|1|Yes|Y|Text||

C|T0001|M1556||Limpid liquid ||Receipt-Bulk|1|Yes|Y|Text||

C|T1379|M1398|18||23|Receipt-Bulk|1|Yes|Y|Number|mm²/s|

B|5998|R00014A||N|20072008|Unknown|

C|T0014|M0211||2.0||CoA|1|No|Y|Text||

C|T0014|M0211||2.0||Receipt-Bulk|1|No|Y|Text||

C|T0014|M0211||2.0||Transfer|1|No|Y|Text||

C|T0051|M0271|97|||CoA|1|No|Y|Number|None|

C|T0073|M1356|Pass|||Receipt-Bulk|1|No|Y|||

C|T0073|M1356|Pass|||Transfer|1|No|Y|||

C|T0025|M0331||0.880||CoA|1|No|Y||g/ml|

C|T0025|M0331||0.880||Receipt-Bulk|1|No|Y||g/ml|

C|T0025|M0331||0.880||Transfer|1|No|Y||g/ml|

C|T0001|M1556||Clear & Bright ||CoA|1|No|Y|Text||

C|T0049|M0341|28.0||32.0|CoA|1|No|Y|Number|mm²/s|

C|T0049|M0341|28.0||32.0|Receipt-Bulk|1|No|Y|Number|mm²/s|

C|T0049|M0341|28.0||32.0|Transfer|1|No|Y|Number|mm²/s|

C|T0042|M0422|||-15|CoA|1|No|Y||°C|

C|T0092|M0578|||16|CoA|1|No|Y|Number|% Loss|

C|T0021|M0199||||CoA|1|No|Y||minutes|

C|T0039|M1453|Mktble|||CoA|1|No|Y|||

C|T0050|M0341||5.1||CoA|1|No|Y|Number|mm²/s|

C|T0050|M0341||5.1||Receipt-Bulk|1|No|Y|Number|mm²/s|

C|T0050|M0341||5.1||Transfer|1|No|Y|Number|mm²/s|

C|T0026|M0412|210|||CoA|1|No|Y|Number|°C|

Z|20101006142355|SAPQMP|40|

where Records A indicate File Header, Z indicates File Trailer

Recodrs B indicateds Material header and Would be repeating multiple times

No. of B Records = No. of Idocs generated with corresponding C records data which indicates Component Rows (multiple)

i.e as many B records file contains, that many Idoc will be created

For Mapping I require B and C Records. Field Separator is Pipe | symbol

I need to Ignore A B C Z

How to define the source structure and the respective FCC Parameters

please help me out

Former Member
0 Kudos

Hi,

Create source structure like this

File

Main_header Occurence 1..1

File_Header Occurence 1..n

Data Occurence 1..n

Main_Trailer Occurence 1..1

Sender FCC

Recordset structure: MainHeader,1,FileHeader,,Data,,MainTrailer,1

Key field name indi

Mainheader.fieldSeprator |

Mainheader.endSeparator \nl

Mainheader.fieldName f1,f2,f3...

Mainheader.keyFieldValue 'A'

Fileheader.fieldSeprator |

Fileheader.endSeparator \nl

Fileheader.fieldName f1,f2,f3...

Fileheader.keyFieldValue 'B'

Data.fieldSeprator |

Data.endSeparator \nl

Data.fieldName f1,f2,f3...

Data.keyFieldValue 'C'

MainTrailer.fieldSeprator |

MainTrailer.fieldName f1,f2,f3...

MainTrailer.endSeparator \nl

MainTrailer.keyFieldValue 'D'

I hope it works

Regards,

Shradha

Answers (2)

Answers (2)

Former Member
0 Kudos

answered

Former Member
0 Kudos

Hi Vemuganti,

there are 2 options.

Option 1: you poll the file, do the content conversion in file snd cc to get xml containing all values. In consequent graphical mapping you filter afterwards based on A / B / C / Z values data you need and mapp only required values to your target idoc xml.

Option 2: you poll the file completely without any conversion and use combination of 2 mappings. a) simple java mapping to filter and create xml b) graphical mapping to mapp output from #a to idoc xml.

Regards

Rudolf