on 10-24-2014 2:59 PM
Hi SDNites,
I have a scenario where I have to pick a file form the shared directory and read the file name which will be used as an input for RFC look up and then send the file as an attachment via email obtained from Look up.
Can you please guide me do I need to build IR componet for sender as I am not reading the file contents and how will I read the file name (I know we have to create UDF for the same) and pass it to RFC look up.
Regards,
Abhishek
Hi Abhishek,
Your scenario is going to be like below:
File (Sender Adapter without Content Conversion) --> Message Mapping (UDF to read FileName + RFC Lookup [Request + Response]) --> Email (File as Attachment).
You can follow the below blog for File to Email Scenario (). You don't need the Module creation. Skip that part. Otherwise the blog mentioned by .
Use the UDF Code provided by .
Refer this blog for RFC Lookup:
If you want to use RFC Lookup from UDF:
Can you please guide me do I need to build IR componet for sender as I am not reading the file contents and how will I read the file name (I know we have to create UDF for the same) and pass it to RFC look up.
You are not reading the File (not using FCC) but it has to be File --> Mail Scenario.
So you need to build all the required configuration for this flow.
Regards,
Nabendu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Abhishek,
You can use the following code to get the File Name while mapping...
DynamicConfiguration dynamicconfiguration = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey name = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName"); //fetching filename
String MyFileName = dynamicconfiguration.get(name); //assigning the filename to local variable
return MyFileName;
Also please choose the option on Sender File Adapter CC "set Adapter-specific message attributes" and "File Name".
The output of above UDF will be input for your RFC Lookup.
Please use the following link to send the file to a mail as an attachment.
http://wiki.scn.sap.com/wiki/display/XI/Step+by+Step+Mail+To+File+Scenario
Thanks-
Ramesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhishek,
for file to email scenario please refer the below document
for RFC lookup based on file name refer the below blog
regards,
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.