on 09-28-2011 6:11 AM
Hi All,
I am working on File to RFC scenario.
Here the file name is like 'ABCD_XYZ_1234_DATE' where the date is in yyyymmdd format.
I have to read this filename & the date in the filename is to be mapped with one of the RFC parameter.
Also how would I trigger the Interface if the file resides in PI server or on local mchine.
How to configure the processing parameters in sender comm channel if I want to read the file after every 15 mins?
Thanks,
Amit Patil
Hi,
By writing simple UDF in your mapping you can Acheive this
Try this Once
DynamicConfiguration dynamicconfiguration = (DynamicConfiguration)param.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
String MyFileName = dynamicconfiguration.get(key);
String str[] = MyFileName.split("_");
return str1[1];
Map this to the date parameter(RFC) in the mapping .
If the file resides on Local machine then you can use FTP and if it is on PI server then NFS as Transport protocol.
If you want read the file for every 15 min there are 2 options
1) Set the poll interval time to 900 sec
2) Configure ATP in RWB
Configuring ATP in RWB :
http://www.dataxstream.com/2010/11/configuring-availability-time-planning-in-sap-pi/
Thank & Regards,
Deepthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
First of all - Thanks to All.
After keeping the file on PI server and configuring NFS as Sender Transport Protocal, I am unable to see the message log in SXMB_MONI.
I kept poll interval as 5 mins i.e. 300 secs.
How would I know whether the interace has got triggered or not? Or is there any else triggering point?
Thanks & Regards,
Amit Patil
Hi All,
Now I am able to monitor XML messages.
But now the problem is of Message Mapping in which I am getting error is as below.
com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_MM_Vista_Royalties_for_proxy_: RuntimeException in Message-Mapping transformatio~
The UDF I have used in the message mapping for the date passed in the filename is as below.
public String MapPostDt(Container container)
{
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String SourceFileName = conf.get(key);
String str[] = SourceFileName.split("_");
return str[3];
}
Is it the correct one?
Regards,
Amit Patil
> When I am monitoring XML message, in the pipeline process under Inbound Message under SOAP Header, I am unable to find the step for DynamicConfiguration which should appear when Java Mapping(UDF) is used.
You have to check the corresponding parameter in communication channel for sender file adapter, otherwise the fields are not populated.
If you are looking for the selective reading of the inbound directory then please refer here..
http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm
Advanced Selection for Source File
If you want to set an exclusion mask for the File Name specified above, or if you want to specify multiple directories using a file name mask and exclusion mask, set the Advanced Selection for Source Fileindicator.
○ Specify an Exclusion Mask for the file name specified above.
You want to process all files that have the extension '.txt', but want to exclude all files that begin with the letter 'a'. To do this, enter .txt for File Name, and a for Exclusion Mask.
○ You can enter additional specifications for source directories, file names, and exclusion masks in the table. This data is processed in addition to the details specified above.
Hi Amit Patil,
Do you need only the date then I would like to do a little change in the return statement within Deppthi's code above.
It will be return str1[3];
All other required settings for the purpose has been already stated in above posts.
regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
>>Here the file name is like 'ABCD_XYZ_1234_DATE' where the date is in yyyymmdd format. I have to read this filename & the date in the filename is to be mapped with one of the RFC parameter.
For this use ASMA Properties in file sender communication channel and write a UDF using dynamic configuration and split the text n date from filename.. and then pass the date as input to RFC paramter..
mapping will be UDF->RFC paramter..
>>Also how would I trigger the Interface if the file resides in PI server or on local mchine.
Use FTP server if it resides on Local machine,if on PI server go for NFS transport protocol
>>How to configure the processing parameters in sender comm channel if I want to read the file after every 15 mins?
For this increase poll interval in sender communication channel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit
Here
1. Set your Adapter Specific Parameter for your sender file adapter. Make use of this blog by michal
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14 for achieving the same
2. With the help of the code described, obtain the Dynamic configuration parameters where you get the file name.
3. With the help of UDF extract the date from the file name.
4. With the help of UDF map the required parameter to RFC's Parameter
DONE!
Regards
Ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.