Dynamic Configuration-File to File in scenario

10-11  Source: Network gathering  Views:1 

Advertisement
Hi Experts,
As per the requirement needs to supress the numeric extensions of the files and transfer to the receiver.
Example: file name is XXX123.txt , but after picking up by sender communication channel in XI that file needs to converts XXX.txt and transfer to the receiver. Finally in the receiver end the file name should be Mahesh.txt only.
Please share the inputs how to do dynamic configuration in XI in File to File scenario.
Hi,
First you need to have a UDF as shown below. No need to put any arguments in the UDF.
public String getFileName(Container container){
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
//get file name in string s
String s = conf.get(key);
//remove all numeric values
int i,l;
l=s.length();
String a="";
for(i=0;i<l;++i)
if(s.charAt(i)>='0' && s.charAt(i)<='9')
continue;
a=a+s.charAt(i);
s=a;
conf.put(key, s);
return s;
Now you need to map this UDF to any root element or dummy element of the target XML structure.
Ensure that
1. Sender Comm Channel has ASMA and file name ticked
2. Receiver Comm Channel  has ASMA and file name and "fail if ASMA missing" ticked
3. in receiver communication channel -> File access parameters-> File name scheme -
> put any value say "*". This step is not compulsory.
Hope this solves your problem.
regards
Anupam
Related articles
  • Doubt om Dynamic Configuration of receiver file 10-11

    Hello ,   for Acheiving the Dynamic configuration of receiver file name ,adapter specific message attribute is used...But how to suppress the name of file in the content of the Received file... Is my question correct..do we get the file name in conte

  • Dynamic Configuration for two file adapters communication channels 10-11

    Hello Experts!!!!!!      In one of the interface in my landscape, I am using two file adapters for creating two files with different names and at two different destination on F.T.P. However the receiver service for both the communication channel are

  • Dynamic configuration for multiple files 10-11

    Hi All, I am new to PI. I have a proxy to file scenario, wherein 3 files are to be generated depending upon the value in a field (site ID) on the same receiver. Site ID can only have 3 different vales. All these 3 files are to have a dynamically defi

  • Problem:obtaing file name using Dynamic configuration of file adapter 10-11

    hi all I am using Dynamic configuration for getting file name. I am getting Dynamic configuration in SXMB_MONI containg file name, but payload is empty unlike file i am sending.Hi All, Basically my requirement to get Filename in idoc segments in orde

  • Dynamic Configuration - Set Directory Path for File Receiver Adapter 10-11

    Hi Experts, I have a question regarding the dynamic configuration for the file adapter. Is it possible to set a directory path without a message mapping for the file receiver adapter? the problem is that I want to import a pdf document. this pdf docu

  • Multimapping and dynamic folder selection for files 10-11

    Hi SDNers, I have a requirement where I need to split the message in multiple messages, I am using 1:N Multimapping for this. Also I need to use dynamic configuration to route the separated files to multiple folders based on place field in the messag

  • Dynamic Configuration Bean 10-11

    Hi Experts, I am doing a pass through scenario (i.e. ICo) without any ESR objects and I want to add time stamp to the file name at receiver side. Could you please help me in doing this via Dynamic Configuration Bean? What I also want to do is to repl

  • XSL mapping with Java enhancment PI 7.1 - Dynamic configuration 10-11

    Scenario - IDOC -> File XSL Mapping using dynamic configuration to set file name. 1. Ive included xmlns:javamap="java:packageName.DynamicFunctionClass"> in the XSL header 2.Ive call this method javamap:transform($input, $output) In the Jav

  • File to file design advice 11-30

    Hi experts, i have a file to file scenario. The third party wants the IDOC data as a IDOC file. So we have created file port and posting the idoc to that file port which creates file in the application server. here is my doubt when it comes to PI des

  • Variable Substitution and Dynamic Configuration 10-11

    Hi All, In Variable Substitution , the name that should be given the the receiver payload should be part of the Source Payload unlike the Dynamic Configuration wherein the file name can be generated dynamically during mapping. I have the following qu

  • Dynamic Configuration-File to File in scenario 10-11

    Hi Experts, As per the requirement needs to supress the numeric extensions of the files and transfer to the receiver. Example: file name is XXX123.txt , but after picking up by sender communication channel in XI that file needs to converts XXX.txt an

  • Dynamic Configuration File Names 10-11

    Hi, I have a RFC->XI->File scenario. I have to put the target files names based on the calculation of values in 2 fields in the input. I tried using Dynamic Configuration in my message mapping for this. This is the code: DynamicConfiguration conf =

  • File name cant be fetched from Dynamic configuration...mutli-mapping used 10-11

    In a scenario, i have a BPM which has a transformation step which contains a mutimapping ...means 2 messages mapped to 1 messgaes, here in the mapping i m using an UDF and written code to extract the file name from dynamic configuration..... the prob

  • Dynamic configuration- Is file name stored in any abap table in PI 10-11

    Hi. Is there any ABAP table in XI containing the dynamic configuration's xml of a message. For any file scenario Can I get the file name from any of the abap table in PI Regards, DeepakInteresting ABAP tables in XI Interesting ABAP tables in XI – Par

  • Receiver File Error while using Dynamic Configuration 10-11

    Hi All, My Scenario is from SAP IDOC --> PI --> FIle... In the mapping i have used the dynamic variable substitution for the receiver file.... The Dyanamic file will be alwasy generated irrespective of the condition for the Mapping... Now Whenever S

  • Dynamic configuration of Receiver FTP File channel 10-11

    Hi, The scenario is sending an IDOC from an R/3 system (using IDOC adapter) to a FTP file system. I want to dynamically configure the filename and the target directory in the following cases 1. With filename and the target directory coming as a part

  • Dynamic configuration with a target ZIP file 10-11

    Hi, I have an scenario file to file. Source is a ZIP file, so CC is a FILE NFS Binary. XI acts as a FTP mover and there aren't  message mapping nor Integration directory definition . Target and source filename it's the same. But target directory must

  • Dynamic File, Directory names - File2File Scenario 10-11

    We donot have message mapping in our Scenario  ( Ftp file 2 Ftp file scenario ) where we like to change filename, directory before writing file on the target ftp server. Basically Dynamic configuration has to be manipulated based on  file name patter

  • Proxy to file using dynamic configuration 10-11

    Hi Frnds, I  have a scenario ABAP_Proxy-XI-File, here in the proxy I am getting a pdf file with xml as attachment now I need to save the pdf file to the target folder with the name availble in one of the fields of attached xml file. I have used Adapt

  • Dynamic configuration of properties/descriptor files? 10-11

    Hello all, I am trying to use configuration files used in j2ee applications (property files, deployment descriptors) in a more dynamic manner. I have been searching for a suitable solution for some time now. I have come across the following syntax wi