Blogs for File content conversion in File Adapter
hi all,
Can some one give me the links for File Content Conversion for File to File Scenario. please.
Thanks in advance.
Hi
For Sender
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
/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/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
SAP Help for sender
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
For Receiver:
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
SAP Help for receiver
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Similar Messages
-
How to set DEBUG severity for File adapter in J2SE AE
Hi,
Can anyone help me in setting the severity level to DEBUG for file adapter?
I have tried to set in logging.properties file as given below,
formatter[Trace] = TraceFormatter
formatter[Trace].pattern =%24d [%t] %-6s %l - %m
log[Trace] = FileLog
log[Trace].pattern = swb_%g.log
log[Trace].limit = 2000000
log[Trace].cnt = 5
log[Trace].formatter = formatter[Trace]
com.sap.aii.messaging.adapter.severity = DEBUG
logging components
#com.sap.aii.axis.logs = +log[Trace]
#com.sap.aii.axis.severity = DEBUG
#org.apache.axis.logs = +log[Trace]
#org.apache.axis.severity = DEBUG
Please correct me if I have did anything wrong and sugest me hot to set the DEBUG level as soon as possible.
Best Regards,
SooryaHi Sejoon,
when we changed the host of XI server in one of our projects one of the things we had to change was the exchange profile entries
http://server:port/exchangeProfile/index.html
to see how your adapter engine is configured
http://server:port/sld
SLD -> Content Maintenance
then
Subset: landscape description
Class: XI Adapter Framework
buth check the exchange profile entries first
Regards,
michal -
How to have Secure Connection for File Adapter.Pls help
Hi All,
For File to File Scenario
How to have Secure Connection for File Adapter.
Pls send links/blogs explaining this scenario.
Regardshi rich
go through these links
FTPs connection failed - error ".. certificate rejected by ChainVerifier"
Re: What is SFTP, FTI channels
http://help.sap.com/saphelp_erp2005/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm
FTPS implementation question.
http://help.sap.com/saphelp_nw04s/helpdata/en/43/0e16bfd7b021aee10000000a1553f6/frameset.htm
Server certificate rejected by ChainVerifier:FTPS server(Points Guaranteed)
/people/krishna.moorthyp/blog/2007/07/31/sftp-vs-ftps-in-sap-pi
File adapter
thanks
Kunaal -
Directory specification for File Adapter
Hello,
I would like to ask if it is possible to determine a directory where message is saved for file adapter based on message content.
E.g. I have general directory (GD) under which I would like to save a messages in directories with are called based on vendor number what is part of a message.
So a message would be saved in
...\GD\vendor number\file name.
In case that vendor number directory is not created yet I need to create it.
I know that in file adapter a directory name is constant and file name can differ based on settings.
This behaviour is in Business Connector enabled through possibility to write an "user-exit" in Java for directory determination.
Is something similar possible in XI ?
We are currently running on XI 3.0 with external adapter engine version 2.0 but to use internal adapter engine is no problem for me.
Thank you for your advice.
Marian MorzolHi Marian,
You can do this with content based routing in the interface determination, but then you have to create a new interface/channel for every extra directory.
Cheers,
Frank -
Dynamic UserID/Password for file Adapter
Hi,
How to use dynamic UserId/Password for file adapter ?
(Sender/Receiver)
In our case the Id/Pwd of FTP Site changes freguently.
Can anyone help.
Thanks in Advance
Regards
ChemmanzHi Chemmanz,
>>>>In our case the Id/Pwd of FTP Site changes freguently.
but do you have those passwords in the message payload?
if not then you will still have to fill it somewhere right?
BTW
the only way would be to use java proxies and write a simple ftp adapter inside it (or your own adapter)
but this is not possible in standard I believe
Regards,
michal -
Time stamp is not getting updated for File Adapter in communication channel
Hi All,
Since yesterday, I am observing that the time stamp of communication channel for File adapter is not gettingupdated some times.
I had to stop and start the communication channel to update the time stamp.Please let me know if anyone has come across such issue or any useful notes on this.I could not find any related notes on Market place.
Regards,
DinakarHi,
This is happening only with one communication channel which is sender in derection.Any reason why it is happening like this?since the restart of the communication channel it is getting update now.I really do not know how to delete/create the communication channels as this was done our PI consultants.Pls guide me.
Regards,
Dinakar -
Content conversion in sender adapter.
Hi,
I have a problem with the content conversion in sender adapter.
I need only process the csv file with the exact number of columns containing the structure, if the csv file contains more o less columns in the csv file, I want that this files are not relayed by the adapter and remain on the server.
Thank you very much for your help.@ Hareen
This can be achieved at mapping level. You need to check the number of columns that are comming in the file using Count function. If the number of count is equal to the value specified then will process the message else raises a mapping exception.
Are you talking about "count" function in the message mapping? that function won't count the number of fields / columns, but would count the number of occurrence of a particular field. -
Reciever content conversion for File adapter.
Hi ,
I am doing Idoc to file scenario,it is working fine without any FCC in the reciever file adapter but its failing when I use FCC.getting the error like
"Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'STRUC.fieldFixedLengths' or 'STRUC.fieldSeparator' is missing "
I know this error is because of FCC problem.
I am getting this xml structure without FCC in the rec file adapter
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:DataRec_MT xmlns:ns0="http://xyz.....">
- <SET>
- <STRUC>
<PERNR>0000185</PERNR>
<ENAME>xyz m xyz</ENAME>
<NACHN>xyz</NACHN>
</STRUC>
</SET>
</ns0:DataRec_MT>
I want to get 00000185||xyz m xyz ||xyz format
I am using these FCC parameters
STRUC.fieldNames fld1,fld2,fld3 etc
STRUC.fieldSeparator ||(do I need to put this in ' ' ?)
STRUC.endSeparator 'nl'
do I need to add any more parameters or not supposed to use any parameters.
please help.
I tried with different combinations but no luck.
i have DT created with stucture like
DT_xyz
Recset
Record set structure.
and I maintained all with the same case for field names,recordset structure,record set etc
I searched blogs and links,and I will keep on.
and what if if we dont get a value for a field in the record structure?whole FCC gonna fail?
thank you,
BabuRamana and Raj,
I tried both options but,still getting error.
Recordset structure : STRUC
STRUC.fieldSeparator ||
STRUC.endSeparator 'nl'
or
Recordset Structure: STRUC
Try with these parameters
STRUC.addHeaderLine=0
STRUC.fieldSeparator = ||
STRUC.endSeparator = 'nl'
I get this error in File CC
<b>Channel has not been correctly initialized and cannot process messages
Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'STRUC.fieldFixedLengths' or 'STRUC.fieldSeparator' is missing </b>
and when I furthur click on the message ID in CC I get this error
<b>Success File adapter receiver: processing started; QoS required: ExactlyOnce
2007-08-01 08:02:57 Error File adapter receiver channel CC_File_RECV is not initialized. Unable to proceed: null
2007-08-01 08:02:57 Error Exception caught by adapter framework: Channel has not been correctly initialized and cannot process messages
2007-08-01 08:02:57 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</b>
any suggestions?
thank you. -
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. -
File content conversion using SOAP adapter
Hi,
I'm using a receiver SOAP adapter in my IDOC to file scenario and need to do file content conversion in the receiver side.
Are any standard modules available for file content conversion in the SOAP adapter or do I need to write custom EJB modules for this.
Please note that I have to use a SOAP adapter, can't use any other adapter.
Thanks in advance
ShiladityaHi,
XML Document Conversion Type
● Enter recordTypes as the parameter name.
Under Parameter Value, enter the complete, comma-separated list of all names of recordset types that occur in the document to be converted.
If you decide to use this method, you can define a different conversion type for each recordset type that occurs in the XML document.
For example, you could name the recordset types as follows: RecordType1,RecordType2,RecordType3.
● Enter singleRecordType as the parameter name.
Under Parameter Value, enter the name of a recordset type that is to be used to convert all elements that occur in the XML document.
If you decide to use this method, define the same conversion type for each recordset type that occurs in the XML document.
You must enter exactly one parameter only. Whichever parameter you choose, you automatically exclude the second parameter.
You define further parameters for each recordset type.
In the remainder of this documentation the parameters are specified by the prefix <RecordType>. In your configuration, replace this name with the name of the recordset type.
Conversion Type List with Separators
● <RecordType>.fieldSeparator
Enter the field separator that is written between the individual fields of a record.
This specification is mandatory.
Conversion Type List with Fixed Field Length
● <RecordType>.fieldLengths
Specify a character string that contains a list of fixed field lengths that are separated by commas and which determines the number and the length of fields generated in the text file.
For example, you want to write a recordset with three elements that have field widths of five, ten, and fifteen characters. Enter:
<RecordType>.fieldLengths = 5,10,15
This specification is mandatory.
● <RecordType>.fieldLengthExceeded
Specify how you want to handle fields that exceed the configured field length. Permitted values for the parameter value are:
○ error (default)
Interrupts processing of message with error
○ cut
Cuts off superfluous characters
○ ignore
Ignores the field length restriction
Further Entries
● <RecordType>.beginSeparator
Enter a string. The string is placed in front of the first field of a recordset.
● <RecordType>.endSeparator
Enter a string. The string is appended to the last field of a recordset as a concluding character. The default is \r\n.
● contentType
Enter the MIME type of the converted payload. The default value is text/plain.
● addHeaderLine
Only define this parameter if you have already defined singleRecordType.
Define whether a header line is to be added to the result of the conversion.
○ none (default)
Does not insert a header line
○ fromXML
The header line is generated from the element name of the first recordset of the XML document
○ fromConfiguration
The header line is determined by the configuration parameter headerLine.
● headerLine
Only define this parameter if you have already set addHeaderLine=fromConfiguration.
The value that you define is placed in front of the result of the conversion as a header line.
● fixedLineWidth
Enter the maximum line length n (in characters) that can be written to the resulting document. The separator specified by lineSeparator is inserted in the resulting document every n characters.
● lineSeparator
Only define this parameter if you have already defined fixedLineWidth.
Specify the string that is written to the resulting document at the end of each line that is written with fixedLineWidth. The default is \r\n.
Use of Special Characters
You can use special characters in the following parameters: <RecordType>.fieldSeparator, <RecordType>.beginSeparator, <RecordType>.endSeparator, headerLine, and lineSeparator.
● Tabulator: \t
● Carriage Return (CR): \r
● Line Feed (LF): \n
● Arbitrary character: \x<code>
<code>indicates the hexadecimal character code of the character to be displayed.
Regards,
Phani -
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 -
Is a record ID field required for File Adapter (Header, Body, Trailer)?
Hi,
File to File scenario. The sender file is a text file i.e. .txt which needs a conversion on the sender file adapter. There are three structures in the file namely header (one), body (many) and Trailer (one). From what I can see I need a record Id field (with the same name) in all the structure types, can anyone confirm this for me?
Thanks,
LeanneThat is correct. If you have a variable number of records of a particular type, then you need a way to accurately identify each type of record... and that is done via the key field (or Record ID) which is present in each record type.
Extract from SAP Online Help:
<i>Key Field Name
If you specified a variable number of substructures for Recordset Structure, in other words, at least one substructure has the value *, then the substructures must be identified by the parser from their content. A key field must be set with different constants for the substructures. In this case, you must specify a key field, and the field name must occur in all substructures.
Specify the Key Field Type to be used to compare the predefined values. This entry is used if the key field name is defined.
NameA.keyFieldValue: Specify the value of the key field for the structure. This entry is mandatory if the key field name is set. Otherwise, the entry is ignored.</i>
For more info, refer to the SAP Help:
http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm -
Key Field Value for File Adapter Sender Wildcard
Hello everybody, is there a way to use a wildcard for the property of NamA.keyFieldValue in the cc for a Fils Sender????, here's an example why, I need to take some Files via PI 7.0 and my key filed can change according to the file an example is that in a file can be HF28 and in another file can be HF29, the only character that is going to be constant is the H, I would really appreciate any suggestions, thanks in advance.
Regards,
Julio CesarHi Julio
File sender adapter will read the file using FCC
Key Field Value entry is mandatory if the key field name is set. Otherwise, the entry can be ignored
http://help.sap.com/saphelp_nw70/helpdata/EN/34/393071e9b998438ddb8ce97cd617a1/frameset.htm
Content Conversion ( The Key Field Problem )
Thanks
Gaurav Bhargava -
Adapter Module for File Adapter
I have a scenario where I have 2 related files (text file and a pdf file) for the message. I need to enhance the payload (content conversion from text file) with the size of the pdf file. I have developed a adapter module for this and it is working fine if there is 1 set of text and pdf file. But if there are more than 1 set of files, it is processing the first set and giving the below error for other files.
"Error: com.sap.engine.services.ejb.exceptions.BaseTransactionRolledbackLocalException: Exception thrown in method process. The transaction is marked for rollback."
Regards
Yogeshcheck this thread :
BaseTransactionRolledbackLocalException in custom adapter module
Exceptions in Recievr Communication Channel with Adapter Module -
BPM to get rid of polling for file adapter
Hello,
nice scenario here:
We want to trigger a scenario for file to file transfer via an aRFC to be independent from the polling.
Looks like this needs a BPM, which could be started via an aRFC (save e.g. the content of the RFC in a directory on the XI machine if necessary).
But how to trigger now the sender adapter to pick up the prepared file (no relation to the content coming with the RFC) to deliver it?
Looks like we do not really understand how to use the BPM? Any idea to solve that is welcome!
Best regards
DirkHi Dirk,
take a look at this weblog by siva:
/people/siva.maranani/blog/2005/05/22/schedule-your-bpm
schedule your BPM and then you can use pooling
for the file adapter cause the message will stay in BPM
and you can control from the BPM
Regards,
michal
Maybe you are looking for
-
How can i unlock my iphone from apple ID
Hello guys plz i need ur help my cosuin have sent me an iphone 5 he lives in sweden he bought it from a guy there. so when i startes up my phone its shows that the phone is locked and its linked to the apple ID of that guy. Well now my iphone is usel
-
It's very sad that after 8 years of loyalty fios will not honor my contract for another 2 years. Optimum is more then happy to take 11,000 dollars with of business the next 8 years or so .. Really fios you can't cut a loyal customer a break ! But wil
-
Unable to connect to db after installation
hi all, am having problems in connecting to my oracle10g xe database after installation. each time I try to connect, it displays ORA-12560: TNS:error adapter protocol. pls I will appreciate your anticipated assistance. thanks jideofor
-
Sudden Crash During Slideshow Previews
Hi there, I usually post to the Powerbook thread, but for once I've been using iPhoto (the latest version) to build a slideshow of roughly 50 photos. What I've found is that the app crashes, apparently randomly (no one images to 'blame' when I previe
-
Cannot find "Binding Direction" in InDesign CS6
I have InDesign CS6 for Mac. I need to build a document that binds right-to-left ("Bind Right"). Online it says that I can do this by using "Binding Direction" in the Document Setup Dialog but that dialog does NOT show "Binding Direction." Do I need