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
Ram
Hi 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
Similar Messages
-
File content Conversion in j2se at the receiver side
Hi ,
I need to do a file content conversion using j2se adapter at the recevier side.
my structure is something like
<name>
<name1>
<name2>
</name>
<address>
<address1>
<address2>
</address>
and the output should be like
#tname1$name2
#sadress1.address2
Please do the needfull
Thanks & Regards,
HamsaHi Hamsa,
#tname1$name2
#sadress1.address2
Lot of # and $, so can you paste the FCC parameters that you have tried in the File adapter?
In j2se also we can use the same. If you are not sure on how to use, paste the FCC parameter here and someone will be able to make the J2SE version out of it
Regards
Suraj -
Reg:File content conversion for Sender File Adaptor
Hi all,
i would like to know , how the file content conversion is written for the below mentioned XML code. The flat file will have only the table name and the fieldname
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Mt_File xmlns:ns0="http:/file_to_idoc">
<query_table>ztable1</query_table>
<row_count/>
<Fields>
<item>
<fieldname>zempno</fieldname>
</item>
</Fields>
</ns0:Mt_File>
regards
priyaFirst you create the conversion rules, then you create the XML structure accordingly, not the other way.
online help will help you -
Error in reciever file content conversion
Hi
I have the following error in the file content conversion
Could not process due to 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)'
my content conversion is :
Recordset Structure : FI_Banks_Header_MT,Line
FI_Banks_Header_MT.fieldSeparator = 'nl'
FI_Banks_Header_MT.fieldSeparator = ;
my xml is :
<FI_Banks_Lines_MT>
****<Line>
<FIELD1>12799</FIELD1>
<FIELD2>721042</FIELD2>
<FIELD3>0620</FIELD3>
<FIELD4>20.06.06</FIELD4>
<FIELD5>5575688</FIELD5>
****</LINE>
</FI_Banks_Lines_MT>
The file gets ok !!! but I still get this error in adapter monitor after the file is converted all the time
any1 managed to solve it ? thx , ShaiHey sorry for the previous one...
try out this...
Recordset Structure : FI_Banks_Lines_MT
FI_Banks_Lines_MT.endSeparator = 'nl'
FI_Banks_Lines_MT.fieldSeparator = ;
hope this helps !!!...
Cheers.,
Esha -
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 only 100 characters read from source..
Hi,
In my case I have a sender channel with file content conversion set as follows;
Recordset structure : Record, 1
sequence: ascending
Key field type : String (case sensitive)
record.fieldseparator : 'nl'
record.fieldnames : Data
ignorerecordsetname: true
Idea is in ECC, when a custom program is run, it reads the shipment data and builds an xml file with data in various nodes like;
<shipmentId>6767667</shipmentId>
<DelvText>hjysks sag fhdososlhfiof </DelvText>
Now all this data is converted to a single string entry under tag called <Data> and passed on to the third party system by PI using above conversion.
And the resulting file will have all the data like this;
- <Record>
<Data><?xml version="1.0" encoding="UTF-8"?></Data>
</Record>
- <Record>
<Data><ShipmentId>6767667</ShiomentId>.........</Data>
It so happens that the data that is populated in the <DelvText> by the program is lost during conversion. I get only first 100 characters in the resulting above mentioned XML after the file content conversion happens. rest of the string is lost. I can see all other data perfect except for this long text.
This is the data I enter in the delivery's header text under shipment instruction field. I debugged the program and see that the entire text is indeed filled but gets lost after the file conversion happens !!
What can be the reason ?
thnksStefan, I appreciate your concern, thanks. But this is an already working interface and I cannot change it and can only assist with minor data mapping changes and troubleshooting such issues.
Scenario is simple, ECC has to send shipment data to third party via PI.
The shipment data has to be sent as an XML file with a single <Data> tag as I showed to you earlier.
It is so weird that when I type my delivery text less than 100 characters I can see that in full text in my XML file but only when the text is more than 100 characters, the XML has only 100 characters and it is passed to the third party like that and so third party is consdering this as incomplete info.
Would help if you can think and let me kjow what may create this kind of an issue or if you can point me where to look for issues.
thnks -
Inconsistency File Content Conversion
Hi,
My scenario is file to r/3 wherein the source file is a fixed length file. So I am using file content conversion in my sender adapter.
My source structure looks like:-
DT_TRAN
|__RECORD 1..unbounded
|_____HEADER 1
|_____QUOTE 0...unbounded
|_____ORDER 0...unbounded
|_____INVOICE 0...unbounded
|_____BILLING 0...unbounded
|_____CONTACT 0...unbounded
|_____FOOTER 1
I am getting this error while executing the scenario.
Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR consistency check in recordset structure validation (line no. 5: missing structure(s) before type 'Header'.
However, I checked the record in line no.5 and it's clean and perfect. But still getting the error. If I remove this record and execute, the file is picked and data is processed.
In File Content Conversion, I have used the following parameters:-
Recordset Name = Record
Recordset Structure = HEADER,1,QUOTE,,ORDER,,INVOICE,,BILLING,,CONTACT,*,FOOTER,1
I am using Key Fields to separately identify the details records. I used ignoreRecordsetName = true. In this case, in XML message payload does not contain <Record> node and so there is an error.
Can anyone suggest, how to overcome the issue such that all the records in the file are processed.
Thanks.
BalakrishnanThe content conversion parameters are:-
Record.endSeparator = 'nl'
Record.fieldNames = HEADER,QUOTE,ORDER,INVOICE,BILLING,CONTACT,FOOTER
Record.fieldSeparator = 'nl'
like the above, i have done for all the nodes. However, if i remove the record from line 5 and process the file, the file is picked up and processed succesfully. i have checked many times. the line no.5 record is not having any issues with structure or fixed length calculation. for some reaosn, it gives the error. -
Module processor enhancement with file content conversion
Hi All,
I have a bean (module processor) that converts the a PDF doc to text. I need to use the same bean with file content conversion. Module processor processing sequence is as follows:
1) My Bean: localejbs/myBean
2) Default: localejbs/CallSapAdapter (Bean for file content conversion).
When I tried the same (myBean + File adapter with file content conversion) , it was not working as expected. But the same bean works fine with normal file adapter (myBean + File adapter without file content conversion).
Couldn't figure out the reason. Please help.
Regards,
Ajay.As the content conversion of the file adapter is done before calling the customer module, it is not possible to use both.
As workaround you can do the file content conversion with help of the MessageTransformBean. In the module chain you put the MessageTransformBean after your module.
Note that the configuration of the MessageTransformBean has to be done like the J2SE sender file adapter:
http://help.sap.com/saphelp_nw04/helpdata/en/0d/00453c91f37151e10000000a11402f/frameset.htm
You find an example here:
https://websmp206.sap-ag.de/~sapdownload/011000358700001186732005E/HowToConveModuleJMS.pdf
Regards
Stefan -
Encoding problem after File Content Conversion
Hi SAP gurus!
we're about exporting debitor data via PI into CSV files. Therefore we use a mapping to an intermediate structure. In the receiver file adapter a file content conversion is done into the target CSV format.
We have a lot of data with eastern europe characters. Right after the mapping, everything is fine. All characters are processed correctly. After the file content conversion, the files written on the target system contain "?" instead of the special characters.
Does anybody have any hint to fix this problem? We already tried to change the "file.encoding" parameter, but hasn't helped.
Thanks in advance for your support!
Cheers,
MatthiasHello Satish,
thanks for your reply.
First, I have to explain, that the sender side isn't done by file adapter but IDoc adapter. So I cannot change the encoding on sender side.
Both on IDoc and file side, the data is ok. Only when inserting the file content converion, the files become corrupted.
Without using the FCC, tjhe target files are stored as UTF-8. When using FCC the files are stored as ANSI. (I tested this by opening the files in notepad and performing "Save As")
Do you have further ideas?
Cheers,
Matthias -
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 PMHi,
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 -
File content conversion: String with commas to CSV
Hi Experts,
I have the following structure
DATA (1..n)
...Result (1..1)
The Result field contains a string like below
a,b,c,d,e,f,g,h,i,j
How do I put this into File Content Conversion when I want the receiver to be a CSV file? One cell per letter.
Thanks in advance.Outbound: you could convert your flat file to xml at first. Make the necessary mapping to the destination structur.
http://www.riyaz.net/blog/xipi-file-content-conversion-for-simple-structure/
Inbound: Content convernsion from xml to csv.
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
Cheers
Serdar -
File Content Conversion Receiver Channel
Hi,
I have a complex structure like:
<Header>
</Header>
<Item>
<SubItem>
<Info>
</Info>
</Subitem>
</Item
<Item>
<SubItem>
<Info>
</Info>
</Subitem>
</Item
When I follow the instructions for File Content conversion I cannot separate the Item / SubItem and Info segments into separate lines in my flat file.
The result is:
Header
Item Subitem Info
Item Subitem Info
I want
Header
Item
Subitem
Info
Item
Subitem
Info
How can i establish the correct result?
Best regards
Ron.Hi,
I specified the following
Name value
Header.addHeaderLine 0
Header.fieldSeparator ;
Header.endSeparator 'nl'
Item.addHeaderLine 0
Item.fieldSeparator ;
Item.endSeparator 'nl'
Subitem.addHeaderLine 0
Subitem.fieldSeparator ;
Subitem.endSeparator 'nl'
Info.addHeaderLine 0
Info.fieldSeparator ;
Info.endSeparator 'nl'
Best Regards
Ron -
EDI Flat file Content Conversion
Hi Experts,
I have got a question on File Content Conversion, Please have look the following structure, is it possible with FCC or what is the best possible solution for this, which is very big favour to me.
Some information about this structure,
This is EDI message in flat file structure, each segment has got 700 characters as a row, LIN item is repeating many times,
ST ,XQ , N1 , DTM, LIN, P04, N9,ZA , ZA ,ZA , etc are segments, LIN item is repeating, at the end CTT is last segment. Again from ST segment to CTT segment comes 3 more times.
ST 0000001 4444444
XQ H 20100531
N1 xxxxxxxx u 00000
N4 aaaaaaaa, kk xx87654
DTM600 20100531
LIN CB224790 HH002720033676 PP00027200336760 ZZ0
P0400001000000000 000000000 000000000 000000000000000000000000
N9 VN0000000594
ZA QA238.00000000000CT LJXX
ZA QN1.0000000000000CT LJXX
ZA QO000000000000000CT LJXX
ZA QP210.00000000000CT LJXX
ZA QS61.000000000000CT LJXX
ZA QW208.00000000000CT LJXX
LIN CB320275 SS004330033052 PP00043300330521 ZZ0
P0400001000000000 000000000 000000000 000000000000000000000000
N9 VN0000000594
ZA QA36.000000000000CT LJXX
ZA QN1.0000000000000CT LJXX
ZA QO000000000000000CT LJXX
ZA QP120.00000000000CT LJXX
ZA QS8.0000000000000CT LJXX
ZA QW36.000000000000CT LJXX
CTT00005300000000000000000000 00000000
ST 0000001 4444444
XQ H 20100531
N1 xxxxxxxx u 00000
N4 aaaaaaaa, kk xx87654
DTM600 20100531
LIN CB224790 HH002720033676 PP00027200336760 ZZ0
P0400001000000000 000000000 000000000 000000000000000000000000
N9 VN0000000594
ZA QA238.00000000000CT LJXX
ZA QN1.0000000000000CT LJXX
ZA QO000000000000000CT LJXX
ZA QP210.00000000000CT LJXX
ZA QS61.000000000000CT LJXX
ZA QW208.00000000000CT LJXX
LIN CB320275 SS004330033052 PP00043300330521 ZZ0
P0400001000000000 000000000 000000000 000000000000000000000000
N9 VN0000000594
ZA QA36.000000000000CT LJXX
ZA QN1.0000000000000CT LJXX
ZA QO000000000000000CT LJXX
ZA QP120.00000000000CT LJXX
ZA QS8.0000000000000CT LJXX
ZA QW36.000000000000CT LJXX
CTT00005300000000000000000000 00000000
Please I am really requesting you get appropriate answer and quick response please
Thanks in Advance
Regards
SandyaHi Suresh, Raj,
Thanks for quick reply, but we haven't got Seeburger Adapter in our landscape. Please one small clarification please this message looks to me, we can do with FCC, but i need some experties from you guys.
1. ST segment comes in one line with 700 characters - has got 5 fields 1..1 cardinolity
2. XO segment comes in another line with same length 700 ch, but 8 fields different lengths 1..1 cardinality
10 LIN segment comes in another line 700 characters, but 0..n
Can't we take structure as follows:
Header -- 0..n
SegID --- 1..1
field 2 -
1..1
field 3 -
1..1
field 4 -
1..1
field 5 --- 1..1
Row2 -
1..1
SegID -
1..1
field2 -
1..1
Row6 -
1..n (for LIN segment)
SegID --- 1..1
field 2 --- 1...1
Please can you give me your experties please??
Regards
Sandya -
File is not creating on the Receiver for File Content Conversion
Hi,
i have created a scenario with this blog
/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
for sender side i am using File Content Conversion to read .txt file and on receiver side i need xml file i have done that.
when i placed the file in the sender folder it gets picked up and i checked in Communication Channel monitporing in Runtime WorkBench it is processed Successfully. but no XML File is created on the Receiver side. i am unable to see the messages on SXMB_MONI also.
Please suggest some ideas to solve this.
Thanks,
Giridhar.CHi Giridhar.
unable to see the messages on SXMB_MONI also
If the file got picked and in Communication Channel monitoring RWB you can see that it is processed without any errors ,, then i feel it should come in come.Please check the Audit log in RWB, there you can see the error message if any.
Please check the connection parameters in FTP and make sure that the same sender folder is
not being used by any other scenario.If you have done any recent changes then do a cache refresh .
Please post if you see any error in content conversion.
Regards
Srinivas -
File Content Conversion -All the input content was not shown in output file
Hi Experts,
In my scenario, I need to send data from .XML file to .txt file, using File Content Conversion at Receiver communication channel. This is File to File scenario.
This is my Input xml file.
<ns:FILEINPUT_MT xmlns:ns="http://File2FileTest">
<RECORD>
<Row>
<FirstName>Susie</FirstName>
<LastName>Tony</LastName>
<City>London</City>
<Country>UK</Country>
</Row>
</RECORD>
</ns:FILEINPUT_MT>
<b>Processing Parameters</b>
Target Directory = C:/Test
File Name Scheme = xi_output.txt
File Construction Mode = Add Time Stamp
File Type = Binary
<b>Content Conversion Parameters</b>
Recordset Structure : RECORD
RECORD.endSeparator = nl
RECORD.fieldSeparator = ;
After Activate and providing the input xml file, xi_output.txt file was generated. But the file content was shown only with Susie i.e. with First Name only. I need xi_output.txt file should have all the four fields (FirstName, LastName, City, Country)
Could some one help me to resolve the issue?
Thanks in advance
SreeCheck these blogs...Might help you.
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
/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/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
/people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
Link for SAP Help
http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
Maybe you are looking for
-
What is the best way to retrive data from a Global Variable?
Here is what I want to do, I have several PC's that run different types of tests. I want to use a global variable, running on a single PC, that acts like a sever that can be accessed by the other PC's in my lab. This Global variable will store the ho
-
I'm looking for a way of getting the RGB value of the screen background color (a solid color selected in System Preferences). Possible via Terminal?
-
Can anyone help me out with this one? I'm trying to run an IKM to Planning to update a Planning dimension metadata outline and am using the IKM SQL to Planning. After executing it, the Operator shows the status completed but an exception occured from
-
Export/Import Photoshop preferences, plugins, etc.?
I need to wipe my computer clean and reinstall windows. re-installing Photoshop is not a big deal, but I have several preferences, plugins, saved layer styles, actions, etc. That I do not want to loose and will not be retained. Is there a way I can b
-
Calculator: having problem with main method
This is a program that converts Infix expression to Postfix and evaluates it.I used eclipse to run this. In my main method, how do i get it to loop? when the user still wants to input another expression? i just can't seem to figure this out. import j