Comm Channel content conversion
Hi everyone,
I have an existing interface IDOC to File scenario, in which I want to drop one field from the final output file.
But I can't remove that field from the interface as it is is required for business logic till the very end.
Can I acheive this in Ciontent conversion in Communication channel ?
Any ideas will be appreciated.
Cheers,
Hi,
While configuring FCC parameteres, for 'fieldFixedLengths' keep the width of that corresponding field as '0'.
It will work.
Regards,
Supriya.
Similar Messages
-
Reciever Comm. Channel Content conversion parameter for deep level
I am doing a scenario from SAP to Legacy sytem ( Proxy to File Scenario).Target File to be generated is of for fixed length.
__My source strucure is as follows:__
DT_Source
--->Root_IS .......................................0.to..1
DC..............................................0..to..1.............................xsd:string
>Root_VT....................................0..to..unbounded
POY....................................0..to..1.............................xsd:string
PON....................................0..to..1.............................xsd:string
>Root_VR............................0..to..unbounded
POL.............................0..to..1.............................xsd:string
SF----
0..to..1.............................xsd:string
Here DT_source is Data type name,
Root_IS is structure under this we have one field DC,
Root_VT is second field of Root_IS but act a a Stucture for fields POY and PON,
Root_VR is a field of Root_VT but act as a structure for Fields POL and SF.
__My targert strucure is as follows:__
DT_Target
>Root_IS.......................................0.to..1
Key..............................................0..to..1.............................xsd:string
DC..............................................0..to..1.............................xsd:string
>Root_VT....................................0..to..unbounded
Key..............................................0..to..1.............................xsd:string
POY....................................0..to..1.............................xsd:string
PON....................................0..to..1.............................xsd:string
>Root_VR............................0..to..unbounded
Key..............................................0..to..1.............................xsd:string
POL.............................0..to..1.............................xsd:string
SF----
0..to..1.............................xsd:string
>Root_ZS............................0..to..1
Key..............................................0..to..1.............................xsd:string
Count...........................................0..to..1.............................xsd:string
Here DT_Target is data type for file reciever.In which i need to configure reciever communication channel with file content conversion parameters.File needs to be generated is of fixed length.Root_IS,Root_VT,Root_ZS are sructure on same level and Root_VR sructure is under Root_VT.
I tried to Configure File Content Conversion Parameters on reciever Comm Channel but getting comm channel error as follows:
Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value 'VR')', probably configuration error in file adapter (XML parser error)': java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value 'VR')', probably configuration error in file adapter (XML parser error)'
Could not process due to error: java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value 'VR')', probably configuration error in file adapter (XML parser error)'
File content parameters i used as follows:
Root_IS.fieldNames : Key,DC
Root_IS.fieldFixedLengths :(as per length mentioned)
Root_IS.endSeparator :'nl'
Root_VT.fieldNames :Key,POY,PON
Root_VT.fieldFixedLengths :(as per length mentioned)
Root_VT.endSeparator :'nl'
Root_VR.fieldNames :Key,POL,SF
Root_VR.fieldFixedLengths :(as per length mentioned)
Root_VR.endSeparator :'nl'
Root_ZS.fieldNames :Key,Count
Root_ZS.fieldFixedLengths :(as per length mentioned)
Root_ZS.endSeparator :'nl'Please consider this one as new: i tried to explain it more as on privew everything gets shaked
I am doing a scenario from SAP to Legacy sytem ( Proxy to File Scenario).Target File to be generated is of for fixed length.
__My source strucure is as follows:__
DT_Source
--->Root_IS .......................................0.to..1
DC..............................................0..to..1.............................xsd:string
>Root_VT....................................0..to..unbounded
POY....................................0..to..1.............................xsd:string
PON....................................0..to..1.............................xsd:string
>Root_VR............................0..to..unbounded
POL.............................0..to..1.............................xsd:string
SF----
0..to..1.............................xsd:string
Here DT_source is Data type name,
Root_IS is structure under this we have one field DC as a child,
Root_VT(structure) is second field of Root_IS but act a a Parent Stucture for fields POY and PON,
Root_VR(structure) is a field of Root_VT but act as a Parent structure for Fields POL and SF.Means we have three structres Root_IS and under this we have Root_VT and under this we have Root_VR
__My targert strucure is as follows:__
DT_Target
>Root_IS.......................................0.to..1
Key..............................................0..to..1.............................xsd:string
DC..............................................0..to..1.............................xsd:string
>Root_VT....................................0..to..unbounded
Key..............................................0..to..1.............................xsd:string
POY....................................0..to..1.............................xsd:string
PON....................................0..to..1.............................xsd:string
>Root_VR............................0..to..unbounded
Key..............................................0..to..1.............................xsd:string
POL.............................0..to..1.............................xsd:string
SF----
0..to..1.............................xsd:string
>Root_ZS............................0..to..1
Key..............................................0..to..1.............................xsd:string
Count...........................................0..to..1.............................xsd:string
Here DT_Target is data type for file reciever.In which i need to configure reciever communication channel with file content conversion parameters.File needs to be generated is of fixed length.Root_IS,Root_VT,Root_ZS are sructure on same level as a first level subelements of DT_Target and Root_VR sructure is under Root_VT.
Root_IS have fileds: key,DC: Root_VT have Fields :Key,POY,PON:Root_VR have fields:Key,POL,SF and Root_ZS have Fields:Key and Counts.
I tried to Configure File Content Conversion Parameters on reciever Comm Channel but getting comm channel error as follows:----
>
Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value 'VR')', probably configuration error in file adapter (XML parser error)': java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value 'VR')', probably configuration error in file adapter (XML parser error)'
Could not process due to error: java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Consistency error: more fields found in XML structure than specified in conversion parameters! (Value 'VR')', probably configuration error in file adapter (XML parser error)'
File content parameters i used as follows:
Root_IS.fieldNames : Key,DC
Root_IS.fieldFixedLengths :(as per length mentioned)
Root_IS.endSeparator :'nl'
Root_VT.fieldNames :Key,POY,PON
Root_VT.fieldFixedLengths :(as per length mentioned)
Root_VT.endSeparator :'nl'
Root_VR.fieldNames :Key,POL,SF
Root_VR.fieldFixedLengths :(as per length mentioned)
Root_VR.endSeparator :'nl'
Root_ZS.fieldNames :Key,Count
Root_ZS.fieldFixedLengths :(as per length mentioned)
Root_ZS.endSeparator :'nl' -
JMS sender communication channel content conversion
Hi,
I struck with the content conversion in the JMS Sender communication channel.
I have configured the communication channel with the filed fixed lengths. (Simple type)
The field fixed lengths i have given are 10,2,3,11
The contents in the file 1000000072 230 111
but, in the input xml after conversion iam getting 100000007 in the first field and 2 in the second field 23 in the third field.
I have configured the sender communication channel as in the document in SDN.
Even, i configured several communication channels. I didn't get this strange error any time.
I have gone through SDN to fix this issue, but i didn't get solution.
If anyone got rectified this kind of error, please answer your solution to me
Thanking you,
Regards,
Krishnaraju.Hi,
Thanks for all your support. The issue got resolved.
The issue is due to the file, In the file the special characters are appearing. We are not able to see these characters in the notepad, wordpad, text editor.
But, these characters are appearing in th syn text editor. So, we removed those characters and processessed the file. Now, it is successfull.
Regards,
Krishnaraju. -
We would like to send "delimited" files to another application (tab-delimited, CSV, ... - the other application does not support XML-based interfaces). Obviously we will have an outbound channel that uses the file/FTP adapter and the data will be subjected to "content conversion".
The data contains names in many languages; not all of this can be represented in ISO Latin-1, much less in US-ASCII. I suppose UTF-8 would work. The question is: how is this handled by the FTP protocol? (considering that the FTP client is part of the SAP PI file/FTP adapter and the FTP server is something on the "other" machine)Hi Peter,
you can maintain the file encoding in the outbound adapter. See [Configuring the Receiver File/FTP Adapter|http://help.sap.com/saphelp_nw2004s/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm]
For your requirements "utf-8" sounds pretty fitting.
Regards,
Udo -
IMAP Sender channel, Content Conversion Module , target XSD structure issue
Hi,
I'm using the content conversion adapter module in my IMAP senderchannel , to transform a flat file into a IDOC ORDERS05 structure.
I have some difficulties generating the right structure... how can I make a more deep structure ?
My output is like this. All created segment is on the same level.
<ORDERS05>
<IDOC>
<E1EDK01>
<E1EDK03>
<E1EDKA1>
<E1EDK02>
<E1EDKT1>
<E1EDKT2>
<E1EDKT2>
<E1EDKT1>
<E1EDKT2>
<E1EDKT2>
<IDOC>
</ORDERS05>
Here the E1EDKT2 should be a "level under" or "sub structure" to E1EDKT1, and not on the same level !
The wanted result:
<ORDERS05>
<IDOC>
<E1EDK01>
<E1EDK03>
<E1EDKA1>
<E1EDK02>
<E1EDKT1>
<E1EDKT2>
<E1EDKT2>
<E1EDKT1>
<E1EDKT2>
<E1EDKT2>
<IDOC>
</ORDERS05>
How can I solve this ????Hi,
you can do it on adapter level too:
but you cannot do it in standard content conversion I guess
(if it has more then 2 levels)
check this how you can do it:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/482aae19-0301-0010-3485-8efd618818d0
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> -
Content conversion sender keyfield + unknow length field
hi,
I have a file with lines. the first six chars of each line tells me which type of line it is.
I need to split the file to files which contains only one type of lines each.
I bulit data type with 2 fields : ID - length = 6 chars, Data - length unknown.
I can use ID as keyfield but i don't have length or separator.
How do i achive the split with the sender channel content conversion?
Is there another way I can define my data type to solve this?
Thanks
TomerHi
You can use the FCC parameter
fieldFixedLengths and fieldNames.
Define fieldName as ID and length will be 6. The remaining can be taken into different field.
This you can map to two different structures in message mapping. If you are confirtable with Java or XSLT that can work too.
Thanks
Gaurav -
Content conversion at JMS sender communication channel
Hi friends,
I have to convert fixed length flat structure to xml message.Therefor i have to do content conversion at the JMS sender comm channel.Can someone please explainthe procedure?
data in the queue would be like as follows.
9999000000124646q12233appej500rc11147822zordHi Manikandan,
The structure conversion can handle files containing rows with different structures. In
each row there is a key field to identify the structure. The rows with identical key fields of
course have identical structures.
Let us assume that we have a sample file with four rows. Each row has a two-byte key
field; the first row has a second field with ten bytes; the structure of the second and third
rows is the same and comprises two additional fields with three bytes each; the last row
has a second field with five bytes:
AA1234567890
BBABCABC
BBXYZXYZ
CC12345
The configuration for the conversion could look like this:
Module Configuration
Module Key Parameter Name Parameter Value
Plain2XML Transform.Class com.sap.aii.messaging.adapter.Conversion
Plain2XML Transform.ContentType text/xml;charset=utf-8
Plain2XML xml.conversionType StructPlain2XML
Plain2XML xml.processFieldNames fromConfiguration
Plain2XML xml.documentName MyDocument
Plain2XML xml.documentNamespace http://xi.com/test
Plain2XML xml.recordsetName MyRecordset
Plain2XML xml.recordsetStructure NameA,1,NameB,*,NameC,1
Plain2XML xml.keyFieldName MyKey
Plain2XML xml.keyFieldType CaseSensitiveString
Plain2XML xml.NameA.fieldNames MyKey,field-nameA
Plain2XML xml.NameA.fieldFixedLengths 2,10
Plain2XML xml.NameA.keyFieldValue AA
Plain2XML xml.NameB.fieldNames MyKey,field-nameB1,field-nameB2
Plain2XML xml.NameB.fieldFixedLengths 2,3,3
Plain2XML xml.NameB.keyFieldValue BB
Plain2XML xml.NameC.fieldNames MyKey,field-nameC
Plain2XML xml.NameC.fieldFixedLengths 2,5
Plain2XML xml.NameC.keyFieldValue CC
In xml.recordsetStructure, you add a name for each different structure followed by the
number of occurrences or an asterisk for unbounded occurrences. For each structure
name, you configure the structure separately in a separate namespace such as
xml.NameA.fieldNames and so on.
If your source file is a CSV file, replace each xml.XXX.fieldFixedLengths with
xml.XXX.fieldSeparator.
the result of this conversion looks like this:
<ns:MyDocument xmlns:ns="http://xi.com/test">
<MyRecordset>
<NameA>
<MyKey>AA</MyKey>
<field-nameA>1234567890</field-nameA>
</NameA>
<NameB>
<MyKey>BB</MyKey>
<field-nameB1>ABC</field-nameB1>
<field-nameB2>ABC</field-nameB2>
</NameB>
<NameB>
<MyKey>BB</MyKey>
<field-nameB1>XYZ</field-nameB1>
<field-nameB2>XYZ</field-nameB2>
</NameB>
<NameC>
<MyKey>CC</MyKey>
<field-nameC>12345</field-nameC>
</NameC>
</MyRecordset>
</ns:MyDocument>
Regards,
Vinod. -
Content Conversion in receiver channel
Hi all,
I have a proxy to FTP scenario with no mapping involved.Over proxy communication PI is receiving the data, I am creating the CSV file using content conversion in receiver channel and placing the file at FTP.
The file name is coming in one of the field of the input xml,I am using variable substitution and setting the file name from that particular field value.But as I don't want that node and file name element in my output file content, please guide me what parameters can I set in my content conversion to remove the FileNode from o/p csv file.
The sample input xml is
<MT>
<Record>
<Field1>1</Filed1>
<Field2>2</Filed2>
</Record>
<Record>
<Field1>3</Filed1>
<Field2>4</Filed2>
</Record>
<FileNode>
<FileName>InutFile</FileName>
</FileNode>
</MT>
I want output xml to be like
1,2
3,4
I have followed this blog /people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12 to cut the FileNode, but it gives an error in cc parameters.
In my actual i/p payload,the Record is 0..unbounded and there are 50 sub elements inside Record element.
Please provide your inputs.
Thanks,
RuchiHi Ruchi,
Change your structure like this.
MT>
<Record>
<Field1>1</Filed1>
<Field2>2</Filed2>
</Record>
<Record>
<Field1>3</Filed1>
<Field2>4</Filed2>
</Record>
<FileNode>
<FileName>InutFile</FileName>
</FileNode>
</MT>
Dont put the filenode under Record.
Also Add the below parameters.
FileNode.fieldSeparator '0'
FileNode.endSeparator '0'
FileNode.fieldFixedLengths 0
FileNode.fixedLengthTooShortHandling Cut
FileNode.fieldNames FileName
Now use the same parameter mentioned in the blog .Your problem will be resolved. -
Problem with Sender File Content Conversion Communication Channel
Hi All,
I am using XI 3.0--SP 16.
I have configured a Sender communication channel with File Content Converison which takes up a Fixed length text file and converts to XML.
My scenario is that I have some 'n' files, out of which one file has error in content conversion.
In a normal scenario I would expect other files to get processed, but they are not.
I can correct the error or even discard the error file. But I am unable to understand why XI is not processing the rest of the good files.
Thanks in advance.
Regards.,
SudharshanHi,
@Renjith
The QOS is EO, thats why I am wondering why it is not picking the rest of the good ones
Regards,
Sudharshan -
File Content Conversion : Sender Channel
Hi
I am trying to do content conversion in the Sender Channel from a flat file to a XML.
My Target XML(message structure) looks like
<H1>
<H2>
<D>Detail Record</D>
<L1>line</L1>
<L1>line</L1>
</H2>
<H2>
<D>Detail Record</D>
<L1>line</L1>
<L1>line</L1>
</H2>
</H1>
Here the element <H2> is only needed to group <D> and the following <L1> elements of each new occurrence of <D>.
Now my problem is that the element <H2> is not getting created.
and the message after content conversion is looking as follows
<H1>
<D>Detail Record</D>
<L1>line</L1>
<L1>line</L1>
<D>Detail Record</D>
<L1>line</L1>
<L1>line</L1>
</H1>
What should I do to get the desired result.@Yes Bhavesh you are right.
Hi Jai,
I am trying the other way round.i.e from flat file to a XML message.As I said I was trying to do it for Sender Channel where is the after content conversion I want a XML file.The example is a what I framed out of my actual problem.
if flat file is as follows ,
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
DetailRecord1
Line1
Line2
Line3
DetailRecord2
Line4
Line5
then the XML must look like
<H1>
<H2>
<D>DetailRecord1</D>
<L1>Line1</L1>
<L1>Line2</L1>
<L1>Line3</L1>
</H2>
<H2>
<D>DetailRecord2</D>
<L1>Line4</L1>
<L1>Line5</L1>
</H2>
</H1>
I identify the different types records in the flat file
as follows,
Record starting with "Detail" is considered as <D> element
Record starting with "Line" is considered as <L> element.
Hope I did clarify. -
Issue with content conversion in receuver communication channel
Hi,
I am trying to configure receiver communication channel with file adapter and content conversion.
File structure is simple, as shown below:
MT_EmployeeDetails
Employee_rec
Employee_rec_struct
EmpNo
EmpName
Address
It should have generated file in the following format:
1101 xxxx xxxxx
1102 xxxx xxxxx
1103 xxxx xxxxx
But it is generating flat file as shown below:
1101 1102 1103 1104
Basically it is populating only first field in the target field. But I could see that the xml file is properly getting
generated in sxmb_moni.Also, when i tried to generate xml file without FCC, it is creating file properly.
following are the parameters I am using:
Employee_rec_struct.fielSeparator '0x09'
Employee_rec_struct.endSeparator 'nl'
pls let me know whetehr i need to add any other parameters in FCC.Hi,
Can u please provide with the exact structure of target... i know u have mentioned it already...
But the hierarchy and occurence is nt clear..
Like
Mt
---Employee(1)
Records(0..unbounded)
Name(1)
Age(1)
So that others here,can easily get vt exactly u want and give the solution....
If ur structure is like..
MT_EmployeeDetails
---Employee_rec
Employee_rec_struct(0..unbounded)
EmpNo
EmpName
Address
Then,
Use,
Employee_rec_struct.fieldSeparator '\t'
end separator is optional... by default its new line characcter.. no need of giving....
U should be giving the recordStructure as Employee_rec_struct,*
If still nt solved do post
Babu -
Content conversion in reciever HTTP channel
My reciever application expects non xml messages through an HTTP
How do i post a non xml message through a XI HTTP reciever channel?Your thread subject indicates that you want to do some content conversion. If so, follow prateek's reply.
else if there is no conversion then you can directly use HTTP adapter.
- Gujjeti. -
.csv file Vs .txt file Content conversion sender file channel
Hi Experts,
I have a file with filename say input.csv.I want to do content conversion for these .CSV file.Is it same like we have to do for .txt file say input.txt.
when i open my .csv file in notepad, i get multiple rows with each field separated by ';'.what are the content conversion parameters we have to define for .csv file and can we mention input.csv as the file name as a source file name.
Thanks
DeepakHi,
Use the following parameters for Sender file channel in case of reading .csv file
Recordset Structure.fieldSeparator -
Recordset Structure.endSeparator -
'nl'
Recordset Structure.fieldNames -
provide field names separated with ,
Regards
Seshagiri -
Losing 0x0D in Content Conversion of a file receiver communication channel
Hi everyone, I have a file to file scenario in which I receive an XML like this:
<MT_IDOCS>
<IDOCS>
<IDOC>E2EDK14 10000000000000000010000020000010200600
E2EDK14 10000000000000000010000030000010200712
</IDOC>
</IDOCS>
<MT_IDOCS>
Actually this is just to give you an idea, but inside the IDOC tag I have a whole IDoc with the flat file structure that is going to be processed by with program RSEINB00. The incoming file has characters 0x0D and 0x0A between both lines, which is correct and is the desired format for program RSEINB00.
But when I download this XML using content conversion, the resulting file has lost the 0x0D character, it still has the 0x0A, but all 0x0D are gone.
The content conversion is set like this
Recordset structure IDOCS
IDOCS.fieldSeparator $$$$$$
IDOCS.endSeparator '0'
(I don't know exactly why they did it that one...anyway only 1 IDOCS tag is expected). The I have to extract the exact bytes from inside the IDOC tag and download them to a file. Is it possible to handle it from the content conversion? Thanks!Hi Pablo,
maybe the problem relates to the file encoding you have specified in the Communication Channels. Maybe the file is being picked up from a Windows system which uses Carriage Return (CR) in conjunction with the line feed character ( LF) to indicate
the end of an ASCII text file. The hex code 0D0A. Whereas the receiver system maybe a Unix systems which uses only LF (0A).
The module
ConvertCRLFfromToLF
using parameter value
LFtoCRLF
may resolve this
e.g.,
see the 'Example' SAP online help -
[Adapter Framework Module Interfaces|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/32/43d84072378031e10000000a1550b0/content.htm] -
Content Conversion Parameters in Communication Channel
Hi,
I have a requiremnet to develop:
Scenario is SAP to Legacy System
Based on Mapping Sheet, I have defined Data types for both SAP and Legacy system. The Data structure is
There is a root node IS with occurance 1-n. In this node there is another node MS with occurance 1-n. This MS contains another node MI with occurance 1-n. MI contains MA node with occurence 1-n.Similarly MA contains MT node with occurance 1-n.
IS -> MS -> MI -> MA -> MT all with occurance 1-n.
Can anyone please help me in defining Content Conversion Parameters and Variable Substitution in Receiver Communication Channel.
Regards,
Deepak RajIS -> MS -> MI -> MA -> MT all with occurance 1-n
Your requirement seems to match with that mentioned in this blog:
/people/karthiknarayan.kesavan2/blog/2007/08/22/file-content-conversion-for-multi-hierarchical-structure
The blog does not mention the use of FCC...instead uses functionalities in mapping to get flat file....
Regards,
Abhishek.
Maybe you are looking for
-
Squid doesn't accept https requests
I have a server running Arch i686 and installed squid as a web proxy server. I can connect to it through, say Firefox, and it serves all the pages except SSL'ed ones. It simply throws a generic Firefox error. What do I need to enable in my squid.conf
-
Can I convert purchased m4v video files for my iPOD?
I want to convert a video that I purchased from the iTunes store, which is in m4v format so that it can play on my iPOD. However, when I select the movie from the library (in iTunes) and then FILE>CREATE NEW VERSION>CREATE iPOD OR iPHONE, this choice
-
hi abap gurus, Consider u have 2 internal tables (one for Header Data, other one for Line Item) How to transfer the Header & its corresponding Item data to third Internal table thanks and regards, bala
-
What are the properties for sorting?
Hi Experts, In News Autor I want to sort the list by using the latest news at the top. So I need all the properties for sorting System Administration-> System Configuration -> Content Management ->User Interface -> Settings ->Collection Renderer S
-
Promlem in Manual Condition Type
hi I am using Manual condition type for Price(in v/06 i maintained as 'Manula entry has priority' & in V/08 activated manual check button) but in sales order after selecting manula condition & entering value if i press the enter button the values a