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,
Hamsa
Hi 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
Similar Messages
-
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 -
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 -
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 -
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 -
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 -
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 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. -
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 -
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 on the Receiving side
Is there a way in which if I want a Pipe Delimited File as a result, after the last field also I get a pipe with next record starting in the next line.
Hi,
For | (Pipe), use corresponding hex code as fieldSeparator i.e. 0x7C as fieldSeparator.
For FCC on receiver side refer -
[Simple FCC|http://www.riyaz.net/blog/index.php/2008/02/19/xipi-file-content-conversion-for-simple-structure/], [Complex FCC|http://www.riyaz.net/blog/index.php/2008/02/20/xipi-file-content-conversion-for-complex-structures/]
For separotor at the end of line you can try using a dummy field or use combination of pipe and newline i.e. '0x7C' and '0x0D' (stands for carriage return) or 'nl' as endSeparator
Edit: You might consider using 'nl' as beginSeparator parameter and 0x7C as endSeparator. This will do the trick. However, this would add a blank line in the beginning of the file.
Hope this helps.
Regards,
Riyaz
Edited by: Riyaz Sayyad on Aug 21, 2008 3:00 PM -
J2SE XML to Flat File Content Conversion
Hi
I've currently got a scenario which sends a flat file to the integration server, it gets mapped and sent to a receiver adapter on a deployed j2se engine.
I'm now trying to convert the xi-xml structured file to a flat file again on the j2se side (the same flat file format it originally had).
My original flat file looks like this -
477
477=AA1
My xml file looks like this -
<?xml version="1.0" encoding="UTF-8"?>
<ns0:ResultMessage xmlns:ns0="urn:xxxx-com:a_test_j2se_filetofile">
<Item>
<field1>477</field1>
</Item>
<Item>
<field1>477</field1>
<field2>AA1</field2>
</Item>
</ns0:ResultMessage>
I am using these content conversion parameters:
xml.addHeaderLine=0
xml.fieldSeparator==
xml.endSeparator='nl'
I get this error on the integration engine (sxmb_moni):
Error while sending by HTTP (error code: 500, error text: Internal Server Error:java.lang.NullPointerException) (See attachment HTMLError for details)
and the j2se adpater log says this:
17:16:32 (4120): Message "13b9d644-54c9-4ffb-0c40-db4c14458d77" of type "application/xml", kind "B" received
17:16:32 (4124): Parsing XML message
17:16:32 (4131): ERROR: Message processing failed with "java.lang.NullPointerException"
What am i missing?So, now... I did a test configuration in XI and sent your test-payload...it worked.
The J2SE adapter configuration:
File adapter java class
classname=com.sap.aii.messaging.adapter.ModuleXMB2File
version=30
mode=XMB2FILEWITHCONVERSION
#Adress for XMB endpoint -
XI.httpPort=8111
XI.httpService=/file/receiver
#File Adapter specific parameters -
file.createDir=1
file.targetDir=c:/transfer/inbound
file.targetFilename=xmboutput.txt
#file.writeMode=append
#file.writeMode=overwrite
file.writeMode=addCounter
file.counterMode=immediately
#file.counterMode=afterFirst
file.counterSeparator=_
file.counterFormat=00000
file.counterStep=1
#File Content Conversion specific parameters -
xml.addHeaderLine=0
xml.fieldSeparator==
xml.endSeparator='nl'
And here the configuration of the receiver communication channel in the integration directory:
Adapter Type: XI
Receiver
Transport-Protocol: HTTP 1.0
Message-Protocol: XI 3.0
Adapter-Engine: Integration Server
Adressing-Type: URL Address
Target Host: <yourJ2SEip>
Service Number: 8111
Path Prefix:http://<yourJ2SEip>:8111/file/receiver
Authentication Data
Logon data for non-SAP systems
User
Password
That's it... sent your payload and got the wished result:
477
477=AA1
Regards,
Heinrich
Maybe you are looking for
-
I upgrade my ssd for my macbook pro retina from the 256 to 480 GB but when I tunr it on or restarted the computer the gray screen that is suppost to apper dosent show insted a screen with lettler show before the login screen besides that the computer
-
Is there a way of transferring my music from my ipad2 to my iPhone 5
Is there a way to move my music from my iPad to my iPhone?
-
How to make join bsis,bkpf,bseg table with zdbb and zobb table for data retrieval
HI, I have an abap development requirement in which i have to retrieve data fields from different table, like bsis ,bkpf, bsip, bsas, pyar, lfa1,skat,etc. I have retrieved data from bsis and bkpf and bseg by finding common field like "belnr, budat
-
Hi, my ipad got stolen and i was wondering if there is anyway of finding out the serial number remotely from another apple device?
-
I am running Lightroom 3.4.1 on Windows Vista Pro 64 bit, everything has been working flawlessly for months. In the last few days when trying to import photos directly from the camera (5d mark II and 7d) the previews suddenly stopped showing - instea