Field Content Conversion
When do we usually go for field content conversion ?
Our implementation uses field content conversion but I have no idea why it was at all used. Can anyone throw some light on this ?
Thanks,
Nivedita
hi nivedita,
i think it should be File Content Conversion instead of Field Content Conversion.
Anyways In File Content Conversions, you can convert a table in XML format to pure text format in this mode and vice versa. The expected XML structure contains the structure as nodes filled with any number of elements without additional sub node.
you can also Convert Fixed Length File and Comma Separated Value text file containing complex structures into an XML source format in this mode. The file contains various row formats in logical structures.into Xml form using FCC.
FCC is used in both sender and receiver communication channel.
For more information refer this link:
Converting File Content in a Sender Adapter
http://help.sap.com/saphelp_nw04/helpdata/en/33/c6e63b60c25767e10000000a11402f/frameset.htm
Converting File Content in the Receiver Adapter
http://help.sap.com/saphelp_nw04/helpdata/en/33/c6e63b60c25767e10000000a11402f/frameset.htm
Regards,
Mandeep Virk
*reward if helpful*
Similar Messages
-
Problem with File Content Conversion
Hi All
I am facing a problem with file content conversion.
This is my sample file structure:
Header_Record (Occurance - 1)
Field1 in Header
Field2 in Header
Item(Occ-1 to n)
Field3 in Item
Field4 in Item
<<ItemType>> (Structure in Item) (Occ - 0 to n)
<<Field5>> in ItemType
<<Field6>> in ItemType
<<ItemTypeCategory>> (Structure in ItemType)(Occ - 0 to n)
<<<<Field7>>>> in ItemTypeCategory
<<<<Field8>>>> in ItemTypeCategory
Footer_Record (Occurance-1)
Field9
Field10
There is a key field 'Type' in all the above records with unique value in each record.
Now, I defined Field content conversion as follows:
Recordset Structure: Header_Record,1,Item, * , ItemType, * ,ItemTypeCategory, * ,Footer_Record,1
Recordset Sequence: Ascending
KeyField Name: Type
Following are parameters defiled:
Header_Record.Keyfieldvalue: 00
Header_Record.fieldseperator: ,
Header_Record.fieldnames: Field1,Field2
Header_Record.endseperator: 'nl'
Item.keyfieldvalue: 05
item.fieldseperator: ,
item.fieldfieldnames: field3,field4
item.endseperator: 'nl'
ItemType.keyfieldvalue: 10
itemType.fieldseperator: ,
itemType.fieldfieldnames: field5,field6
itemType.endseperator: 'nl'
ItemTypecategory.keyfieldvalue: 15
itemTypecategory.fieldseperator: ,
itemTypecategory.fieldfieldnames: field7,field8
itemTypecategory.endseperator: 'nl'
Footer.keyfieldvalue: 20
Footer.fieldseperator: ,
Footer.fieldfieldnames: field5,field6
Footer.endseperator: 'nl'
Now, i pass the following file:
00,111
05,222
10,333
15,444
20,555
What i expect out of my FCC is this (Sample output to show the hierarchy of field values):
00,111
05,222
<<10,333>>
<<<<15,444>>>>
20,555
But, I am getting this output (Hierarchy is missing. All the structures are in the same order without hierarchy):
00,111
05,222
10,333
15,444
20,555
Field values are being identified according to field content conversion, but, the hierarchy of the fields is missing.
Can you please tell me how should i change my FCC config?
Sorry for this long question.
Many Thanks
Chandra
Edited by: Chandra Sekhar H on Jan 30, 2009 7:10 PM
Edited by: Chandra Sekhar H on Jan 30, 2009 7:16 PM
Edited by: Chandra Sekhar H on Jan 30, 2009 7:17 PMYou will always get a flat structure from FCC. If you want hierarchichal strucuture, you have to create a target and map. You will get only like -
Root
--Recordset
Group1
Fields
Grop2
Fields
Group3
Fields
VJ -
Reciever File Content conversion problem
Hi,
i am converting idoc into txt file
in sxmb_moni,the payload of target xml is,
<?xml version="1.0" encoding="UTF-8"?>
<ns0:HRPayroll_014_MT xmlns:ns0="http://XXXX.com/xi/:XXX">
<Infotype014>
<infotype>001400</infotype>
<zfty>400</zfty>
<zicnum>111111</zicnum>
<begda>20070428</begda>
<lgart>4000</lgart>
<betrg>0.00</betrg>
<anzhl>99.00</anzhl>
</Infotype014>
</ns0:HRPayroll_014_MT>
in File adapter i did like this-
Infotype014.fileldNames infotype,zfty,zicnum,begda,lgart,betrg,anzhl
Infotype014.fieldFixedlenghts 6,3,7,8,4,13,12
Infotype014.processConfiguration FromConfiguration
Infotype014.endSeparator 'nl'
and in RunTime Workbench
i am getting like this
<b>Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:
Parameter 'Infotye014.fieldFixedLengths' or 'Infotye014.fieldSeparator' is missing</b>.
Channel has not been correctly initialized and cannot process messages
please guide me ..how to declare in field Content conversion Prameters.
i dont require column names.fields are fixed lenghts.
regards
JaganHi amitanshu,
Thanks for your response..
i given only fieldFixedLenghts
the auditlog is
Time Stamp Status Description
2007-05-10 15:15:58 Success Message successfully received by messaging system. Profile: XI URL: http://saps020:50100/MessagingSystem/receive/AFW/XI Credential (User): PIISUSER
2007-05-10 15:15:58 Success Using connection File_http://sap.com/xi/XI/System. Trying to put the message into the receive queue.
2007-05-10 15:15:58 Success Message successfully put into the queue.
2007-05-10 15:15:58 Success The message was successfully retrieved from the receive queue.
2007-05-10 15:15:58 Success The message status set to DLNG.
2007-05-10 15:15:58 Success Delivering to channel: FILE_HRP_RECEIVER_HR_PAYROLL014_CC
2007-05-10 15:15:58 Success MP: entering
2007-05-10 15:15:58 Success MP: processing local module localejbs/CallSapAdapter
2007-05-10 15:15:58 Success File adapter receiver: processing started; QoS required: ExactlyOnce
2007-05-10 15:15:58 Error MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Channel has not been correctly initialized and cannot process messages
Time Stamp Status Description
2007-05-10 15:15:58 Error Exception caught by adapter framework: Channel has not been correctly initialized and cannot process messages
2007-05-10 15:15:58 Error File adapter receiver channel FILE_HRP_RECEIVER_HR_PAYROLL014_CC is not initialized. Unable to proceed: null
2007-05-10 15:15:58 Success Acknowledgement sent successfully for type: SystemErrorAck
2007-05-10 15:15:58 Success Acknowledgement creation triggered for type: SystemErrorAck
2007-05-10 15:15:58 Error Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Channel has not been correctly initialized and cannot process messages.
2007-05-10 15:15:58 Success The asynchronous message was successfully scheduled to be delivered at Thu May 10 15:20:58 EEST 2007.
2007-05-10 15:15:58 Success The message status set to WAIT.
my adaper is in Active status only
please guide me
regards
Jagan -
Skipping fields during content conversion
is it possible to skip fields during content conversion in file sender adapter?
The case is, the CSV file contains 300+ field and i only need 10. Therefore i have created a datatype with those 10 field.
I was hoping to skip the fields i do not need during content conversion.
If this is not possible i see no other than to create a datatype with 300+ fields by hand. Which will take all day!
Hopefully there is a solution, since i could not find what i needed on the SAP Help or SDN.
Thanks in advance for all your time!Hi M,
is it possible to skip fields during content conversion in file sender adapter?
No .. this is not possible during FCC.
The case is, the CSV file contains 300+ field and i only need 10. Therefore i have created a datatype with those 10 field.
Hopefully there is a solution, since i could not find what i needed on the SAP Help or SDN.
Well, you can give it a shot. There are freewares available on internet, which can transform the CSV file to XSD. Then you can import that XSD structure in ESR.
The only point is that your source CSV file must be having the header (with all field names on it).
I had done this with another integration tool, no idea how it will work with PI. But it's worth giving it a try.
If this is not gonna happen, then you have no other option but to create complete DT manually or use adapter module (not recommended for such cases).
Regards,
Neetesh -
How to force field to appear in input structure in content conversion
Hi all,
I am doing file content conversion in sender File adapter. Here is the structure
Header
Body
field1 - length 2
field2 - occurrence 1:1, length 3
field3 - length 2
field4 length 2
Trailer
Here is the fixed length file that is inputed into XI
<b>header22 2211trailer</b>
field2 occrence is 1:1 and as you se from the file example field2 from the body is empty(just space).But When I do the content conversion I don;t have this field showing up in my structure!??!!
I want to make sure that field2 appears even as empty field because that is screwing my mapping!?
Can you please have any idea how to make sure that field is in my input structure when I pass spaces?Can I force it somehow?
Thanks all.Hi Jon,
Yes you are right.
For Ex: ur XML is
<1>a</1>
<2>b</2>
and sometime is there is no value ur FCC will become
<1>a</1>
So what you have to do is in the message mapping take the source element
if <2> exists then <2>---->Target
else
<2>---->Constant(space)
and this "exists" is a standard function in NodeFunctions.
Regards, -
Key field from content - Sender file adapter content conversion
I am reading a source CSV file that has this structure. All rows in the source file are the same structure: line items of a PO. But there will be multiple POs in a single file, identified by the PO number as one column in the file.
PONum,LineItemNum,Qty,Description
001,1,34,Carrots
001,2,17,Apples
001,3,22,Bananas
002,1,4,Mangos
002,2,9,Coconuts
003,1,44,Grapes
Goal is to generate 3 messages, one for each PO:
<po>
<num>001</num>
<line_items>
... 3 line items for PO # 001 ...
</line_items>
</po>
<po>
<num>002</num>
<line_items>
... 2 line items for PO # 002 ...
</line_items>
</po>
<po>
<num>003</num>
<line_items>
... 1 line item for PO # 003 ...
</line_items>
</po>
Is there any way to use the Content Conversion Key Field Name to group the line items into the correct 3 messages? "Key Field Name" expects a static identifier for each type of row; but mine varies by the PO number in the content.
Or do I need to do this in the mapping? If so, what is the easiest way to split 1 large message of all line items into multiple target messages based on the PO number? (I assume this is better than sending individual line item messages and aggregating them later, as long as the file size is OK.)
Thanks in advance!
RBL
Edited by: Robert Burfoot-Lobo on Apr 8, 2009 11:43 AMHi Robert,
If ur goal is to split into 3 messages one for each PO, you can go for message split and using graphical mapping you can achieve that.
Within the message mapping go to the tab Messages.
Change the occurrence of the target message to 0..unbounded.
Also this link may help you.
/people/claus.wallacher/blog/2006/06/29/message-splitting-using-the-graphical-mapping-tool
Regards,
Madhu -
File Content Conversion - Key Field Value
Hi Experts,
I am using File to Idoc scenario for my mapping. In the receiver Communication channel, I am using File Content Conversion. My scenario is as follows :
I have a recordset with Header and Line items with Key Field Indicator as 'H' and 'L'. In some cases, the value for this Key Field is coming in as something other than 'H' and 'L'. I need to throw an exception when this Key Field is not 'H' or 'L'.
In the 'Content Conversion' tab, my attributes are as:
Header_Structure.keyFieldValue = 'H' and Line_Structure.keyFieldValue = 'L'. Is there any more attributes that I need to add ?
Please advise. Thanks a lot.
Regards,
Freddy.>>multiple key field values in FCC configuration i.e Line_Structure.keyFieldValue = H or L
AFAIK it is not possible but lets wait for other experts to comment on this...
>>Can keyFieldInStructure (add, ignore) parameter help me in this case ?
No. this parameter is only used when you want to include key filed in ur XML structure(add) or not (ignore)...
Chk this:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm -
File Content Conversion ( avoid fields in conversion)
Hi all
An IDoc to File scenario , I am doing file content conversion in receiver File adapter.
my message type for file 2 HEADER each having its own substructure
Like 1header
fieldA
2header
fieldC
fieldD
I want the "<b>1header and its 1 subelement not be converted in file content conversion" </b>
because its used for dynamic file name configuration, so i do'nt want it to be written on file.
Regards
Ashutosh.rRawat,
Yes I know you will get that error. That is the reason why I have told you to add another parameter fixedLengthTooShortHandling as Cut. So add one more parameter in your file receiver communicaion channel: Also I hope ASFD0101 is your strcuture not the field in the strcuture.
ASFD0101.fixedLengthTooShortHandling : Cut
Then I think it should work like a boom.
---Satish -
File Sender, Content Conversion - how to define variable length last field?
XI 3.0 SP17
With a File Sender communication channel, that uses Content Conversion - how do I define a 'variable length' last field?
The scenario - the input file has four fields, of which the first three are a known fixed length, and the last (fourth, trailing) field is variable in length.
Using a Message Protocol of 'File Content Conversion', how do I define that last variable length field (field name 'WOData' below) in the Content Conversion Parameters section?
My current parameters are:
Recordset Structure - Row,*
ignoreRecordsetName - true
Row.fieldFixedLengths - 1,12,5,99999
Row.fieldNames - WOType,WONum,WOLine,WOData
I've tried the following for 'Row.fieldFixedLengths' to no avail -
'1,12,5,*'
'1,12,5,0'
'1,12,5,'
'1,12,5'
The last two were grasping at straws )
The only thing I've got to work is specifying a 'large' value for the final field (99999 above).
In addition, does anyone know if specifying a large value (e.g. 99999) for the final trailing field will give rise to performance issues when the file is being processed?
In the help for "Converting File Content in a Sender Adapter", it states -
<Begin Quote>
NameA.fieldFixedLengths
If you make a specification here, the system expects a character string that contains the lengths of the structure columns as arguments separated by commas.
If you also specify a separator for the columns, you must not add its length to the length of the columns.
This entry is mandatory if you have not made an entry for NameA.fieldSeparator.
<End Quote>
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm<< note that fieldFixedLengths will not take any wildcard entries like *. So in these case it is ideal to provide a maximum char length. But note that while the file is being created that many spaces will be created in your file !!! >>
Hi Shabarish,
Yes, no wildcard is the conclusion I came to, hence my maximum )
The message size did not increase by any 'blank padding'. When I look in [Message Display Tool (Detail Display)] 'Audit Log for Message: X' -
2006-10-17 18:22:42 Success Channel X: Entire file content converted to XML format
2006-10-17 18:22:42 Success Send binary file "X" from FTP server "X", size 103290 bytes with QoS EO
2006-10-17 18:22:42 Success Application attempting to send an XI message asynchronously using connection AFW.
2006-10-17 18:22:42 Success Trying to put the message into the send queue.
2006-10-17 18:22:42 Success Message successfully put into the queue.
2006-10-17 18:22:42 Success The application sent the message asynchronously using connection AFW. Returning to application.
The input flat file in non-XML format was 92,132 bytes and the message payload into XI was 103,290 bytes.
My understanding is that trailing spaces are stripped from XML nodes. -
File content conversion without field separator
Hi experts,
in my scenario I'm sending a txt file to an external receiver.
Each field of the file must be separated from the others with differents field separators according with the requirement of the receiver, for example:
field1;field2:field3, field4; ecc....
For this reason I've created in the source message many "FieldSeparator" fields. These fields will be populated by ABAP program.
I thought that it was possible to omit parameter fieldSeparator in content conversion, but testing the interface I receive an error because fieldSeparator is missing.
Is possible to omit fieldSeparator or to specify a fieldSeparator null?
The fields in the target file must be of variable lenght, so I cannot use FieldFixedLenght.
The only solution I found is to create in the target message structure a single string with each field concatenated, is the only possible solution?
Thanks
Fabio Boni
Edited by: Fabio Boni on Oct 21, 2010 5:47 PMSorry...posting error earlier..
The seperator can be concatenated at the end of each field in mapping.So seperator will be part of field value.
But with receiver FCC, you need to either mentione fieldfixedlenght or fieldseperator.Please check if space is going to to work for you as separator.
Edited by: nagarjuna _s on Oct 21, 2010 6:36 PM -
Key field in File Content Conversion
Is Keyfield must be unique in FCC ?
Hi,
Check this to get more Clarity abt the Key Field Usage
Content Conversion ( The Key Field Problem )
Regards
Seshagiri -
Ignore fields in File Content Conversion
Hi all,
I need to read first 9 fields in Content conversion from text file and ignore all the others.The problem is I don't know exactly the number of fields(it varies from file to file).
I try to use the following in my content conversion:
item.fieldSeparator = ;
item.fieldNames = "Names of item fields"
item.lastFieldsOptional = NO
ignoreRecordSetName = true
Now it works with files with 9 fields,but doesn't with more than 9...
I tried with item.lastFieldsOptional = YES as well but it didn't help...
Anyone any suggestions?
Thanks in advanceThe problem is I don't know exactly the number of fields(it varies from file to file).
>>>> then how do you write your FCC ? because the mandatory parameters fieldFixedLengths or fieldSeparator and the fieldNames will expect a defined set of values and not dynamic.maybe you can read the file record row kind and then extract the fields u need.
item.lastFieldsOptional
>>>
this is to ignore only the last field.
<i>xml.lastFieldsOptional=YES|NO
This parameter specifies whether the last fields can be omitted (YES) or not (NO) in a CSV structure. If you do not make a specification, the default value is NO.</i> -
Key field values for file content conversion at sender communicationchannel
Hi all,
I am working on scenario File to Idoc.In this scenario at the sender side we configure the file content conversion for .CSV file.
In the flat file i am having more than one orders, XI will pick the file and creates a separate Idoc for each sales order at r/3.
We have similar fields "Order Item Number" both header and item.
If we got '00000' on the Header item then it should create a new idoc at the r/3 side other wise it will create line item.
Order item number will be 00000 for header but it will differ from order item to item.
source structure
Order Header
Order type
Sold-to-code
PO number
Order item number
Order date
AdresName1
AdresName2
Street and House number
Postal Code
City
Country Code
Filler
Order Item
Order type
Sold-to-code
PO number
Order item number
Order date
Product code
Order quantity
Item text
Filler
Now I have some questions....
I don't have standard filed values to give the key fileds at source structure.
I need to create the Idoc at r/3 system for each individual record.
Is it possible to create new idoc with out using the Key filed value?
If it is possible then how can i proceed with fcc?
please give me your valuable suggestions
Best Regards,
satya
Edited by: satyatanuku on Mar 3, 2010 1:41 PM
Edited by: satyatanuku on Mar 3, 2010 1:42 PM
Edited by: satyatanuku on Mar 3, 2010 1:44 PMHi,
Just check the Content Conversion Parameters- Recordset Structure.
If you have filled in this parameter with
Header,1,Item,1
then change it to
Header,1,Item,3
Regards
Chandra -
Content Conversion without key field value
Hi all,
I want to do a content conversion which includes a record structure Header,1,Detail,*
I dont have any key field value in the header nor in the detail. Can this be achived using FCC or should i go for Java.
Rgds
AdityaHi Aditya,
I think if u having multiple records then one shud hav key fields,
pls check 4th point in this guide
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/troubleshooting%2bthe%2bfile%2badapter
Also check this discussion::File Content Conversion(SenderFileadapter) fields parameters
Thanks, -
Content Conversion - Ignore extra last fields
Hi There
My content conversion has the following:
STRUCTURE.fieldNames
STRUCTURE.fieldSeparator
STRUCTURE.additionalLastFields
STRUCTURE.endSeparator
My payload has 22 fields and I only specify 20 field names in my CC.. Due to the parameter additionalLastFields, I don't get an error because of the extra 2 fields.. These field is used in the file name and not in the file itself.. But it adds it to the end of each line regardless. I suppose adding fixed Field length would solve this problem but that I don't have.
Is there a way to ignore these 2 by NOT adding it to the file? Maybe some parameter I migth have over looked?
Thanks
JanHi,
Use the different structures for payload data and the fields to be used for file name.
Similar to STRUCTURE add one more structure as STRUCTURE1 and define those 2 fields over here.
The FCC parameters can also be dfefined accordingly.
STRUCTURE1.fieldNames= field1, field2
STRUCTURE1.fixedFieldLengths = 0,0
Thanks
Swarup
Edited by: Swarup Sawant on Sep 7, 2009 1:20 PM
Maybe you are looking for
-
computer hard drive fried, all data lost, how can I get my music library off and onto another computer? no downloads, just cd's I loaded on to it
-
see the subject - that's it, I would just like for videos to play, please
-
ExecuteUpdate error with mysql
Dear All: i have a wierd error right here, the code is working correctly for the first call to this jsp page but the error come out when second call to this page. the field was update wrongly, credit=credit-1 become credit=credit-2 and Point=Point+1
-
Integrating External JQUERY code with Edge Animate
Hi all... There are two ways i can see of integrating Edge Animate With External JQuery Something happens within Adobe edge and triggers something to happen externally or vice versa..... 1: When an action is performed (mouseUp MouseOver... etc...) we
-
SmbServer: could not create socket: Address already in use
When I start SmbServerAgent, it fails again and again. In SmbServer.log there exists "SmbServer: could not create socket: Address already in use," but SmbServer was already shutdown. How do resolve such issue? Thanks a lot. ergent