Receiver File Adapter - Encoding issue.
Hi Everybody,
The file format (encoding) is different to the format generally we used to get.
Currently we are get the flat files in DOS format.The current file when we are downloading it we are getting it in the UNIX or other format.
For eg: 20 has been changed to 0D in the file.
Can somebody help me on the same.
Thanks,
Zabiulla
Hi,
Check on this for file adapters
Text
Under File Encoding, specify a code page.
The default setting is to use the system code page that is specific to the configuration of the installed operating system. The file content is converted to the UTF-8 code page before it is sent.
Permitted values for the code page are the existing Charsets of the Java runtime. According to the SUN specification for the Java runtime, at least the following standard character sets must be supported:
■ US-ASCII
Seven-bit ASCII, also known as ISO646-US, or Basic Latin block of the Unicode character set
■ ISO-8859-1
ISO character set for Western European languages (Latin Alphabet No. 1), also known as ISO-LATIN-1
■ UTF-8
8-bit Unicode character format
■ UTF-16BE
16-bit Unicode character format, big-endian byte order
■ UTF-16LE
16-bit Unicode character format, little-endian byte order
■ UTF-16
16-bit Unicode character format, byte order
Regards
Vijaya
Similar Messages
-
Receiver File adapter encoding
Hi All ,
My scenario is
ABAP Proxy --> XI -->Flat file.
My receiver is flat file , comma separated to a NFS....
there is a character
ß in one of the fields of source payload.
When I am using UTF-8 in the receiver channel , this character is displayed in the File (in the Unix box using cat or vi) as +
I have tried with the other encoding options.. but unfortunately it is just just displayed as a dark black box for the other options .. just like this ▀ ..
Any Idea on how to solve this.
A note .. in sxmb moni the charater is displayed correctly .. that is ß .. both before and after the mapping.... so no problem within the integration server .. but the output file is not created with the correct character.
Thanks and Regards,
Himadri
Message was edited by:
Himadri ChakrabortyThe question is: What encoding do you want?
The file is in UTF-8, when you view it, your editor should be able to interpret UTF-8. You can view the file with a web browser and set the encoding to UTF-8.
When you want another encoding, for example ISO-8859-1, put this in the file receiver channel.
For more details check this guide:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42
Regards
Stefan -
Encoding issue in receiver file adapter
Hi experts,
I am having a file to file scenario using integrated configuration where i am using file encoding 'US-ASCII' for converting the target file to ASCII and its not working.
Is there any other settings need to be done in the receiver file adapter to convert to 'ASCII' encoding format?
Do we have any other method to convert to 'ASCII' format for the receiver file?
.txt file is used for this interface.
Thanks!Hi Mahakrishnan,
What is the format of file mentioned in sender file adapter? If SAP-PI is receiving File format in US-ASCII. Then mention US-ASCII in sender communication channel in file encoding field,file type will be text. In case the file format received by SAP-PI is normal text file then by default sender adapter will convert it to UTF-8. Maintain the file type=text and encoding=US-ASCII for receiver file adapter also.
ASCII is an alias for US-ASCII file encoding, hence both mean the same encoding. Thus this format should work. If its still not working please refer to SAP note 821267.
Regards
Anupam
Edited by: anupamsap on Mar 9, 2012 5:47 AM -
Receiving file adapter content conversion issue
Guys,
Could someone please help me with a Receiving file adapter issue?
My output structure is something like this:
Vendor_file_MT (occurence 1)
--Recordset (occurence 0..unbounded)
Vendor (occurence 1)
Field1
Field2
Field3
Field73
Field74
My content conversion is very simple:
Recordset Structure: Vendor
Parameters:
Vendor.fieldFixedLengths 30,30,30, (...) ,1,27
Vendor.fixedLengthTooShortHandling Cut
Vendor.endSeparator 'nl'
If I don't do the content conversion, it works fine, I get all the fields in the XML format.
When I do the content conversion however, I get multiple lines but only the very first field of each line.
What could be the problem? What am I missing here? Any idea?
Your help would be much appreciated.
Thanks,
ViktorVarga:
Its little strange that its not working even after adding that. Did you check the receiver channel in your RWB for any logs. Add the statement in my previous post and Also try to clear the Cache and activate the channel again..See if it works
Glad it worked
Edited by: Guru on Apr 21, 2008 3:15 PM -
Receiver File Adapter - Adapter Engine
I am able to read files using Sender File Adapter. But when I try to write a file using Receiver File Adapter I get the following erro:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!--
Call Adapter
-->
- <SAP:Error xmlns:SAP="<http://sap.com/xi/XI/Message/30>" xmlns:SOAP="
<http://schemas.xmlsoap.org/soap/envelope/>" SOAP:mustUnderstand="">
<SAP:Category>XIServer</SAP:Category>
<SAP:Code area="INTERNAL">AE_DETAILS_GET_ERROR</SAP:Code>
<SAP:P1>af.exi.usxid</SAP:P1>
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText>3: No service user name found for Integration
Server is.00.usxid</SAP:AdditionalText>
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>Error when reading the access data (URL, user, password)
for the Adapter Engine af.exi.uswalexi</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
I tried executing the function module SAI_AE_DETAILS_GET but I am not getting the error URL Not found. This was working in the past. We upgraded to SP15 this showed up again.
Any help appreciated.I'm working on integration of SAP with 3rd party application. While sending data from SAP to XI, i'm getting the following error which i've found in sxmb_moni (XML Message->Call Adapter).
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<!-- Call Adapter --> -
<SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>XIServer</SAP:Category>
<SAP:Code area="INTERNAL">AE_DETAILS_GET_ERROR</SAP:Code>
<SAP:P1>af.xp1.sapxi</SAP:P1>
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText>3: No service user name found for Integration Server is.00.sapxi</SAP:AdditionalText>
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>Error when reading the access data (URL, user, password) for the Adapter Engine af.xp1.sapxi</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Plz help me to solve this issue. If possible mail me the solution to my personal email-id [email protected]
Note:
1. We are using CIM 1.3
2. In XI Server Message Monitoring, i'm getting the System Error message in Integration Engine.
3. In Payloads, i'm getting the required information in XML format as desired.
Thanks in advance.
Regards,
Navaneeth.S -
Receiver File Adapter - FTPEx: 550 Access denied
Hi Experts,
In my receiver file adapter scenario I'm getting 550 Access denied in RWB.
I am a little confused here because I could access the FTP client from my desktop using the same User and Password informed in the Receiver CC. I also could drag and drop a file there.
Here you have Detail Display in RWB, it seems that at least the user is working fine for PI also:
Success: Connecting to FTP server "<FTP IP>"
Success: Write to FTP server "192.168.10.85", directory "\Transportadoras\10326750000101\", file "Nfe_teste.xml"
Success: Transfer: "TXT" mode, size 8881 bytes, character encoding UTF-8
Error: Attempt to process file failed with An error occurred while connecting to the FTP server '192.168.10.85:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 Access denied.'. For details, contact your FTP server vendor.
Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: An error occurred while connecting to the FTP server '192.168.10.85:21'. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: 550 Access denied.'. For details, contact your FTP server vendor.
Regards,
Daniela
Edited by: Daniela Machado on Aug 11, 2010 10:18 PMHi Daneial,
This is an issue due to any firewall or proxy between your Xi system and the FTP.In this case the direct logon
works with same user but when XI tries to create file at runtime you get this error due to network issues.
To resolve this contact your Basis/Network guys and
1. Set the permissions to FTP User you are using as 777 rights(full access to read , write and delete)
2.If you have access to PI server, try to telnet /connect to ftp using command prompt (open ftp .....) the FTP server form there, you should see the same error there , inform this to your network guys.
3.Clear all the files places already in the ftp (take backup) and test afresh after permissions are set by basis team.
Regards,
$rinivas -
Sender_interface_name in Variable Substitution in Receiver File Adapter CC
Hi,
as per this page : http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm
it says:
Variable Substitution (Target Directory/File Name Scheme)
If you set the Enable indicator, you can enter variables for the Target Directory and File Name Scheme. Enter the names of the variables and references in the table.
● Enter each variable that you reference in the Target Directory and File Name Scheme fields without the surrounding percentage sign under Name of Variables in the table.
The variables can refer to attributes of the message header or elements of the message payload.
○ If the variables are to refer to an attribute of the message header, add the prefix message: to the name of the variable under Reference. You can specify the following attributes of the message header:
sender_party, sender_service, receiver_party, receiver_service, interface_name, interface_namespace, message_id, message_id_hex
Can we not access sender_interface_name and sender_interface_namespace are not mentioned in above list of variables.
Is it not possible to access sender_interface_name or sender_interface_namespace as variable substitute parameters from within Receiver File Adapter Communication channel.
thanks.>Shabarish Vijayakumar wrote:
>>the sender interface details will always remain a constant
>>so you can hard code the value, isnt it?
Yes, i can hardcode, thats not a bad idea, i need to create then 3 different Reciever File Communication Channel objects, as I am dealing with 3 scenarios for which sender system and sender interface is different.
>Shabarish Vijayakumar wrote:
>>if you look at the mapping runtime constants, those are also for the receiver since the sender interface will always remain constant for any particular CC.
>>http://help.sap.com/saphelp_nw04/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm
yes in this link you provided i can see..
INTERFACE Interface
INTERFACE_NAMESPACE InterfaceNamespace
SENDER_SERVICE SenderService
RECEIVER_SERVICE ReceiverService
RECEIVER_NAME ReceiverName
RECEIVER_NAMESPACE ReceiverNamespace
it seems both INTERFACE (,INTERFACE_NAMESPACE) and RECEIVER_NAME(,RECEIVER_NAMESPACE) are present, may be one is for sender, and another is for receiver.. may be if i use dynamic configuration, possibly my issue would be addressed.. correct me if i am wrong.
thanks. -
Need to get the Mail attachment name as it is to the receiver file adapter
I am doing a Mail to File scenario. I need to get the attachment from the mail and store it on the file server. I am using the PayloadSwap bean in the sender mail adapter. My requirement is to carry forward the attachement name as it is to the receiver file adapter side and store the file with the same name.
Did any one try doing this? I was looking at developing an adapter module but got struck as I could not find whether the attachement name is stored in the XI payload after it has got swapped using the swap bean.
Any help would be appreciated.
VJOops pressed the send key. Take two.
This is becoming a damn nightmare. When I run the adapter I am getting ModuleExceptions. Can you pass your eyes over these Java config settings to see what I am doing wrong. Using NWDS CE 7.1 with PI 7.1 both at SP07. All the imports were taken from PI 7.1 after SP07 was applied. The build id of NWDS is
SAP NetWeaver Developer Studio
SAP NetWeaver 7.1 Composition Environment SP07 PAT0001
Build id: 200901152336
APPLICATION.XML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>MailPOP_EAR</display-name>
<description>EAR description</description>
<module>
<ejb>MailPOP_EJB.jar</ejb>
</module>
</application>
APPLICATION-J2EE-ENGINE.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">
<application-j2ee-engine>
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="service">engine.security.facade</reference-target>
</reference>
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="library">engine.j2ee14.facade</reference-target>
</reference>
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="service">com.sap.aii.af.svc.facade</reference-target>
</reference>
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="interface">com.sap.aii.af.ifc.facade</reference-target>
</reference>
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="library">com.sap.aii.af.lib.facade</reference-target>
</reference>
<reference reference-type="hard">
<reference-target provider-name="sap.com" target-type="library">com.sap.base.technology.facade</reference-target>
</reference>
<fail-over-enable mode="disable" />
</application-j2ee-engine>
EJB-J2EE-ENGINE.XML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-j2ee-engine SYSTEM "ejb-j2ee-engine.dtd">
<ejb-j2ee-engine>
<enterprise-beans>
<enterprise-bean>
<ejb-name>GetMailAttachment</ejb-name>
<jndi-name>GetMailAttachment</jndi-name>
<session-props/>
</enterprise-bean>
</enterprise-beans>
</ejb-j2ee-engine>
EJB-JAR.XML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
2.0//EN"
"http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<description>EJB JAR description</description>
<display-name>EJB JAR</display-name>
<enterprise-beans>
<session>
<ejb-name>GetMailAttachment</ejb-name>
<home>com.sap.aii.af.lib.mp.module.ModuleHome</home>
<remote>com.sap.aii.af.lib.mp.module.ModuleRemote</remote>
<local-home>com.sap.aii.af.lib.mp.module.ModuleLocalHome</local-home>
<local>com.sap.aii.af.lib.mp.module.ModuleLocal</local>
<ejb-class>sample.GetMailAttachment</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
SENDER MAIL ADAPTER modules
1 AF_Modules/PayloadSwapBean Local EB 1
2 GetMailAttachment Local EB 2
3 sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local EB 3
1 swap.keyName payload-name
1 swap.keyValue MailAttachment-1
RECEIVER FILE MODULES
1 localejbs/AF_Modules/DynamicConfigurationBean Local Enterprise Bean 1
2 localejbs/CallSapAdapter Local Enterprise Bean 2
1 key.0 write http://sap.com/xi/XI/System/File FileName
1 value.0 message.interface
VARIABLE FILENAME SUBST WITH ASMA TURNED ON
fName message:interface_name
JAVA SOURCE
package sample;
import javax.ejb.CreateException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import com.sap.aii.af.lib.mp.module.Module;
import com.sap.aii.af.lib.mp.module.ModuleContext;
import com.sap.aii.af.lib.mp.module.ModuleData;
import com.sap.aii.af.lib.mp.module.ModuleException;
import com.sap.engine.interfaces.messaging.api.Message;
import com.sap.engine.interfaces.messaging.api.MessagePropertyKey;
import com.sap.engine.interfaces.messaging.api.TextPayload;
import com.sap.engine.interfaces.messaging.api.XMLPayload;
import com.sap.aii.af.service.cpa.Channel;
@ejbHome <{com.sap.aii.af.lib.mp.module.ModuleHome}>
@ejbLocal <{com.sap.aii.af.lib.mp.module.ModuleLocal}>
@ejbLocalHome <{com.sap.aii.af.lib.mp.module.ModuleLocalHome}>
@ejbRemote <{com.sap.aii.af.lib.mp.module.ModuleRemote}>
@stateless
<code>GetMailAttachment</code>
@SuppressWarnings("unused")
public class GetMailAttachment implements SessionBean, Module {
private static final long serialVersionUID = 7612238514043673502L;
private SessionContext myContext;
private MessagePropertyKey myFileName;
public void ejbRemove() {
public void ejbActivate() {
public void ejbPassivate() {
public void setSessionContext(SessionContext context) {
myContext = context;
@throws CreateException
public void ejbCreate() throws CreateException {
public void getMessageProperty(MessagePropertyKey FileName) {
myFileName = FileName;
@param moduleContext
Contains data of the module processor that might be important
for the module implementation such as current channel ID
@param inputModuleData
Contains the input XI message as principal data plus eventual
set supplemental data
@return ModuleData Contains the (changed) output XI message. Might be the
response message if the module is the last in the chain.
@exception ModuleException
Describes the cause of the exception and indicates whether
an retry is sensible or not.
@SuppressWarnings("deprecation")
public ModuleData process(ModuleContext moduleContext,
ModuleData inputModuleData) throws ModuleException {
try {
Message msg = (Message) inputModuleData.getPrincipalData();
TextPayload payload = msg.getDocument();
String contentType = payload.getContentType();
// Content Type could be something like
// text/plain;charset="UTF-8";name="file.txt"
contentType = contentType.replaceAll("\"", "");
int i = contentType.lastIndexOf("=") + 1;
String fileName = contentType.substring(i);
msg.setMessageProperty(myFileName, fileName);
inputModuleData.setPrincipalData(msg);
} catch (Exception e) {
return inputModuleData;
JAVA ERRORS
2009-02-04 11:41:14 Information Mail: calling the module processor for channel LMK_Common_Mail_Sender
2009-02-04 11:41:14 Information Swap: swapping by payload-name ? MailAttachment-1
2009-02-04 11:41:14 Information Swap: successfully swapped
2009-02-04 11:41:14 Information Mail: message leaving the adapter (call)
2009-02-04 11:41:14 Information The application tries to send an XI message asynchronously using connection AFW.
2009-02-04 11:41:14 Information Backward validation is enabled
2009-02-04 11:41:14 Error Unable to validate the message with message ID 8702df71-f254-11dd-9b9b-001a64a73518
2009-02-04 11:41:14 Error Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Content is not allowed in prolog.
2009-02-04 11:41:14 Error Mail: error occured: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Content is not allowed in prolog.
2009-02-04 11:41:14 Error Mail: error occured: com.sap.aii.af.lib.mp.module.ModuleException -
Receiver File adapter content conversion using StrictXml2PlainBean
Hi All,
For receiver file adapter i am using the module StrictXml2PlainBean, and also i mentioned the module configuration like this
parameter name parameter value
recordTypes Header,TransactionHeader,TransactionDetail,TransactionTrailer,FileTrailer
FileTrailer.endSeparator |\n
FileTrailer.fieldSeparator |
Header.endSeparator |\n
Header.fieldSeparator |
TransactionDetail.endSeparator |\n
TransactionDetail.fieldSeparator |
TransactionHeader.endSeparator |\n
TransactionHeader.fieldSeparator |
TransactionTrailer.endSeparator |\n
TransactionTrailer.fieldSeparator |
But when i send the idoc, The receiver CC is throwing an error
Message processing failed. Cause: com.sap.aii.af.modules.conversion.xml2plain.ConversionException: Invalid structure name encountered during conversion: Transaction at XML element MT_DeliveryOrder,Transaction
My actual structure is
MT_DelvOrder
Header 0...1
Transaction 0....Unbounded
TransactionHeader 1..1
TransactionDetail 0...unbounded
TransactionTrailer 1...1
FileTrailer 0...1
The module is checking for the Transaction node,but i require the rest 3.
Same configuration i have done successfully with FCC without using the module....
So can any one suggest me where i am missing... why the module is pointint towards, the Transaction cant i ignore this node . and continue with the rest???
Regards,
Sridhar
Edited by: sridhar reddy kondam on Aug 10, 2009 12:35 AMHi Rajesh,
The same FCC configuration was working fine with FCC and when i am using this module configuration i am getting the prob...
In the file i need the Header,TransactionHeader,TransactionDetail,TransactionTail,Filetrailer
my sample output file is
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_DeliveryOrder>
<Header>
</Header>0...1
<Transaction>0...Unbounded
<TransactionHeader> 1..1
</TransactionHeader>
<TransactionDetail> 0...Unbounded
</TransactionDetail>
<TransactionTrailer>1...1
</TransactionTrailer>
</Transaction>
<FileTrailer> 0...1
</FileTrailer>
Any suggestions will be great help...
I think i need to go with other options without using this module....
Regards,
Sridhar
Edited by: sridhar reddy kondam on Aug 10, 2009 6:03 AM -
Hi all,
I am trying to convert the XML to Plain file in receiver file adapter. I am using module - StrictXml2PlainBean
My target structure is -
<MT_Name>
<records>
<Header>
</Header>
<Item>
</Item>
</records>
</MT_Name>
<Header> and <Item> are at same level.
When I use --
1. Header.fieldSeparator = ,
2. Item.fieldSeparator = ,
3. recordTypes = Header,Item
Then I get this error -
Message processing failed. Cause: com.sap.aii.af.app.modules.conversion.xml2plain.ConversionException: Invalid structure name encountered during conversion: records at XML element MT_Name,records
When I use --
1. records.fieldSeparator = ,
2. singleRecordType = records
Then I get this error -
Message processing failed. Cause: com.sap.aii.af.app.modules.conversion.xml2plain.ConversionException: The element nesting level for the structure MT_Name is too deep (reference: 3 levels, found: 4 levels) at XML element MT_Name,records,Header,Item
To add more details to the scenario, multiple records can be generated but one record will have only one Header, with multiple Items.
Any help in this regard will be highly appreciated.
Thanks,
AbhiHi Abhi,
Here you go....
For your target structure as:
<MT_Name>
<records>
<Header>
</Header>
<Item>
</Item>
</records>
</MT_Name>
Where I have assumed that <Header> and <Item> are at same level.
DO NOT use any Module just simply configure the receiver channel as below:
In the file Receiver Channel
Recordset Structure = Header,Item
Name Value
Header.fieldSeparator ,
Item.fieldSeparator ,
I have tried this and it works.
Let me know if you are facing any issues.
Cheers
Dhwani -
Receiver File Adapter - File Content Converstion
Hi,
I have an xml-output (as a string) but I need to use the content converstion tool in the receiver file adapter to make this into one string without the nodes etc. Example of the format that i want the file to be in:
1AXXX10363501 00000013PC..........etc.
And I need each instance of SBR in a new row. How can I do this? Please tell me if things are unclear.
Example of the structure the file has now without content converstion.
<?xml version="1.0" encoding="UTF-8"?>
<StockBalanceFlatfile><Rows><SBR>
<Type>1</Type>
<Mode>A</Mode>
<Owner>XXX</Owner>
<SKU>10363501</SKU>
<Quantity>00000013</Quantity>
<UOM>PC</UOM>
<Attr1>2476</Attr1>
<Status>0000</Status>
<Filller>----
</Filller>
<ELM>*</ELM>
<CRLF>CRLF</CRLF>
</SBR></Rows></StockBalanceFlatfile>
Best Regards
ClaesClaes,
Use the below content conversion parameters.
<u>Content Coversion Parameters</u>
<b>Recordsetstructure</b> StockBalanceFlatfile,Rows,SBR
<b>Name</b> <b>Value</b>
SBR.endSeparator 'nl'
If it doesn't help, reply back.
Best Regards,
raj. -
Receiver file adapter creates an innecesarry extra line
Hi,
I have an issue with an extra line that add the receiver file adapter with the content conversion.
The file XML that the file adapter has to convert, is the next;
<root>
<cofig>
<FileName>NameOfTheFile.txt</FileName>
</cofig>
<lines>
<line>
<data>BBBBBBBBBBBBBBBBBBBBBB</data>
<data>Aaaaaaaaaaaaaaaaaaaaaa</data>
</lines>
</root>
Because FileName is not necessary, I remove it with:
cofig.fieldFixedLengths 0
cofig.fixedLengthTooShortHandling CUT
but it leaves an empty line that i don't want. that is, the text in the file start in the second line.
Any help?
Thank you in advance.Can you do a small change in your mesg. structure ?
change it to....
<root>
<lines>
<line>
<data>BBBBBBBBBBBBBBBBBBBBBB</data>
<data>Aaaaaaaaaaaaaaaaaaaaaa</data>
</lines>
<i><b><cofig>
<FileName>NameOfTheFile.txt</FileName>
</cofig></b></i>
</root>
and then use
cofig.fieldFixedLengths 0
cofig.fixedLengthTooShortHandling CUT
followed by
endSeparator 0
Ref: Suppressing Field In Receiver File Adapter for more details. -
Receiver File Adapter - Content Conversion
Hi,
I don't quite get this:
I have a structure
<?xml version="1.0" encoding="UTF-8"?>
<AnElement1>
<AnElement2>
Bla bla bla
</AnElement2>
</AnElement1>
I want to convert this to a flat file with a line containing
Bla bla bla
In te receiver file adapter I define the following:
In the 'Content Conversion Parameters'
Recordset Structure : AnElement2
Name Value
AnElement2.addHeaderLine 0
AnElement2.fieldSeparator 'nl'
AnElement2.endSeparator 'nl'
This results in an Empty file each time indicating some error somewhere.
What am I missing?
Thanks
AndreHi Andre,
Just check the link <a href="http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm">File content conversion</a>
Also check out this web log <a href="/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2 to TXT</a>
Is there any error log shown in File adapter ?
Regards,
Keith
Message was edited by: keith thompson -
Problem: The same filename from a sender to a receiver file adapter - SP14
Blog : /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
My Problem:
The thing works for me and i am able to get my input files name as my output file name. But one thing i noticed is that in my target message, the field where i have mapped the code it always returns the value "null" but finally when the file is created i get the required result.
My input file name is input.txt and i get the same name in my output file too.
In sxmb_moni if i check DynamicConfiguration link i see the following
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Response
-->
- <sap:DynamicConfiguration xmlns:sap="http://sap.com/xi/XI/Message/30">
<sap:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFTPHost">10.25.116.98:21</sap:Record>
<sap:Record namespace="http://sap.com/xi/XI/System/File" name="Directory">/input/test</sap:Record>
<sap:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFileTimestamp">20060228T112200Z</sap:Record>
<sap:Record namespace="http://sap.com/xi/XI/System/File" name="FileType">bin</sap:Record>
<b><sap:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">input.txt</sap:Record></b>
<sap:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFileSize">770</sap:Record>
</sap:DynamicConfiguration>
But when i check my mapped field i see
<field3>BodyC</field3>
<keyfield>02</keyfield>
<field5>BodyE</field5>
<field6>BodyF</field6>
</Body>
- <Trailer>
<keyfield>03</keyfield>
<b><field2>null</field2> -> Null value instead of input.txt</b>
</Trailer>
</ns0:MT_Putfile>
The code i have used to map the field2 of the trailer is the following ....
<i>DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileType");
String valueOld = conf.get(key);
return valueOld; </i>
Any clues ?Gosh this is spooky
Anyway i tried with that line of code but it throws me an error during activation ...
Activation of the change list canceled Check result for Message Mapping mm_IS | http://t-systems.com/Shabarish: Starting compilation Source code has syntax error: /usr/sap/TXT/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map387c7300a9ac11da9d280011256afae8/source/com/sap/xi/tf/_mm_IS_.java:104: cannot resolve symbol symbol : method getTransformationParameters () location: interface com.sap.aii.mappingtool.tf3.rt.GlobalContainer DynamicConfiguration conf = (DynamicConfiguration) container.getGlobalContainer().getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); ^ 1 error
The code is :
DynamicConfiguration conf = (DynamicConfiguration) container.getGlobalContainer().getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
//DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
//String valueOld = conf.get(key);
String valueOld = conf.toString();
return valueOld;
Thanx Renjith so far .. but i hope this gets resolved (else i will loose my sleep thinkin abt the situation) -
REG: File content conversion in Receiver file adapter
HI Gurus,
I have the scenario like proxy to file with content conversion
my message type for the source like this
MT_SOURCE
-----||
|---ROW
------------||
|---LINE
target strucuture also same
MT_TARGET
-----||
|---ROW
------------||
|---LINE
i am using the following FCC parameters in receiver file adapter
LINE.fieldSeparator = ' '
LINE.fixedLineWidth = 90
LINE.lineSeparator = 'nl'
LINE.fieldFixedLengths = 200
LINE.endSeparator = 'nl'
the output file show the data differently in note pad when compare to word
word output
dgepvs 023456987
kgdd0016155710 SS Smw Ne 01
kgdd0016155710 SS Smw Ne 01
kgdd0016155710 SS Smw Ne 01
kgdd0016155710 SS Smw Ne 01
kgdd0016155710 SS Smw Ne 01
kgdd0016155710 SS Smw Ne 01
kgdd0016155710 SS Smw Ne 01
notepad out put
dgepvs 023456987 kgdd0016155710 SS Smw Ne 01 kgdd0016155710 SS Smw Ne 01 kgdd0016155710 SS Smw Ne 01 kgdd0016155710 SS Smw Ne 01 kgdd0016155710 SS Smw Ne 01
word output is the correct output wat i am expect but same out put i want in note pad can any help me out for this how can i resolve this
Thanks in advanceThere is nothing wrong in your content conversion parameters. This is pure editors interpretation for the next line character.
I would do in java program to fix this issue using '\r\n' You might want to try and see how that helps for notepad editor.
Maybe you are looking for
-
Creating a job in schema when can't login in that schema
there is a requirement that I've to create a job in a schema, but i don't have that schema's password,but I've that server's SYSDBA's password,means I can login into SYS account as SYSDBA, but I've to create a job in that schema. how is it possible,
-
There are several people who might want to use Thunderbird on a work computer but I don't like how everyone's email files are open to public view. It looks like anyone can see emails without having to login to another person's account.
-
TIBCO adapter for WLI 8.1 exists?
Does WebLogic adapter for TIBCO RendezVous 7.0 exists for WLI 8.1 ? At this page I can see adapter for WLI 7.0 only: http://commerce.bea.com/products/weblogicadapters/wl_adapter_home.jsp I've tried to deploy BEA_TIBCO_1_0_70.ear to WLI 8.1, but got t
-
Start-up Disc Corrupted all the time
Start-up Disc Corrupted all the time MacBook Pro early 2008 running 10.6.4 and Windows 7. My MBP, early 2008, 2.5 GHz, 4GB Memory, HARD Disc 250 GB Hitachi (HTS 542525K9SA00) needs disc repair and erase and reinstall ever 5 days or so. This problem s
-
I keep reloading data into Notes in my IPad and after syncing, the new data is missing from the ipad and doesn't show in the PC. Had similar but slightly different with my iPhone. Any solutions, please?