Upload
ankaiahyadav
View
26
Download
0
Embed Size (px)
Citation preview
2/3/2015 SAP Process Integration: SAP PI Dynamic File Name generation
http://gawshanpi.blogspot.in/2012/08/sappidynamicfilenamegenerationin.html 1/3
SAP Process Integration
Thursday, August 2, 2012
SAP PI Dynamic File Name generation
In some cases the requirements of the file being dropped by PI requires to be certain specific formats. For e.g. Date or sequence numbersrequired. Even though there is a date stamp privided by the File adapter, it is not very flexible in terms of format. Thus the below method isquite helpful. Everything happens in the message mapping.
There is one config required in the File Receiver in the Integration Directory:
The next thing to configure is the message mapping in the ESR, create a UDF in the message mapping as follows:
Gawshan Bhimjee
View my completeprofile
About Me
2012 (4)
August (3)
Making an RFC call from aUDF in PI For UKMS
SAP PI Dynamic File Namegeneration
MDM ECC integration
March (1)
Blog Archive
My Blog List
0 More Next Blog»
2/3/2015 SAP Process Integration: SAP PI Dynamic File Name generation
http://gawshanpi.blogspot.in/2012/08/sappidynamicfilenamegenerationin.html 2/3
Posted by Gawshan Bhimjee at 3:15 AM
Labels: Dynamic File Receiver, SAP PI
The reason why I am imported the Seeburger functions are because in this particular case, the file name required a sequence number whichincrements for each customer. Thus it creates a seeburger variable and gets the next sequence number. Also this UDF should be calledonce only in the mapping. It should basically have the following code to make the file name be as per what you define:
DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
SimpleDateFormat dateformat = new SimpleDateFormat("yyyyMMdd");String timestamp = dateformat.format(new Date());
String filename1= "OTI_I_18_"+customerGLN + "_" + customerNumber +"_" +".txt";
conf.put(key, filename1);
The above should do the trick for a special date formatted file name.
Recommend this on Google
3 comments:
yektek training March 18, 2014 at 8:18 AM
nice post thank you
Reply
siva sankar Sankar May 2, 2014 at 6:37 PM
nice post thanks for sharing from Swathi
Reply
YekTek Online Training May 12, 2014 at 6:41 PM
excellent post thanks for sharing from Kajal
Reply
2/3/2015 SAP Process Integration: SAP PI Dynamic File Name generation
http://gawshanpi.blogspot.in/2012/08/sappidynamicfilenamegenerationin.html 3/3
Newer Post Older PostHome
Subscribe to: Post Comments (Atom)
Enter your comment...
Comment as: Google Account
Publish Preview
Simple template. Powered by Blogger.