on 09-20-2011 7:22 AM
I have the following XML:
<n0:CostCentreServiceCreateRequest>
<n0:ESB_Header>
<MessageId>4E77E43F-1D1D-0096-E100-8000AC182411</MessageId>
<Timestamp>2011-09-19T14:00:00Z</Timestamp>
<SourceSystem>SAP</SourceSystem>
<TargetSystem>MDS</TargetSystem>
<ActionType>CostCentreServiceCreateRequest</ActionType>
</n0:ESB_Header>
<n0:CostCentre>
<Record>
<Cost_Centre>0010100010</Cost_Centre>
<Valid_From_Date>1900-07-01</Valid_From_Date>
<Valid_To_Date>9999-12-31</Valid_To_Date>
<General_Name>Edu and Train Access</General_Name>
<Description>Education and Training Access</Description>
<Person_Responsible>Shala Karan</Person_Responsible>
<Department>ErlyChld Prg</Department>
<Cost_Center_Category>1</Cost_Center_Category>
<Company_Code>1010</Company_Code>
<Currency_Key>AUD</Currency_Key>
<Costing_Sheet>Z00001</Costing_Sheet>
</Record>
</n0:CostCentre>
</n0:CostCentreServiceCreateRequest>
I want to write it to a CSV file. However, I only want to write the values in the <Record> element and ignore everything else. Is this possible? At the moment, in my content conversion, I have Record entered in the Recordset Structure field. In the details below that I am setting the Record.addHeaderLine, Record.headerLine, Record.fieldSeparator, and Record.endSeparator attributes.
However, what this generates is the following:
CODE,NAME,vaild_to_date,vaild_from_date,description,person_responsible,department,category,company_code,currency,actual_primary_posting_locked_flag,actual_revenu_posting_locked_flag,costing_sheet
4E77DA9E-8943-0099-E100-8000AC182411|2011-09-19T14:00:00Z|SAP|MDS|CostCentreServiceCreateRequest
0010100010
It includes the <n0:ESB_Header> values (which I dont want) and only the first value of <Record>.
Ideally the output would look like this:
CODE|NAME|vaild_to_date|vaild_from_date|description|person_responsible|department|category|company_code|currency|actual_primary_posting_locked_flag|actual_revenu_posting_locked_flag|costing_sheet
0010100010|Edu and Train Access|1900-07-01|9999-12-31|Education and Training Access|Shala Karan|ErlyChld Prg|1|1010|AUD|Z00001
Notice also that the Header is pipe delimited. Is there anyway to set this? So far I can only get the header to be comma delimited.
Thanks,
Krishneel
I want to write it to a CSV file. However, I only want to write the values in the <Record> element and ignore everything else. Is this possible?
Yes its possible. Rest all configuration seems to be fine. Refer the following link.
http://help.sap.com/saphelp_nwpi71/helpdata/en/44/686e687f2a6d12e10000000a1553f6/frameset.htm
Try to refresh cache as well. It might be taking old configuration.
Regards
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In field separator use "|" instead of ",".
Regards,
Gouri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use a message mapping to remove the Header values from the payload before sending to the adapter for content conversion.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.