cancel
Showing results for 
Search instead for 
Did you mean: 

Problenm with date transformation in graphical message mapping

Chandra_Hota
Participant
0 Kudos

Hello All

I am facing an issue with a very trivial message mapping, involving date functions.

On the sending and the receiving side, in the datatypes of the message, i declared both the corresponding fields as XSD:Date

My sending system is sending a data in the format dd.MM.yyyy

My receiving side is expecting it as yyyy-MM-dd.

I did a graphical date mapping using the date transformation function.

In the graphical mapping, I specified dd.MM.yyyy in the Source date format and yyyy-MM-dd in the target date format.

But, i am getting "Runtime exception in message-mapping transformation: unparsable date".

Can someone tell me what might be going wrong here?

Thanks

Chandra

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hey Chandra

Its working fine

You need to type the formats in Date Transform. Dont select default once.

Check

http://www.flickr.com/photos/32274480@N06/3038926242/

Thanks

Gaurav

Former Member
0 Kudos

Are you sure that the input date is comming in format dd.MM.yyyy?

Maybe its another format, like ddMMyyyy or something like that.

Give us a date that you put in the test mode in the incoming field.

Chandra_Hota
Participant
0 Kudos

I am using 17.11.2008 as the input.

This is the error message i get, which i picked from the trace:

com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:FI_Asset_Req/Header/Date_Of_File. The message is: Unparseable date: "17.11.2008" at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:420) at com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:118)

Former Member
0 Kudos

try creating ur own UDF with fillowing code.

function formatDate( String s )

{

SimpleDateFormat f = new SimpleDateFormat( "dd.mm.yyyy");

Date d = f.parse( s );

//and then convert to desired target format.

}

SudhirT
Active Contributor
0 Kudos

Hi Chandra,

Normally it works,Definitly you have made an wrong entry in Format Of Source Date property in Date Function Transform date.

Please check it again type the source format as dd.MM.yyyy and in target format as yyyy-MM-dd.It should work then.

Thanks!