Flat file parsing of irregular records

Hello,

I have a issue regarding flat file parsing. I have flat file with fixed length records.
HXXXXXXXXXXXXXXX
DXXXXXXXXXXXXXXX
DXXXXXXXXXXXXXXX
83XXXXXXXXXXXXXX
83XXXXXXXXXXXXXX
83XXXXXXXXXXXXXX
DXXXXXXXXXXXXXXX
83XXXXXXXXXXXXXX
DXXXXXXXXXXXXXXX
TXXXXXXXXXXXXXXX

where H, D , 83 , T are record identifiers. D and 83 records occur in irregular fashion. I want to get all the D and 83 records in 1 list item for each D and 83.

while right now i am gettin as per above data :
3 list items for D , and 2 list items for 83 records.

Please help me what should i modify in my curent template so that it parses correctly.
attached is my current template.

please help me… its urgent…

You kind help would be more than appreciated.

Thanks a lot…!!!
Regards,
Amit
Template.txt (4.85 KB)

What you have to do it change your schema in this fashion.

(RecordIdentifier)
D (maxRepeat=unlimited)
–> D FieldDefinitions
–>83 (maxRepeat=unlimited) put this 83 record definition in the same D hierarchy
---->83 Field Definitions

This way D and 83 RecordDefinitions will loop together and test the FF parsing you should see the expected results.

HTH,
RMG

Hi RMG,

Thanks for your prompt response.
I am working on SAP BC 4.0 version. i have attahed the template.
If you could please help me by editing the template.

I dont know how to introduce max repeats in this template.
Or if you have any guidelines for that ( any pdf document ).

Also D and 83 records are in same level.

Thanks a lot…
Amit

Oh 4.6…i thought you are using wM IS6.x FlatFile Adapter Schema capabilities.

So in your template at the end set this and

D1 8395

Finally generate your updated Schema/record for this template change.

HTH,
RMG

Hi RMG,
Thanx for your suggestion.
I have already tried this.
This doesnot work. when we do this… it all the D1 records in one but subsequent 8395 records come as sub part of D1. Like for the data

HXXXXXXXXXXXXXXX
DXXXXXXXXXXXXXXX
DXXXXXXXXXXXXXXX
83XXXXXXXXXXXXXX
83XXXXXXXXXXXXXX
83XXXXXXXXXXXXXX
DXXXXXXXXXXXXXXX
83XXXXXXXXXXXXXX
DXXXXXXXXXXXXXXX
TXXXXXXXXXXXXXXX

I will get 1list for D records
D
-D[0]
-D[1]
-83[0]
-83[1]
-83[2]
-D[2]
-83[0]
-D[3]

I want the output as
D
-D[0]
-D[1]
-D[2]
-D[3]
83
-83[0]
-83[1]
-83[2]
-83[3]

Please suggest me some thing.

Thanks a lot…

Regards,
Amit

You should get like this only

You should get this order only, since D and 83 are repeating together based on your sample file…FF parsing cannot seperate it with D and 83 as individual records.

D
-D[0]
-D[1]
-83[0]
-83[1]
-83[2]
-D[2]
-83[0]
-D[3]

HTH,
RMG

Hi RMG,

Now if i want that kind of out put how shud i go ?? shall i loop on D records and transfer 83 records into a temp one , then accumulate them…and then go ahead. Is that feasible ???

else any suggestions… ?

Really appreciate for your time and help.

Regards,
Amit

“shall i loop on D records and transfer 83 records into a temp one , then accumulate them”

Yes If you wanted them seperately processed then go with this divide approach but make a note this will kill your service performance.

But based on your sample ff layout D and 83 structures should loop together and your parsing/transformation will be success.If this works then What is the show stopper in your flow?? You can use the same structure and map it to your target format.

HTH,
RMG