Dynamic Filename for Reciever File Adapter
Hi All,
Can anyone answer to some of my quesries which are as follows
a) . Currently Iu2019m working on an IDOC-to-File scenario in which I need to create zip file on file server by using a payload value. I
search sdn and found a bean that can be used to create zip file which is PayLoadZipBean. Iu2019m referring the below weblog for creating file name dynamically.
/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
My question is can anyone explain or provide me the step by step procedure in detail for the prerequisite which are mention in the weblog, i.e.
u201CAssuming that the following have been done and configured.
1.A value table has been created in the ABAP stack of the WAS in which XI is running and the entries as the file types, which will be written into the files are maintained.
2.Create a number range object in SNRO transaction in the same ABAP stack which will be having the sub objects as the file types maintained in the value table with their number ranges maintained. u201C
b) .Can we use all mapping techniques (ABAP, Java, XSLT and Graphical) in a single scenario if yes then how to trigger them and which one executes much faster?
c) .Can we trigger an RFC asynchronously and how?
Your help is highly appreciated and
Regards
Faisal
Edited by: Abdul Faisal on Nov 19, 2009 8:53 AM
a) . Currently Iu2019m working on an IDOC-to-File scenario in which I need to create zip file on file server by using a payload value. I
search sdn and found a bean that can be used to create zip file which is PayLoadZipBean. Iu2019m referring the below weblog for creating file name dynamically.
/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i
My question is can anyone explain or provide me the step by step procedure in detail for the prerequisite which are mention in the weblog, i.e.
Hi Use dynamic configuration UDF to create file name dynamically.its very easy search in sdn you will find the code,even you can create file directory name dynamically.
In receiver file communication channel if you use PayLoadZipBean it will do Zipping of your message,for this you need to add this bean name additional parameters section in Receiver Channel.
If you want to create zip file based on pay load value check the condition at mapping level based on that call the service,if you not required zip file in other case for that you need to create one more file receiver communication channel.
u201CAssuming that the following have been done and configured.
1.A value table has been created in the ABAP stack of the WAS in which XI is running and the entries as the file types, which will be written into the files are maintained.
not claer,can you explain bit more
2.Create a number range object in SNRO transaction in the same ABAP stack which will be having the sub objects as the file types maintained in the value table with their number ranges maintained. u201C
b) .Can we use all mapping techniques (ABAP, Java, XSLT and Graphical) in a single scenario if yes then how to trigger them and which one executes much faster?
We can use all mappings single scenario,how mean just add the mapping names in Operation/Interface mapping.
As per my understanding Message Mapping works faster then JAVA then XSLT then ABAP,but it depends on how many lined of code you written.
c) .Can we trigger an RFC asynchronously and how?
Yes we can use RFC Asynchronous,search in sdn you will find it,if unable to find let me know.
Regards,
Raj
Similar Messages
-
Dynamic Filename on Receiver File Adapter
Hi,
I am running XI 3.0 SP 14.
The scenario is
SAP R/3 (IDOC) > XI (Receiver File Adapter)> FTP Server
There is no mapping on the XI side, we just drop the IDOC XML on to the ftp server.
I would like to configure a dynamic file name on the Receiver File Adapter where if the 'MSATZ' Field
within the E1EPD04 segment of the IDOC is populated then I would like to send a separate
Filename than the one specified on the 'File Name Scheme'.
Has anybody done this or any suggestion how I should go about this please.
Thank you.
Warm Regards,
RanjanHi Guys,
When I tried to create the User defined function as below, I got the Null value for the "StreamTransformationConstants.DYNAMIC_CONFIGURATION" object.
My code looks like this,(this is part of the debuging code)
Start
public String Create(String a,String b,Container container){
if (container.getTransformationParameters() == null)
return "conf.null";
if (container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION) == null)
return "Dynamic.null";
return b;
--End
On the output I get the value "Dynamic.null". I do not know why the object value is Null.
Any suggestion pls.
Thank you.
Warm Regards,
Ranjan -
Dynamic File Name for Receiver File Adapter
Hi All,
How can we use dynamic name for Receiver file adapter?
Can anyone help.
Thanks in Advance
ChemmanzHi Chemmanz,
The dynamic filename generation concept is as follows.
In your filename field. just give a variable with % symbols. (eg: %file% ).
Now, under the option Variable Name Substitution, you can give how the value has to be created.
It can be your interface name, sender service name, etc or it can be some value dynamically from your payload.
For the former, your give
message:interface_name ,etc
and for the payload part you give,
Payload: "your element root which u wanna acecss"
Just check this link out,
http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
And read the contents under variable substitution and it will help you understand the concepts better.
If you have any clarifications, do get back,
Regards,
Bhavesh -
Error in reciever file adapter , where i am getting file name dynamically
hi all,
error in reciever file adapter , where i am getting file name dynamically, please help me in this isssue , i am trying for a long time
MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:MT_eINVOICE_RECV' found in document', probably configuration error in file adapter (XML parser error)': java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:MT_eINVOICE_RECV' found in document', probably configuration error in file adapter (XML parser error)'i am getting new error
MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Channel has not been correctly initialized and cannot process messages
this is my strcuture
and i have changed my structure
<HEADER>
<ADDRESS1/>
<ADDRESS2/>
<ADDRESS3/>
<ADDRESS4/>
</HEADER>
<HEADER_GST>
<TAX1/>
<TAX2/>
<TAX3/>
</HEADER_GST>
<LINE>
<QTY/>
<UOM/>
<UNIT_AMT/>
<CHARGE_TO_DT/>
</LINE>
<FILENAME>
<FILENAME/>
</FILENAME>
i have given the recordset structure as
HEADER,HEADER_GST,LINE,FILE -
Dynamic File naming in reciever File Adapter
Hi all,
I am using a reciever File adapter and my requirement is to generate 3 different file names based on the value of an element from the Payload.For example..
Say in Payload for the first Occurence of the Data segment which contains Field-1 and Field-1 Contains value X then filename should be X.CSV,
same as
For the next occurence of the Data Segment if the Value of Field-1 is Y then File name should be Y.CSV.
Similarly For Z as well.
This is something like this...
SOurce Structure
================
IDOC
DATA SEGMENT-1
Field-1---> X
Field-2
Field 10
DATA SEGMENT-2
Field-1
Field-2
Field 10
DATA SEGMENT-3
Field-1
Field-2
Field 10
then the output and filenames should be...
X.CSV
Field-1
Field-2
Field-3
Y.CSV
Field-1
Field-2
Field-3
Z.CSV
Field-1
Field-2
Field-3
Kindly help, is there any way i can do this using File Adapter Configurations .Please suggest.Hi,
you can use a small business process.
There you will receiver the message in one receive step.
than you need a transformation Step with a mapping which split your message to several messages.
At least you have now a Multi Row container with one message for each data segment.
For sending each messages of this multirow container you need a block in BPM.. this you have to set to parallel processing.
Inside this block you have a sending step which send the single message.
and without BPM take a look at this Weblog(you need SP14):
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions me</a>
Regards,
Robin -
Required Changes in FCC Paramenters for Sender File Adapter.
Hi
I am Doing File-File Scenario.I am using FCC in the Sender File Adapter. I have defined the structure as below.
My Source Structure
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_Source xmlns:ns0="http://city.net/filecopy">
<Message>
<Id>123</Id>
<Head>
<Id>123</Id>
<Filename>test.xml</Filename>
</Head>
<Body>Helloworld</Body>
</Message>
</ns0:MT_Source_FILE>
So for the above structure, I have defined the FCC Parameters as
Document Name: MT_Source (Message Type)
Document Namespace:http://city.net/filecopy(Namespace)
Recordset Name: Message (root node)
Recordset Structure: Message,1,Head,1
Recordset Sequence: Ascending
Recordsets per message:1
Keyfield Type: string
In the Table Rows I have defined
Message.fieldFixedLengths: 3,10
Message.fieldNames: Id, Body
Message.fieldSeparator: ,
Message.endSeparator: 'nl'
Head.fieldFixedLengths: 3,8
Head.fieldSeparator: ,
Head.endSeparator: 'nl'
Head.fieldNames: Id, Filename.
My Input Text file
123,Helloworld
123,text.xml
I am Getting Output as
<?xml version="1.0" encoding="utf-8" ?>
- <ns:MT_Source xmlns:ns="http://city.net/filecopy">
- <Message>
- <Message>
<Id>123</Id>
<Body>HelloWorld</Body>
</Message>
- <Head>
<Id>123</Id>
<Filename>test.xml</Filename>
</Head>
</Message>
</ns:MT_Source>
I should get Body field after Head Structure as in the Source Structure, So Please what changes do I need to do in the Parameters Specified above to get the desired Output.
So How should I define the FCC Paramenters For Sender File Adapter ?
Any Help Would be Appreciated.
Regards,
VarunHi Everyone,
I could Succeed to some extent.
I have defined the parameters as follows
Recordset Structure: Message,*,Head,1
Key Field Name: KZ
Key Field Type: integer
In the table, I defined the Parameters as
Message.fieldFixedLengths:1,3
Message.fieldNames:KZ,Id
Message.keyFieldValue:1
Message.keyFieldInStructure:ignore
Message.fieldSeparator:,
Message.endSeparator:'nl'
Head.fieldFixedLengths:1,3,8
Head.fieldNames:KZ,Id,filename
Head.keyFieldValue:2
Head.keyFieldInStructure:ignore
Head.fieldSeparator:,
Head.endSeparator:'nl'
Message.fieldFixedLengths:1,11
Message.fieldNames:KZ,Body
Message.keyFieldValue:3
Message.keyFieldInStructure:ignore
Message.fieldSeparator:,
Message.endSeparator:'nl'
My source text file
1,123
2,123,test.xml
3,Hello World
my output is
<?xml version="1.0" encoding="utf-8" ?>
- <ns:MT_Source xmlns:ns="http://city.net/FileCopy">
- <Message>
- <Message>
<Id>123</Id>
</Message>
- <Head>
<Id>123</Id>
<Filename>test.xml</Filename>
</Head>
</Message>
</ns:MT_Source>
I got the output almost correct except I am not getting the value in the Body
Any help would be appreciated.
Please correct me If I am wrong.
Regards,
Varun
Edited by: Varun on Sep 2, 2008 12:06 PM
Edited by: Varun on Sep 2, 2008 12:15 PM -
Error in reciever file adapter
Getting following error in a reciever file adapter (stack trace extracted from defaultTrace)
#1#com.sap.engine.services.dbpool.exceptions.BaseSQLException: ResourceException in method ConnectionFactoryImpl.getConnection(): com.sap.engine.services.connector.exceptions.BaseResourceException: Cannot open resource(Managed Connection) with LocalTransaction support or add a second one in the same transaction, for component "ejbContexts/sap.com/com.sap.aii.af.app/CallSapAdapter" in application "sap.com/com.sap.aii.af.app".
at com.sap.engine.services.dbpool.cci.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:59)
at com.sap.aii.af.ra.ms.runtime.Resources.getDBConnection(Resources.java:362)
at com.sap.aii.af.ra.ms.impl.core.store.MessageStore.getMessageProfile(MessageStore.java:1228)
at com.sap.aii.af.ra.ms.impl.ConnectionImpl.deliveryAck(ConnectionImpl.java:399)
at com.sap.aii.adapter.file.SapAdapterServiceFrameImpl.sendAcks(SapAdapterServiceFrameImpl.java:350)
at com.sap.aii.adapter.file.SapAdapterServiceFrameImpl.callSapAdapter(SapAdapterServiceFrameImpl.java:250)
at com.sap.aii.af.modules.CallAdapterWithMessageBean.process_receiver(CallAdapterWithMessageBean.java:201)
at com.sap.aii.af.modules.CallAdapterWithMessageBean.process(CallAdapterWithMessageBean.java:161)
at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl1.process(ModuleLocalLocalObjectImpl1.java:103)
at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:252)
at com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0.process(ModuleProcessorLocalLocalObjectImpl0.java:103)
at com.sap.aii.af.listener.AFWListenerBean.onMessage(AFWListenerBean.java:243)
at com.sap.aii.af.listener.AFWListenerLocalObjectImpl0.onMessage(AFWListenerLocalObjectImpl0.java:103)
at com.sap.aii.af.ra.ms.impl.ServicesImpl.deliver(ServicesImpl.java:253)
at com.sap.aii.adapter.xi.ms.XIEventHandler.onDeliver(XIEventHandler.java:838)
at com.sap.aii.af.ra.ms.impl.core.queue.ReceiveConsumer.invokeHandler(ReceiveConsumer.java:351)
at com.sap.aii.af.ra.ms.impl.core.queue.ReceiveConsumer.onMessage(ReceiveConsumer.java:100)
at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:831)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: com.sap.engine.services.connector.exceptions.BaseResourceException: Cannot open resource(Managed Connection) with LocalTransaction support or add a second one in the same transaction, for component "ejbContexts/sap.com/com.sap.aii.af.app/CallSapAdapter" in application "sap.com/com.sap.aii.af.app".
at com.sap.engine.services.connector.resource.impl.ResourceSetImpl.checkEnlist(ResourceSetImpl.java:308)
at com.sap.engine.services.connector.jca.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:229)
at com.sap.engine.services.dbpool.cci.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:51)
... 21 moreHI,
Refer this link. It gives solution to the above problem.
http://help.sap.com/saphelp_nw04s/helpdata/en/5c/2f2c4142aef623e10000000a155106/content.htm
Regards,
Sudheer. -
Anonymous login in sender,reciever file adapter
hi all xi's
i dont know what is the need of anonymous login option in sender,reciever file adapter and the other thing is if i use check anonymous login there is no option for
specifing username,pwd,ftp server ip.
early anser will be appreciated.
bye.
regards.
seeta ram.Hi,
when you configure your FTP server you can opt for anonymous login.
It means anyone can log on to this server just by using the IP address.
No user creation.. so ..No need for user id or pwd. i mean no authentication.
FTP connection parameters.. i.e. server n port will always be there if you are going for FTP.
It wont ask for these if you select NFS.
Being Anonymous only removes the user id n pswd option.
Anonymous login is "Never suggested"..Pretty insecure..
Dont forget to award SDN points Seeta.
Regards
Pushkar
Message was edited by:
pushkar anand -
Reciever file adapter permissions
Hi
I am trying to writing a file on remote computer using nfs reciever file adapter
I get the following error
Message processing failed.Cause com:sap.aii.af.ra.ms.api.RecoverableException: Target directory '
Hfavediqa2_0\ZIMEQCDATAIN' does not exist
The XI Server users are not in the domain of the customer
so we created a local user in the Hfavediqa2_0 with same password
so if I login with the user and password of xidadm to this server I can connent to the share
Hfavediqa2_0\ZIMEQCDATAIN and write files in this directory
how to solve this issue ? seems very stange to me
thx
ShaiHi,
Try and check if you can access the server mentioned here. ie. Hfavediqa2_0. NFS is used for files on shared directories in local network. Hence you should be able to ping this server. Simply type ping <server name/IP> and you should see the response. If you are not able to do that, then it won't be possible to reach the destination directory, hence the error. Using FTP could be alternate solution.
Thanks,
Bhavish
Award points is comments helpful -
FCC Paramenters for Sender File Adapter
hi
I am using FCC in the Sender File Adapter. I have defined the structure as below. Fields ID, Filename, Values will be generated at Runtime as I have defined Used Defined Funtions for Both.
Only I will Pass the value in Body. i.e "Hello".
So How should I define the FCC Paramenters For Sender File Adapter ?
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_Source_FILE xmlns:ns0="http://city.net/FILEtoHTTP">
<Message>
<Id>123456</Id>
<Head>
<Id>123456</Id>
<Filename>sample.xml</Filename>
</Head>
<Body>hello</Body>
</Message>
</ns0:MT_Source_FILE>
In the source text file, Do I need to send only "Hello" value because ID and filename will be generated at runtime?
Regards,
Varun
Edited by: Varun on Sep 1, 2008 6:00 PMHi,
Refer this link:
http://help.sap.com/saphelp_NW04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
Regards,
Nithiyanandam -
Framemaker uses <$filename> for short file name, can we edit this to change appearance? We do not want the short file name of long filename to include the .fm extension can this be removed or modified to make this happen? In compiling our books it would be helpful to not have this extension appear as it then requires us to create extra files without them.
See: System Variables
-
Content conversion in Reciever File Adapter
Hi Frens,
Iam doing A FCC in Reciever file adapter. My input structure is
DT_structure
->Record
->Row
Field1
Field2
Field3
I have donr the configuration as
Recordset Structure : Record,Row
Row.fieldSeparator : ,
Row.endSeparator : 'nl'
Record.fieldSeparator : 'nl'.
With this configuration Iam able to display only one record but I need to display multiple records in the file. Please do suggest me wha need to be done to achieve this.
Radhika.First check whether your datatype has the occurrence of records unbounded or not. Then goto content conversion. If both your Record and Row tags can occur multiple times, then use
Recordset Structure : Record,*,Row,*
Or if Record occurs only once and multiple Row nodes are required, then use
Recordset Structure : Record,1,Row,*
Regards,
Prateek -
Archiving in Reciever file adapter
Hi .
can any one plz help me in <b>archiving file's in reciever file adapter</b> .
thanks
shakifHi Mohamed,
Normally we acrchive the files only in the sender communicaton channel by selecting the processing mode as Archive and giving the path of the directory where the sucessfully processed files are to be placed int the archieve directory.
There is no option to archieve the files in the receiver file adapter.
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm">Configuring Sender File Adapter</a>
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm">Configuring Receiver File Adapter</a>
Regards
Santhosh
Remember to set the thread to solved when you have received a solution
[url=Use a Good Subject Line, One Question Per Posting - Award Points; Use a Good Subject Line, One Question Per Posting - Award Points[/url] -
Dynamic URL for HTTP receiver adapter
Hi all,
when the XI send the http request to the target system, the format maybe like this:
header + body the body is including: Prolog, payload and Epilog
here is about the target system have a 'input' parameter(maybe string type)
is it possible to pass the 'head + body' these value(or maybe the whole http request message) into input
i mean is it possible to set the dynamic URL for http receiver adapter like this:
http://host:port/path?input=<the header and body>
i have searched the blog Dynamic Configuration of Some Communication Channel Parameters using Message Mapping
Link:[/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping]
and the similar threads in the forum
please give me some advice
thanks in advanceWhen a HTTP server requests the whole message as URL parameters, then I assume that the server also requests an HTTP GET, which is not supported by XI.
Could you check this?
Regards
Stefan -
Filename for flat file using J2EE FILE FTP Receiver adapter
Hi there,
I am struggling to do the following:
I have a J2EE File receiver that sends a file with a specific name to a FTP destination. I define the target filename in my graphical mapping using certain criteria and a incremental number. In my adapter I use variable substitution to select that value in the payload as the filename. Up to this point everything works fine.
The problem is that I convert the payload to a flat structure using xslt before writing it out and because of that the adapter cannot find my value as defined in the variable I use for the name.
Now, obviously if I move the xslt module after the CallAdapter module, the file won't be converted to a flat structure.
Can anyone give me advice on how I can do the flat conversion <u>and</u> the specific filename from the payload?
Thanks in advance,
JohanHi,
Instead of using variable substitution, use adapter specific identifiers to set the file name in mapping.
Ref:/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Regards,
Jai Shankar
Maybe you are looking for
-
Itunes wont open after just being installed
Hi, I have justed downloaded the Quicktime + iTunes from this site, and started installation process. Everything went fine until "Go together" page ends and the actual installation process takes place. After the installation bar shows that it's compl
-
Every time I try to play a movie/tv show on my ipad that i've bought but haven't downloaded, a message comes up saying 'This device is already associated with an apple id, you can download past purchases on this device with just one apple id every 90
-
WSADMIN: Test webservice - 403 Forbidden
Hi all, i want to test some webservice in transaction wsadmin. For this purpose i used the J2EE server of XI. But after a new support package level of XI i can't test my services any more. The error: 403 Forbidden You are not authorized to view the r
-
Creating Custom Privilages to assign to Authorization policy
Hi, I want to create custom priviliages like "Create User", "Search User" in OIM. So that I can assign these privilages to authorization policies. Please let me know how to create custom privilages. Thanks
-
The videos do not play except on YouTube. It shows an error message that it can't play the video. I have the latest updated Adobe Flash player. And the same videos work well on IE and GC !