File Content Conversion. Help required
Hi All,
My scenario
I have source text file. I need to do Receiver Determination based on some value.
I need to send again text file at target side.
My source txt file is:
Condition:
If :59:/1000001642 comes then send to Receiver A
If :58:/9000001642 comes at that position then send to Receiver B
Can you please tell me how to apply FCC at sender and receiver side as I am not able to
do it.
Regards
Hi Rick,
Can there be any way I can avoid FCC and do Rec Determination because I am required to
do complex FCC at both source and target side.
If you want XI to route a flat file (without FCC in file adapter), then I think you will need to do enhanced
receiver determination. It will have to be a java map since the input is still a flat file.
http://help.sap.com/saphelp_nw04/helpdata/en/43/a5f2066340332de10000000a11466f/content.htm
https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3343
There are many ways to handle this in java, but hereu2019s a simple example that should get you started.
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Map;
import com.sap.aii.mapping.api.MappingTrace;
import com.sap.aii.mapping.api.StreamTransformation;
import com.sap.aii.mapping.api.StreamTransformationConstants;
import com.sap.aii.mapping.api.StreamTransformationException;
public final class AdvancedReceiverJava implements StreamTransformation {
private Map _param;
public void setParameter(Map param) {
_param = param;
public void execute(InputStream in, OutputStream out) throws StreamTransformationException {
//MappingTrace trace = (MappingTrace)_param.get(StreamTransformationConstants.MAPPING_TRACE);
BufferedReader reader = null;
try {
reader = new BufferedReader(new InputStreamReader(in));
StringBuffer sb = new StringBuffer();
String line = null;
while ((line = reader.readLine()) != null) {
sb.append(line).append("\n");
String fileString = sb.toString();
//replace this with a call to value mapping for more configurable solution
String receiver = null;
if (fileString.indexOf("59:/100000164") > -1)
receiver = "receiverService1";
else if (fileString.indexOf("58:/9000001642") > -1)
receiver = "receiverService2";
else
throw new Exception("No receiver found in source file.");
StringBuffer xml = new StringBuffer();
xml.append("<?xml version='1.0' encoding='UTF-8'?>");
xml.append("<ns0:Receivers xmlns:ns0='http://sap.com/xi/XI/System'>");
xml.append("<Receiver><Service>").append(receiver).append("</Service></Receiver>");
xml.append("</ns0:Receivers>");
out.write(xml.toString().getBytes());
out.flush();
} catch (Exception e) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
throw new StreamTransformationException(sw.toString());
} finally {
if (reader!= null) try { reader.close(); } catch (Exception e) {}
-Russ
Similar Messages
-
Input file is Excel file. Should I need to convert this using the File Content Conversion(File Sender), if so can anyone pls explain me how????
thank youHi,
This Will help you,
1) With JAVA Mapping we can Achieve
/people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file
( go thru the Below lines in the Blog )
http://help.sap.com/saphelp_nw04/helpdata/en/1f/0e3237e5875249e10000009b38f936/frameset.htm
Page 37
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/da1e7c16-0c01-0010-278a-eaed5eae5a5f
/people/gregor.wolf3/blog/2006/09/01/excel-to-csv-conversion-with-a-php-web-service
Regards
Agasthuri Doss -
Need File Content Conversion Help
Hi,
With the help of the SDNers i was able to create the proper structure for FCC.Now i want to have the column names been listed as part of the final file content.with the current structure i could get only the data and not the coulmnheaders
The structure used is as below:
Recordset structure=Root,Record
Record.addHeaderLine=0
Record.fieldNames=name,mobile,email
Record.fieldSeparator=,
Record.endSeparator='nl'
Root.fieldSeparator=,
Root.fieldSeparator='nl'
Pls help me solve this.
Regards,
KarthikHI
refer the following links
File Content prameters for the Receiver Adapter
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm
File Content prameters for the Sender Adapter
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
Refer
File Receiver with Content Conversion
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
Configuring the Receiver File/FTP Adapter
http://help.sap.com/saphelp_nw04/helpdata/en/95/bb623c6369f454e10000000a114084/frameset.htm
File content conversion sites
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Please see the below links for file content conversion..
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
File Content Conversion for Unequal Number of Columns
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns - FCC
Content Conversion (Pattern/Random content in input file)
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file - FCC
/people/harrison.holland5/blog/2006/12/20/xi-configuration-for-mdm-integration--sample-scenario - FCC - MDM
XI in the role of a FTP
/people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp - FCC
File to R/3 via ABAP Proxy
/people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy - FCC
/people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter - EOIO - File
http://help.sap.com/saphelp_nw04/helpdata/en/ee/c9f0b4925af54cb17c454788d8e466/frameset.htm - cc
http://help.sap.com/saphelp_erp2005vp/helpdata/en/95/bb623c6369f454e10000000a114084/content.htm - fcc cOUNTER
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/da1e7c16-0c01-0010-278a-eaed5eae5a5f - conversion agent
File Content prameters for the Receiver Adapter
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm
File Content prameters for the Sender Adapter
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
Refer
File Receiver with Content Conversion
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
Configuring the Receiver File/FTP Adapter
http://help.sap.com/saphelp_nw04/helpdata/en/95/bb623c6369f454e10000000a114084/frameset.htm
File content conversion sites
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Please see the below links for file content conversion..
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
File Content Conversion for Unequal Number of Columns
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns - FCC
Content Conversion (Pattern/Random content in input file)
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file - FCC
/people/harrison.holland5/blog/2006/12/20/xi-configuration-for-mdm-integration--sample-scenario - FCC - MDM
XI in the role of a FTP
/people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp - FCC
File to R/3 via ABAP Proxy
/people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy - FCC
/people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter - EOIO - File
http://help.sap.com/saphelp_nw04/helpdata/en/ee/c9f0b4925af54cb17c454788d8e466/frameset.htm - cc
http://help.sap.com/saphelp_erp2005vp/helpdata/en/95/bb623c6369f454e10000000a114084/content.htm - fcc cOUNTER
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/da1e7c16-0c01-0010-278a-eaed5eae5a5f - conversion agent
cheers -
Help required File Content Conversion.
Hi All,
Kindly help me in this topic i.e. File Content Conversion.
- What is File Content Conversion?
- Is knowledge of any programming language required?
- What is its function?
- How do I use it?
Thanks in Advance.
Regards,
Sreedhar, AvHi Sreedhar,
Reward points if this helps
What is File Content Conversion?
File content conversion is used for converting flat files (fixed lenght, comma seperated) into XML messages for further processing by an integration engine. The internal XI processing (mapping, routing etc) is based on XML messages hence you need messages to be converted to XML.
SAP By default understands xml data structure. If your file is coming in an xml format you can process it as it is.
In case of file that is coming with a delimiter then you need to have File content conversion for SAP adpater to conver file into an XML structure which will then go to next step of Message Mapping.
Is knowledge of any programming language required?
No
What is its function?
Check these blogs for content conversion,
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
*How do I use it? *
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
Reward points if this helps
Regards
Pragathi. -
Required help for Identifying diff. items in file content conversion.
Hi All,
I've to use a file content conversion parameters for a .txt file in which there are two objects. One is a header and the other is a item detail.
How do we get or mark the difference between both so that XI recognizes the particular line is a Header and the other is a Item detail
Thanks in Advance.
Regards,
Sree.Hi
Make use of a field which is common to header and item line which will always hold different values for header and item. Or otherwise if possible, add an extra field in the header and item lines, say 'Key' and use it in the 'Key Field Name' parameter in the adapter configuration. See this for details - [File Content Conversion for Complex Structures|http://www.riyaz.net/blog/index.php/2008/02/20/xipi-file-content-conversion-for-complex-structures/].
Regards,
Riyaz -
Need Help in Sender File Content Conversion
Hi All,
I request your expert advice on Sender File content Conversion. I need to process the below pasted file. I was able to achieve this by keeping a offset of 6 in Sender PI File Adapter (PI 7.1) to ignore first 6 lines and used a Unix script to remove last line"END OF REPORT".
Now my new requirement is I need to capture the date "DECEMBER 2009" from line 3. How can I do this. I have set offset as 6 so Adapter will start processing from line 7. If I don't set offset Interface fails. Please suggest. Thank you.
ABC LAB XYZ LIMITED"
TRIAL BALANCE"
FOR THE PERIOD ENDED DECEMBER 2009"
"TEST Bank","101000",-1589365.58,0.00,738295.08,0.00
"TEST Bank Clearing A/c","101200",0.00,0.00,14848018.55,0.00
"TEST Bank Sweeps","101250",104315957.19,0.00,7571985482.08,0.00
"TEST Receipts","101260",0.00,0.00,19788596.15,0.00
"TEST Corporate Deposits","101270",-7776629.87,0.00,-135914980.50,0.00
"SHARES","00SH",0.00,0.00,-7869890086.22,0.00
"END OF REPORT"Dear Phani,
Please go through the below blogs:
File content conversion sites
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Please see the below links for file content conversion..
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter - FCC
File Content Conversion for Unequal Number of Columns
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns - FCC
Thanks,
Satya -
"Alerts" & "File Content Conversion" required
Hi, can any one mail me the
1) Alerts (trouble shooting guide)
2) File Content Conversion document please.
[email protected]
regards,
satish.Hi Satish
have a look on theses URL's
refer these link for more details about Alert
For email alerts
/people/aravindh.prasanna/blog/2005/12/24/configuring-scenario-specific-e-mail-alerts-in-xi-ccms-part-2
/people/aravindh.prasanna/blog/2006/02/20/configuring-scenario-specific-e-mail-alerts-in-xi-ccms-part-3
/people/sap.user72/blog/2005/01/14/alert-management--improving-monitoring-of-your-landscape
/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
You have to do SMTP Configuration for EMail and SMS.....
http://help.sap.com/saphelp_nw04/helpdata/en/af/73563c1e734f0fe10000000a114084/content.htm
Alerts
/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide
/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-stepCheck out these:
RWB- Alert Configuration LInk isnot working
Unable to login into Alert configuration
Get all the details here
CCMS ALERTS
/people/sap.user72/blog/2005/11/24/xi-configuring-ccms-monitoring-for-xi-part-i
/people/sap.user72/blog/2005/12/05/xi-grmg-customizing-for-xi-ccms-heartbeat-monitoring-part-ii
/people/aravindh.prasanna/blog/2006/02/20/configuring-scenario-specific-e-mail-alerts-in-xi-ccms-part-3
Alerts
transaction handling in XI
/people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
Auto triggering of alerts
transaction handling in XI
SCOT
not sending email from alert inbox
See this link : http://help.sap.com/saphelp_nw70/helpdata/en/da/a3a7408f031414e10000000a1550b0/frameset.htm
heck this weblogs on creating them and troubleshooting:
/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide
/people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9418d690-0201-0010-85bb-e9b2c1af895b
/people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
Further reference
http://help.sap.com/saphelp_nw04/helpdata/en/80/942f3ffed33d67e10000000a114084/content.htm
Also suggested go through the blog:Alerts with variables from the messages payload
/people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
/people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
/people/ginger.gatling/blog/2005/12/02/innovative-ways-to-use-alerts
/people/matt.kangas/blog/2006/06/27/personalized-alert-delivery
U may proceed in the following ways:
1. Reduce the securit settings of ur browser and enable the cookies
2. Try to SSO enable ur scenario
Have a look here:
SAP Note 840849
The configuration required as per ur patch level
SAP Note 913858
Check out these:
RWB- Alert Configuration LInk isnot working
Unable to login into Alert configuration
Thanks!! -
File Content Conversion in Receiver Adapter Help
Hi,
I need to have a flat file at receiver side with the following structure.
Product
LineItem
Notes
Product
LineItem
Notes
But i am getting as
Product
Product
LineItem
Notes
Notes
Please suggest me the changes to be made in File Content Conversion Parameter
Your Help will be appreciated.
Thanks in advance,
AshokSingh,
I think we wont give field names in the receiver file adapter. Please find the details below:
RecordSet Structure: Product,LineItem,Notes.....
Parameters:
Product.fieldFixedLengths:30,10...
Product.endSeparator:'nl'
LineItem.fieldFixedLengths:30,10..
LineItem.endSeparator:'nl'
Notes.fieldFixedLengths:30,10...
Notes.endSeparator: 'nl'
Thanks
Ashok -
Problem with file content conversion for multiple substrcture. Please help!
Hi Experts,
I am using file content conversion in file sender communication channel. The input file is a flat file with data like this:
A01 AA8I0NBVDA 20090704 84900
A02 AA8I0NBVDA 20090704 84900
A03 AA8I0NBVDA 20090704 84900
I want the data in sender side after content conversion to be like this:
<ns:Receive_Schedules xmlns:ns="http://mynamespace">
<ScheduleData>
<line>A01 AA8I0NBVDA 20090704 84900</line>
<line>A02 AA8I0NBVDA 20090704 84900</line>
<line>A03 AA8I0NBVDA 20090704 84900</line>
</ScheduleData>
</ns:Receive_Schedules>
I have tried many options in file content conversion but getting the data like this:
<ns:Receive_Schedules xmlns:ns="http://mynamespace">
<ScheduleData>
<line>A01 AA8I0NBVDA 20090704 84900</line>
</ScheduleData>
<ScheduleData>
<line>A02 AA8I0NBVDA 20090704 84900</line>
</ScheduleData>
<ScheduleData>
<line>A03 AA8I0NBVDA 20090704 84900</line>
</ScheduleData>
</ns:Receive_Schedules>
Following are the settings/properties have configured in content conversion:
Document Name Receive_Schedules
Document namespace http://mynamespace
Document Offset <no value>
Recordset Name <no value>
Recordset namespace <no value>
Recordset structure ScheduleData,*
Recordset sequence Ascending
Recordsets per message 1
Key field Name <no value>
Key Field Type String
ignoreRecordsetName true
ScheduleData.endSeparator 'nl'
ScheduleData.fieldNames line
ScheduleData.fieldSeparator 'nl'
How to get the desired message? What changes I need to do in content conversion settings? Please help!
thanks
Gopal
Edited by: GOPAL BALIGA on Jul 1, 2009 12:11 PMHi Ranjan,
My structure is like what you ahve defined.
scheduledata...1.1
...line....0...Unbound
I also tried the parameters you gave but still getting the same.
<ns:Receive_Schedules xmlns:ns="http://mynamespace">
<ScheduleData>
<line>A01 AA8I0NBVDA 20090704 84900</line>
</ScheduleData>
<ScheduleData>
<line>A02 AA8I0NBVDA 20090704 84900</line>
</ScheduleData>
<ScheduleData>
<line>A03 AA8I0NBVDA 20090704 84900</line>
</ScheduleData>
</ns:Receive_Schedules>
Following are the settings/properties have configured in content conversion:
Recordset structure ScheduleData,* -
> Is the value correct?
Recordset sequence Ascending -
> Is the value correct?
Recordsets per message 1 -
> Is the value correct?
ignoreRecordsetName true
ScheduleData.fieldSeparator nl
ScheduleData.fieldNames line
ScheduleData.endSeparator nl
Edited by: GOPAL BALIGA on Jul 2, 2009 5:28 AM -
Need help in file content conversion complex structure
Hi Guys ,
Iam new to this file content conversion , Please let me know whether below requirement is possible .if yes than how ?
Inbound XML file from Proxy
<Data>
<keyfield1>0011</keyfield1>
<keyfield2>0012</keyfield2>
<Keyfield3>0013</Keyfield3>
<field1>Test1</field1>
<field2>testfield1</field2>
<field3>0001</field3>
<Data>
<keyfield1>0021</keyfield1>
<keyfield2>0022</keyfield2>
<Keyfield3>0023</Keyfield3>
<field1>Test2</field1>
<field2>testfield2</field2>
<field3>0002</field3>
output pgp flat file .
pgp file format should be as below after file content conversion
0011|0012|0013|Test1||||||
0011|0012|0013|Testfield1||||||
0011|0012|0013|0001||||||
0021|0022|0023|Test2||||||
0011|0012|0013|Testfield2||||||
0011|0012|0013|0002||||||
thanks a lot .
Regards
PrabhuHi.
Try this.
First you need to use a message mapping and create a target structure to convert a similar output structure that do you want. like this
<Target>
-- Field1
-- Field2
-- Field3
-- Field4
-- Field5
-- Field6
-- Field7
-- Field8
-- Field9
</Target>.
Then map
keyfield1-> Field 1 ,keyfield2-> Field 2 , keyfield 3---> Field 3
map field1-> field4 .. for the others fields duplicate the Target node (right click) and map map field2-> field5 ..etc.
For the field 5 until field 9 map with constant ("'')
Then in you receiver comunication channel put simple parameters.
Target.fieldSeparator = |
Target.endSeparator = 'nl'
Regards. -
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 -
Error in Receiver File adapter using File content Conversion
Hi,
I am getting the following error in the receiver file adapter.
Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'statement.fieldFixedLengths' or 'statement.fieldSeparator' is missing
I am using the below parameters for FCC:
Recordset Structure - statement
statement.endSeparator - 'nl'
statement.fieldSeparator - '0X09'
statement.fieldNames -xblnr,wrbtr,newbs,kostl,newko,prctr,xref1,rke_wwfud,rke_wwst3,blart,bukrs,bldate,budat,gjahr,monat,ctype,waers,bktxt,posnr,wbs_element,mwxkz,businessplace,businessplace,c_waers,c_wrbtr,g_ctype,g_waers,g_wrbtr,h_ctype,h_waers,h_wrbtr,trade_id,lob,sgtxt,zuonr,reason_rev,ldgrp,tcode,lifnr
ignoreRecordsetName - true
Please let me know where i am going wrong.
Thanks,
AparnaHi Aparna,
I feel the problem in your content conversion parameters is with
statement.fieldNames and ignoreRecordsetName
When you are confirguring receiver file adapter for file content conversion the above one is not required. Please refer below link for details on configuring content conversion in file adapter
[http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm]
Hope this helps !!
Regards,
Amit -
Remove of quotes"' in the sender file adapter -- file content conversion
HI Guys,
MY source file is comma seprated file (,) in the file i had quotes" " for the data like
"5000543","0.00","03/04/2009",
is there any way i can remove the quotes in file content conversion
Please help me on this
Regards
SrinivasSrinivas,
This should not be a big deal, because your fields are separated by a comma. So you need to keep in mind like you are doing the content conversion for a csv file.
See this blogs for some information:
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
In the second blog 1345 there are parameters for content conversion. So similarly mention your conversion parameters in your sender communication channel. So after converting to xml your input fields have values like:
field1: "5000543"
field2: "0.00"
field3: "03/04/2009"
So all your field values has with "". Now you can use either standard replace funciton or a udf as given above and then it will remove the quotes and then you can map according to your requirements. If you think sometimes you can get quotes and sometime not in the file then you can use function like startswith or endswith along with exists and can map accordingly.
Regards,
---Satish -
Supress Column Heading - File Content Conversion in Sender Adapter
Hi,
Let me give a more clear picture about my scenario. I need to convert CSV File to XML output:-
My source file has column heading and values. The sample data is mentioned hereunder:-
PERNR;KID;PNALT;NACHN;NAME2;VORNA
;1200;1200;Angus
I have created a data type as under:-
DT_LegacyEmployee (Category - Complex Type)
Employees (Category - Element, Occurence - 1)
Header (Category - Element, Occurence - 0...1)
PERNR_H
KID_H
PNALT_H
NACHN_H
NAME2_H
VORNA_H
Employee (Categroy - Element, Type - DT_LegacyEmployee_Row, Occurence - 0...unbounded)
PERNR
KID
PNALT
NACHN
NAME2
VORNA
The file conversion parameters in the file sender adapter are mentioned hereunder:-
Document Name - MT_LegacyEmployee
Document Namespace - http://abc.com/xi
Recordset Name - Employees
Rescordset Structure - Header,1,Employee,*
Recordsets per Message - 1
Key Field Type - String (Case Sensitive)
Employee.fieldSeparator - ;
Employee.endSeparator - 'nl'
Employee.fieldNames - PERNR,KID,PNALT,NACHN,NAME2,VORNA
I dont' have a key field value. How do we remove the header and show only the values in the xml output. I have searched the forum topics as well checked many blogs related to file content conversion, but nothing helped. Kindly advice how to fix this issue. Thanks in advance.
Regards.
PraveenHi Praveen,
Change your File Adapter as below
Document Name - MT_LegacyEmployee
Document Namespace - http://abc.com/xi
Recordset Name - Employees
Rescordset Structure - Employee,*
Recordsets per Message - 1
Key Field Type - String (Case Sensitive)
Employee.fieldSeparator - ;
Employee.endSeparator - 'nl'
Employee.fieldNames - PERNR,KID,PNALT,NACHN,NAME2,VORNA
There is no need for the Header required in the data type.
DT_LegacyEmployee (Category - Complex Type)
Employees (Category - Element, Occurence - 1)
Employee (Categroy - Element, Type - DT_LegacyEmployee_Row, Occurence - 0...unbounded)
PERNR
KID
PNALT
NACHN
NAME2
VORNA
Now the trick is in the mapping program
Lets assume your mapping looks like
MT_LegacyEmployee ---> MT_TargetEmployee
- Employees ---> Records
- Employee ---> Record
- PERNR ---> TargetPERNR
- .. so on
When you do a mapping from Employee ---> Record apply the following logic.
(PERNR)--->
(TestEquals =) --->(NOT)--->
(Constant) ---> (IF)
(PERNR) (IF Without Else) ---> (Record)
(THEN)
(Employee)--->
When doing this make sure RightClick on PERNR and Select Context ---> Employees.
By default context would be from Employee and it will give you an error of XSD format. So make sure you are changing the context. -
Sender adapter: File content conversion suggestion
Hi all,
I require your suggestion on File content conversion with Sender File adapter. I am having a scenario where I would be getting multiple orders data i.e., header and item information in a single file. Suppose, we have given a chance to design the source structure. So, which would be the better way for having the source structure so that it would be easy for file content conversion and mapping. Is it like Method 1 or Method II?
Method I:
Orderno,FieldA,FieldB,FieldC
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,FieldA,FieldB,FieldC
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,FieldA,FieldB,FieldC
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Method II:
Orderno,FieldA,FieldB,FieldC
Orderno,FieldA,FieldB,FieldC
Orderno,FieldA,FieldB,FieldC
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
If you suggest method I, can you let me know how the content conversion parameters look like?
Thanks in Advance,
Adithya K
Message was edited by:
Adithya KAdithya,
Looking at your input file I think a structure as below would be better.
<Order_Data>
<Orderno>
<Orderno/>
<FieldA/>
<FieldB/>
<FieldC/>
</Orderno>
<Items>
<Orderno/>
<OrderItem/>
<Field1/>
<Field2/>
<Field3/>
<Field4/>
<Field5/>
</Items>
</Order_Data>
Content Conversion Parameters for this would be:
RecordSet Structure OrderData,,Orderno,1,items,
OrderData.fieldNames Orderno,items
OrderData.fieldSeparator 'nl'
OrderData.endSeparator 'nl'
Orderno.fieldNames Orderno,FieldA,FieldB,FieldC
Orderno.fieldSeparator ,
Orderno.endSeparator 'nl'
items.fieldNames Orderno,OrderItem,Field1,Field2,Field3,Field4,Field5
items.fieldSeparator ,
Items.endSeparator 'nl'
ignoreRecordsetName true
Depending on which are your key fields you will have to put two more parameters:
Orderno.keyFieldValue
items.keyFieldValue
Hope this would be of some help.
Thanx,
Manju. -
IDOC to flat File----Problem in File Content Conversion at receiver
hi experts,
I am doing a IDOC to flat file secnario.
My requirment is IDOCXI-Flat file
Format of flat file is like:--
Every segment in the IDOC will be converted into a single line of file(without any delimiter). So number of lines in flat file will be equal to number of segments in IDOC.
I am facing problem in File Content conversion.
Please help me out..
Thanks
JaideepCheck this doc...
[How To...Convert an IDoc-XML structure to a flat file and vice versa in XI 3.0 |https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a]
Maybe you are looking for
-
Windows Deployment Services Issues
i have a Windows deployment Services server running , and at the same server i am running dhcp as well as dns server. the network series is 10.241.0.1 to 10.241.0.105 , questions: Q: if i want the dhcp server to offer ip address in the network of 10.
-
How do I upgrade FCPX to an older version
The lastest downgrade of FCPX has totally ruined the synchhronization of mullticam clips. Is there any way to get the older version back?
-
I would like to know difference between Oracle Reports6i Ver 6.0.8.11.3 & 6.0.8.10.1. We are facing some problems which we feel is due to incompatability between the 2 versions. Any information on the same would be of great help. Thanx In advance.
-
Cannot generate dynamic alert for initial column in SNP.
Hello, I have an SNP alert macro with a simple condition running from Initial column for 158 weeks. The alert is generated correctly for all other weeks but not for initial column. The IF condition works correctly because a CELL_BG() in the same aler
-
Multiple Keyboard inputs...
I've finished up a version of Pong for extra credit for a Java class i am taking, and i ran into an interesting situation. I cannot figure out how to have a two player version of pong have both players control their paddles with the keyboard. The spe