on 03-29-2016 10:27 AM
Dear Experts,
My Scenario is Idoc to File
Idoc is Costomized Idoc and Receiver file structure is same sender Idoc XSD file(through external destination).
Requirement is receiver wants file name with time stamp (File/FTP receiver cc )
I am take the reference of below link but I am getting error below in RWB.
http://scn.sap.com/community/pi-and-soa-middleware/blog/2014/03/12/adapter-module-addtimestamp
Error:---> Message processing failed. Cause: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of AddTimeStamp.
kindly help me.
I appreciate your help.
Regards
Naveen L
Hi,
Step1:
Addtimestamp udf ->dyanamicConf(udf) -> targetnode.
Addtime stamp udf : (import pkg "java.text.SimpleDateFormat" under importInstructions)
public String AddTimestamp(String var1, Container container) throws StreamTransformationException{
String DATE_FORMAT_NOW = "yyyyMMddHHmmssSSS"; // here u have to give specific format
Calendar cal = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
return sdf.format(cal.getTime());
dynamicUDF:
public String DynamicConfig(String a, Container container) throws StreamTransformationException{
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
conf.put(key,a);
return "";
Hop this will help.!! do share the results.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naveen,
Please mark this answer as correct answer and close the thread by marking as helpful answer 😛
Let me know if you still require some help 😛
Regards
S Tomar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Naveen,
Deploy the below Files as mentioned in the link
Enterprise Java Bean Project: AddTimeStamp_EJB
Enterprise Java Bean Application: AddTimeStamp_EAR
using NWDS or any deployment tool.
I believe your requirment is to have timestamp in some special format.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praveen,
Thanks for your reply,
while using File construction mode tab get below error
Error: Could not process due to error: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but was not supplied in the XI Message header
Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but was not supplied in the XI Message header
Regards
Naveen L
This error is because of you enabled the ASMA properties in the file receiver channel and you did not set the file name property using dynamic configuration, do you want file name to be dynamic then in the message mapping set the file name using dynamic configuration. If you dont have the mapping better to create message mapping and set the file name using dynamic configuration otherwise you need to write own adapter module for this.
Regards,
Praveen.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.