cancel
Showing results for 
Search instead for 
Did you mean: 

Filename with Timestap

0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

suchitatomar
Participant
0 Kudos

Hi,

 

: (import pkg "java.text.SimpleDateFormat" under importInstructions)

 
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());

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.

0 Kudos

Dear Tomar,

Thanks for your Response

Add Time Stamp UDF is Correct answer.

Regards

Naveen L

Answers (3)

Answers (3)

suchitatomar
Participant
0 Kudos

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

former_member186851
Active Contributor
0 Kudos

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.

former_member182412
Active Contributor
0 Kudos

Hi Lingampally,

The error is because you did not deploy the adapter module in your system that is why you are getting error.

Why don't you use add time stamp option in file adapter.

Regards,

Praveen.

0 Kudos

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

former_member182412
Active Contributor
0 Kudos

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.

0 Kudos

Dear Praveen,

Thanks for your reply,

It is very helpful to find the issue.

Regards

Naveen L