Sender Adapter File Content Conversion
Hi everyone,
Can someone help me out here?
For some reasons, out of the fields declared, only 20 gets filled!
Scenario, I've configured the file sender adapter with file content conversion. It's picking up an fixed length ASCII file.
Here are the Content Converion Parameters:
Document Name: MT_Site
Recordset Name: Rootnode
Recordset Structure: Site,*
Recordset Sequence: Ascending
Site.fieldNames= Site_Number,Participant_Number,OPIS_Terminal,ntework_list,tax_code1,tax_code2,tax_code3,tax_code4,CFN_Product,CFN_Product_1,CFN_Product_2,CFN_Product_3,CFN_Product_4,CFN_Product_5,CFN_Product_6,CFN_Product_7,CFN_Product_8,CFN_Product_9,Name,Address,City,Province_state,Region,Filler
Site.fieldFixedLengths= 6,4,4,6,2,2,2,2,2,2,2,2,2,2,2,2,2,2,30,26,26,2,1,1
Site.processFieldName= fromConfiguration
Site.lastFieldsOptional= YES
Site.endSeparator= 'nl'
So only the first 20 fields gets filled!
Thanks for your help on this!
check if the number of characters in the file matches the total in the content conversion for one record line.
if ur message type has three fields a1,b1,c1 of length 10,10,5 respectivvely and the same is maintained in CC, if u have the file data as 123456789abcdef the data for <b>a1</b> will be 123456789a and for <b>B1</b> it will be bcdef and no data for C.....hence this check
Message was edited by:
Prabhu S
Similar Messages
-
Problem with Sender Adapter File Content Conversion
Hi all!
I have a question about file content conversion in sender file adapter.
I have file like:
{field1
field2
field3
field4
$
{field5
field6
field7
field8
And i need to get file like:
<dealings>
<deal>
<field1>{field1</field1>
<field2>field2</field2>
<field3>field3</field3>
<field4>field4</field4>
<field5>-}*</field5>
</deal>
<deal>
<field1>{field5</field1>
<field2>field6</field2>
<field3>field7</field3>
<field4>field8</field4>
<field5>-}*</field5>
</deal>
</dealings>
I put content conversion parameters:
deal.fieldSeparator = $
deal.fieldNames = field1,field2,field3,field4,field5
And i get a file like:
<ns:mt_swift_file>
<dealings>
<deal>
<field1>{field1</field1>
</deal>
<deal>
<field1>field2</field1>
</deal>
<deal>
<field1>field3</field1>
</deal>
<deal>
<field1>field4</field1>
</deal>
<deal>
<field1>-}*</field1>
</deal>
<deal>
<field1/>
</deal>
<deal>
<field1>{field5</field1>
</deal>
<deal>
<field1>field6</field1>
</deal>
<deal>
<field1>field7</field1>
</deal>
<deal>
<field1>field8</field1>
</deal>
<deal>
<field1>-}*</field1>
</deal>
</dealings>
</ns:mt_swift_file>
What i do wrong?
As i understand, XI put string to a separate tag after symbol 'nl', but how can i get structure without unnecessary tags?Hi,
Check some links for FCC
Introduction to simple(File-XI-File)scenario and complete walk through for starters(Part1)
Introduction to simple (File-XI-File)scenario and complete walk through for starters(Part2)
File Receiver with Content Conversion
Content Conversion (Pattern/Random content in input file)
NAB the TAB (File Adapter)
Introduction to simple(File-XI-File)scenario and complete walk through for starters(Part1)
Introduction to simple (File-XI-File)scenario and complete walk through for starters(Part2)
How to send a flat file with various field lengths and variable substructures to XI 3.0
Content Conversion (Pattern/Random content in input file)
NAB the TAB (File Adapter)
File Content Conversion for Unequal Number of Columns
Content Conversion ( The Key Field Problem )
The specified item was not found.
File Receiver with Content Conversion
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Regards,
Phani -
Sender Adapter File Content Conversion - question
Hi!
Could you help me to make xml-file from csv?
I have file like:
12345#254#9765#89654
55#9066#77127#47
And i need file like:
<dealings>
<deal>
<field1>12345</field1>
<field2>254</field2>
<field3>9765</field3>
<field4>89654</field4>
</deal>
<deal>
<field1>55</field1>
<field2>9066</field2>
<field3>77127</field3>
<field4>47</field4>
</deal>
</dealings>
I haven't key fields - all fields are accidental. And lengths of all fields are accidental.
How to put content conversion parameters?
Thank you.HI
File Content prameters for the Sender Adapter
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
File content conversion sites
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Please see the below links for file content conversion..
The specified item was not found. - FCC
The specified item was not found. - FCC
File Content Conversion for Unequal Number of Columns
File Content Conversion for Unequal Number of Columns - FCC
Content Conversion (Pattern/Random content in input file)
Content Conversion (Pattern/Random content in input file) - FCC
XI Configuration for MDM Integration - Sample Scenario - FCC - MDM
XI in the role of a FTP
XI in the role of a FTP
File content conversion sites
Introduction to simple(File-XI-File)scenario and complete walk through for starters(Part1)
Introduction to simple (File-XI-File)scenario and complete walk through for starters(Part2)
File Receiver with Content Conversion
Content Conversion (Pattern/Random content in input file)
NAB the TAB (File Adapter)
Introduction to simple(File-XI-File)scenario and complete walk through for starters(Part1)
Introduction to simple (File-XI-File)scenario and complete walk through for starters(Part2)
How to send a flat file with various field lengths and variable substructures to XI 3.0
Content Conversion (Pattern/Random content in input file)
NAB the TAB (File Adapter)
File Content Conversion for Unequal Number of Columns
Content Conversion ( The Key Field Problem )
The specified item was not found.
File Receiver with Content Conversion
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Please see the below links for file content conversion..
The specified item was not found. - FCC
The specified item was not found. - FCC
cheers -
Doubt regarding Sender adapter file content conversion to RFC
Hi Experts,
Below is the my Source and Target XML structure ( i have creaated source structure same as target RFC structure), This scenario is working fine when i give XML file as input. File -> XI -> RFC , xml file is able to update the information in R3.
How should i configure sender file adapter for file content conversion for above structure(in this case input is fixed lenth text), and i could able to change source structure according to our req, without changing target RFC strucuture.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_HSA_IDNumber xmlns:ns0="urn:passhe.com/UpdateIdNumberISA32">
<COMMIT_I>X</COMMIT_I>
<IDENTIFICATION>
<STUDENT>6500001191</STUDENT>
<ID_TYPE>FS0030</ID_TYPE>
<ID_NUMBER>testxml</ID_NUMBER>
<VALID_FROM>20070421</VALID_FROM>
<VALID_TO>20091231</VALID_TO>
</IDENTIFICATION>
</ns0:MT_HSA_IDNumber>
I have configured sender file adapter with FCC like :
Document name as: MT_HSA_IDNumber
Document name space as: urn:passhe.com/UpdateIdNumberISA32
Record structure as: COMMIT_I,1,IDENTIFICATION,1
COMMIT_I.fieldNames : COMMIT_I
COMMIT_I.fieldFixedlengths: 1
IDENTIFICATION.fieldNames: STUDENT,ID_TYPE,ID_NUMBER,VALID_FROM,VALID_TO
IDENTIFICATION.fieldFixedlengths: 12,6,60,8,8
i am getting error like this: even when i change source structure like below metioned:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_HSA_IDNumber xmlns:ns0="urn:passhe.com/UpdateIdNumberISA32">
<COMMIT>
<COMMIT_I>X</COMMIT_I>
</COMMIT>
<IDENTIFICATION>
<STUDENT>6500001191</STUDENT>
<ID_TYPE>FS0030</ID_TYPE>
<ID_NUMBER>idnumber1</ID_NUMBER>
<VALID_FROM>20070421</VALID_FROM>
<VALID_TO>20091231</VALID_TO>
</IDENTIFICATION>
</ns0:MT_HSA_IDNumber>
Conversion initialization failed: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'COMMIT_I.fieldFixedLengths' or 'COMMIT_I.fieldSeparator' is missing Consistency check: no. of arguments in 'COMMIT_I.fieldFixedLength' does not match 'COMMIT_I.fieldNames' (0 <> 1)
Please help me out
thanks
dhanushHi Dhanush,
Try giving the Sender FCC this way for the source structure you have mentioned above.
Record structure as: COMMIT,1,IDENTIFICATION,1
COMMIT.fieldNames : COMMIT_I
COMMIT.fieldFixedlengths: 1
Hope this helps.
Thanks and Regards,
Induja -
Sender adapter: File content conversion suggestion
Hi all,
I require your suggestion on File content conversion with Sender File adapter. I am having a scenario where I would be getting multiple orders data i.e., header and item information in a single file. Suppose, we have given a chance to design the source structure. So, which would be the better way for having the source structure so that it would be easy for file content conversion and mapping. Is it like Method 1 or Method II?
Method I:
Orderno,FieldA,FieldB,FieldC
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,FieldA,FieldB,FieldC
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,FieldA,FieldB,FieldC
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Method II:
Orderno,FieldA,FieldB,FieldC
Orderno,FieldA,FieldB,FieldC
Orderno,FieldA,FieldB,FieldC
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
If you suggest method I, can you let me know how the content conversion parameters look like?
Thanks in Advance,
Adithya K
Message was edited by:
Adithya KAdithya,
Looking at your input file I think a structure as below would be better.
<Order_Data>
<Orderno>
<Orderno/>
<FieldA/>
<FieldB/>
<FieldC/>
</Orderno>
<Items>
<Orderno/>
<OrderItem/>
<Field1/>
<Field2/>
<Field3/>
<Field4/>
<Field5/>
</Items>
</Order_Data>
Content Conversion Parameters for this would be:
RecordSet Structure OrderData,,Orderno,1,items,
OrderData.fieldNames Orderno,items
OrderData.fieldSeparator 'nl'
OrderData.endSeparator 'nl'
Orderno.fieldNames Orderno,FieldA,FieldB,FieldC
Orderno.fieldSeparator ,
Orderno.endSeparator 'nl'
items.fieldNames Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
items.fieldSeparator ,
Items.endSeparator 'nl'
ignoreRecordsetName true
Depending on which are your key fields you will have to put two more parameters:
Orderno.keyFieldValue
items.keyFieldValue
Hope this would be of some help.
Thanx,
Manju. -
File sender adapter and content conversion with polish character
We are loading a csv file with PI 7.0 file sender adapter using "content conversion" - all fields go through EXCEPT a special character hex '208C' (space in front) looks like "Æ" is converted to hex 'C28C'.
We are using code page UTF8
We are using:
enclosuresign "
enclosuresignescape ""
fieldcontentformatting nothing
enclosureconversion NO
Hope some one can helpHi Bohamo,
Hope you have set the following for your file sender adapter :
1. Transfer Mode is set to Binary,
2. File Type Text,
3. Encoding ISO-8859-1( for Western European Latin ).
Inorder to recognize Polish Character, try as follows :
Your sender file after coming into Pi has XML encoding declaration 'UTF-8'.
Write a simple XSLT mapping to change the value of the attribute "encoding" to "ISO-8859-1" in the output XML of message mapping . Include this XSLT map as the second mapping step in your interface mapping.
First step in your interface mapping will be your already existing message mapping.
An example of the XSL code :
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method='xml' encoding='ISO-8859-1' />
<xsl:template match="/">
<xsl:copy-of select="*" />
</xsl:template>
</xsl:stylesheet>
or you can also do java mapping if you are comfortable with java code !
Cheers,
Ram. -
Sender File Adapter - File Content Conversion
Hello,
i do have a problem with the file content conversion at the sender file adapter.
I have configured the file content conversion with key field defined
keyfield: key
recordsetstructure is set as head,1,item,*
head.fieldSeparator |
head.beginSeparator |
head.endSeparator |
head.keyFieldValue H
head.fieldNames key,....
item.fieldSeparator |
item.beginSeparator |
item.endSeparator |
item.keyFieldValue I
item.fieldNames key,....
When i run it like this it will not read since it has a problem to identify the key fields.
When ever i change the whole logic to be not based on fieldseparator but on fixed length, everything is working perfectly fine.
but this unfortuantly doesn't help as i have no fixed structure for the rest of the fields.
also when i change the recordsetstructure to head,1,item,1 my file is also processed correctly, of corse only for the first line, it at least tells me that the file structure is correctly defined.
Can anyone help why the identification for the keyfields doesn't work with field names and separator but in the same set up with fixed lengths ?
thanks a lotHello All,
thanks for the helpful answers.
So i tried Jayan tip and removed the begin Separter.
Unfortuantly my file is really looking like this |H|...|...| for the header record
and for the item record |I|...|...| ( this was an" I" like in Item ...
In my opinion this means i really do have a begin seperator which is the same like the field separator.
When i removed it from both the file and the config it started to work.
So i wrote an java function which will trow away the first digit in this case and integrated it in my szenario.
So that when this file is read there is no | as a begin flag anymore.
And the whole thing starts to work, this sounds more like a bug then a feature but anyway i am happy.
so thanks a lot
Tina -
Remove of quotes"' in the sender file adapter -- file content conversion
HI Guys,
MY source file is comma seprated file (,) in the file i had quotes" " for the data like
"5000543","0.00","03/04/2009",
is there any way i can remove the quotes in file content conversion
Please help me on this
Regards
SrinivasSrinivas,
This should not be a big deal, because your fields are separated by a comma. So you need to keep in mind like you are doing the content conversion for a csv file.
See this blogs for some information:
/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
In the second blog 1345 there are parameters for content conversion. So similarly mention your conversion parameters in your sender communication channel. So after converting to xml your input fields have values like:
field1: "5000543"
field2: "0.00"
field3: "03/04/2009"
So all your field values has with "". Now you can use either standard replace funciton or a udf as given above and then it will remove the quotes and then you can map according to your requirements. If you think sometimes you can get quotes and sometime not in the file then you can use function like startswith or endswith along with exists and can map accordingly.
Regards,
---Satish -
File Adapter - File Content Conversion to XML last element missing
I'm using the SAP File Adapter with File Content Conversion to convert | (pipe) delimited records into XML.
When the last field is blank, I would expect that an empty node gets created, however, the node doesn't get created at all.
For example given these settings...
Record.fieldSeparator = |
Record.endSeparator = 'nl'
Record.fieldNames = FIELD1,FIELD2,FIELD3
Using this three record file as my data...
|123|XYZ
ABC||XYZ
ABC|123|
When converted to XML, this is what the recordset XML structure looks like...
<Recordset>
<Record>
<FIELD1 />
<FIELD2>123</FIELD2>
<FIELD3>XYZ</FIELD3>
</Record>
<Record>
<FIELD1>ABC</FIELD1>
<FIELD2 />
<FIELD3>XYZ</FIELD3>
</Record>
<Record>
<FIELD1>ABC</FIELD1>
<FIELD2>123</FIELD2>
</Record>
</Recordset>
Notice that the last record is missing the "FIELD3" element.
Edited by: William Krick on Jun 17, 2011 4:49 PMGiuseppe Agnello wrote:
> Sorry, there was a typo in the parameter name.
> Word fields should start with capital F.
> Try with Record.missingLastFields, with value "add"
>
> http://help.sap.com/saphelp_nw70/helpdata/en/ae/d03341771b4c0de10000000a1550b0/frameset.htm
>
> Similar issue was resolved with same parameter in this thread:
> Sender file adapter with FCC not creating last field
That did the trick. It was a typo. Thanks Giuseppe.
I'm willing to bet that this parameter was added to fix the parsing bug without breaking existing users that had already worked around the original bug. You shouldn't really have to special case the last field. -
Doubt regarding Recever file adapter file content conversion (FCC)
Hi Expetrts, below is the my target structure.
<?xml version="1.0" encoding="TF-8"?>
<ns1:MT_StatusChange xmlns:ns1="urn:passhe.com/ChangeOfStatusISA26">
<IV_ST_OBJID>65390091</IV_ST_OBJID>
<IV_BEGDA>25082008</IV_BEGDA>
<LT_STUDENT_STATUS>
<item>
<HS_CAMPUS>65</HS_CAMPUS>
<STOBJID>65390091</STOBJID>
<STUDENT12>michal</STUDENT12>
<HS_STATUS>MISC</HS_STATUS>
<item>
<LT_STUDENT_STATUS>
</ns1:MT_StatusChange>
How to configure in File Content Conversion Recever File Adapter for above target structure. i have done as below, but i am getting error. please correct me where i did mistake.
Recordset Structure : IV_ST_OBJID,IV_BEGDA,LT_STUDENT_STATUS,item
IV_ST_OBJID.fieldNames : IV_ST_OBJID -> for this field there is no subfield
IV_ST_OBJID.fieldSeparator: , (comma)
IV_BEGDA.fieldNames : IV_BEGDA -> for this field there is no subfield
IV_BEGDA.fieldSeparator: , (comma)
LT_STUDENT_STATUS.fieldNames : HS_CAMPUS,STOBJID,STUDENT12,HS_STATUS
LT_STUDENT_STATUS.fieldSeparator: 'nl'
item.fieldNames : HS_CAMPUS,STOBJID,STUDENT12,HS_STATUS
item.fieldSeparator: , (comma)
I am getting below error:
'Conversion configuration error: Unknown structure 'ns1:MT_StatusChange' found in document', probably configuration error in file adapter (XML parser error)'
Thanks
Dhanush.Hi Dhanush,
It is better always if u have a structure with Header and trailers if u have a subsrtuctures in it & always try make it in this format:
<?xml version="1.0" encoding="UTF-8"?>
<MT_ContentConversion_Test>
<Header>
<F1>HF1</F1>
<F2>HF2</F2>
</Header>
<Item>
<F1>IF1</F1>
<F2>IF2</F2>
<Item>
<Trailer>
<F1>TF1</F1>
<F2>TF2</F2>
</Trailer>
</ns0:MT_ContentConversion_Test>
Try to go through this blog it will be very helpful to u :
/people/shabarish.vijayakumar/blog/2007/08/03/file-adapter-receiver--are-we-really-sure-about-the-concepts
Regards,
Vinod. -
Create substructures via file adapter - file content conversion
I have a need to create a structure as follows using file content conversion from a flat file
source:
H1~00
S1~1A
L1~1B
S1~2A
L1~2B
S1~3A
L1~3B
<?xml version="1.0" encoding="UTF-8"?>
<ns:x_MT xmlns:ns68="urn:abt.com/IAM">
<DocHeader>
<Label />
<type />
</DocHeader>
<DocItem>
<Ship>
<Label />
<type />
</Ship>
<Lines>
<Label />
<type />
</Lines>
</DocItem>
</ns:x_MT>
I can successfully create a x_MT but I do not get the heirarchy (DocItem node) and therefore I'm having trouble on the mapping side.
My file content conversion is as follows:
Document Name: x_MT
Document Namespace: urn:abt.com/IAM
Recordset Name: x_DT
Recordset structure: DocHeader,1,Ship,,Lines,
Recordsets per message: *
Key Field Name: label
DocHeader.fieldSeparator '0x7E'
DocHeader.endSeparator 'nl'
DocHeader.fieldNames label,type
DocHeader.keyFieldValue H1
Ship.fieldSeparator '0x7E'
Ship.endSeparator 'nl'
Ship.fieldNames label,type
Ship.keyFieldValue S1
Lines.fieldSeparator '0x7E'
Lines.endSeparator 'nl'
Lines.fieldNames label,type
Lines.keyFieldValue L1
What I get is a structure without the node DocItem and therefore appears like a flat structure and mapping fails since I have multiple 'Lines' and only the last one gets mapped.
I've read all the weblogs around this topic and none seemed to address more than one node. Please help.
Thank you,
ParimalaHi Parimala,
As per SAP help document the structure created by content conversion would look like this..
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
<documentName>...
<recordset>
<NameA>
<field-nameA1>field-value</field-nameA1>
<field-nameA2>field-value</field-nameA2>
<field-nameA3>field-value</field-nameA3>
</NameA>
<NameB>
<field-nameB1>column-value</field-nameB1>
<field-nameB2>column-value</field-nameB2>
<field-nameB3>column-value</field-nameB3>
</NameB>
</recordset>
<recordset>
</recordset>
</documentName>...
If you require a <DocItem> node then you have to handle this in mapping.
Regards
Anand -
File Receiver Adapter(File Content Conversion)
Hi All,
If i open my file using notepad after File Content Conversion i am seeing a BOX kind of Symbol after Every Row ..
but the same file if i open using word i am not seening that BOX ,,and the file is perfect ..can any plz tell what is the reason ... ?
i gave<b> filedfixedlenght & Endsaparator</b> only
is that i need to add any thing in the File Content Conversion parameters...
thanks
shakifHi Mohammad,
If I am not wrong "Box kind of symbol" would be "Symbol" for end of the line(EOL).
In win-word if you click on "Show/Hide tab" You will see same symbols.
Does it makes any problem while processing file?
Let us know more details.
Nilesh -
Sender Side: File Content Conversion
I have a text file, with following values.
AAA056070144AEA056070144AACTESTPO271+(.......sequence continues)
Length of TAG (Like AAA, AEA,AAC etc) is fixed (i.e.3 ). Length of the Values coming after TAG are not fixed. Field Separator is '+'.
Source structure is
DT_OrdersFromECHO
|_ ECHO_SO
|_ Value
My requirement is after FCC, I sud get
ECHO_SO
|_ Value : AAA056070144
ECHO_SO
|_ Value : AEA056070144
ECHO_SO
|_ Value : AACTESTPO271
If I mention field Separator and filed Names ,it gives an error
Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 1 according to structure 'ECHO_SO':java.lang.Exception: ERROR in configuration / structure 'ECHO_SO.': More elements in file csv structure than field names specified!
How can i achieve it?Hi Snehal,
>AAA1234AEA12345BAA3456BAD345678CAA9876+CAD13445
So you will have only one line in the input file which have all the records separated by + sign. Right?
If this is the case then you cannot use FCC of the sender file channel. because at a time the fields or the values are not fixed..
So I will suggest you to read the file into PI (without FCC) and then break it into
TAG : AAA
Value: 1234
TAG : AEA
Value: 12345
TAG : BAA
Value: 3456
either using XSLT of java mapping.. So your interface mapping will have this mapping as 1st and your normal (source to targte conversion) mapping as 2nd
Regards
Suraj -
Receiver File Adapter - File Content Conversion
My XML is like this in XI:
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:Target xmlns:ns0="http://test.com">
- <Target>
- <Directory>
<Comment_1>#</Comment_1>
<Directory_Rec>testfile.csv</Directory_Rec>
</Directory>
- <File>
<Comment_2>#</Comment_2>
<File_Rec>testfile.csv</File_Rec>
</File>
<Target_Rec>Record 1</Target_Rec>
<Target_Rec>Record 2</Target_Rec>
<Target_Rec>Record 3</Target_Rec>
</Target>
</ns0:Target>
and my CSV file should looklike
#testfile.csv
#testfile.csv
Record 1
Record 2
Record 3
How can I do that. Would someone help he. If I put fieldseparator as 'nl' its writing as follows
Record 1
Record 2
Record 3Hi Ram,
with the structure you have given we can not achieve your target csv structure. at the max you can achieve the output as the following
#testfile.csv
#testfile.csv
Record 1Record 2Record 3
using the below specified config
Recordset Structure: Target,Directory,File
Target.fieldSeparator as 'nl'
Directory.fieldSeparator as '0'
Directory.endSeparator as 'nl'
File.fieldSeparator as '0'
File.endSeparator as 'nl'
in teh output the last line Record 1... comes like that because the File.fieldSeparator's value overrides the parents fieldSeparator i.e of Targets. '0' stands for no separator.
if you want to achieve your target output Target_Rec should be inside one more node say TargetRecords
and XML should be like this in XI:
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:Target xmlns:ns0="http://test.com">
- <Target>
- <Directory>
<Comment_1>#</Comment_1>
<Directory_Rec>testfile.csv</Directory_Rec>
</Directory>
- <File>
<Comment_2>#</Comment_2>
<File_Rec>testfile.csv</File_Rec>
</File>
<TargetRecords>
<Target_Rec>Record 1</Target_Rec>
<Target_Rec>Record 2</Target_Rec>
<Target_Rec>Record 3</Target_Rec>
</TargetRecords>
</Target>
</ns0:Target>
and the content conversion configuration should be
Recordset Structure: Target,Directory,File,TargetRecords
Target.fieldSeparator as 'nl'
Directory.fieldSeparator as '0'
Directory.endSeparator as 'nl'
File.fieldSeparator as '0'
File.endSeparator as 'nl'
TargetRecords.fieldSeparator as 'nl'
Regards,
Sundar -
JMS receiver adapter file content conversion issue
I'm able to successfully convert complex structure using XML2Plain using StructXML2Plain module keys. However, I'm having trouble with a simple structure. All I see is a LF in the queue.
For the simple structure, I create the message via ABAP mapping unlike complex structure.
My data looks like this -
<?xml version="1.0" ?>
- <ns1:HQ_reply_MT xmlns:ns1="urn:abc.com:HQToSAP">
<Data1> PIPXSDI3070 00000 00342YSDI3070PROCESS_MQSERIES HQXPLOR10 XPLOR.ORDER.RESULTS 0000 000000000000000086312 Invalid Process flag : 2. 065</Data1>
</ns1:HQ_reply_MT>
the only think I'm missing is the encoding="UTF-8" in the first line of the xml document. Not sure how to get this via ABAP mapping.
My conversion rules are as follows -
<b>Transform.Class com.sap.aii.messaging.adapter.Conversion
Transform.ContentType text/plain;charset=utf-8
xml.addHeaderLine 0
xml.conversionType SimpleXML2Plain
xml.fieldSeparator ","</b>
I've tried Transform.ContentType and TransformContentType, both result in success with only LF in the queue.
At this point I'm thinking its something to do with my XML message I create. Any ideas?
Thank you.You need an additional hierarchy level:
root
-> row
-> data
In your example:
<?xml version="1.0" ?>
<ns1:HQ_reply_MT xmlns:ns1="urn:abc.com:HQToSAP">
<b><row></b>
<Data1> PIPXSDI3070 00000 00342YSDI3070PROCESS_MQSERIES HQXPLOR10 XPLOR.ORDER.RESULTS 0000 000000000000000086312 Invalid Process flag : 2. 065</Data1>
<b></row></b>
</ns1:HQ_reply_MT>
Regards
Stefan
Maybe you are looking for
-
Is there a way to have snap to functionality on the ipad3 apps screen like for MAC and win7?
Researching ipad3 and snap to functionality, similiar to that found on MACs and PCs using WIN7. Searched the web but I did not find anything specific to the ipad.
-
Recorded Sound, please help
I shot a movie recently, and since the audio we recorded on some of the scenes sucked, we dubbed a few of them. Some of these scenes take place outside, but we dubbed them in a small room and when the recorded sound is placed over the scene, it sound
-
How to get back bookmarks missing in ipad 3
How to get back disappeared bookmarks in ipad 3 air
-
The application Microsoft Word can't be opened - 1712
Now, suddenly, I cannot open it, or read/create any files, even though I can see the documents in my folders, and the light under the Icon is lit on the dock. When I open my Applications Folder, Word is shown as in there, but when I clicked on it, I
-
Hi For importing Bill of Material there are two templetes oProduct and oProductLines. In oProduct templete i;ve mentioned the parent item name so is it necessary to write the name of parent item in front of child items in oProductLines templete, as i