File Content Conversion Removes Leading Blank/Space
I'm having a problem where file content conversion is trimming leading blanks/space/whitespace from fields when reading in the inbound file. I've seen where people have posted that you need to use fieldContentFormatting to prevent content conversion from stripping the leading/trailing whitespace. I added that parameter to my list (see below example) but it still appears to be trimming the leading whitespace. Look forward to hearing your thoughts. Here are the details:
I'm using fixed length file content conversion for Sender File Adapter (SP15). I have the following parameters set:
Document Name = MaterialData
Recordset name = item
Recordset Structure = MaterialLine, 1
I have:
MaterialLine.fieldNames = matno_external, mat_description
MaterialLine.fieldFixedLengths = 40, 40
MaterialLine.fieldContentFormatting = nothing, nothing
The following is the input file (notice spaces prior to second occurrence of material numbers)
ZED00000001 AIMS LIGHT A
ZED00000001 AIMS LIGHT B
ZED00000002 AIMS SWITCH A
ZED00000002 AIMS SWITCH B
ZED00000003 AIMS SEMICONDUCTOR A
ZED00000003 AIMS SEMICONDUCTOR B
The following is the source XML after file content conversion from SXMB_MONI (note spaces no longer exist in matno_external tag).
<?xml version="1.0" encoding="utf-8" ?>
- <ns:MaterialData xmlns:ns="http://xxxxxxx.com/yyy/test">
- <item>
- <MaterialLine>
<matno_external>ZED00000001</matno_external>
<mat_description>AIMS LIGHT A</mat_description>
</MaterialLine>
</item>
- <item>
- <MaterialLine>
<matno_external>ZED00000001</matno_external>
<create_date>10/09/06</create_date>
<mat_description>AIMS LIGHT B</mat_description>
</MaterialLine>
</item>
- <item>
- <MaterialLine>
<matno_external>ZED00000002</matno_external>
<mat_description>AIMS SWITCH A</mat_description>
</MaterialLine>
</item>
- <item>
- <MaterialLine>
<matno_external>ZED00000002</matno_external>
<mat_description>AIMS SWITCH B</mat_description>
</MaterialLine>
</item>
- <item>
- <MaterialLine>
<matno_external>ZED00000003</matno_external>
<mat_description>AIMS SEMICONDUCTOR A</mat_description>
</MaterialLine>
</item>
- <item>
- <MaterialLine>
<matno_external>ZED00000003</matno_external>
<mat_description>AIMS SEMICONDUCTOR B</mat_description>
</MaterialLine>
</item>
</ns:MaterialData>
Thanks all for your attempts but I figured it out and wasn't this the biggest case of irony.
Here I was trying to prevent leading spaces from being trimmed in the loading of my file and my problem was that when I typed:
MaterialLine.fieldContentFormatting
I actually left a "blank" at the end of the "g" in Formatting. Apparently XI didn't like that and neither gave me a runtime or compile error. Anyway I found this and though I'd share in case anyone else encounters it. I removed the blank and all is working now.
Similar Messages
-
RCVR File Content Conversion - Remove empty Recordsets
Hello everyone,
Here's my scenario: IDOC > XI > TXT (File Content Conversion)
Here's how my output XML currently looks like:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:D001FILE_MT xmlns:ns0="http://www.pharmaindustries.com">
<Recordset/>
<Recordset>
<MATLCODE>00155581</MATLCODE>
<MATLNAME>ALCOHOL REFINED 96% V/V (BALAYAN)</MATLNAME>
</Recordset>
<Recordset>
<MATLCODE>00155581</MATLCODE>
<MATLNAME>ALCOHOL REFINED 96% V/V (BALAYAN)</MATLNAME>
</Recordset>
<Recordset/>
<Recordset>
<MATLCODE>20388853</MATLCODE>
<MATLNAME>POLYSORBATE 60 SD (TWEEN 60 SD)</MATLNAME>
</Recordset>
</ns0:D001FILE_MT>
Currently, the conversion settings in the receiver file adapter results into this:
BLANK
00155581 ALCOHOL REFINED 96% V/V (BALAYAN)
00155581 ALCOHOL REFINED 96% V/V (BALAYAN)
BLANK
20388853 POLYSORBATE 60 SD (TWEEN 60 SD)
I want to get remove the BLANK LINES from the text file so that it now resembles this:
00155581 ALCOHOL REFINED 96% V/V (BALAYAN)
00155581 ALCOHOL REFINED 96% V/V (BALAYAN)
20388853 POLYSORBATE 60 SD (TWEEN 60 SD)
Here are the conmmand parameters already existing in the "Content Conversion Parameters":
Recordset.fieldNames
Recordset.fieldFixedLengths
Recordset.endSeparator
Would anyone know which command I should add in this section so that empty "Recordsets" are removed from the text file?
Thanks in advance!
GlennHi,
as per my understanding, u have teo record sets
i.e Recordset(bold one which has no fileds)
Recordet(which has two fileds)
if you use Recordset.field Separator-- 'nl'
nothing but ignoring the first record set
for second record set(which is not bold)
provide FCC parameters which i have provided previously.
still u r facing problem, try with
ignore recordset name - true
Recordset.fieldContentFormatting - ignore
note: here you have two record set i.e<Recordset>(blod)
<Recordset>(not bold).
warm regards
mahesh. -
File Content Conversion--- Removing Quotations from csv file
I have a csv file in the folowing format:
field1,field2,field3,field4
"111","222","333","444"
"aaa","bbb","ccc","ddd"
Suppose the header name is row in IR.
While configuring the sender file adapter in XI, i have given following parameters under file content conversion.
row.fieldNames=field1,field2,field3,field4
row.fieldSeparator=","
row.processFieldNames=fromConfiguration
row.beginSeparator="
After picking up the XML file XI processes the data so that we have out put as
row
field1 111
field2 222
field3 333
field4 444"
row
row
field1 aaa
field2 bbb
field3 ccc
field4 ddd"
row
My Problem is what parameter should I add in ID to remove this last quote say 444" and ddd" from the XML message ????
I tried using
row.endSeparator=" but it is still giving the same output.
Can anyone help ????????????????????????Hi,
Try this FCC instead
row.fieldNames=field1,field2,field3,field4
row.fieldSeparator=,
row.processFieldNames=fromConfiguration
row.enclosureSign=u201C
row.enclosureSignEsc=u201Cu201C
row.endSeparator='nl'
http://help.sap.com/saphelp_NW04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm
If you specify xml.enclosureSign=u201C and xml.enclosureSignEsc=u201Cu201C, text enclosed in quotation marks is transferred unchanged and the quotation marks are removed.
Thanks
SaNv... -
File Content Conversion: Remove reserved characters from Content
Hi PI Gurus,
we're facing a little problem with FCC in File Receiver Adapter. Sometimes the defined fieldSeparator ("|") comes within the field content.
e.g.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Positions xmlns:ns0="http://test.com">
<Position>
<Value1>001</Value1>
<Value2>Test|Content</Value2>
</Position>
</ns0:Positions>
So, my first thought was to replace all "|" with a litte java mapping beind the actual mapping.
But, is there any possibility to achieve this via configuration of FCC (something like fieldSeperatorSubstitution)?
Help is as always highly appreciated!
Cheers,
Matthias KralHello Hareenkumar,
yes you're totally right. I ran in several OutOfMemoryError while testing the code above. The errors started with messages over 15 MB.
Here's the code, that is productive now. It replaces all Pipes "|" by Slashes "|" and really works fine and performant.
public void execute(InputStream in, OutputStream out)
throws StreamTransformationException {
try {
int totalCount = 0;
byte[] buf = new byte[40960];
int count = 0;
while (count >= 0) {
count = in.read(buf);
totalCount += count;
if (count > 0) {
for (int i=0; i<count; i++){
if (buf<i>==124){
buf<i> = 47;
out.write(buf, 0, count);
} catch (IOException e) {
throw new StreamTransformationException(e.getMessage());
Thank you all again!!!
Cheers Matthias -
Spaces getting trimmed in file content conversion
Hi all,
I am converting a flat file to an XML file by XI. The problem which i am facing in file content conversion is that the spaces in flat file data are getting trimmed to one space in the XML in SXMB_MONI.
The data in flat file is like SOUTHSEA and HANTS is having nearly 8 spaces.
But the data in XML is:
<b><u>SOUTHSEA HANTS PO5 2LZ PO5 2LZ020327</u></b> i.e. in XML, there is only 1 space between SOUTHSEA and HANTS.
The following parameters i have used in file content conversion:
.keyFieldValue '*'
.fieldSeparator 'nl'
.fieldNames RECORD_DATA
.ignoreRecordsetName true
I am taking each record of the flat-file in a single record RECORD_DATA in XML.
<b>So can anyone tell me why the big spaces are getting trimmed to a single space eg. between SOUTHSEA and HANTS etc.</b>
Thanks in advance.
Rajeev GuptaHi,
try :
NameA.fieldContentFormatting = <b>nothing </b>
as the default is <b>trim </b>
refere:
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
Trailing spaces problem during file content conversion
I have developed a proxy to file scenario.And am using file content conversion for creating the file. The file is to be a fixed length file.
File Structure
<Header>
<Item>
<Item Trailer>
<File Trailer>
Each tab in the file has the last character mapped to spaces.
Eg: Header00000001 2006011700000000020060<blank space>
Item00000001 2006011700000000020060<blank space>
The problem is that during file content conversion. XI does not preserve trailing spaces at the end of the line i.e.if a particular line in the file ends with space. It terminates the line at the last non-space character (in this case at 060).
However we are required to maintain these trailing spaces at the end of each line.
I have tried preserve white space in data type that does not work.
I know that xslt mapping may solve the problem but I am looking for a workaround with my current graphical mapping.
Looking for suggestions !!
Thanks,
RashidaHi,
I have the problem quite opposite to this where we are getting the trailing spaces at end of each record which should not come.
File structure is
<Record>
- <Data>
<Content>11/09/2007@210@ZACSL007@GBB-56436@PS01@29@1044@19@646@0</Content>
</Data>
</Record>
............. n records
<Header>
<File_Name>UK01</File_Name>
</Header>
Record structure in communication channel used is
Header, Data
Data.fieldFixedLengths 1024
Data.addHeaderLine 0
Header.addHeaderLine 0
Header.fieldFixedLengths 0
Header.fixedLengthTooShortHandling Cut
Data.fixedLengthTooShortHandling Cut
Header.endSeparator '0'
Actually if the length of record is less than 1024, rest of the length is being filled with spaces which should not occur.
Many advanced thanks.
Jitender -
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 -
How to remove the footer in the file content conversion
HI
I have receiver structure like this
<Mt_test>
<Node1>
<test1>name1</test1
<test2>name2</test2
<footer>
<test3>name3>
This is the structure. footer segment we need in pay load. so we can't skip anything in the mapping. But target we are using File content conversion. i want to remove the last footer segment in the file. Please help me this.
thanks
SamHi Satish,
Thank for your quick replay.
attached payload i am receiving after the mapping. i need to eliminate footer node in my file.
Output should be like this.
20100201,200,2345.00
20100218,201,2345.00
But out put i am getting like this
20100201,200,2345.00
20100218,201,2345.00
test0001---> should be remove this in the output file.
Payload:
<ns0:MT_google xmlns:ns0="http://google.com/xi/google">
<Datarow>
<CALDAY>20100201</CALDAY>
<PLANT>200</PLANT>
<ZSTR_PLANT>2345.00;/ZSTR_PLANT>
</Datarow>
<Datarow>
<CALDAY>20100218</CALDAY>
<PLANT>201</PLANT>
<ZSTR_PLANT>2345.00;/ZSTR_PLANT>
</Datarow>
<Footer>
<FileName>test0001</FileName>
File content conversion:
Datarow.endSeparator ='nl'
Datarow.fieldseparator = ,
Footer.fieldfixedLenghts =0
Footer.fieldlengthTooShortHandling= Cut
Please suggest me anything to change.
Advanced Thanks
Sam
</Footer>
</ns0:MT_google> -
Removing leading zeros and leading blank spaces from an input field
Hi All,
I have an input field which is alphanumeric and i need to remove the leading zeros and blank spaces in it , but intermediate spaces should be kept .
so i used the UDF
String output = input.replaceFirst("^0+","");
return output;
but this code does not remove the leading blank spaces . Can anybody help in modifying this code so that even the leading blank spaces along with leading zeros can be removed .
Regards ,
Loveena .lets say input is a
then
int len = a.length();
for(int i;i< length;i++)
if(a.substring(0,1).equals(" ") || a.substring(0,1).equals("0"))
a = a.substring(1,len);
return a;
hope you got the logic so that you can enhance it better -
Remove Header Node in File Content Conversion
Hi Guys,
In our scenario receiver payload is
<?xml version="1.0" encoding="UTF-8"?>
<ns1:MarketInventoryResponse xmlns:ns1="PRINCIPALS/MarketInventory">
<Header>
<CurrentDate>200809</CurrentDate>
</Header>
<MarketInventory>
<Local_ProductCode>121</Local_ProductCode>
<WH_QTY>20</WH_QTY>
<WH_Cost>3000</WH_Cost>
<Store_QTY>40</Store_QTY>
<Store_Cost>5000</Store_Cost>
</MarketInventory>
</ns1:MarketInventoryResponse>
We are using File content conversion method. Now we got the output is
200809
121#20#3000#40#5000
But We need below mentioned format.
121#20#3000#40#5000
we don't need CurrentDate which is in Header node. So, how to ignore Header node in FCC method. Please any one help me.
Note : Now we using following parameters in FCC
Recordset Structure : MarketInventory
MarketInventory.addHeaderLine : 0
MarketInventory.fieldSeparator : #
MarketInventory.endSeparator : 'nl'
Thanks & Regards
VijayHi Vijaya,
You have two options:
1.- Sãnthosh Kûmãr V Solution:
Recordset Structure : Header,MarketInventory
Header.fieldFixedLengths = 0
Header.fixedLengthTooShortHandling = Cut
Header.endSeparator = '0'
2.- Use Adapter-Specific Message Attributes in your File adapter.
In the last one you would have to set the name of your file in FileName atributte.
Carlos -
Preserve spaces in File Content Conversion
Dears colleagues,
we have a problem with the File Content Conversion in SAP PI 7.1
We send an IDOC from SAP to PI and a file to an external system. For example we have:
IDOC Z,
Segment S1 with fields
F1
F2
Segment S2 with fields
F3
F4
the mapping contains:
Z-S1-F1 --> File-Fiedl1 ( lenght 5 )
Z-S1-F2 --> File-Field2 ( lenght 5 )
Z-S2-F3 --> File-Field3 ( lenght 5 )
Z-S2-F4 --> File-Field4 ( lenght 5 )
If all the fields come filled the mapping it's ok and the result too, but if for example the second segment didn't come, the mapping it's ok ( no error in sxmb_moni ) but the result doesn't preserve the las 10 positions.
Any idea¿?
Thanks in advance.
JC.JC Says..
If all the fields come filled the mapping it's ok and the result too, but if for example the second segment didn't come, the mapping it's ok ( no error in sxmb_moni ) but the result doesn't preserve the las 10 positions.
Use the following parameters in your FCC..
<recordsetName>.fieldFixedLength = 5,5,5,5,5
Regards,
Madan Agrawal -
Hi Question about Sender File Content Conversion
Hi All,
I have a flat file i need convert that flat file to the below XML format using File content Conversion, can anybody help me on this with example File content Convertion parameters
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_FileSend xmlns:ns0="http://test">
<Recordset>
<Contact>
<Name>ABC</Name>
<Number>123</Number>
<Address>
<HouseNumber>246789</HouseNumber>
<StreetNumber>100</StreetNumber>
<Phone>
<Mobile>90000000</Mobile>
<LandLine>12345678</LandLine>
</Phone>
</Address>
<Email>
<Office></Office>
<Personal></Personal>
</Email>
</Contact>
</Recordset>
</ns0:MT_FileSend>Hi Sudheer reddy,
Good question.
File content conversion parameters are:
1) Doccument Name: Doccument name is nothing but message type name for file side: MT_FileSend
2) Doccument Namespace: mention the name space for the message type.
3) Doccument Offset: for which row and which coloumn doccument has to be write.
4) recordset name: mention the record set name: Recordset
5) Recordset Namespace: if the namespace is different for message type name space mention name space or otherwise it is blank.
6) Recordset Structure: Mention the structure name
7) Recordset Sequence: mention the sequence of the recordset Ascending or Decending
8) Recordset permessage: Would define no of record sets per message.
9) Key-field name: to query to the doccument
10) Key field type: string(Case-senstive)
fieldValues
fieldSeparator
endSeparator
Note: pls check in SDN about file content conversions it so many blogs are available, u can easily understand.
Regards,
Sateesh -
File Content Conversion Problem
Hi
I have a flat file having 10 fileds with fixed length of field 7 characters
abc bcd dce cef ecf fgi
123 234 343 233 434 343
322 222 222 222 222 222
+++++++++++++++++++++++++++++++
XML CODE FOLLOWS
+++++++++++++++++++++++++++++++
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_send xmlns:ns0="http://OTO-Continue.com">
-<SEND>
<abc>343</abc>
<bcd>343</bcd>
<dce>434</dce>
<cef>3434</cef>
<ecf>343</ecf>
<fgi>434</fgi>
</SEND>
</ns0:MT_send
As per the client req I'm going with FCC. The file is picking fine with the FILE. But not picking with the FCC.
The parameters which I gave are as follows.
SOURCE I feel it is fine since file is picking fine and keeping the same for FCC also.
PROCESSING
QOS -- Exactly Once
Poll Interval -- 10
Processing Mode -- Delete
Empty-File Handling -- Process empty files
CONTENT CONVERSION Parameters
Document Name -- (am giving sender data type name) DT_send
Document NSpace -- http://OTO-Continue.com
Recordset Name -- SEND
Recordset Structure -- SEND,*
Recordset Sequence -- Ascending
Recordset per Message -- 0
And in the table the parameters am settings are
SEND.fieldNames abc,bcd,cde,def,efg,ghk
SEND.fieldFixedLengths 7,7,7,7,7,7 (because each and every field has 7 characters)
SEND.keepIncompleteFields No
SEND.fieldFixedLengthType char
SEND.fieldContentFormatting trim
SEND.fieldEndSeparator 'nl'
This was the configuration. But this is not working I monitored the Communication Channel and file is not reading and not getting deleting.
What actually went wrong in above configuration. Why it is not working.
Thanks.Hi Swarna,
CONTENT CONVERSION Parameters
Document Name -- ?
DocumentNSpace -- ?
Recordset Name -- ?
Recordset Structure -- ?
Recordset Sequence -- Ascending
Recordset per Message -- ?
Document Name - <Message Type> eg:- (MT_ABC)
DocumentNSpace - Name space of your MT
Recordset Name - The root node( Which has one occurence)
Recordset Structure - The parent node of the fields(can have multiple occurences)
Recordset Sequence -- Ascending
Recordset per Message -- 1/* (No.of records per each record set)
In your structure
+++++++++++++++++++++++++++++++
XML CODE FOLLOWS
+++++++++++++++++++++++++++++++
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_send xmlns:ns0="http://OTO-Continue.com">
-<SEND>
<abc>343</abc>
<bcd>343</bcd>
<dce>434</dce>
<cef>3434</cef>
<ecf>343</ecf>
<fgi>434</fgi>
</SEND>
</ns0:MT_send
There is no root node, so in your FCC you need to mention your RecordsetName and you can ignoreRecordSetName in result structure. Check the following blog simulates your requirement.
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
Regards,
Prasanna -
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 -
Supress Column Heading - File Content Conversion in Sender Adapter
Hi,
Let me give a more clear picture about my scenario. I need to convert CSV File to XML output:-
My source file has column heading and values. The sample data is mentioned hereunder:-
PERNR;KID;PNALT;NACHN;NAME2;VORNA
;1200;1200;Angus
I have created a data type as under:-
DT_LegacyEmployee (Category - Complex Type)
Employees (Category - Element, Occurence - 1)
Header (Category - Element, Occurence - 0...1)
PERNR_H
KID_H
PNALT_H
NACHN_H
NAME2_H
VORNA_H
Employee (Categroy - Element, Type - DT_LegacyEmployee_Row, Occurence - 0...unbounded)
PERNR
KID
PNALT
NACHN
NAME2
VORNA
The file conversion parameters in the file sender adapter are mentioned hereunder:-
Document Name - MT_LegacyEmployee
Document Namespace - http://abc.com/xi
Recordset Name - Employees
Rescordset Structure - Header,1,Employee,*
Recordsets per Message - 1
Key Field Type - String (Case Sensitive)
Employee.fieldSeparator - ;
Employee.endSeparator - 'nl'
Employee.fieldNames - PERNR,KID,PNALT,NACHN,NAME2,VORNA
I dont' have a key field value. How do we remove the header and show only the values in the xml output. I have searched the forum topics as well checked many blogs related to file content conversion, but nothing helped. Kindly advice how to fix this issue. Thanks in advance.
Regards.
PraveenHi Praveen,
Change your File Adapter as below
Document Name - MT_LegacyEmployee
Document Namespace - http://abc.com/xi
Recordset Name - Employees
Rescordset Structure - Employee,*
Recordsets per Message - 1
Key Field Type - String (Case Sensitive)
Employee.fieldSeparator - ;
Employee.endSeparator - 'nl'
Employee.fieldNames - PERNR,KID,PNALT,NACHN,NAME2,VORNA
There is no need for the Header required in the data type.
DT_LegacyEmployee (Category - Complex Type)
Employees (Category - Element, Occurence - 1)
Employee (Categroy - Element, Type - DT_LegacyEmployee_Row, Occurence - 0...unbounded)
PERNR
KID
PNALT
NACHN
NAME2
VORNA
Now the trick is in the mapping program
Lets assume your mapping looks like
MT_LegacyEmployee ---> MT_TargetEmployee
- Employees ---> Records
- Employee ---> Record
- PERNR ---> TargetPERNR
- .. so on
When you do a mapping from Employee ---> Record apply the following logic.
(PERNR)--->
(TestEquals =) --->(NOT)--->
(Constant) ---> (IF)
(PERNR) (IF Without Else) ---> (Record)
(THEN)
(Employee)--->
When doing this make sure RightClick on PERNR and Select Context ---> Employees.
By default context would be from Employee and it will give you an error of XSD format. So make sure you are changing the context.
Maybe you are looking for
-
How to have different music library's on iPods using the same Apple ID
Hello. Me and my sister both have iPod 4th generations. Because of the timing of the purchases of our devices we use the same apple account. I would like to know how to have a different iTunes music library to her and if it will still keep the librar
-
"ORA-12535:TNS:operation timed out" error
hi, I want to connect to my oracle server.If I try to connect my client means"ORA-12535:TNS:operation timed out" error is shown.What should i do to the rectify this problem.Pls give me a solution. Thanks in advance. -reg Lakshman.
-
Now heres a problem i have been facing everytime i try an unplug iphone 4s/ipod touch 5... and heres what i have tried out after searching the net and this forum 1) tried different usb ports 2) tried different cables all genuine apple products if som
-
Enable the security configuration for this panel
Why do my panels built with Configurator sometimes display this in Ps Cs4? "Please close all panels or restart Photoshop to enable the security configuration for this panel" Closing panels or restarting Photoshop does not enable the panels but export
-
How good is the latest iMac 21.5inch 500gb
How good is the latest iMac 21.5inch 500gb