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
Prabhat
If 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
Similar Messages
-
How to debug file content conversion problems?
Hi,
I'm trying to debug a file content conversion problem. I'm mapping a few nodes in an IDOC to a file of fixed length fields. I'm using the "<Node A>.fieldFixedLengths", "<Node B>.fieldFixedLengths", "<Node C>.fieldFixedLengths", etc. parameters to specify the fixed length records.
However, a certain node (for e.g. Node B) is causing a problem and if it is present in the IDOC, the output file does not get created. Upon checking the XI monitor, I notice that the file gets mapped correctly and thus the problem lies when the file adapter does the file content conversion. How do I debug this because there is no descriptive error in the XI log? If this node is not present, the file gets generated fine.
Thanks,
Basant GuptaHi,
If your SXMB_MONI shows, success status, then go to RWB->Message Monitoring->Message display tool and then check Audit log for the analysis,
So it wil help you debug the situation.
If there is no error, then check RWB->Component Monitoring->Adapter Monitoring for you file communciation channel..
/people/michal.krawczyk2/blog/2005/01/02/simple-adapter-and-message-monitoring
Regards,
Moorthy -
IDOC to File - File Content Conversion Problem
Hi,
The scenario is IDOC to File. I am using file content conversion for my receiver adapter. The receiver adapter parks the file in the receiver system but the file has no data. In SXMB_MONI on checking the payload at every step, the data is transformed successfully. I am able to see the data at the receiver payload but the file in the receiver system has got no data.
I have used all possible parameters in the receiver adapter:-
Recordset.fieldFixedLengths 1,1,1
Recordset.endSeparator 'nl'
Recordset.fieldNames rec_type,action,del_in
Recordset.fixedFieldType char
Kindly advice if some more parameters need to be added.
Thanks in advance.
KrishnaHi,
if you're using stnadard SAP idoc
you can try using the same approach as specified
in this doc (but with module IDOC to XML insdead of XML to IDOC)
https://websmp203.sap-ag.de/~sapdownload/011000358700001795162005E/HowToIDocXMLToFlat.pdf
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> -
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 -
Recevier File Content Conversion Problem
HI,
i am using File COntent Conversion on Recevier Side for getting output in .txt file.
My Input File:
0112345010101
021111112222
03100001111112222
03100011111212223
041000011111
021231116722
03100781119012332
041005611001
059453287699
My Fields are: "header,hbatch,body,tbatch,trailer"
RecordStrucure: header,hbatch,body,tbatch,trailer
I used fiexefiledlenghts and seperator and end seprator. But its not working.
Please guide me to generate the txt file in the output.
Regards,
Giridhar.CThanks you all for your quick responses.
I have used Sender FCC and created the following XML Format on the Receiver Side.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_INPUT xmlns:ns0 = "http://sealchennai.com/FCC2">
<header>
<key1>01</key1>
<name>12345</name>
<date>01010</date>
</header>
<hbatch>
<key2>02</key2>
<hvalue1>11111</hvalue1>
<hvalue2>12222</hvalue2>
</hbatch>
<hbatch>
<key2>02</key2>
<hvalue1>12311</hvalue1>
<hvalue2>16722</hvalue2>
</hbatch>
<body>
<key3>03</key3>
<bvalue1>10000</bvalue1>
<bvalue2>11111</bvalue2>
<bvalue3>12222</bvalue3>
</body>
<body>
<key3>03</key3>
<bvalue1>10001</bvalue1>
<bvalue2>11112</bvalue2>
<bvalue3>12223</bvalue3>
</body>
<body>
<key3>03</key3>
<bvalue1>10078</bvalue1>
<bvalue2>11190</bvalue2>
<bvalue3>12332</bvalue3>
</body>
<tbatch>
<key4>04</key4>
<tvalue1>10000</tvalue1>
<tvalue2>11111</tvalue2>
</tbatch>
<tbatch>
<key4>04</key4>
<tvalue1>10056</tvalue1>
<tvalue2>11001</tvalue2>
</tbatch>
<trailer>
<key5>05</key5>
<value1>94532</value1>
<value2>87699</value2>
</trailer>
</ns0:MT_INPUT>
But i need the Output in the follwont text format on Receiver Side.
01,12345,010101
02,11111,12222
03,10000,11111,12222
03,10001,11112,12223
04,10000,11111
02,12311,16722
03,10078,11190,12332
04,10056,11001
05,94532,87699
Please do the needful help to create the fiel in the text format.
Regards,
Giridhar.C -
Complex file content conversion in case of CSV file
Hi Friends,
What you see below is generated from Excel i.e excel file saved as CSV file. This file i need to map in XI.
Problem is i have to take only the data and not the header part.
for e.g in this particular line
Employee ID :,,E00315
I need only E0315 and not the header value. Similarly i have to find some solution to map all the required data.
Please suggest me how to use file content conversion in such scenarios.
Solution is required on top priority. Points will be immdly rewarded.
Thanks & Regards
K.Ramesh
,,Time Sheet,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,Ref. No: T-PRO-01-011,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,Page No.: 01,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Employee ID :,,E00315,,,Sale Order No / Line Item :,,,SO123456,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Employee Name :,,K.RAMESH,,,Client Name :,,,NCLIENTELE,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Month / Week :,,Jul-08,,,Project Name :,,,Internal Project,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Sales Team :,,,,,Project Role Start date :,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Location :,,BANGALORE,,,Project Role End date :,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Sl. No.,Date,Day,AA Type, Task Description,,,,,No.of Hours,Remarks,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
1,7/1/2008,Tue,0814-Talent acquitision,task 1,,,,,12.00,rmk 1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2,7/2/2008,Wed,0814-Talent acquitision,task 2,,,,,10.00,rmk 2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
3,7/3/2008,Thu,0814-Talent acquitision,task 3,,,,,12.00,rmk 3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
4,7/4/2008,Fri,0814-Talent acquitision,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
5,7/5/2008,Sat,0814-Talent acquitision,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
6,7/6/2008,Sun,0950-Holiday,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
7,7/7/2008,Mon,0804-Development,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
8,7/8/2008,Tue,0804-Development,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, , , ,,,,,,,,,,,,,,,,,,,,
9,7/9/2008,Wed,0804-Development,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
10,7/10/2008,Thu,0804-Development,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
11,7/11/2008,Fri,0804-Development,,,,,,,,,,,,,,,,,,,,,,,,,,,, , ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
12,7/12/2008,Sat,0950-Holiday,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
13,7/13/2008,Sun,0950-Holiday,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,
14,7/14/2008,Mon,0900-Paid leave,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
15,7/15/2008,Tue,0900-Paid leave,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
16,7/16/2008,Wed,0804-Development,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
17,7/17/2008,Thu,0804-Development,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
18,7/18/2008,Fri,0804-Development,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
19,7/19/2008,Sat,0804-Development,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
20,7/20/2008,Sun,0950-Holiday,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
21,7/21/2008,Mon,0804-Development,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
22,7/22/2008,Tue,0804-Development,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
23,7/23/2008,Wed,0804-Development,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
24,7/24/2008,Thu,0804-Development,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
25,7/25/2008,Fri,0804-Development,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
26,7/26/2008,Sat,0814-Talent acquitision,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
27,7/27/2008,Sun,0950-Holiday,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
28,7/28/2008,Mon,0804-Development,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
29,7/29/2008,Tue,0804-Development,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
30,7/30/2008,Wed,0804-Development,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
31,7/31/2008,Thu,0804-Development,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Prepared By:,,,,,Approved By:,Company Project Manager,,,,Client Project Manager,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Name,,K.RAMESH,,,Name,YYY,,,,ZZZ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Signature,,,,,Signature,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Date ,,31.07.2008,,,Date ,31.07.2008,,,,31.07.2008,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,Hi,
In this CSV file, what all i need is the value E00315 after the label Employee ID. I used in FCC the parameters u asked me to do. Also in the Document Offset i gave value 3 so that the first three lines are ignored.
1,,,Time Sheet,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
1,,,,,,,,,,,Ref. No: T-PRO-01-011,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
1,,,,,,,,,,,Page No.: 01,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
1,Employee ID :,E00315
But still i am getting the error
Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 4 according to structure 'tims_header':java.lang.Exception: ERROR in configuration / structure 'tims_header.': More elements in file csv structure than field names specified!
Please help.
Thanks
Ramesh -
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 in PI 7.1 (file to Proxy)
Hi
I am working on a file (text) to Proxy scenario in PI 7.1 version, where I receive the file as shown below
1. Record is header
2. 2nd and 3rd records are Details with the different formats
3. Last Record is trailer
File will have the 2nd and 3rd records sequentially, ex file will have 2nd format, 3rd record format, 2nd record format, 3rd record format, 2nd record format, 3rd record format like that
0200
1BFKKOPKC_C MC -20090803-01MC 5444002244564364 2009073000000000BOSTON RED SOX
2BFKKOPKD_C MC -20090803-0190000000006520090112
1BFKKOPKC_C VISA-20090803-01VISA4011080000404419
2BFKKOPKC_C VISA-20090803-01VISA4011080000404416
1BFKKOPKC_C VISA-20090803-0190000000006620090112
2BFKKOPKC_C VISA-20090803-0190000000006720090112
1BFKKOPKC_C VISA-20090803-01VISA4011080000404450
2BFKKOPKC_C VISA-20090803-01VISA4011080000404450
3BFKKOPKS_C 5,500.00-USD 5
4BFKKOPKS_C 5,500.00-USD 5
Can anyone let me know what are the parameters needs to be declared in the file content conversion, and how to process the file if the file contains different formats sequentially
Thanks a lot for the input
PRPR ,
You would be needing these ones.. :
NameA.fieldNames
NameA.fieldSeparator.
NameA.endSeparator
NameA.fieldFixedLengths (this one not sure though....depends upon ur req,..)
Regards,
Edited by: Santosh Rawat on Aug 10, 2009 11:17 AM -
File Content Conversion - Creating Mulitple structured Flat Files
Hello,
I am trying to create a flat file using File content Conversion.For simple XML strcutures like
<Header>
</Header>
<Item>
</Item>
<Trailer>
</Trailer>
the file content conversion works fine. But whe the XML structure gets complicated like
<Header>
</Header>
<Item>
<Item_Detail>
</Item_Detail>
</Item>
<Trailer>
</Trailer>
or
<Header>
</Header>
<Item>
<Item_Detail_1>
<Item_Detail_2>
</Item_Detail_2>
</Item_Detail_1>
</Item>
<Trailer>
</Trailer>
I am not able to create the correct flat file with the Item_Detail information.How can I do the same ?
Regards,
Sandeepwell same in the receiver side too....
REF: http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
and sorry abt the earlier blogs, u can chk out the one below ....
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion -
Hi,
I am facing some problem in FCC for Receiver adapter. It has to convert from XML to CSV File.
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:PaymentFull_Target xmlns:ns0="http://sdn.com/Payment">
- <RECORDSET>
- <Header>
<LineItem>1</LineItem>
<SaleNumber>102</SaleNumber>
<TransNumber>105</TransNumber>
<Store>1326</Store>
<variant>Z6</variant>
<TransType>NEW</TransType>
<Adjustm_Type />
</Header>
- <Header>
<LineItem>2</LineItem>
<SaleNumber>102</SaleNumber>
<TransNumber>105</TransNumber>
<Store>1326</Store>
<variant>Z6</variant>
<TransType>NEW</TransType>
<Adjustm_Type />
</Header>
- <Header>
<LineItem>3</LineItem>
<SaleNumber>102</SaleNumber>
<TransNumber>105</TransNumber>
<Store>1326</Store>
<variant>Z6</variant>
<TransType>NEW</TransType>
<Adjustm_Type />
</Header>
</RECORDSET>
</ns0:PaymentFull_Target>
Output File is coming only with lineitem values , remaining fields are not coming.
*1,2,3*
FCC Used...
RecordSet Structure -- Header
Header.fieldNames -
LineItem,SaleNumber,TransNumber,Store,variant,TransType,Adjustm_Type
Header.fieldSeparator----- ,
Header.endSeparator----- 'nl'
Did I miss anything.. any idea whats going wrong?
Thanks
DeepthiHi Deepthi,
Mention the occurrence of header in Recordset
You specify like this:
Recordset: Header, *
Header.fieldSeparator : u2018Field Separatoru2019
-->For FCC on Receiver side you donu2019t have to mention the field names.
-->The u2018endSeparatoru2019 parameter needs to given for substructure only
Check this links:
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
/people/shabarish.vijayakumar/blog/2007/08/03/file-adapter-receiver--are-we-really-sure-about-the-concepts
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
Rgds,
Akhila -
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 -
File Content Conversion Problem: Sender File Adapter
Hi All,
In Sender File Adapter, how to spilt the single line into different lines using + as a separator. Plz see below my source file.
#SMESS=IV01:672633SAP:676968:::NL51:02:11+
COPS=678713:676968:070416:IV01'3:11IVFR=678713:PDA and'IND 2'9206 AD'Dtn'INIVDA=070416IVNR=6264008195:676968add1
#EMESS=0+
In above txt file there are 3 lines.
1st line starts with #SMESS
2nd line starts with COPS
3rd line starts with #EMESS.
In 2nd line, if u observe there are 3 lines separating by +. My task is, I have to spilt the 2nd line into 3 lines using + separator.
I already used the xx.endSeparator as '+' to spilt the line but it is not working....
Could anyone help me how to do this. This is very urgent
Thnx,
Kumar.Hi Shankar,
1) My Expected XML Structure:
<?xml version="1.0" encoding="utf-8" ?>
- <ns:MT_IV01 xmlns:ns="http://ms.com/dev/ms">
- <Recordset>
- <DT_SMESS>
<D_9901>IV01</D_9901>
<D_9902>672633SAP</D_9902>
<D_9903>676968</D_9903>
<D_9904 />
<D_9905 />
<D_9906>NL51</D_9906>
<D_9907>02</D_9907>
<D_9908>11</D_9908>
</DT_SMESS>
- <DT_COPS_2>
<D_C022>678713</D_C022>
<D_C023>676968</D_C023>
<D_C008>070416</D_C008>
<D_C111>IV01'3</D_C111>
<D_H559>11</D_H559>
</DT_COPS_2>
- <DT_IVFR_2>
<D_C024>678714</D_C024>
<D_D333>PDA and'IND 2'9206 AD'Dtn'IN+</D_D333>
</DT_IVFR_2>
- <DT_IVDA_2>
<D_D365>070416</D_D365>
</DT_IVDA_2>
- <DT_IVNR_2>
<D_D189>6264008195</D_D189>
<D_H364>676968add1</D_H364>
</DT_IVNR_2>
- <DT_EMESS>
<D_D9901_1>0</D_D9901_1>
</DT_EMESS>
</Recordset>
</ns:MT_IV01>
2) I am not getting any error even if I use key Fields or Not becoz in the RecordSet Structure I mentioned DataType, 1 instead of DataType, *.
3) FCC Parameters:
Document Name: MT_IV01
Document Namespace: http://ms.com/dev/ms
Recordset Structure: DT_SMESS,1,DT_COPS_2,1,DT_IVFR_2,1,DT_IVDA_2,1,DT_IVNR_2,1,DT_EMESS,1
Recordset Sequence: Ascending
Key Field-type : String (Case-sensitive)
4) Error:
Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 2 according to structure 'DT_COPS_2':java.lang.Exception: ERROR in configuration: more elements in file csv structure than field names specified! -
Sender file content conversion problem
hi Masters,
I have sender side structure like this...below..
emp_row unbounded.
empid
name
city
country.
actually i had given few id with names and other details which i stored in txt file .
like
001, ram, newyork, usa.
002 ,john,london,uk.
003, smit,tokyo,japan.
but if i see in reciever side then i wil get xml file where only 001,ram,newyork,usa. is mentioned ... and remaining records are not there..
wht is the fault and how to rectify tht fault please help me ..
Thanks in Advance ,
jp.recordset structure -- emp_row
emp_row.fieldSeparator - ','
emp_row.endSeparator - 'nl'
if you have "." at the end of each record in your file then remove it and change it to new line -- "nl" -- by hitting the enter key on your keyborad at the end of each record Or if you want to use "." only then replace 'nl' in the above endSeparator parameter list with '.'
PS: Share u r current content conversion parameter settings also
Cheer's -
Receiver File content conversion problem with newline separator
Hello Experts,
My scenario is IDOC To file..At output we are generating an csv file wherein we have got records in new line.
somethng like these..
ITEM1,ITEM2,ITEM3
ITEM1.ITEM2,ITEM3.
But when i open these csv file using notepad,we are getting records in same line.
i.e item1,item2,item3item1,item2,item3
Also we have specify in FCC,endseparator value as 'nl'
My target structure is somethng like these,
MT_PRODUCT_MASTER
-Product master
-item1
-item2
Pleasee advise.What is exactly parameter that you have set on channel?
endSeparator = 'nl'
NameA.endSeparator
If you enter a character string here, the system adds it to the last column as a closing character. You can also make this specification in addition to NameA.fieldFixedLengths. To include a line break following the closing character, you must explicitly define it by attaching ´nl´ (including the quotation marks) to the string. -
File Content conversion for Fiexed length output file
Hi,
I am Working on Idoc to File scenario.
I would like to know the content conversion partmenrts for the follwoing structure.
Structrure is as below:
Message Type
Header Record 1..unbounded
. Field1 0...1
. Field2 0...1
. Field3 0...1
.. Detaillines 0...unbounded
... Field3 0..1
... Field4 0..1
.. Detaillines2 0..unbounded
... Field6 0...1
... Field7 0...1
Can you please advise.
Regards,
Manoj KumarHi Manoj
Give the FCC parameter as
RecordSet Structure = Header,,Detaillnes,,Detaillines2,*
Header.endSeparator = 'nl'
Header.fieldFixedLengths = field length
Header.fieldFixedLengthType = char/byte
Header.fieldNames = field1,field2,field3,.....
Header.keyFieldValue = Header
Detaillnes.endSeparator = 'nl'
Detaillnes.fieldFixedLengths = field length
Detaillnes.fieldFixedLengthType = char/byte
Detaillnes.fieldNames = field1,field2,field3,.....
Detaillnes.keyFieldValue = Detaillnes
Detaillines2.endSeparator = 'nl'
Detaillines2.fieldFixedLengths = field length
Detaillines2.fieldFixedLengthType = char/byte
Detaillines2.fieldNames = field1,field2,field3,.....
Detaillines2.keyFieldValue = Detaillines2
The keyFieldValue should be the Value which identifies your record either as Header/Detaillines/Detaillnes2.
Regards
Santhosh
Message was edited by:
Santhosh Kumar V
Maybe you are looking for
-
Why is my iPod touch new screen blank??:(
-
How do we put an object in coherence cache when the pk is using @TableGener
Hi, I am trying to create a sample application using Spring, JPA, Eclipselink, Coherence. I am trying to insert objects into cache and then expecting it to persist into database asynchronously. The issue is we are using @TableGenerator to generate pk
-
Removing original audio from a film clip!Please help
Hi I am trying to export a film with visuals and sound synced - I have done this within Logic however when I export it (Options>Movie>Export Audio to Movie) I am not presented with an option that allows me to remove the original audio from the film.
-
Problem in activation of "Certify Completion" Button in LBK1.
Hi Experts, We are working on LBK1 logbook entry. The Certify Completion Button in Notification is coming correctly, but in Log Entry this button is not displayed. How we can activate / display this button in LBK1 ? Study SAP
-
I can't see my usb on my desktop
When I hook my usb up, it does not appear on my desktop. How do I see it?