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
Similar Messages
-
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 -
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 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. -
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. -
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 -
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. -
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 -
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 -
XI File Content Conversion Issue
Peace to All,
I am having this funny problem in File Content Conversion:
com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:ZIN_MT. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
What did I do:
DATA TYPE1.
Structure1: TESTOUT_DT Complex Type
REC Element 1-1
Name11 Element xsd:string 1-1
Name12 Element xsd:string 1-1
Structure2: TESTIN_DT Complex Type
Name21 Element xsd:string 1-1
Name22 Element xsd:string 1-1
Mapping:
name11-name21
name12-name22
Configuration of Sender File :
DocumentName : TESTOUT_DT
Document NameSpace : http:/myspace.com/test1
RecordSetName : Recordset
Recordset Structure : Rec,1
Rec.fieldNames :name11,name12
Rec.fieldSeparator :,
Rec.endSeparator :'nl'
So when I test it it picks up the file but is unable to map it to destination.
Can anyone help me to find out why?.
One more hint is that I am using Third party Business System and I use the same for both file CC sender channel and Filereceiver channel.
I will appreciate your help.
ThanksMany thanks to your guidance...SDN is the best...It worked
Moving forward I encountered another issue, when I extend it a Trail to it and end up with this mapping:
ZOUT_MT 11 -ZIN_MT 11
Recordset 1--1
Rec 1unboundedTest01 1-----unbounded
key(string) 1...1----
key 1..1(string)
name11(string) 1..1----
name21 1..1(string)
name12(string) 1..1----
name22 1..1(string)
Trail 1...1 -
Trail 1---1
key(string) 1..1 -
key 1..1(string)
test(string) 1...1 -
test1..1 (string)
In Config: Sender File CC
Doc Name :ZOUT_MT
Doc namspace : http://mytest.com/test1
RecordsetName : Recordset
Recordset Structure : Rec,*,Trail,1
Key Field Name : key
Recordset per message : 1
Rec.fieldNames : key,name11,name12
Rec.fieldSeparator : ,
Rec.endSeparator : 'nl'
Rec.processConfiguration: FromConfiguration
Rec.keyFieldValue : 1
Trail.fieldNames: key,test
Trail.endSeparator: 'nl'
Trail.processConfiguration : FromConfiguration
Trail.keyFieldValue : 1
Trail.fieldSeparator : ,
From all this work above , when I put the file having:
1,111,112
1,222,223
1,333,334
1,99
The output file in empty (null)...
Does anyone out there understand why the output file is becoming null..
here is the log I get in workbecnh (commuunication channel)
Audit Log for Message: c1a434f5-ad9f-4a26-08c1-e7d579a5927a
Time Stamp Status Description
21.01.2009 11:48:22 Success Channel ztest_sender_cc: Entire file content converted to XML format
21.01.2009 11:48:22 Warning Channel ztest_sender_cc: Empty document found. Proceed without sending message
21.01.2009 11:48:22 Success File "/mylocation/interface/SCM/somefolder/in/shilpagirlsinput.txt" deleted after processing -
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 -
Hi ,
My Scenario is File to FIle having Sender .CVS using File Content Conversion
The sender file is coming below as an example,
a,b,"c,d,e",f
Here I need to consider Double code value "c,d,e" as a single field value using File separator as COMMA(,)
Please guide me how to achieve this type of file using FCC with file separator COMMA.Hi Dilip,
We had a similar problem where the name for eg: "John,Smith" when written into a .csv file were considered as "John","Smith" as two different entities instead of one. The solution was we used the character quotes " before and after the name field message mapping before it is sent to channel for .csv conversion as shown in the screenshot. Now it is treated as one single filed instead of two.
Hope this helps!
Thanks,
Divya. -
Sender File Content Conversion Issue
Hi guys,
I´m trying to convert a flat file into a xml structure using FCC. The flat file looks like:
G220520102205201003062010
D824000 006500015010000000000000GPDME 4521005 LP00
D351023 006500015010000000000000GPDME 4521005 LP00
D523000 006500015010000000000010GPDME 4521005 LP00
G220520102205201003062010
D824000 006500012510000002442490GPDME 4521005 LP00
D351023 006500012510000000049530GPDME 4521005 LP00
D523000 006500012510000000517790GPDME 4521005 LP00
G220520102305201003062010
D824000 006500012510000000025240GPDME 4521005 LP00
I´ve created the following DT:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:sap.com" targetNamespace="urn:sap.com">
<xsd:complexType name="DT_PRODUCTS_OUT">
<xsd:sequence>
<xsd:element name="RECORDS" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="REG_TYPE" type="xsd:string"></xsd:element>
<xsd:element name="PSTNG_DATE" type="xsd:string"></xsd:element>
<xsd:element name="DOC_DATE" type="xsd:string"></xsd:element>
<xsd:element name="FECINT" type="xsd:string"></xsd:element>
<xsd:element name="DETAIL" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="REG_TYPE" type="xsd:string"></xsd:element>
<xsd:element name="MATERIAL" type="xsd:string"></xsd:element>
<xsd:element name="PLANT" type="xsd:string"></xsd:element>
<xsd:element name="STGE_LOC" type="xsd:string"></xsd:element>
<xsd:element name="MOVE_TYPE" type="xsd:string"></xsd:element>
<xsd:element name="ENTRY_QNT" type="xsd:string"></xsd:element>
<xsd:element name="ENTRY_UOM" type="xsd:string"></xsd:element>
<xsd:element name="ITEM_TEXT" type="xsd:string"></xsd:element>
<xsd:element name="COSTCENTER" type="xsd:string"></xsd:element>
<xsd:element name="TR_PART_BA" type="xsd:string"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
As you can see the record DETAIL is nested to the record RECORDS. The point is that with the standard module of the FCC I can´t achieve my requirements, I only could get an XML structure like this:
<Recordset>
*<RECORDS>*
<REG_TYPE>G</REG_TYPE>
<PSTNG_DATE>22052010</PSTNG_DATE>
<DOC_DATE>22052010</DOC_DATE>
<FECINT>03062010</FECINT>
*</RECORDS>*
*<DETAIL>*
<REG_TYPE>D</REG_TYPE>
<MATERIAL>824000</MATERIAL>
<PLANT>0065</PLANT>
<STGE_LOC>0001</STGE_LOC>
<MOVE_TYPE>501</MOVE_TYPE>
<ENTRY_QNT>0000000000000</ENTRY_QNT>
<ENTRY_UOM>GPD</ENTRY_UOM>
<ITEM_TEXT>ME</ITEM_TEXT>
<COSTCENTER>4521005</COSTCENTER>
<TR_PART_BA>LP00</TR_PART_BA>
*</DETAIL>*
*<DETAIL>*
<REG_TYPE>D</REG_TYPE>
<MATERIAL>351023</MATERIAL>
<PLANT>0065</PLANT>
<STGE_LOC>0001</STGE_LOC>
<MOVE_TYPE>501</MOVE_TYPE>
<ENTRY_QNT>0000000000000</ENTRY_QNT>
<ENTRY_UOM>GPD</ENTRY_UOM>
<ITEM_TEXT>ME</ITEM_TEXT>
<COSTCENTER>4521005</COSTCENTER>
<TR_PART_BA>LP00</TR_PART_BA>
*</DETAIL>*
*<DETAIL>*
<REG_TYPE>D</REG_TYPE>
<MATERIAL>523000</MATERIAL>
<PLANT>0065</PLANT>
<STGE_LOC>0001</STGE_LOC>
<MOVE_TYPE>501</MOVE_TYPE>
<ENTRY_QNT>0000000000010</ENTRY_QNT>
<ENTRY_UOM>GPD</ENTRY_UOM>
<ITEM_TEXT>ME</ITEM_TEXT>
<COSTCENTER>4521005</COSTCENTER>
<TR_PART_BA>LP00</TR_PART_BA>
*</DETAIL>*
</Recordset>
But it should look like this, with the records DETAIL inside RECORDS:
<Recordset>
+*<RECORDS>*+
<REG_TYPE>G</REG_TYPE>
<PSTNG_DATE>22052010</PSTNG_DATE>
<DOC_DATE>22052010</DOC_DATE>
<FECINT>03062010</FECINT>
*<DETAIL>*
<REG_TYPE>D</REG_TYPE>
<MATERIAL>824000</MATERIAL>
<PLANT>0065</PLANT>
<STGE_LOC>0001</STGE_LOC>
<MOVE_TYPE>501</MOVE_TYPE>
<ENTRY_QNT>0000000000000</ENTRY_QNT>
<ENTRY_UOM>GPD</ENTRY_UOM>
<ITEM_TEXT>ME</ITEM_TEXT>
<COSTCENTER>4521005</COSTCENTER>
<TR_PART_BA>LP00</TR_PART_BA>
*</DETAIL>*
*<DETAIL>*
<REG_TYPE>D</REG_TYPE>
<MATERIAL>351023</MATERIAL>
<PLANT>0065</PLANT>
<STGE_LOC>0001</STGE_LOC>
<MOVE_TYPE>501</MOVE_TYPE>
<ENTRY_QNT>0000000000000</ENTRY_QNT>
<ENTRY_UOM>GPD</ENTRY_UOM>
<ITEM_TEXT>ME</ITEM_TEXT>
<COSTCENTER>4521005</COSTCENTER>
<TR_PART_BA>LP00</TR_PART_BA>
*</DETAIL>*
*<DETAIL>*
<REG_TYPE>D</REG_TYPE>
<MATERIAL>523000</MATERIAL>
<PLANT>0065</PLANT>
<STGE_LOC>0001</STGE_LOC>
<MOVE_TYPE>501</MOVE_TYPE>
<ENTRY_QNT>0000000000010</ENTRY_QNT>
<ENTRY_UOM>GPD</ENTRY_UOM>
<ITEM_TEXT>ME</ITEM_TEXT>
<COSTCENTER>4521005</COSTCENTER>
<TR_PART_BA>LP00</TR_PART_BA>
*</DETAIL>*
+*<RECORDS>*+
</Recordset>
Any Idea how to achieve that with File Content Conversion?
Thanks in Advance,
Luis
Edited by: Luis Zarzo on Jun 14, 2010 1:22 PMSorry, I don´t know why my message format has been lost. Hopefully is a bit understandable. The point is that I want to achieve a structure like this:
What I´ve read is that this is not possible to achieve with File Content Conversion, but maybe there is a way.
Otherwise I would like to know if there is an easy way to make this using for example graphical or maybe java mapping.
Thanks a lot,
Luis
Maybe you are looking for
-
About 1356 ERROR:pifreg:can not open registry database error
I test the simpsver using simpclw run on the same machine, the simpsver seen to run normally. After config the correct network option,I test the simpsver on the different machine using simpclw, now I get the "1356 ERROR:pifreg:can not open registry d
-
Hello........ My Hp pavilion dv2910us after install windoas 7 when i try to install my bluetooth driver its say No Bluetooth device was detected............. i try SP38167 And SP46038 but same error .............. what to do............. is it driver
-
New Camera Raw....
I'm a new user to Lightroom. I'm expecting an Olympus E-3 in the next week. About how long can I expect to wait for the new raw file to be supported by LR?
-
I have loaded my music via iTunes Match, have paid the £22.00,but my music is not available on my iPad mini. How do I get music onto my iPad
-
Every time I open Itunes, I get an error message saying that ysloader.exe has stopped working. This began happening after I tried to install that last update. I can't manually download and install the program, nor can I uninstall the iTunes. Have