Problem in Content conversion
hi all,
I am working on a scenerio in which file is the target.I have only 1 field at output and on every execution the output needs to be appended into original file.
EX: output1
output2
output3
My output file is of type catalogue file not a text file.Using 'nl' as fieldseparator in CC dint help.Please suggest some other method to acheive this..
Thanks
shruthi
Hi,
Are you used this
fieldSeparator = ','
endSeparator = 'nl'
file processing mode = Append.
You mentioned your file is catlg file can you explain that, and what type of data it having.
The above parameters for onlt text files.
Similar Messages
-
FCC: Problems with content conversion
Dear all,
I have a receiver FTP adapter with content conversion. In RWB I'm facing following error message:
Adapter Framework caught 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 'FCOTUPI')', probably configuration error in file adapter (XML parser error)'
The field with value FCOTUPI could be found in POS recordset. I double check the length of columns but couldn't find
an error.
CC configuration:
Recordset structure: HEADER,POS,SUBPOS
HEADER.fieldFixedLengths = 8,4,8
POS.fieldFixedLengths = 8,20,15,3
SUBPOS.fieldFixedLengths = 5,5
HEADER.fixedLengthTooShortHandling = Cut
POS.fixedLengthTooShortHandling = Cut
SUBPOS.fixedLengthTooShortHandling = Cut
As you can see by the names, I am using as XML to convert a structure with subnodes. In documentation it said
that it is not allowed, but in some threads I found the information that structure could be processed.
Any ideas how to solve this problem?
Thanks
ChrisDear Amit,
thanks for your answer. I already checked this blog, but hoped for other solutions.
My problem: I tried to map my hierarchical structure to a flat structure.
Source
Struc1 (0..unbounded)
-Item1.1
-Struc2 (0..unbounded)
--Item 2.1
--Struc3 (0..unbounded)
---Item3.1
Target:
Struc1 (0..unbounded)
-Item1.1
Struc2 (0..unbounded)
-Item 2.1
Struc3 (0..unbounded)
-Item3.1
But if e.g. the Struc2 appears two time it will be created two time in target structure before
the Struc3 is created. But ths Struc3 belongs to Struc2 and should be created in flat file under
Struc2 directly.
How can we created a flat structure like this
Struc1
Struc2
Struc3
Struc3
Struc2
Struc3
Thanks
Chris -
Problems with content conversion in File Receiver Adapter
Hello, everybody.
I have a RFC-to-File scenario with file content conversion. Everything is working well except that my file is generated with 2 blank lines at the top of it.
The function module has 3 importing parameters (1 optional) and the file content comes from an internal table.
Is it caused by the function module parameters? If yes, how can I avoid this, once I really need them? If not, does anyone have any idea?
Thanks a lot,
Marcos.Hi, Raj.
Here they are the function module parameters:
Importing parameters:
ICARRIER TYPE CHAR1
FPATH TYPE IPATH
IFILE LIKE VBAK-BNAME
Tables
IYLASDS_RECPT LIKE YLASDS_RECPT
The structure YLASDS_RECPT has only one field with a single line of the file. I am using this field as the <i>Recordset Name</i> inside file adpater parameters.
There is no mapping between RFC and FTP messages.
Thanks a lot,
Marcos. -
Problem during Content Conversion
Hi People,
I have a content conversion scenario, where my input is a flat file. There are certain values which are blank in my fields. However, in my resultant XML, I need to view these blank spaces enclosed within the respective XML tags.
But, I do not get these blank spaces, and I just get an empty close tag like this
<Batch_no />
instead of <Batch_no> </Batch_no>
What do I do to get these spaces in my XML?
regards,
PrashanthHi Prash,
If the blanks are already in your flat file, you can use the conversion parameter <b><RecordSetName>.fieldContentFormatting</b> and set it to "<b>nothing</b>". Note that the blanks won't be shown in sxmb_moni (they are removed by the displaying tool), but nevertheless they are there!
For details please check note 821267.
Best regards
Joachim -
Dynamic file name in receiver - empty line problem with content conversion
Hi,
I do a variable substitution from a filename node in my xml structure. Because I don't want to have the the filename in my flatfile i supress the output with the conversion parameters:
filename.fixedLengthTooShortHandling = Cut
filename.fieldFixedLengths = 0
It's working but: the adapter is puting an empty line at the end of the file. If I even put the filename node at the top of the xml struture it generates the empty line at the top of the flatfile.
Anyone has an idea? is there an other way to set the filename or how can I supress this empty line( I have to) ?
Regrads
J.Jorg,
Actually speaking we cannot get rid of this with XI. You have to write a OS script to remove this.
Else
you add one more parameter as .endSeparator as backspace ie., 0x08. It will definitely remove the line but I think it is putting a square box at the end of previous line. Please check by giving this and let us know the updates.
Regards,
---Satish -
Problem in content conversion in file - xi - file scenario
Hi there,
could you please give some help? I am getting stuck.
here, my problem (last response): Error in Adapter monitor
Besta regards,
davidHi david
Please use the following parameter at the sendeer side to convert an text file into xml file
RECORD.fieldSeparator :,
RECORD.fieldNames :KEY,FNAME,LNAME,AGE
RECORD.keyFieldValue :1
DETAIL.fieldSeparatr :,
DETAIL.fieldNames :KEY,SALARY,EMPID
DETAIL.fieldNames :2
Note:these parameters are accoding to the structure given below.
suppose you have a structure like as below
data (0..unbounded)
record (0..unbounded)
key (1..1)
fname (1..1)
lname (1..1)
age (1..1)
detail (0..unbounded)
key (1..1)
salary (1..1)
empid (1..1)
and the input file will look like as below
1,aaa,bbb,23
2,12000,10838
1,ccc,ddd,23
2,13000,10830
if you still have the problem please reply me back so that i can solve your problem.
Thanks
Rinku -
File adapter content conversion
Hi all,
We are having File to File Scenario
We are facing problem in Content conversion in File
Adapter(Sender)
The source file is in text format and fields are
seperated by '|' character
The source file structure is :
Header|No. of Records
Data Record1
Data Record2
Data Recordn
Trailer|No. of Records
where Data Recordn is of type Field1|Field2|Field3|Field4
and the number of data records is variable
e.g.
Header|5
2|144012|20050801|20050801
212|012|20050801|20050801
244012|2|20050801|20050801
2144|144012|20050801|20050801
212|012|20050801|20050801
Trailer|5
Now , we need to ignore the contents of Header and Trailer Records
For Header , we are setting the property Document Offset to 1
Hence the Header record is ignored
However , we are facing problems in ignoring the Trailer record
We want to know :
1. Is there a direct way ( or some propety ) wherein we can ignore the last record of the file ,
which in this case is Trailer record
2. We also tried the following :
a. We set the Recordset Structure to : row,*,trailer,1
b. However in this case , the keyField is required for row ;
but since the number of data records is variable ,
the keyFieldValue cannot be specified
How should we go about in this case
Please guide us on this
Regards
ShikhaHi all
Thanks for replies
Actually , we are able to ignore header and that is not an issue
Now if we need to discard the trailer record , we believe that RecordSet Structure should be <b>row,,trailer,1</b> or <b>header,1,row,,trailer,1</b>
However , since structure is <b>row,*</b> ; we need to specify the <b>keyField</b> column for row ( data records )
Since <u>number of data records</u> is variable , we are not able to set the <b>keyFieldValue</b> for <u>row ( data record )</u>
Can you'all please guide us on this as we are stuck on this .
Regards
Shikha
Message was edited by: Shikha Jain -
** File Content Conversion Error in Receiver CC - How to solve this?
Hi friends,
My target structure looks like below.
EmployeeJobDetails --> Message Type
JobCode --> Node
EmployeeNumber xsd:string
Domain xsd:string
JobTrack --> Node
Department xsd: string
Position xsd: string
I use the FCC parameters in the receiver CC as below:
Recordset Structure: JobCode,JobTrack
JobCode.fieldSeparator = |
JobCode.endSeparator = 'nl'
JobTrack.fieldSeparator = |
JobTrack.endSepartor = 'nl'.
Because, we want the output like below
1099|Raja
Accts|JuniorAccountant
1100|Ram
HR|Recruiter
like this.
In this scenario Source is XML and target is txt file.
I am using XSLT Mapping. The FCC works fine, if my source input file contains some records. But, when we send empty source XML file as below
<?xml version="1.0" encoding="UTF-8"?>
<EMPLOYEE_DATA/>
Mapping works fine. Message is processed successfully in SXMB_MONI. The payload in response also comes with Message Type name like below
<EmployeeJobDetails namespace >
</EmployeeJobDetails>
While convert this, the system throws below error.
Error Message:
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: 'Conversion configuration error: Unknown structure '' found in document', 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: 'Conversion configuration error: Unknown structure '' found in document', probably configuration error in file adapter (XML parser error)'
Friend, how to convert this when source XML is empty.
But, if we remove JobTrack node in target strucutre and remove the JobTrack parameters in CC, then if we send the same empty XML file FCC is working fine and we get the target text file 0 KB. (Amazing !!)
But, in the first case, how to solve the issue?
Kind Regards,
Jegathees P.Hi friends,
If we remove JobTrack node in target strucutre and remove the JobTrack parameters in CC, then if we send the <b>same empty XML file</b> FCC is working fine and<b> we get the target text file 0 KB</b>. (Amazing !!)
But, if we give parameters like JobCode,JobTrack then send pass the same empty file, we face the problem 'File Content Conversion' Error.
Searching solution for this problem ... -
FIle Content Conversion Problem in IDOC-XI-File Scenario
Dear All,
I am doing IDOC-XI-FILE scenario.
I am facing one problem related to File Content Coversion.My requirement was to generate a dynamic file like <b>%store_code%_%current_date%_sitemaster.xml</b> , I have completed the dynamic generation successfully .
Now there is slight change in the requirement ,<b>we have to suppress the current_date node of the xml content</b> . i have tried to suppress the current_date using these <b>DATE.fieldFixedLengths 0 , Date.fixedLengthTooShortHandling Cut</b> , But I am unable to suppress it Can some body provide me the details on this .
The output xml version generated by Reciever file adapter is as below :
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_SITE_MASTER xmlns:ns0="http://sample-xitest.com/sitemaster">
- <SITE_DATA>
<STORE_CODE>N002</STORE_CODE>
<TITLE_MEDI>Company</TITLE_MEDI>
<STORE_NAME>Mount Road</STORE_NAME>
<STREET>Chennai</STREET>
<COUNTRY>IN</COUNTRY>
<SALES_TAX_NO>12345678910</SALES_TAX_NO>
</SITE_DATA>
</ns0:MT_SITE_MASTER>
Plz provide me the code I have to write in the file content conversion .
Thanks in advance
Regards
PrabhatIf u see my earlier reply, I mentioned that u can not suppress the field from the one node.i.e Form SITE_DATA data type u can not suppress the field called CURRENT_DATE.
My suggestion is that , modify the Data type in such a way that you will be having two nodes as I have mentioned earlier. Then use the Suppress Logic for the Current Date.
So it will look like this-
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_SITE_MASTER xmlns:ns0="http://sample-xitest.com/sitemaster">
- <SITE_DATA>
<STORE_CODE>N002</STORE_CODE>
<TITLE_MEDI>Company</TITLE_MEDI>
<STORE_NAME>Mount Road</STORE_NAME>
<STREET>Chennai</STREET>
<COUNTRY>IN</COUNTRY>
<SALES_TAX_NO>12345678910</SALES_TAX_NO>
</SITE_DATA>
<CURR_DATE>
<CURRENT_DATE>20051105</CURRENT_DATE>
</CURR_DATE>
</ns0:MT_SITE_MASTER>
So ur SITE_DATA is not having a field called CURRENT_DATE. This field is in separate node (segment ) called CURR_DATE. Now u can use the Suppress Logic for the same like this.
CURR_DATE.fieldFixedLengths - 0
CURR_DATE.fixedLengthTooShortHanling - Cut
And in your Variable Substitution you can use the date from the other segment called CURR_DATE.
Hope this solves ur problem.
Regards,
Moorthy -
Problem in file content conversion from XML to CSV
Hi Experts,
I am finding problem in file content conversion. I need to convert the following XML file into CSV file:
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_CROSS_REF xmlns:ns0="urn:dabur:idoc2file:pos">
<Update_type>2</Update_type>
<PLU>00000000</PLU>
<Cross_ref_PLU>7777777</Cross_ref_PLU>
<Capture_PLU />
<Package_size />
<Package_desc />
</ns0:MT_CROSS_REF>
The output file data has to be like:
2,00000000,7777777,,,,
The problem I am facing is while specifying the content conversion parameters in communication channel i dont know what recordset structure i should mention as all the records are directly under root. If I mention recordset structure as "ns0:MT_CROSS_REF" and parameters as
ns0:MT_CROSS_REF.fieldSeparator ,
ns0:MT_CROSS_REF.endSeparator 'nl'
i get error in communication channel monitoring and no file is posted.
Please help me as to what correct parameter i should mention in my case.
Thanks,
Regards,
YashHi Chirag,
I cannot change the xml file as it comes after mapping idoc to a message type. How can I add ROOT in the xml? My message type is like MT_CROSS_REF and it has those 6 fields as in the XML (Update_type, PLU etc.). I do the mapping of these fields from a IDOC and get the XML.
I hope you got my point.
Thanks,
Yash -
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 -
Problem with file content conversion in receiver file adapter
Hi All
I have a problem with file content conversion in receiver file adapter.
This is my recordset structure: Header_Record,1,Claim_Record,*,Check_Rec,1
These are the content conversion parameters:
Header_Record.fieldSeparator = ,
Header_Record.endSeparator = 'nl'
Claim_Record.fieldSeparator = ,
Claim_Record.endSeparator = 'nl'
Check_Rec.fieldSeparator = ,
Check_Rec.endSeparator = 'nl'
In SXMB_MONI, i can see that the data is correctly extracted from proxy, and correctly mapped to receiver message, and i see a checkered flag (success).
But, Adapter status is RED with the following error message:
Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter '1.fieldFixedLengths' or '1.fieldSeparator' is missing
In communication channel monitoring, i get the following error message:
Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Channel has not been correctly initialized and cannot process messages
What is going wrong here? Can anyone please tell me?
Thanks
ChandraPosted in Incorrect forum.
Posted again in Process Integration forum -
Receiver File Adapter Content Conversion Problem.
Hi All,
I am getting in receiver file adapter due to content conversion setting. Problem is that all the fields coming in file adapter are optional. In content conversion , i have specified fieldfixedlengths. So whenever any optional field is not present , it fails . How should we handle it? is there any option to declare fields as optional, I know that is the there for sender adapter. But no. of fields is also very large, so putting each and every field as optional is very time consuming.
What should i do?
Ranjeet Singh.Hi Daniele,
Instead of using the standard funciton , i created a UDF for handling this situation.
My logic is UDF is like
//write your code here
int Size = Integer.parseInt(Truncate_Size);
String Return_Value = "";
if (!("".equals(Input)) )
if (Input.length() > Size )
Return_Value = Input.substring(0,Size);
else
Return_Value = Input.substring(0, Input.length());
else
for(int i = 0; i< Size ; i++)
Return_Value = Return_Value + " " ;
return Return_Value;
SO in this case also , it should be able to handle empy source element. But it is not working. -
Hi gurus
I sem to have a really silly problem
I'm only getting the FIRST field on file content conversion and no new line
here's a part of the XML file from the payload manifest
<?xml version="1.0" encoding="UTF-8" ?>
- <rfc:Z_XI_005_RFC xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
- <IP_CUSTOMER_HEADER>
- <item>
<CUSTOMERID>100853</CUSTOMERID>
<COMPANY>Bram Van Tuyl Coldstore</COMPANY>
<SHORT_NAME>VAN TUYL</SHORT_NAME>
<SALES_REGION>EUROP</SALES_REGION>
</item>
</IP_CUSTOMER_HEADER>
</rfc:Z_XI_005_RFC>
I've defined the following parameters in the content conversion
Recordset sructure item
content conversion parameters
item.fieldSeparator ; (a semi colon)
item.endSeparator 'nl'
if I look in my file all i get is
100853
where's the rest of the data ????
When I don't use content conversion xml file is generated correctly.
Any ideas
I am at 100% loss to see what's wrong here as this should be an EASY automatic conversion.
(the input structure is all character)..
Max pts to anyone who solves this
Cheers
jimbothe file is identical
payload from inbound message
for example
<rfc:Z_XI_005_RFC xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
- <IP_CUSTOMER_HEADER>
- <item>
<CUSTOMERID>1000001</CUSTOMERID>
<COMPANY>One-time ship-to</COMPANY>
<SHORT_NAME>ONE-TIME</SHORT_NAME>
<STREET />
<STREET2 /> .......
Paylioad under Receiver Grouping
<rfc:Z_XI_005_RFC xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
- <IP_CUSTOMER_HEADER>
- <item>
<CUSTOMERID>1000001</CUSTOMERID>
<COMPANY>One-time ship-to</COMPANY>
<SHORT_NAME>ONE-TIME</SHORT_NAME>
<STREET />
<STREET2 />
etc
text file 100001;1000001........ etc
There's no Payload that I can see under the response (checkered flag) where it says processed successfully.
cheers
jimbo -
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
Maybe you are looking for
-
Efi update problems. The mac restart
I have a BIG problem after the las software update in my mid-2012 macbook pro (13" i7) start to hang out. When i open parallales the computer show the blue screen and restart. help thnks
-
One user can't get Outlook to work
Hi, We have one user who is having problems with Outlook. It started a few weeks ago, and no one else is having the same problem. It says "The connection to Microsoft Exchange is unavailable. Outlook must be online to complete this action" Environmen
-
Came across these today - thought they were pretty great. See the rest here - http://veryfunnypics.eu/2015/06/23/what-if-the-heroes-we-love-had-different-jobs-20-pictures/What would your super-power be, and what's the most mundane, boring way you cou
-
Dear all, In my client place, no HR module is implemented. But the client is asking for TDS on salary to be deducted for all the employees. How to do? I will award full points for the right answer. Thanks & Regards, A.Anandarajan.
-
Getting my S5s tomorrow and need to prepare
I just ordered the BOGO S5 phones adding two more lines to my account. I already have a family plan and I have my S4 and the other two lines are basic lines. When the S5s arrive tomorrow, I want to take one of the S5s and activate it on my line, ta