on 08-29-2007 8:55 AM
Hi experts,
Can someone help me with setting right Content conversion parameter in the Receiver of File adpater(FCC).The output file must be fixed length text file.
Here is the receiver structure:
<Recordset>
<Header>
<f1>01</f1>
<f2> </f2>
<f3> </f3>
</Header>
<Body>
<SubBody1>
<field1 />
<field2 />
<field3 />
<field4 />
<field5 />
</SubBody1>
<SubBody2>
<field6 />
<field7 />
<field8 />
<field9 />
<field10/>
</SubBody2>
</Body>
<Trailer>
<f1>03</f1>
<f2> </f2>
<f3> </f3>
</Trailer>
</Recordset>
Also Body can occure multiple times in the file but still will have this structure...Header and Trailer can occure only once in file.
What are the right content conversion perameters in this case?
Appreciate your help asap!T
Thanks
Jon
Recordset:Header,Body,SubDody1,SubBody2,Trailer
Header.fieldFixedLengths - Specify a character string containing a list of fixed column widths that are separated by commas according to your structure.
SubBody1.fieldFixedLengths - based on you are structure
SubBody2.fieldFixedLengths - based on you are structure
Body.endSeparator - 'nl'
Trailer.fieldFixedLengths - based on you are structure
Cheers's
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, for the tips,
Can you please be more specific when you say : based on you are structure??Well the structure is given - you can see it ? Each field in the output file will start from fixed position :
Body: 1pos- field1 20 pos field2 35pos field3 .....
Same is for Header and trailer - every field is fixed at exact position...
pls asap
thanks
Thanks ,
and what do you do with SubBody.fieldNames ? Do I put Name/Value and if I do - do I enter field1 , field2, field3 ...etc . Actually do I need to enter all fields along with the fixed length or it is not needed? If I do need to enter them - do they have to give same namer for the field or it could be - f1 , f2, f3?
Thanks
No , you don't need to enter the fieldnames but will have to do a similar configuration as header for SubBody
SubBody1.fieldfixedLengths --- 10,15,10,25 ..etc(field lengths of all the fields under this node)
SubBody2.fieldfixedLengths --- 5,...etc (field lengths of all the fields under this node
So Body is not entered in the Parameters?Onlu SubBody is ? Correct?
How come the File Adapter knows that SubBody is substructre of Body ? Or it does not need to know it ?
Aslo under Adapter(Receiver) there is a field I have to enter - either Text or Binary ? I want the output file to be text - do I enter Text?
Thanks !!!
yeah it should take care of it with out you needing to enter any values for Body as there are no child fields directly under it.
Use Binary for file encoding. This parameter doesn't mean that you are going to get the output in "00011110011" format .. it is related to the encoding of the XML document which is created.
just give these parameters a try and share the output structure if possible.
Cheer's
Hi John,
The file adapter does not support more than two levels.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Ian,
What do I do in such case? Look at my structure up , Under recordset I have - Header, Body and Trailer substructured - 1 lever , but under Body I have another Substructures and than the fields ? What do I do in this case ? Am I fine or not ?
I don't like to revise my Data Mapping and Data types...
If you'd like I can send you a screenshots with my Data definitions in the Receiver side?
Thanks !!
<Recordset>
<Header>
<f1>01</f1> F1F2F3SB1F1SB1F2..SB1F5SB2F1SB2F2..SB2F5TF1TF2TF3
<f2> </f2>
<f3> </f3>
</Header>
<Body>
<SubBody1>
<field1 />
<field2 />
<field3 />
<field4 />
<field5 />
</SubBody1>
<SubBody2>
<field6 />
<field7 />
<field8 />
<field9 />
<field10/>
</SubBody2>
</Body>
<Trailer>
<f1>03</f1>
<f2> </f2>
<f3> </f3>
</Trailer>
</Recordset>
Is the expected output something like this
F1F2F3---- Header
SB1F1SB1F2..SB1F5SB2F1SB2F2..SB2F5( multiple line items)
SB1F1SB1F2..SB1F5SB2F1SB2F2..SB2F5
TF1TF2TF3( Trailer)
I think you are very correct:
F1F2F3---- Header
SB1F1SB1F2..SB1F5SB2F1SB2F2..SB2F5( multiple line items)
SB1F1SB1F2..SB1F5SB2F1SB2F2..SB2F5
TF1TF2TF3( Trailer)
Actually Body is the Record and within one file you can have multiple Records(Bodies) and only one Header and Trialer . I put only to for clarity but actually occurrence for Body is 0:unbound which means you can have 0 or many occurrence in the file SubBody1 , SubBody2 SubBodyN.
But In the file fields go on row one after another based in Fixed length of each field until first Body(records ) is printed , than follows the second Body start at new line, than third Body starts at new line and so on Each line is given fixed length 500 which is enough to hold all fields in the body
So you are exact right about the output structure the way you have it above !
So what do we do than?
Thanks much!
Sorry I have a mistake in my previous post :
This is the correction
...Actually Body is the Record and within one file you can have multiple Records(Bodies) and only one Header and Trialer . I put only to for clarity but actually occurrence for Body is 0:unbound which means you can have 0 or many occurrence in the file Body1 , Body2 BodyN.....
But you are right in your structure - bottom line !
<Recordset>
<Header>
<f1>01</f1>
<f2> </f2>
<f3> </f3>
</Header>
<Body>
<SubBody>
<field1 />
<field2 />
</SubBody>
<SubBody>
<field1 />
<field2 />
</SubBody>
<SubBody>
<field1 />
<field2 />
</SubBody>
</Body>
<Trailer>
<f1>03</f1>
<f2> </f2>
<f3> </f3>
</Trailer>
</Recordset>
if this is the input structure then FCC goes like this ....
Recordset:Header,Body,SubBody,Trailer
Header.fieldFixedLengths 10,20,30.. (based on you are structure fixed lengths)
Header.endSeparator - 'nl'
SubBody.fieldFixedLengths 10,20,20 (based on you are structure fixed lengths)
Body.endSeparator - 'nl'
Trailer.fieldFixedLengths 10,20,30 .(based on you are structure fixed lengths)
Trailer.endSeparator - 'nl'
We might have to try out SubBody.endSeparator - 'nl' if Body.endSeparator - 'nl' does not insert a new line after each body record.
Cheer's
I am getting error..Have any idea?
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Request Message Mapping
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>Application</SAP:Category>
<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
<SAP:P1>com/sap/xi/tf/_MM_MAPPING_</SAP:P1>
<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
<SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:P3>
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>During the application mapping com/sap/xi/tf/_MM_MAPPING_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
sure , do you want me to send mapping details to you ?
For sender I am just using pure XML Adapter .Actually my XML to XML conversion whent fine - i did it for test purposes...to make sure XML work fine,,And XML to XML is based on same mappings...So I wonder what coudl be wrong ?
I can sedn files if you want, just tell me what do u need ?
thanks
/people/shabarish.vijayakumar/blog/2007/08/03/file-adapter-receiver--are-we-really-sure-about-the-concepts - read that weblog for a right understanding. It talks about the approach that you will require.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.