cancel
Showing results for 
Search instead for 
Did you mean: 

SAP XI : Date and Time Service

Former Member
0 Kudos

Hi All,

Is there any runtime variable or service in SAP XI through which I can

map the current DATE and TIME of the system. Currently I am using XSLT mapping and

in that XSL I am calling java code for Date and Time.

So is there any other way through which I can Map the date in the output field

without calling Java code in XSLT.

Thanks

Farooq

Accepted Solutions (0)

Answers (3)

Answers (3)

agasthuri_doss
Active Contributor
0 Kudos

Hi,

This thread will help you

Regards

Agasthuri Doss

agasthuri_doss
Active Contributor
0 Kudos

Hi,

write a user defined function in java to get the current time and call that java function in XSLT.

Can you try this code for getting time

SimpleDateFormat formatter = new SimpleDateFormat("hh:mm:ss a z");

Date now = new Date();

String nowAsString = formatter.format(now);

If you execute this XI server you will get the server time.

Regards

Agasthuri Doss

MichalKrawczyk
Active Contributor
0 Kudos

hi,

you can do it from java - if you use XSLT on java stack

you can do it from ABAP - if you use XSLT on ABAP stack

there are also java functions for date

in message mapping

so you can put two mappings (in your <b>interface mapping</b> object):

one XSLT

and one message mapping which will only fill the date

to see how many mappings work have a look at my weblog:

/people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>