File Content Conversion for Multi Hierarchical Structure for Sender Adapter
Hi Gurus,
My text file is coming as
Header,filed1,field2(Occurrence=1)
Content,field3,field4(Occurrence =1-Unbounded)
Detail,field4,field5(Occurrence = 1-unbounded)
Trailer,fieldN(Occurrence=1)
My requirement is to write a file content conversion, so that, in the resultant XML Structure the Detail will come under Content.
I have defined the Record Set Structure as
Header,1,Content,*,Detail,*,Trailer,1
But after FCC, the Detailed record is coming in the same level as the Content Record. But the business requires that, the Detailed Record should come under Content Record, so that they can correlate.
Could any one advise?
Regards,
SS
Edited by: Subhendu Sahu on Jun 17, 2011 4:43 PM
Hi,
Please use the below parameters -
○ 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.
NameA.keyFieldInStructure
■ If the key field of the substructure is to be added to the XML document, enter add. This is the default.
■ If the key field is to be ignored, enter ignore.
http://help.sap.com/saphelp_nwpi711/helpdata/en/44/6713ec3f914ddee10000000a1553f7/frameset.htm
cheers,
Sunil
Similar Messages
-
File content conversion : hexa decimal character value for tab
Experts,
I am working on a FCC for a tab delimited file. Can any one tell me what is the hexadecimal value of tab. I am using '0x09' but it is not recognizing this.
Can anyone help me out..
Thanks
VeeruHi Veeru,
> I am working on a FCC for a tab delimited file. Can any one tell me what is the hexadecimal value of tab. I am using '0x09' but it is not recognizing this.
Have a look at this bolg /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter . You can try the 2nd method given in that. If that doesn't solve your issue, might be there is some other problem in the FCC configuration.
Regards,
Sunil Chandra -
Hierarchy on file content conversion for receiver?
Y'all,
I'm stuck in this problem and I haven't find a solution to solved it... so, all your clues and reply's are really appreciate...
The basic problem is a File content conversion for a receiver C.C. that is not working and it's raising some errors in the RWB, I have gone thru some blogs but I still having a lot of doubts...
I want to produce a flat TXT file that will have a line for every node or subnode, it doesn't matter if it's not represented as hierarchical structure like this one... but the records must be produced or written in the same order...
Man_Del_Header as main node with Man_Header, Delete_Detail and Trailer as subnodes...
<?xml version="1.0" encoding="UTF-8"?>
<ns1:MT_DISTRIBUTOR_DELETE xmlns:ns1="http://xxx.com/xi/POSout">
<Man_Del_Header>
<MD_Header>|HM|1|</MD_Header>
<MD_StoreNumber>051</MD_StoreNumber>
<MD_filler1>|2|0000|3|</MD_filler1>
<MD_EffDate>09/17/07</MD_EffDate>
<MD_filler2>|4|005|5|dsdvnd|7|</MD_filler2>
<MD_BatchNumber>500</MD_BatchNumber>
<MD_fiiller3>|8|</MD_fiiller3>
<MD_BatchDescr>DELETE PREV CST BTCH</MD_BatchDescr>
<MD_filler4>|10|D|</MD_filler4>
<MD_linef>1</MD_linef>
<Man_Header>
<Man_Header>|HM|1|</Man_Header>
<Man_StoreNumber>051</Man_StoreNumber>
<Man_filler1>|2|0000|3|</Man_filler1>
<Man_EffDate>09/17/07</Man_EffDate>
<Man_filler2>|4|005|5|dsdvnd|7|</Man_filler2>
<Man_BatchNumber>500</Man_BatchNumber>
<Man_filler3>|8|</Man_filler3>
<Man_BatchDescription>Delete Distributor</Man_BatchDescription>
<Man_filler4>|</Man_filler4>
<Man_linef>Constant</Man_linef>
</Man_Header>
<Delete_Detail>
<Delete_Detail>|D|901|170|</Delete_Detail>
<Delete_DistribNumber>0000005010</Delete_DistribNumber>
<filler9>|</filler9>
<delete_linef>1</delete_linef>
</Delete_Detail>
<Delete_Detail>
<Delete_Detail>|D|901|170|</Delete_Detail>
<Delete_DistribNumber>0000005011</Delete_DistribNumber>
<filler9>|</filler9>
<delete_linef>1</delete_linef>
</Delete_Detail>
<Trailer>
<Trailer>|T|1|</Trailer>
<TotalRecCnt>00005</TotalRecCnt>
<filler1>|2|</filler1>
<NoOfHeaders>00002</NoOfHeaders>
<filler2>|3|</filler2>
<NoOfAdds>00000</NoOfAdds>
<filler3>|4|</filler3>
<NoOfChanges>00000</NoOfChanges>
<filler4>|5|</filler4>
<NoOfDeletes>00002</NoOfDeletes>
<filler5>|13|</filler5>
<NoOfSubstitution>00000</NoOfSubstitution>
<filler6>|</filler6>
<linef>1</linef>
</Trailer>
</Man_Del_Header>
<Man_Del_Header>
<MD_Header>|HM|1|</MD_Header>
<MD_StoreNumber>061</MD_StoreNumber>
<MD_filler1>|2|0000|3|</MD_filler1>
<MD_EffDate>09/17/07</MD_EffDate>
<MD_filler2>|4|005|5|dsdvnd|7|</MD_filler2>
<MD_BatchNumber>500</MD_BatchNumber>
<MD_fiiller3>|8|</MD_fiiller3>
<MD_BatchDescr>DELETE PREV CST BTCH</MD_BatchDescr>
<MD_filler4>|10|D|</MD_filler4>
<MD_linef>1</MD_linef>
<Man_Header>
<Man_Header>|HM|1|</Man_Header>
<Man_StoreNumber>061</Man_StoreNumber>
<Man_filler1>|2|0000|3|</Man_filler1>
<Man_EffDate>09/17/07</Man_EffDate>
<Man_filler2>|4|005|5|dsdvnd|7|</Man_filler2>
<Man_BatchNumber>500</Man_BatchNumber>
<Man_filler3>|8|</Man_filler3>
<Man_BatchDescription>Delete Distributor</Man_BatchDescription>
<Man_filler4>|</Man_filler4>
<Man_linef>Constant</Man_linef>
</Man_Header>
<Delete_Detail>
<Delete_Detail>|D|901|170|</Delete_Detail>
<Delete_DistribNumber>0000005012</Delete_DistribNumber>
<filler9>|</filler9>
<delete_linef>1</delete_linef>
</Delete_Detail>
<Delete_Detail>
<Delete_Detail>|D|901|170|</Delete_Detail>
<Delete_DistribNumber>0000005013</Delete_DistribNumber>
<filler9>|</filler9>
<delete_linef>1</delete_linef>
</Delete_Detail>
<Delete_Detail>
<Delete_Detail>|D|901|170|</Delete_Detail>
<Delete_DistribNumber>0000005014</Delete_DistribNumber>
<filler9>|</filler9>
<delete_linef>1</delete_linef>
</Delete_Detail>
<Trailer>
<Trailer>|T|1|</Trailer>
<TotalRecCnt>00006</TotalRecCnt>
<filler1>|2|</filler1>
<NoOfHeaders>00002</NoOfHeaders>
<filler2>|3|</filler2>
<NoOfAdds>00000</NoOfAdds>
<filler3>|4|</filler3>
<NoOfChanges>00000</NoOfChanges>
<filler4>|5|</filler4>
<NoOfDeletes>00003</NoOfDeletes>
<filler5>|13|</filler5>
<NoOfSubstitution>00000</NoOfSubstitution>
<filler6>|</filler6>
<linef>1</linef>
</Trailer>
</Man_Del_Header>
</ns1:MT_DISTRIBUTOR_DELETE>
|HM|1|051|2|0000|3|09/17/07|4|005|5|dsdvnd|7|500|8|DELETE PREV CST BTCH|10|D|1
|HM|1|051|2|0000|3|09/17/07|4|005|5|dsdvnd|7|500|8|Delete Distributor|Constant
|D|901|170|0000005010|1
|D|901|170|0000005011|1
|T|1|00005|2|00002|3|00000|4|00000|5|00002|13|00000|1
|HM|1|061|2|0000|3|09/17/07|4|005|5|dsdvnd|7|500|8|DELETE PREV CST BTCH|10|D|1
|HM|1|061|2|0000|3|09/17/07|4|005|5|dsdvnd|7|500|8|Delete Distributor|Constant
|D|901|170|0000005012|1
|D|901|170|0000005013|1
|D|901|170|0000005014|1
|T|1|00006|2|00002|3|00000|4|00000|5|00003|13|00000|1
So as you can see, i wanna produce a flat file that will have line or record for each node, it doesn't matter that it has a hierarchy or a deeper level, it should be a simple flat file...
The thing is that i have been trying to setup the receiver comm. channel and it's raising some errors like Could not process due to error:
<i>java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value 'XXXX')', probably configuration error in file adapter (XML parser error)'</i>
I have checked this blog:
/people/karthiknarayan.kesavan2/blog/2007/08/22/file-content-conversion-for-multi-hierarchical-structure
Unfortunately i don't know if there's another way to achieve this...Jerry,
it easy if you go with multi mapping concept and without BPM if you are above >XI3.0 SP14.and use Append mode in the receiver file adapter.
just create the target structure like root under that Man_Del_Header,Man_Header,Detail,Trailer at the same level but got be careful with occurences.
<b>Source:</b>
I think from your structure you have
Man_Del_Header (1-unb)
Man_Header (1-1)
detail (0-unb ) may be (1-unb)
trailer (1-1)
create <b>target DT</b> like:
ROOT
..Man_Del_Header (1-1)
..Man_Header (1-1)
..detail (0-unb ) may be (1-unb)
..trailer (1-1)
all are at same level under ROOT.
create MT,MI,MM,IM.
in MM just map correspoding fields and if you have any unbounded onces map the nodes too. and map Man_Del_Header in the source to MT_XYZ (important)
and in the MM go to MESSAGES tab and change the occurences of the target Message to 0-unbounded same way in the interface mapping 0-unbounded.
here it create anothe extra node in the mapping something like Message1,this is ok.
and in ID just create all other objects like as usual except creating Interface determination ,in that select the extended radio button.
in reciever File CC use FCC ,would be very simple in the recordsetstrcture give
your four nodes Man_Del_Header,Man_Header,Detail,Trailer.
and use either fixed or field seperator.use append mode in recv File CC otherwise it will generate files as many occurences your source "Man_Del_Header" has ,cos we are mapping it to the MT--xyz .
thats it you are ready to go...
if any error post back here again.
you can make use of this thread
/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible (here there are two target DT ,but you just create one DT,remaining are similar)
good luck.
Babu -
File Content Conversion Problem
Hi
I have a flat file having 10 fileds with fixed length of field 7 characters
abc bcd dce cef ecf fgi
123 234 343 233 434 343
322 222 222 222 222 222
+++++++++++++++++++++++++++++++
XML CODE FOLLOWS
+++++++++++++++++++++++++++++++
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_send xmlns:ns0="http://OTO-Continue.com">
-<SEND>
<abc>343</abc>
<bcd>343</bcd>
<dce>434</dce>
<cef>3434</cef>
<ecf>343</ecf>
<fgi>434</fgi>
</SEND>
</ns0:MT_send
As per the client req I'm going with FCC. The file is picking fine with the FILE. But not picking with the FCC.
The parameters which I gave are as follows.
SOURCE I feel it is fine since file is picking fine and keeping the same for FCC also.
PROCESSING
QOS -- Exactly Once
Poll Interval -- 10
Processing Mode -- Delete
Empty-File Handling -- Process empty files
CONTENT CONVERSION Parameters
Document Name -- (am giving sender data type name) DT_send
Document NSpace -- http://OTO-Continue.com
Recordset Name -- SEND
Recordset Structure -- SEND,*
Recordset Sequence -- Ascending
Recordset per Message -- 0
And in the table the parameters am settings are
SEND.fieldNames abc,bcd,cde,def,efg,ghk
SEND.fieldFixedLengths 7,7,7,7,7,7 (because each and every field has 7 characters)
SEND.keepIncompleteFields No
SEND.fieldFixedLengthType char
SEND.fieldContentFormatting trim
SEND.fieldEndSeparator 'nl'
This was the configuration. But this is not working I monitored the Communication Channel and file is not reading and not getting deleting.
What actually went wrong in above configuration. Why it is not working.
Thanks.Hi Swarna,
CONTENT CONVERSION Parameters
Document Name -- ?
DocumentNSpace -- ?
Recordset Name -- ?
Recordset Structure -- ?
Recordset Sequence -- Ascending
Recordset per Message -- ?
Document Name - <Message Type> eg:- (MT_ABC)
DocumentNSpace - Name space of your MT
Recordset Name - The root node( Which has one occurence)
Recordset Structure - The parent node of the fields(can have multiple occurences)
Recordset Sequence -- Ascending
Recordset per Message -- 1/* (No.of records per each record set)
In your structure
+++++++++++++++++++++++++++++++
XML CODE FOLLOWS
+++++++++++++++++++++++++++++++
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_send xmlns:ns0="http://OTO-Continue.com">
-<SEND>
<abc>343</abc>
<bcd>343</bcd>
<dce>434</dce>
<cef>3434</cef>
<ecf>343</ecf>
<fgi>434</fgi>
</SEND>
</ns0:MT_send
There is no root node, so in your FCC you need to mention your RecordsetName and you can ignoreRecordSetName in result structure. Check the following blog simulates your requirement.
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
Regards,
Prasanna -
File Content Conversion Generate Incomplete XML
Dear Expert,
I am doing the File Content Conversion ...
Process in sender file adapter is working fine. However, when I check in the receiver folder, the XML file is incomplete after 4 records ...
The Flat File structure :
20100120;SAPQL0;0000000013380325
20100120;SAPQL0;0000000013380332
20100120;SAPQL0;0000000013380333
20100120;SAPQL0;0000000013380334
20100120;SAPQL0;0000000013380337
20100120;SAPQL0;0000000013380338
20100120;SAPQL0;0000000013380402
20100120;SAPQL0;0000000013391225
20100120;SAPQL0;0000000013394988
20100120;SAPQL0;0000000013416842
20100120;SAPQL0;0000000013420424
20100120;SAPQL0;0000000013420616
20100120;SAPQL0;0000000013420621
20100120;SAPQL0;0000000013420624
20100120;SAPQL0;0000000013420627
The XML result was truncated(incomplete) :
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_EDIFILE_LOG xmlns:ns0="http://zasp.edi.siemens.com/zedi/contentconversion">
<Record>
<EDIFILE>
<credate>20100120</credate>
<port>SAPQL0</port>
<idocnumber>0000000013380325</idocnumber>
</EDIFILE>
<EDIFILE>
<credate>20100120</credate>
<port>SAPQL0</port>
<idocnumber>0000000013380332</idocnumber>
</EDIFILE>
<EDIFILE>
<credate>20100120</credate>
<port>SAPQL0</port>
<idocnumber>0000000013380333</idocnumber>
</EDIFILE>
<EDIFILE>
<credate>20100120</credate>
<port>SAPQL0</port>
<idocnumber>0000000013380334</idocnumber>
</EDIFI
Please kindly suggest, which area should I check and correct...
Thank you very much expert.
Best Regards,
YDear All,
I believe that the file adapter has finished writing the file. Not sure, How to check whether the adapter is still working or not since from the SXMB_MONI, I see the mssage processing has been completed.
Further information
The data type structure :
1. DT_EDIFILE_LOG
1.1 Record --> occurence 1
1.1.1 EDIFILE --> occurence 1..unbounded
1.1.1.1 credate --> occurence 1
1.1.1.2 port --> occurence 1
1.1.1.3 idocnumber --> occurence 1
In content conversion parameters :
Recordset Name : Record
Recordset Structure : EDIFILE,*
Thank you very much for your suggestion.
Best Regards,
Y
Edited by: Yonisiwa on Jan 22, 2010 3:34 PM -
** File Content Conversion Error in Receiver CC - How to solve this?
Hi friends,
My target structure looks like below.
EmployeeJobDetails --> Message Type
JobCode --> Node
EmployeeNumber xsd:string
Domain xsd:string
JobTrack --> Node
Department xsd: string
Position xsd: string
I use the FCC parameters in the receiver CC as below:
Recordset Structure: JobCode,JobTrack
JobCode.fieldSeparator = |
JobCode.endSeparator = 'nl'
JobTrack.fieldSeparator = |
JobTrack.endSepartor = 'nl'.
Because, we want the output like below
1099|Raja
Accts|JuniorAccountant
1100|Ram
HR|Recruiter
like this.
In this scenario Source is XML and target is txt file.
I am using XSLT Mapping. The FCC works fine, if my source input file contains some records. But, when we send empty source XML file as below
<?xml version="1.0" encoding="UTF-8"?>
<EMPLOYEE_DATA/>
Mapping works fine. Message is processed successfully in SXMB_MONI. The payload in response also comes with Message Type name like below
<EmployeeJobDetails namespace >
</EmployeeJobDetails>
While convert this, the system throws below error.
Error Message:
Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure '' found in document', probably configuration error in file adapter (XML parser error)': java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure '' found in document', probably configuration error in file adapter (XML parser error)'
Friend, how to convert this when source XML is empty.
But, if we remove JobTrack node in target strucutre and remove the JobTrack parameters in CC, then if we send the same empty XML file FCC is working fine and we get the target text file 0 KB. (Amazing !!)
But, in the first case, how to solve the issue?
Kind Regards,
Jegathees P.Hi friends,
If we remove JobTrack node in target strucutre and remove the JobTrack parameters in CC, then if we send the <b>same empty XML file</b> FCC is working fine and<b> we get the target text file 0 KB</b>. (Amazing !!)
But, if we give parameters like JobCode,JobTrack then send pass the same empty file, we face the problem 'File Content Conversion' Error.
Searching solution for this problem ... -
File content conversion is not creating the exact strcuture as Datatype
Hi,
We are facing issue .
I have sender DT type
<FIle_DT>
< HeaderDetail>
<Field1>
<Field2>
<Linietemdetails>
<Field1>
<Field2>
</Linietemdetails>
</ HeaderDetail>
</File_DT>
but when I am preocessing the file content conversion - > when its pulling the data from the file this structure become
<FIle_DT>
< HeaderDetail>
<Field1>
<Field2>
</ HeaderDetail>
<Linietemdetails>
<Field1>
<Field2>
</Linietemdetails>
</File_DT>
I want same above one after content conversion. I tired allt he options availble . please help
In file content conversion I give
RecordSet Structure -->HeaderDetail,,LineItemDetail,
HeaderDetail.keyFieldValue H
HeaderDetail.endSeparator 'nl'
HeaderDetail.fieldFixedLengths 1,4,8,25
HeaderDetail.keyFieldInStructure ignore
LineItemDetail.keyFieldValue L
LineItemDetail.endSeparator 'nl'
LineItemDetail.fieldFixedLengths 1,3,1,10,10,24,3,25
LineItemDetail.keyFieldInStructure ignore
LineItemDetail.keepIncompleteFields YES
ignoreRecordsetName true
Please help
regards
RamHi Babu,
Thanks a lot for your input.
Actually My requirement is this its file to Multiple idoc scenarios.
Here I am getting flat file HeaderDetails and LinItemdetails. its having Multiple Headerdetail then Line Item Details, I want to create idoc for each HeaderDetail and all the Next LineItemdetails should go to that IDoc. If we can find some solution then it will also work for me.
For ex.
My source would be
FIle_DT>
< HeaderDetail1>
<Field1>
<Field2>
</ HeaderDetail>
<Linietemdetails11>
<Field1>
<Field2>
</Linietemdetails11>
<Linietemdetails12>
<Field1>
<Field2>
</Linietemdetails12>
< HeaderDetail2>
<Field1>
<Field2>
</ HeaderDetail>
<Linietemdetails21>
<Field1>
<Field2>
</Linietemdetails21>
<Linietemdetails22>
<Field1>
<Field2>
</Linietemdetails22>
< HeaderDetail3>
<Field1>
<Field2>
</ HeaderDetail>
<Linietemdetails31>
<Field1>
<Field2>
</Linietemdetails>
</File_DT>
I want target structure like this .
<Idoc>
<HeaderDetail1>
<LineItemdetail11>
<LineItemdetail12>
<LineItemdetail13>
</Idoc>
<Idoc>
<HeaderDetail2>
<LineItemdetail21>
<LineItemdetail22>
<LineItemdetail23>
</Idoc>
<Idoc>
<HeaderDetail3>
<LineItemdetail31>
</Idoc>
If anyway you can help me how to go and how to do this grouping then it would be really great for me.
regards
ram -
Question on File Content Conversion
Hi all,
I went through this blog(/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1) for File content conversion and I have a question regading File Content Conversion. Is it always neccessary to have the data type structure as File, Record, Row and then the fields. Is it always neccesary to maintain this level of hierarchy for File content conversion to work.Hi Sonia,
For FCC sender or receiver if you want text with delimieter / csv file process.
use the below parameters
You would have to use the Document name ,namespace,record set name ,record strucutre name ( and occurrences also) and processing parameters in Sender side
In receiver side Record structre, processing parameters.
see below links to have more details..
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/harrison.holland5/blog/2006/12/20/xi-configuration-for-mdm-integration--sample-scenario /people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp
/people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy
/people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter -
Regards
Chilla -
File Content Conversion ( avoid fields in conversion)
Hi all
An IDoc to File scenario , I am doing file content conversion in receiver File adapter.
my message type for file 2 HEADER each having its own substructure
Like 1header
fieldA
2header
fieldC
fieldD
I want the "<b>1header and its 1 subelement not be converted in file content conversion" </b>
because its used for dynamic file name configuration, so i do'nt want it to be written on file.
Regards
Ashutosh.rRawat,
Yes I know you will get that error. That is the reason why I have told you to add another parameter fixedLengthTooShortHandling as Cut. So add one more parameter in your file receiver communicaion channel: Also I hope ASFD0101 is your strcuture not the field in the strcuture.
ASFD0101.fixedLengthTooShortHandling : Cut
Then I think it should work like a boom.
---Satish -
XML file conversion after sender file content conversion
Hi,
I have issue refarding file content conversion.
My input structure is
<MT_RCICrecords>
<TRNH>
<RCIC>
<RECH>
<RECL>
<RCIC>
<TRNH>
Afetr sender File content conversion (csv to xml) it produces xml file as below (since file conversion does not support 3rd level of hierarchy)
<TRNH>
<RECH>
</RECH>
<RECL>
</RECL>
</TRNH>
It does not recognize RCIC.
Now i am trying to map this to IDOC and getting error as
'MT_RCICRecords tag found instead of IDOC BEGIN ='.
CAn anyone suggest me how to chaage this xml output after File content conversion to add RCIC tag in xml file?
I am new to XI so please give me some sample code to.
Thanks.
Yashpal
Its urgent!My problem is xml generated from content conversion is like below
<MT_RCICrecords>
<TRNH></TRNH>
<RECH></RECH>
<RECL></RECL>
<TRLR></TRLR>
</MT_RCICrecords>
and i want it to be
<MT_RCICrecords>
<TRNH></TRNH>
<RCIC>
<RECH></RECH>
<RECL></RECL>
</RCIC>
<TRLR></TRLR>
</MT_RCICrecords>
which is not happening
My input message structure is
MT_RCICrecords
TRNH
RCIC
RECH
RECL
i hope it is clear now
TRLR -
File content conversion for file with hierarchical structure
Hi
I want to read a flat file in the following message structure using file content conversion.
Message structure is :
01 ( occurence = 1)
_ 1B (occurence = unbounded)
_ 1G (occurence = unbounded)
_1H (occurence = 1)
_1N ( occurence = unbounded)
99 (occurence = 1, trailer record)
In short there will be one 01 ( header record) in file. There will multiple 1B records. Under one 1B record there will multiple 1G records. Under each 1G record there will be one 1H recoprd and multiple 1N record. At the end there will one 99 record.
File format : Fixed length
Data in the text file would be as follows :
01Test
1BF0001MS005 4855390859
1GF000172075F31501 GBPINV 040806
1HF000172075F
1NF000172075F0011MS0051125002FOOUKSTFOOD
1NF000172075F0021MS0056540003ICOMSIEARCA
1BF0111TT005 3454390859
1GF011172075F31501 INRINV 040806
1HF011172075F
1NF011172075F0011MS0051125002FOOUKSTFOOD
1NF011172075F0021MS0056540003ICOMSIEARCA
99002187004855390859
Is it possible to do above using file content conversion or is there any method to do it. Please suggest.
Thanks
Varunyou cant acheive this heirarchy using the file adapters cont. conv, cos it supports only to a single level.
Maybe you can have a module or use the conversion agent !!
Some good reads on the Conv. agent!!!
/people/william.li/blog/2006/03/17/how-to-get-started-using-conversion-agent-from-itemfield
/people/paul.medaille/blog/2005/11/18/conversion-agent-a-free-lunch
/people/alexander.bundschuh/blog/2006/03/14/integrate-sap-conversion-agent-by-itemfield-with-sap-xi
/people/paul.medaille/blog/2005/11/17/more-on-the-sap-conversion-agent-by-itemfield -
Receiver File content conversion for multi level hireachy
Receiver channel file content conversion..
this is SAP proxy to FIle Scenario, which will get invoice details from SAP along with multiple invoice texts for each invoice.
I would like to have below mentioned payload at Target side,
<MT_Invoice>
<File Header> 1...1
<f1> customer invoices </f1>
<f2> 12/02/2010 </f2>
</File Header>
<Invocie header>
<f1> Invoice number1 </f1>
<f2> customer number1 </f2>
</Invoice header>
<Invoice text>
<f1> Inovice no1-text1 </f1>
</Invoice text>
<Invoice text>
<f1> Inovice no1-text2 </f1>
</Invoice text>
<Invocie header>
<f1> Invoice number2 </f1>
<f2> customer number2 </f2>
</Invoice header>
<Invoice text>
<f1> Inovice no2-text1 </f1>
</Invoice text>
<Invoice text>
<f1> Inovice no2-text2 </f1>
</Invoice text>
<Invocie header>
<f1> Invoice number3 </f1>
<f2> customer number3 </f2>
</Invoice header>
<Invoice text>
<f1> Inovice no3-text1 </f1>
</Invoice text>
<Footer> 1..1
<f1> have a great day </f1>
</footer>
</MT_Invoice>
for the above payload file should come as mentioned below
customer invoices 12/02/2010
invocie number1 customer no 1
invoice no1-text1
invoice no1-text2
invocie number2 customer no 2
invoice no2-text1
invoice no2-text2
invoice no2-text3
invocie number3 customer no 3
invoice no3-text1
have a great day
For to get the above payloadI have create a message type like
MT_invoice
header 1...1
f1 1
f2 1
invoice details 0... unbound
f1 1
f2 1
invoice text 0.... unbound
f1
footer 1...1
f1 1
Please correct me if my message type declaration was wrong...
Please suggest how do i need to approach for message mapping and as well as FCC in File adapter...
Edited by: Vidyadhar Kurmala on Dec 2, 2010 10:28 AMIt is not possible to create alternating nodes in graphical mapping tool.
I recommend using the MessageTransformBean for FCC, as this supports a 2-level hierarchy.
Then you add a node record like this:
<MT_Invoice>
<Record>
<File Header> 1...1
<f1> customer invoices </f1>
<f2> 12/02/2010 </f2>
</File Header>
</Record>
<Record>
<Invocie header>
<f1> Invoice number1 </f1>
<f2> customer number1 </f2>
</Invoice header>
<Invoice text>
<f1> Inovice no1-text1 </f1>
</Invoice text>
<Invoice text>
<f1> Inovice no1-text2 </f1>
</Invoice text>
</Record>
<Record>
<Invocie header>
<f1> Invoice number2 </f1>
<f2> customer number2 </f2>
</Invoice header>
<Invoice text>
<f1> Inovice no2-text1 </f1>
</Invoice text>
<Invoice text>
<f1> Inovice no2-text2 </f1>
</Invoice text>
<Invocie header>
<f1> Invoice number3 </f1>
<f2> customer number3 </f2>
</Invoice header>
<Invoice text>
<f1> Inovice no3-text1 </f1>
</Invoice text>
</Record>
<Record>
<Footer> 1..1
<f1> have a great day </f1>
</footer>
</Record>
</MT_Invoice> -
File Content Conversion for complex structure
Hi
I have a requirement to repeat a structure consisting of three lines i.e the segment containing these 3 lines will have occurrence 0....unbounded and will be repeated in the File multiple times ,
What is the level that can be handled in File Content Conversion's recordset structure ?
My issue is that the structure is
Dt_File -> Repeating Level1->Level2 ->Field1
->Level2a->Field3
-> Level2b->Field5
where the first level is DT_File
under which I have RepeatingLevel1 as a SubElement
and under Repeating level I have Level2 , Level2a and Level2b at its subelementsl
and under Level2 I have Field1 , Under Level2a i have Field3 and under Levle 2b i have Field5
How do i handle this in the Content Conversion ?? as in how do I create my Recordset Structure ?? as it just handles one level below the Document Name (i,e) Message Type)
Is it possible ??? or should i consider some other way to constuct my data type ??
Thanks
DevHi Tarang
My DT according to the target file structure is this :
DT_File
>Main1(1,1)
>Main2(1,1)
>Main3(0...unbounded)
>Record1(1,1)
>Field1
>Field2
>Field3
>Record2(1,1)
>Field4
>Field5
>Record3(1,1)
>Field6
>Field7
SO I want to confirm if the receiver FCC will be - Main1,Main2,Main3,Record1,Record2,Record3
Record1.fieldSeparator ,
Record1.endSeparator 'nl'
Record2.fieldSeparator ,
Record2.endSeparator 'nl'
Record3.fieldSeparator ,
Record3.endSeparator 'nl'
or Main1,Main2,Record1,Record2,Record3
Thanks
Dev -
File Content Conversion in Reciever Adapater for multiple element
Hi folks,
My Source file structure is
<?xml version="1.0" encoding="UTF-8"?>
<ns0:file_sender_mt xmlns:ns0="urn:filetofiledemo">
<recordset>
<data1>
<name1>a</name1>
<age1>b</age1>
</data1>
<data>
<name>c</name>
<city>d</city>
<age>e</age>
</data>
</recordset>
</ns0:file_sender_mt>
in my file reciever adapter i am uisn file content conversion and these are the parameters that i have given
reordesetStructure -->
recordset,data1,data,FileNameNode
Name value
recordset.fieldSeparator '0x09'
data1.fieldSeparator '0x09'
data.fieldSeparator '0x09'
data.endSeparator '0x09'
'0x09' is the hex vale for tab
My o/p file is coming as
a b
c d e
the desired o/p is
a b c d e
Any idea on this
Thanks
AmitHi Amit,
You can try using this approach.
You can create two data types.
The input data type is of the input file format.
The output data type can have all the five tags (Name1, Age1, Name, City and age) under one header tag(data1), instead of two tags(Data1, data) in the input file.
Then in the receiver channel u can define the reordesetStructure -->
recordset,data1,FileNameNode
This will produce the output data in one line.
Regards
Neetu -
File content conversion in Sender Adapater for multiple occurances
Hi ,
I am mapping from flat file to idoc .
My flat file is a tab demilited
Since the idoc would have structure
like header , lineitem , schedule
in my flat file conversion
i am giving recordset structure
as header,1,lineitem ,,schedule,
since lineitem would be repeated many times
Bt if i give * i need to give a keyfieldname
which would mean that keyfieldname has to appaer in header and schedule .
since in my case my Column values in header , lineitem and schedule are different
how can i do the file conversion in this case
i can doing something like this
header.keyFieldValue ""
schedule.keyFieldValue ""
header.keyFieldInStructure ignore
schedule.keyFieldInStructure ignore
i am not even sure if thats the correct way
Thanks
AmitHi Amit,
Take a look at these...
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
cheers,
Prashanth
P.S Please mark helpful answers
Maybe you are looking for
-
One prompt for two or more subject area
Does someone knows how to resolve this problem? I have two subject areas. And I need to create prompt that will work on dashboard that contain requests from two different subject areas (one request from one subject area). I hope that I was clear with
-
How to change an characteristic to an navigation attribute?
Hello everyone!! Does anybody knows how to change a characteristic that is on a POS to an attribute navigation of another characteristic that is in the same POS without deactivating it? An infocube has the same POS characteristics. So, if I do this m
-
When connecting MBP to Apple TV prompt appears "iTunes library too large"
-
2 Octobers ago I purchased a Bamboo tablet that came with Corel painter and PSE 7. I recently got a new laptop and decided I wanted to put PSE 7 on my new laptop. I had a problem finding the program and still cant find it. It was in a box with my ser
-
How programmatically set size of report element in Java
In topic [How programmaticaly set size of some field?|How programmaticaly set size of some field?] someone changing programmatically report element, but I think this part of code is in .NET framework For example I mean something like following snippe