on 08-23-2011 10:47 AM
Hi all,
I am doing a webservice (SOAP) to file scenario. The file I get into the target directory is as below.
<?xml version="1.0" encoding="UTF-8"?>
<ns1:MT_Test_interface xmlns:ns1="http://test_namespace.co.uk"><fieldA>0000012345</fieldA><fieldB></fieldB><fieldC>0010203040</fieldC><transaction_type>NEW</transaction_type><transaction_date>2011/08/21</transaction_date><sales data>PARTNERS (((119006.258 169077.102), (372718.323 77854.466, 371449.872 70783.383), (382225.17 73214.976, 398410.463 95156.636)))</sales data></ns1:MT_Test_interface>
But I want it to be a plain text file like below, not an xml file.
0000012345
0010203040
NEW
2011/08/21
PARTNERS
(((119006.258 169077.102), (372718.323 77854.466, 371449.872 70783.383), (382225.17 73214.976, 398410.463 95156.636)))
What are all the modules I need and also the parameters and their values please?
Any help is appreciated.
Thanks.
Ramesh.
Hi Ramesh,
You can achieve this by Using "File Content Conversion " as Message Protocol and follow the below steps.in FTP Receiver Adapter .
Add one more field "Row" in your receiver side data structure and follow the below setps.
Enable Content Conversion Parameters
Record Structure : Row
In the table provide following elements.
Row.fieldNames : fieldA,fieldB,fieldC,transaction_type,transaction_date,sales data
Row.fieldSeparator : 'nl'
Row.processConfiguration: FromConfiguration
Row.endSeparator : 'nl'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks guys.
My xml now is like this:
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:MT_test xmlns:ns1="http://test.co.uk">
- <REPORT>
<company_number>0000043239</company_number>
<transaction_type>CREATE</transaction_type>
<transaction_date>2011/08/21</transaction_date>
<sales_data>Partners (((119006.258 169077.102), (372718.323 77854.466, 371449.872 70783.383), (382225.17 73214.976, 398410.463 95156.636)))</Partners>
</REPORT>
</ns1:MT_test>
I am using the content conversion as below:
Recordset Structure: REPORT
Name: REPORT.addHeaderLine Value: 1
Name: REPORT.fieldSeparator Value: ,
Name: REPORT.endSeparator Value: 'nl'
Name: company_number.endSeparator Value: 'nl'
and I am getting the result as:
company_number,transaction_type,transaction_date,sales_data
0000043239,CREATE,2011/08/21,Partners (((119006.258 169077.102), (372718.323 77854.466, 371449.872 70783.383), 382225.17 73214.976, 398410.463 95156.636)))
But I want file like this:
company_number,transaction_type,transaction_date,sales_data
0000043239
CREATE
2011/08/21
Partners (((119006.258 169077.102), (372718.323 77854.466, 371449.872 70783.383), 382225.17 73214.976, 398410.463 95156.636)))
What will be the CC parameters please?
Many thanks.
Ramesh.
Thanks guys.
Kumar,
I now gave the parameters as:
Recordset Structure: REPORT
Name: REPORT.addHeaderLine Value: 1
Name: REPORT.fieldSeparator Value: 'nl'
Name: REPORT.endSeparator Value: 'nl'
Name: company_number.endSeparator Value: 'nl'
and I am getting the result as below which is good except that I want the header items in the first line to be separated by comas:
company_number
transaction_type
transaction_date
sales_data
0000043239
CREATE
2011/08/21
Partners (((119006.258 169077.102), (372718.323 77854.466, 371449.872 70783.383), 382225.17 73214.976, 398410.463 95156.636)))
But I want file like this:
company_number,transaction_type,transaction_date,sales_data
0000043239
CREATE
2011/08/21
Partners (((119006.258 169077.102), (372718.323 77854.466, 371449.872 70783.383), 382225.17 73214.976, 398410.463 95156.636)))
Where I am doing wrong?
Thank you.
instead of "REPORT.addHeaderLine = 1" try below mentioned 2 parameters:
REPORT.addHeaderLine Value: 3
REPORT.headerLine Value: company_number,transaction_type,transaction_date,sales_data
http://help.sap.com/saphelp_nw73/helpdata/en/44/658abd344a4de0e10000000a1553f7/frameset.htm
If you want each field in the flat file to be on a separate line then your fieldSeparator needs to have a value of 'nl'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use File content conversion in receiver file adapter.
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Do not use any adaptor module to do this. You can just use File adapter content conversion at receiver side:
provide following key value pair:
recordStructure.endSeperator and value 'nl' (new line), which would solve your problem, Provide proper recordStrure value according to your message structure.
Best Regards,
RK
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.