Receiver File Content Conversion concerns
Dear SAP experts,
Need your advise regarding File Content Conversion.
I have here the XML,
<?xml version="1.0" encoding="UTF-8" ?>
<ns0:CSV xmlns:ns0="http://pg.com/xi/tom/connect/edi">
<SLI_root> ---> this is the root node of 'CSVFileName' and 'SLI'
<CSVFileName>Globus_20080306</CSVFileName>
<SLI> ---> this is the root node of the below fields
<PERIO>20071222</PERIO>
<EAN>737052018164</EAN>
<ILN>4304452000004</ILN>
<SALES>16</SALES>
<TURNO>120</TURNO>
<PERFL>W</PERFL>
<SUBSFL>X</SUBSFL>
<SALUN>ST</SALUN>
<CURRENCY>EUR</CURRENCY>
<STOCK>000000000</STOCK>
<STOUN>ST</STOUN>
</SLI>
<SLI>
<PERIO>20071222</PERIO>
<EAN>737052018232</EAN>
<ILN>4304452000004</ILN>
<SALES>3</SALES>
<TURNO>38.699997</TURNO>
<PERFL>W</PERFL>
<SUBSFL>X</SUBSFL>
<SALUN>ST</SALUN>
<CURRENCY>EUR</CURRENCY>
<STOCK>000000000</STOCK>
<STOUN>ST</STOUN>
</SLI>
<SLI>
</SLI_root>
</ns0:CSV>
CSV --> The Message Type of the XML.
SLI_root is under CSV
CSVFileName and SLI are under SLI_root
PERIO, EAN, ILN.. etc. are under SLI
SLI_root is under CSV.
CSVFileName and SLI are under SLI_root.
PERIO, EAN, ILN,... fields are under SLI.
The parameters i've set in Content Conversion are:
Recordset Substructure: SLI_root,SLI
SLI_root.endSeparator: 'nl'
SLI_root.fieldSeparator: 'nl'
SLI.addHeaderLine: 3
SLI.headerLine: PERIO;EAN;ILN...
SLI.fieldSeparator: ;
My output should be,
PERIO;EAN;ILN;SALES;TURNO;PERFL;SUBSFL;SALUN;CURRENCY;STOCK;STOUN
20071222;737052018164;4304452000004;16;120;W;X;ST;EUR;00000000;ST
20071222;737052018164;4304452000004;16;120;W;X;ST;EUR;00000000;ST
20071222;737052018164;4304452000004;16;120;W;X;ST;EUR;00000000;ST
The parameters i've set in Content Conversion are:
SLI_root.endSeparator: 'nl'
SLI_root.fieldSeparator: 'nl'
SLI.addHeaderLine: 3
SLI.headerLine: PERIO;EAN;ILN...
SLI.fieldSeparator: ;
SLI.endSeparator: 'nl'
When i've run my scenario, the output is this,
Globus_20080306;20071222;737052018164;4304452000004;16;120;W;X;ST;EUR;000000000;ST
20071222;737052018232;4304452000004;3;38.699997;W;X;ST;EUR;000000000;ST
20071222;737052018263;4304452000004;1;12.9;W;X;ST;EUR;000000000;ST
20071222;737052018294;4304452000004;1;10.45;W;X;ST;EUR;000000000;ST
The header lines are not present and the value of CSVFileName (Globus_20080306) was inserted in my values.
Kindly advise what is wrong on my parameters set.
Or is there something missing in my configs.
Or i will change my structure of XML ?
Thank you very much!
Fred
Hi Raj,
Im just 4months working in SAP XI, and i still consider myself as a beginner.
I've only used Receiver File Adapter in my scenario (NO Sender File Adapter)
These are the configurations i've made in the Receiver File Comm Channel.
For the Parameters TAB:
File Receiver
Transport Protocol: File System (NFS)
Message Protocol: File Content Conversion
Adapter Engine: Integration Server
File Access Parameters:
Target Directory: * specified directory
File Name Scheme: .csv
Processing Parameters:
File Construction Mode: Create
Write Mode: Directly
File Type: Text
Adapter-Specific Message Attributes
- Use Adapter-Specific Message Attributes
- File Name
Run Operating System Command After Message Processing
Command Line: chmod 664 %F
Content Conversion Parameters:
Recordset Structure: SLI
SLI.addHeaderLine: 3
SLI.headerLine: PERIO;EAN;ILN;....
SLI.field Separator: ;
SLI.endSeparator: 'nl'
Adapter Status: Active
For the Identifiers TAB: (i've had no configs on that)
For the Module TAB:
Processing Sequence:
Number: 1
Module Name: CallSapAdapter
Type: Local Enterprise Bean
Module Key: 0
That's all in my configs in Receiver File Adapter.
Is it ok if you check this?
I've read a SAP Blogs, https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/6400. [original link is broken] [original link is broken] [original link is broken]
I've read in it that there must be set-up in the Module TAB to get the Filename in the Dynamic Configuration.
Kindly advise.
Thank you very much for your usual support.
Fred
Similar Messages
-
Receiver file Content Conversion with Header line
Hi,
Here I am doing receiver file content conversion with header line.
I am able to get the output file correct, when I open the file in notepad the header line and data appearing in the same line (not accepted).
But when I tried to open the name file in internet explorer I can see the header line and data in two different lines (accepted).
What should I do I want to see the same output in the notepad?
Please help me out.
Thanks in advance,
Srikanth.You can use NameA.addHeaderLine.
Specify whether the text file will have a header line with column names. The following values are permitted:
0 u2013 No header line
1 u2013 Header line with column names from the XML document
2 u2013 As for 1, followed by a blank line
3 u2013 Header line is stored as NameA.headerLine in the configuration and is applied
4 u2013 As for 3, followed by a blank line
The below weblinks will help you to know the other paramters.
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
http://help.sap.com/saphelp_nwpi71/helpdata/en/44/686e687f2a6d12e10000000a1553f6/content.htm -
Can External Definition be used or Receiver File content conversion (CSV)?
Hi Experts,
I'm a newbie to SAP PI and I started working on file to File(FCC) scenario in which I am provided with the receiver structure as an External definition. The structure is like
Name
Place
Designation
Salary
hike
Can I use the same structure (External Definition) for the receiver file content conversion or do I need to create another specific structure?
Can I convert the target CSV file to UTF-8 encoding?
Please help.
Regards,
TaroHi,
Can the above specified structure be used for receiver FCC? Does this work? Can this be converted to UTF-8?
If it can be used, how do we specify the parameters for FCC then as there's no root element?
Regards,
Taro -
Receiver File content conversion with nested structure
Hi Guys,
I have the below nested structure and have to convert it using receiver file content conversion.
<Header> [o, unbounded]
<A>a</A>
<B>b</B>
</Header>
<record> [0, unbounded]
<field1>
<X1>x</X1>
<Y1>y</Y1>
</field1>
<field2>
<X2>x</X2>
<Y2>y</Y2>
</field2>
</record>
The file is a comma separated one. Please let me know how to configure the content conversion.
ThanksHi Mukesh,
Have a look at the Shabz's blog for the receiver File content conversion : File Adapter (Receiver) - Are we "really" sure about the concepts?
Thanks,
Pooja -
Receiver File content conversion - NO Output
Hi, yesterday i posted already to this topic but i chose to make a new thread.
I have an IDoc2File Scenario where i put the generated File to the filesystem of the XI-Server.
I try to do a file content conversion at the receiver side. I already read several blogs and also the official documentation (which is kind of bad - because the arne't posted all supported parameters which could be used on the recordset)
But anyway, the is a txt file written but without any details inside, no data is deliverd.
I do a message mapping and try to put only some data to the end-file.
here is my MT which i try to convert:
MT_Tafel
++TafelRecordset
+++TafelDetailsStructure
++++TAFIST
++++TAFSOLL
My parameters at the receiver communication channel are:
Recordset: TafelDetailsStructure
TafelDetailsStructure.endSeparator = 'nl'
TafelDetailsStructure.addHeader = 0
TafelDetailsStructure.fieldSeparator = ,
I have the right message protocol, i am trying to write a simple text file, i have no file-coding like ASCII, file is directly written into an empty one - and that's all.
The file is written but without data inside.
Do i have to announce the filednames i want to write? Like TafelDetailsStructure.fieldNames??
Do i have to add Parameters concerning the tags on the higher level, like TafelRecordset?
Is there a general overview about all parameters you can use on this file content conversion?
Can anybody help me with my scenario - i have no clue what i have done wrong. Communcation channel says everthing is fine, message succesfully transfered.
best regards, Jenshi,
you need to mention the names of the field by
TafelDetailsStructure.fieldNames where u need to specify the filed names.
and also chk the similar thread
content conversion
plsz check the blog
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
check this like below,
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
hope this helps,
kvr
Message was edited by:
PrasadBabu Koribilli -
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 -
Receiver File content conversion for multi level hireachy
Receiver channel file content conversion..
this is SAP proxy to FIle Scenario, which will get invoice details from SAP along with multiple invoice texts for each invoice.
I would like to have below mentioned payload at Target side,
<MT_Invoice>
<File Header> 1...1
<f1> customer invoices </f1>
<f2> 12/02/2010 </f2>
</File Header>
<Invocie header>
<f1> Invoice number1 </f1>
<f2> customer number1 </f2>
</Invoice header>
<Invoice text>
<f1> Inovice no1-text1 </f1>
</Invoice text>
<Invoice text>
<f1> Inovice no1-text2 </f1>
</Invoice text>
<Invocie header>
<f1> Invoice number2 </f1>
<f2> customer number2 </f2>
</Invoice header>
<Invoice text>
<f1> Inovice no2-text1 </f1>
</Invoice text>
<Invoice text>
<f1> Inovice no2-text2 </f1>
</Invoice text>
<Invocie header>
<f1> Invoice number3 </f1>
<f2> customer number3 </f2>
</Invoice header>
<Invoice text>
<f1> Inovice no3-text1 </f1>
</Invoice text>
<Footer> 1..1
<f1> have a great day </f1>
</footer>
</MT_Invoice>
for the above payload file should come as mentioned below
customer invoices 12/02/2010
invocie number1 customer no 1
invoice no1-text1
invoice no1-text2
invocie number2 customer no 2
invoice no2-text1
invoice no2-text2
invoice no2-text3
invocie number3 customer no 3
invoice no3-text1
have a great day
For to get the above payloadI have create a message type like
MT_invoice
header 1...1
f1 1
f2 1
invoice details 0... unbound
f1 1
f2 1
invoice text 0.... unbound
f1
footer 1...1
f1 1
Please correct me if my message type declaration was wrong...
Please suggest how do i need to approach for message mapping and as well as FCC in File adapter...
Edited by: Vidyadhar Kurmala on Dec 2, 2010 10:28 AMIt is not possible to create alternating nodes in graphical mapping tool.
I recommend using the MessageTransformBean for FCC, as this supports a 2-level hierarchy.
Then you add a node record like this:
<MT_Invoice>
<Record>
<File Header> 1...1
<f1> customer invoices </f1>
<f2> 12/02/2010 </f2>
</File Header>
</Record>
<Record>
<Invocie header>
<f1> Invoice number1 </f1>
<f2> customer number1 </f2>
</Invoice header>
<Invoice text>
<f1> Inovice no1-text1 </f1>
</Invoice text>
<Invoice text>
<f1> Inovice no1-text2 </f1>
</Invoice text>
</Record>
<Record>
<Invocie header>
<f1> Invoice number2 </f1>
<f2> customer number2 </f2>
</Invoice header>
<Invoice text>
<f1> Inovice no2-text1 </f1>
</Invoice text>
<Invoice text>
<f1> Inovice no2-text2 </f1>
</Invoice text>
<Invocie header>
<f1> Invoice number3 </f1>
<f2> customer number3 </f2>
</Invoice header>
<Invoice text>
<f1> Inovice no3-text1 </f1>
</Invoice text>
</Record>
<Record>
<Footer> 1..1
<f1> have a great day </f1>
</footer>
</Record>
</MT_Invoice> -
Receiver File Content Conversion - Multiple Hier. Levels, Several Files
you can create several files using single message execution.
one source message structure and target multiple messgae types(0..1) occurance
and same thing you can implement in your Interface mapping.
1 -> Multiple Inbound interfaces
your target final strcture would be with Header,lineitems.
your JDBC->XI Intermedicate.
XI Intermediate ->XI final (this final structure will create the your file)
that way you can design your scenario.
Regards,
Venu.Hello Venu, thanks for answering,
When you talk about intermediate structure you are referring to the approach I mentioned in the link above or to something that can be done using the same scenario structure I have right now?
I am going I little bit deeper in my scenario just in case I havent been so clear in my first explanation:
Lets suppose I have 3 stores: 1001,1002,1003
For each store there are 2 items: 999,888
So XI retrieves the information from the DB thru a stored procedure. This is the output:
STORE--PLU
1001--999
1001--888
1002--999
1002--888
1003--999
1003--888
Please note the information is coming in a flat structure. In the beginning I tried to separate it into several outputs (selects) as shown below but I relaized that was not possible to be handled by XI:
STORE--PLU
query 1
1001--999
1001--888
query2
1002--999
1002--888
query
1003--999
1003--888
That would have been the best approach as I would have generated one single file for each message and thats it, but unfortunately, Xi does not work that way with MSSQL Queries. So I had to made something up based on the answers I got from the SDN experts (Link is below in first message). There was when I used context handling for generating the structures myself within one single message.
In the scenario shown above I would have just needed to generate the following structure for creating messages from the source:
Level1: Main Node
Level 2: Header
Level 2: Body
But now, As I am forced to generate my 3 structures within 1 single message, I had to insert one more node to wrap header and body in per iteration (as a file would do):
Level1: Main Node
Level2: File
Level3: Header
Level3: Body
And that is the problem I am asking help for, that allegedly, XI File Content conversion can just handle up to 2 levels.
Thanks again for answering Venu.
Regards.
Edited by: Anibal Granado on May 12, 2010 11:34 PM -
Receiver File content conversion
Hello All
I am trying to convert the XML file into the text file, my XML file is of the following structure...
<root>
<data>
<details>
</details>
<details>
</details>
</data>
<data>
<details>
</details>
<details>
</details>
</data>
<trailer>
</trailer>
</root>
into the following flat structure
<data><details><details>---
<data><details><details>---
<trailer>
for this i have done the following content conversion settings
Recordset Structure: data,details,trailer
data.addHeaderLine 0
data.fieldFixedLengths 1,8,6,8,8,1,3
data.endSeparator 'nl'
details.addHeaderLine 0
details.fieldSeparator ,
details.endSeparator 'nl'
trailer.addHeaderLine 0
trailer.fieldFixedLengths 1,3,6
trailer.endSeparator 'nl'
but actually i do not need the 'nl' for details.endSeparator, but i am not able to find out any other value which i could provide here, as default value is 'nl', i also do not want to "," for details.fieldseparatoe, but when i change this with fieldFixedLengths, i get the error
"Error: Message processing failed with 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 '015')', probably configuration error in file adapter (XML parser error)'"
kindly help me in finding out the mistake i am doing...
Regards
Dheerajhi Dheeraj,
I feel you handle this situation in mapping by creating the reciever structure similar to given below.
<root>
<data>
<field1/>
<detfield1/>
<detfield2/>
</data>
<trailer>
<count/>
</trailer>
<root>
<field1/> <detfield1/> <detfield2/> are at the same level children of <data>
Map the occurence of <data> element (target structure) per occurence of <data> element(sender XML structure)
By content conversion you will be able the desired output.
Now you have 2 record set structure
Data and trailer.
Hope it helps,
cheers,
Satish -
Receiver - File Content Conversion(FCC)
Hi,
I am facing problem which creating file in destination FTP server with FCC.
Message Type - MT_GCPO
DATA Type - DT_GCPO
Substructures in data type -DT_GCPO are
FILE_HDR, -> 1
ORD_HDR, ->1
SHIP_TO_RCD, ->1
CARD_DETAIL_RCD -> 0 - unbounded
MSG_RCD, -> 0 - unbounded
ORDER_TRL_RCD, -> 1
FILE_TRL_RCD -> 1
In Receiver channel, metioned details as
Record Set Structure - FILE_HDR,ORD_HDR,SHIP_TO_RCD,CARD_DETAIL_RCD,MSG_RCD,ORDER_TRL_RCD,FILE_TRL_RCD
FILE_HDR.fieldFixedLengths 1,10,10,10,8,6,8,3
FILE_HDR.endSeparator 'nl'
ORD_HDR.fieldFixedLengths 1,15,10,8,6,1,3,11,3,2,8,25,7,3,8,80
ORD_HDR.endSeparator 'nl'
SHIP_TO_RCD.fieldFixedLengths 1,15,20,10,1,32,32,32,20,2,9,15,10
SHIP_TO_RCD.endSepartor 'nl'
CARD_DETAIL_RCD.fieldFixedLengths 1,15,2,10,1,10,11,6,8,5,8,2,19
CARD_DETAIL_RCD.endSeparator 'nl'
MSG_RCD.fieldFixedLengths 1,15,2,30,30,30,5,70
MSG_RCD.endSeparator 'nl'
ORDER_TRL_RCD.fieldFixedLengths 1,15,2,2,2,2
ORDER_TRL_RCD.endSeparator 'nl'
FILE_TRL_RCD.fieldFixedLengths 1,8
FILE_TRL_RCD.endSeparator 'nl'
Error message - "File Adapter Receiver Channel CC_GC_PO: Not initialized - cannot proceed: nullI checked Communication Channel and it is in active status.
Adapter Framework caught exception: Channel has not been correctly initialized and cannot process messages"
Not sure how to proceed further ? Please shred some light on this.
Appreciate your help.
Thanks,
KrishnaHi,
I got an error message like this "Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error occurred while connecting to the FTP server "ftp.bostonapparel.com:21": java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'java.lang.Exception: Column value '25P' too long (>1 for 5. column) - must stop', probably configuration error in file adapter (XML parser error)"
I checked all parameters
FILE_HDR.fieldFixedLengths 1,10,10,10,8,6,8,3
FILE_HDR.endSeparator 'nl'
ORD_HDR.fieldFixedLengths 1,15,10,8,6,1,3,11,3,2,8,25,7,3,8,80
ORD_HDR.endSeparator 'nl'
SHIP_TO_RCD.fieldFixedLengths 1,15,20,10,1,32,32,32,20,2,9,15,10
SHIP_TO_RCD.endSepartor 'nl'
CARD_DETAIL_RCD.fieldFixedLengths 1,15,2,10,1,10,11,6,8,5,8,2,19
CARD_DETAIL_RCD.endSeparator 'nl'
MSG_RCD.fieldFixedLengths 1,15,2,30,30,30,5,70
MSG_RCD.endSeparator 'nl'
ORDER_TRL_RCD.fieldFixedLengths 1,15,2,2,2,2
ORDER_TRL_RCD.endSeparator 'nl'
FILE_TRL_RCD.fieldFixedLengths 1,8
FILE_TRL_RCD.endSeparator 'nl' -
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. -
Nested structur for receiver file content conversion
Hello all,
i have the following problem to set up a nested XML-structure to an flatfile.
XML-Structure:
LtcRecords (root)
Header
Deduction
Trailer
Now i want to convert the Header,Deduction and Trailer values to an flatfile.
I tried it with a lot of possibilies. But without an result.
Recordset Structur: LtcRecords
LtcRecords.fieldNames: Header,Deduction,Trailer
Header.fieldFixedLengths: 1,10,5
Header.fieldNames:id,group_id,location_id
Deduction.fieldFixedLengths: 1,10,3
Deduction.fieldNames:id,group_id,product_code
Trailer.fieldFixedLengths: 1,10,5,3
Trailer.fieldNames:id,group_id,location_id,product_code
I hope somebody can help me with my wrong settings.
Many thanks
ilka
Attachments:
Source:
<?xml version="1.0" encoding="utf-8" ?>
<ns1:mt_Metlife0>
<LtcRecords>
<Header>
<id>A</id>
<group_id>0000700015</group_id>
<location_id>00002</location_id>
</Header>
<Deduction>
<id>D</id>
<group_id>0000700015</group_id>
<product_code>GPC</product_code>
</Deduction>
<Trailer>
<id>Z</id>
<group_id>0000700015</group_id>
<location_id>00002</location_id>
<product_code>GPC</product_code>
</Trailer>
</LtcRecords>
<LtcRecords>
<Header>
<id>A</id>
<group_id>0000700013</group_id>
<location_id>00005</location_id>
</Header>
<Deduction>
<id>D</id>
<group_id>0000700013</group_id>
<product_code>GPC</product_code>
</Deduction>
<Trailer>
<id>Z</id>
<group_id>0000700013</group_id>
<location_id>00005</location_id>
<product_code>GPC</product_code>
</Trailer>
</LtcRecords>
</ns1:mt_Metlife0>
Target:
A000070001500002
D0000700015GPC
Z000070001500002GPC
A000070001300005
D0000700013GPC
Z000070001300005GPCHi
I tried the same scenario successfully.
I had given the same input xml and got same output as u want.
The settings of my File Adapter is as follows:
Recordset Structure: LtcRecords,Header,Deduction,Trailer
Header.fieldFixedLengths: 1,10,5
Header.fieldNames:id,group_id,location_id
Deduction.fieldFixedLengths: 1,10,3
Deduction.fieldNames:id,group_id,product_code
Trailer.fieldFixedLengths: 1,10,5,3
Trailer.fieldNames:id,group_id,location_id,product_code
LtcRecord.fieldSeparator:'nl'
File Type: Text
File Encoding:UTF-8
Try with these settings u will definately get the output.
Regards
Arpit Seth -
Receiver adopter using File Content Conversion
Guys,
I am using File Content Conversion at receiver end.
<b>maintained record structure:</b> Table1,Table2,Table4,Table5,Table6,Table7,Table8,Table9
and maintained parameters below menction for each table.
fieldFixedLengths
fieldNames
fixedLengthTooShortHandling
I want to create target file fixed length and the order which maintained in source file.(EXPECTED FORMAT).
But receiver File Content Conversion creating file in below menction format(FILE COMING FORMAT) which i don't want. Can any one help me what are the parameters do I need to maintain, to create the file same order which is like source file.
<b>SOURCE FILE</b>
100ABCDEF 0430000960603201321
2 000000000040008000802
400100160200002000015E59332 000000000010424400
50000000640672060320ABCDEF 043000096
600100100220887000311003510300958527437215 BAMBERGER POLYMERS
400100160100002000015E59347 000000000000008250
700100206430530603200010022088700
80010030643053060320000100220887009
400100160100002000015E59347 000000000000008260
9000010
<?xml version="1.0" encoding="utf-8"?>
<ns:CSAA_Bankdet_src xmlns:ns="urn:cs.www.abcdefinc.com/CSAA_ODSFTP_ECC_Bank_Details">
<Table1>
<RecordType>1</RecordType>
<PriorityCode>00</PriorityCode>
<Destination>abcdef</Destination>
<BankOrginNo>043000096</BankOrginNo>
<CreationDate>060320</CreationDate>
<CretionTime>1321</CretionTime>
<Spaces></Spaces>
</Table1>
<Table2>
<RecordType>2</RecordType>
<Destination>00000000</Destination>
<BankOrginNo>0040008000</BankOrginNo>
</Table2>
<Table4>
<RecordType>4</RecordType>
<BatchNumber>001</BatchNumber>
<ItemNumber>001</ItemNumber>
<RecordOverflow>6</RecordOverflow>
<SequenceNumber>020</SequenceNumber>
<OverflowCode>0</OverflowCode>
<CustomerNumber>002000015E</CustomerNumber>
<InvoiceNumber>59332 0</InvoiceNumber>
<DiscountAmount>00000000</DiscountAmount>
<GrossAmount>010424400</GrossAmount>
</Table4>
<Table5>
<RecordType>5</RecordType>
<BatchNumber>000</BatchNumber>
<ItemNumber>000</ItemNumber>
<LockboxNumber>0640672</LockboxNumber>
<DepositDate>060320</DepositDate>
<Destination>abcdef</Destination>
<BankOrigin>043000096</BankOrigin>
<Spaces></Spaces>
</Table5>
<Table6>
<RecordType>6</RecordType>
<BatchNumber>001</BatchNumber>
<ItemNumber>001</ItemNumber>
<RemittanceAmount>0022088700</RemittanceAmount>
<MICRTransitRouting>031100351</MICRTransitRouting>
<MICRAccountNumber>03009585274372</MICRAccountNumber>
<MICRCheckSerialNumber>15 BAMB</MICRCheckSerialNumber>
<CustomerName>ERGER POLYMERS</CustomerName>
</Table6>
<Table4>
<RecordType>4</RecordType>
<BatchNumber>001</BatchNumber>
<ItemNumber>001</ItemNumber>
<RecordOverflow>6</RecordOverflow>
<SequenceNumber>010</SequenceNumber>
<OverflowCode>0</OverflowCode>
<CustomerNumber>002000015E</CustomerNumber>
<InvoiceNumber>59347 0</InvoiceNumber>
<DiscountAmount>00000000</DiscountAmount>
<GrossAmount>000008250</GrossAmount>
</Table4>
<Table7>
<RecordType>7</RecordType>
<BatchNumber>001</BatchNumber>
<ItemNumber>002</ItemNumber>
<LockboxNumber>0643053</LockboxNumber>
<DepositDate>060320</DepositDate>
<NoofDetailRecords>001</NoofDetailRecords>
<BatchDollarAmount>0022088700</BatchDollarAmount>
<Spaces></Spaces>
</Table7>
<Table8>
<RecordType>8</RecordType>
<BatchNumber>001</BatchNumber>
<ItemNumber>003</ItemNumber>
<LockboxNumber>0643053</LockboxNumber>
<DepositDate>060320</DepositDate>
<NoofDetailRecords>0001</NoofDetailRecords>
<RemittanceDollarAmount>0022088700</RemittanceDollarAmount>
<LastRecordIndicator>9</LastRecordIndicator>
<Spaces></Spaces>
</Table8>
<Table4>
<RecordType>4</RecordType>
<BatchNumber>001</BatchNumber>
<ItemNumber>001</ItemNumber>
<RecordOverflow>6</RecordOverflow>
<SequenceNumber>010</SequenceNumber>
<OverflowCode>0</OverflowCode>
<CustomerNumber>002000015E</CustomerNumber>
<InvoiceNumber>59347 0</InvoiceNumber>
<DiscountAmount>00000000</DiscountAmount>
<GrossAmount>000008260</GrossAmount>
</Table4>
<Table9>
<RecordType>9</RecordType>
<TotalRecords>000010</TotalRecords>
<Spaces></Spaces>
</Table9>
</ns:CSAA_Bankdet_src>
<b>FILE COMING FORMAT</b>
100ABCDEF 043000096 0603201321
200000000
40010016020059332 0 00000000 010424400
40010016010059347 0 00000000 000008250
40010016010059347 0 00000000 000008260
50000000640672060320ABCDEF 043000096
600100100220887000311003510300958527437215 BAMBERGER POLYMERS
700100206430530603200010022088700
80010030643053060320000100220887009
9000010
<b>EXPECTED FORMAT</b>
100ABCDEF 043000096 0603201321
200000000
40010016020059332 0 00000000 010424400
50000000640672060320ABCDEF 043000096
600100100220887000311003510300958527437215 BAMBERGER POLYMERS
40010016010059347 0 00000000 000008250
700100206430530603200010022088700
80010030643053060320000100220887009
40010016010059347 0 00000000 000008260
9000010
Thanks
MHi,
Try to handle this with the context in the mapping.
I think your mapped xml will look like this-
<i>100ABCDEF 043000096 0603201321
200000000
40010016020059332 0 00000000 010424400
40010016010059347 0 00000000 000008250
40010016010059347 0 00000000 000008260
50000000640672060320ABCDEF 043000096
600100100220887000311003510300958527437215 BAMBERGER POLYMERS
700100206430530603200010022088700
80010030643053060320000100220887009
9000010</i>
SO this is because of context problem. All similar nodes are grouped in the Message Mapping.
1) For this you can try with Context Handling - i.e using RemoveContext,SPlity value functions etc in the message mapping.
2) Another way use XSLT mapping here. In this case it will be easier, because you just need to read the input xml as it is and produce the same.
3) One more thing, your input xml looks as if is the output xml. Is it required to have mapping here? If there is no transformation required, then you can do without any mapping, and you will get the required output as it is ..
Regards,
Moorthy
Message was edited by: Krishna Moorthy P -
Mail Adapter and File content conversion.
I have a scenario to send data from SAP to 4 different boards. I have used a Multi mapping for this scenario. I am using Proxy for SAP to xi and SOAP, File and Mail adapter for the external connections.
Questions:
1) I need to send a mail in CSV or Excell format in one scenario. I have used AF_StrictXml2Plain Module but its not working? any thoughts?
2) In the file adapter I have to add the YYYYMMDD (current Date) to the file name? when I use timestamp i get the time too, any way of getting only date? I cant use the Variable substitution as i dont have date in my payload.
3) Receiver File content conversion:
My Message Type Looks like this
MT_XX_XX
Row
title
xxx
I have used these parameters:
Recordset Structure: Row
Row.addHeaderLine : 0
Row.fieldSeparator : ,
Row.endSeparator: 'nl'
am I doing something worng, the file content conversion doesnt work.
Please let me know
Thanks in advanceHi,
Make sure u are using the bean before the mail adapter bean.
Before using the file content conversion make sure that there are no substructures in it , in order to use addheader line as 0. else use addheaderline 3 and give the headerline as comma seperated values
for e.g if this is the type then addheader line= 0
Type 1 :
Record_Mt
Row
field1
field2
else if this the type then addheaderline = 3
*Type 2: *
Record_Mt
Row1
field1
field2
Row2
field1
field2
add module like this
localejbs/sap.com/AF_Modules/StrictXml2PlainBean
with the module key e.g. key
for type 1 struct (as above )add parameter- key as singleRecordType and value as Row with comma seperated value. (remember header line is 0)
for type 2 structure (as above )add parameter- key as recordTypes and value as Row1, Row2 with comma seperated value. (remember header line is 3) -
How to handle the whitespace in receiver file content converion
Hi Experts,
In Receiver file content conversion we are facing issue with white space charecters- lets example value -999, but in receiver field fixed lengh we have defined as 20 lengh as per the requirement. But, in the output file we are getting [negative sign taking as first char and value filling last] - ********* 999. ****** are white space charecters.
Is there any content conversion paramter for avoiding this type of white space charecters in receiver file content conversion ?
Best Regards.
Krushi.hi All,
I presume that there is something missing UDF coding as per the below.
please advise on this.
input to conversion of 437.72- to -437.72 is mapping is executing correclty. but, receiver file content conversion we have defined as amout value as 20.
so -ve sign taking first place char and remaining moving to last charecters, and whitespaces are filling in the middle.
Now i need to do the trailing of white space charecters. I have tried all above suggested options but nothing works.
for(int count=0;count<input.length; count++)
if(input[count].endsWith("-"))
result.addValue("-"+input[count].substring(0,input[count].length()-1));
else
result.addValue(input[count]);
Thanks and Regards,
Krushi.
Maybe you are looking for
-
How to install 11gR2 RAC on 64 bit linux OS
I am completely new to this topic of RAC and need to be installing and standing up RAC on Linux 64 bit OS . I have good knowledge of installing oracle database ENTERPRISE version 11gR2. Can you guide me as to how to start. I am looking for leads. Pro
-
Podcasts and videos will not show.
My itunes won't play my podcasts, videos or movies. There is sound, but the visual is just flashing pink and green colours. I've re-installed the latest itunes, but to no avail. Is there a separate download I can get to update just the video player?
-
Business Partner with ID GUID is not an employee - HR Replication
Hi All, We are on SRM 5.0 Server 5.5. Our SRM Org structure comes from R/3. We did an initial replication and everything worked. I am now manually trying to replicate selected positions and persons, and this is not working properly. The position and
-
Top Level VI could not be opened
Hello. I've got a problem building an application from my VI. I have a project consisting of a few classes. Lets call the main class TEST1. I can make different tests using the TEST1 members, create exe files and run them on different PCs in our LAB.
-
Oracle database instance shutdown without logging in log file
OS - Windows 2003 R2 Oracle - 10.2.0.1 Platform - HP DL380 아무런 오류없이 오라클 자체가 내려가버립니다. Alert Log에 아무런 메세지도 없습니다. 특별한 작업도 하지 않는 상태에서도 내려가 버립니다. 한달에 두번이상 내려가버리고 Windows Service에서는 시작되어 있다고 나오나 정작 오라클은 내려가 있습니다. (수동으로 Startup을 해줘야 올라오는 상태) 이런 경험이 있으신 분은 도