cancel
Showing results for 
Search instead for 
Did you mean: 

date in numeric format - how to map ?

Former Member
0 Kudos

Hi,

I have a scenario, where i get all the characteristics of an Equipment from R3 to XI. One of the characteristics (installation date) is maintained as YYYYMMDD format in R3 so when it reaches XI it appears as a numeric value(exponential).

How can i have XI re-format this numeric value back in to a date ?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi BRamchan

The date format coming from R/3 is in the format YYYYMMDD, please check the data type for the YYYYMMDD whether it is string or numeric in the R/3, if you want to map this date format into the XI you can take it as a string if it is string in the R/3 or numeric if it is numeric in the R/3.

Thanks

Rinku

Former Member
0 Kudos

Please tell me the type(string, date or int or what?) that you have defined for for the outbound data type...i.e. for the data coming from R/3 and also for the inbound data....

Former Member
0 Kudos

Dear Ramchan

>><i>when it reaches XI it appears as a numeric value(exponential).</i>

By this do you mean that you are getting date some thing like 2.0070605 * 10^ 7???

Generally XI does not realize any format. I mean if you define a data type as integer and give a string in it, XI will take it blindly. So i dont think such a problem should ever come...but may be you can write a small UDF where you try and define date as long int or something like that to remove the 10 power component

agasthuri_doss
Active Contributor
0 Kudos

Hi,

In the Source side if you define as the Data format you can avoid this kind of issue.. Else use sub string and read the required one and pass it .

Regards

Agasthuri Doss

Former Member
0 Kudos

Kartik,

When calling the 'Object characteristics read' FM, the installation date characateristic's value is returned as numeric within R3. I am not able to make a general maping rule for all characteristics in XI as the characteristics are numeric/char/curr.

like for eg: the FM returns 20071004 as something like....... (2.0071004*10^ 7)

For this you suggested to use UDF ? Am pretty new to java would appreciate some sample code for this

Former Member
0 Kudos

Hey

first of all u need to declare the Data type for the <date>tag as <i>string</i> in the sender data type,then in mapping pick up the first digit(2) using substring function,then pick up 7 digits(0071004) using substring function from position 3rd to 9th position and then use concat function.

you can use UDF as well which will be fairly simple.

have two variables,get the first digit in first variable,then the 7 digits in next variable and then just concat these two variables

Thanx

Aamir

Former Member
0 Kudos

Hi,

What exactly u need to do......do u want to change the format of incoming date format into to ur requirement.Please make it clear.

If u want to change the format of ur date then u have standard funtions in mapping which will help u in converting the date format into any format.

Regards,

Phani

Reward Points if Helpful