cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with sender file adapter

Naama
Participant
0 Kudos

Hi all,

I am having a problem in reading file with complex structure,

my structure is like this:

Header - 1

rows - 0 - unbound

Footer 1

In the recordset Structure - Header,1, Row,*, Footer,1

The file is not being read, only if I cahnge the * to the exact number of roes type ROw it is working,

Thnaks,

Naama.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

This is a common reqmt and File adapter can very well support this structure. Make sure you give all FCC params correctly like keyField and keyfieldValue. May be you can give the FCC params you have used here.

Naama
Participant
0 Kudos

Thanks,

What do I have to put in keyField and keyfieldValue?

Former Member
0 Kudos

From help.sap.com

● NameA.keyFieldValue

Specify the value of the key field for the structure. This entry is mandatory if the key field name is set. Otherwise, the entry is ignored.

In your case specify which field identifies a particular record as header or item or footer as Keyfield and the corresponding value in keyFieldValue

Naama
Participant
0 Kudos

I dont Have a key that identifies a particular record,

Its a combinition of different fields to each record,

Can I use to key field for some of the records?

Naama
Participant
0 Kudos

Thanks,

I undrstand what you ment, but can i use 2 fields as keyfield?

Former Member
0 Kudos

>>Its a combinition of different fields to each record

XI FCC needs a single dedicated field to identify the type of record. For eg.

H,1,2,3,4,5

D,1,2,3,4,5,6,7

D,1,2,3,4,5,6,7

D,1,2,3,4,5,6,7

F,1,2,3

Where H D and F indicates the type of record and 1..7 can be different fields with different values.

Naama
Participant
0 Kudos

Thanks again,

but know it seems that it works, the file is apperntly beaing read but i dont see anything in the monitor

Naama
Participant
0 Kudos

Can I use the key Field like this:

H,1,2,3,4,5

1,2,3,4,D,5,6,7

1,2,3,4,D,5,6,7

1,2,3,4,D,5,6,7

F,1,2,3

where H,D,F are the key values

Former Member
0 Kudos

Yes. This is possible. Give a common name for the keyfield in the keyfield param.

In FCC you give the param some thing like this.

Header.fieldNames : Keyfield,1,2,3,4,5

Detail.fieldNames : 1,2,3,4,5,keyfield,6,7

Footer.fieldNames : keyyfield,1,2,3

Header.keyFieldValue : <value of H>

Detail.keyFieldValue : <value of D>

Footer.keyFieldValue : <value of F>

Regards,

Jaishankar

Naama
Participant
0 Kudos

hi,

Can i use the length of each record as the key?

Former Member
0 Kudos

No.

Naama
Participant
0 Kudos

Hi,

I tried it on a simple file and it works,

But for some reason it doesnt work on my file, I think it because the structure of the segments.

the first line is the header and its key value is H u2013 it should appear once in the file

the second line is the header2 and its key value is D u2013 it should appear once in the file

the 3+4 lines is the details and its key value is L u2013 it should appear * times

the last line is the footer and its key value is D u2013 it should appear once in the file

Header1.

T H T150380149462.DAT 30/07/08 13:05:04 7 014946/2i`cpei driaz

Header2.

T D D06AA038H08052587014946245-519-60 045000WKMHDN41BP6U122056 0807230807236915 1000000 000000000000000000H,28910,22040 2828910R0000000200000000000000004830800100000001P

Details.

T D D06AA038_L_08052587014946210128910R00010020002000

T D D06AA038_L_08052587014946210128910R00010020002000

Footer.

T T T150380149462.DAT 00008 014946/2*** seq ****

I think that because the beginning of header2 and detail is the same it does not work,

Any Ideas?

Former Member
0 Kudos

All headers should have a common keyFIeldValue and same with Detail and Footer.

When you have multiple headers, then it Header,*

Naama
Participant
0 Kudos

The 2 Headers are not in the same structure

my structure is: header1,1,header2,1,detail,*,footer,1

but when i ass the detail,* it does not work

i get error

"Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR consistency check in recordset structure validation (line no. 3: missing structure(s) before type 'header2'"

Former Member
0 Kudos

>>but when i ass the detail,* it does not work

This is not a pblm with FCC param. Probably your input file is not as expected. If possible send me a sample input file with all the FCC params you have used.

You can get my mail address from my BC.

Edited by: Jaishankar on Aug 4, 2008 2:32 PM

Naama
Participant
0 Kudos

Thanks a lot,

i have solved the problem'

I used the same keyvalue, as you said, for both the headers.

Answers (0)