cancel
Showing results for 
Search instead for 
Did you mean: 

Timezone in xsd:time type can not be handled by SAP

Former Member
0 Kudos

Hello,

I have scenario SOAP --> PI --> ECC (Proxy). In the interface, one field has type of xsd:time. When I sent message without specifying timezone in the field (like 07:03:14), the scenario works fine. However when I send msg with timezone like 07:03:14-05:00, the ECC system can't handle it saying Value 07:03:14-05:00 is not a valid date in accord with the XML format for ABAP Kernel ErrorId: CONVT_NO_TIME. In the MONI of PI, things seem ok, the error message is seen in the MONI of the ECC system where proxy is generated.

Has anyone experienced similiar problem, why SAP system can not handle timezone.

Thanks

Jayson

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

The format of time expected by abap server proxy is hh:mm:ss. Any othe additional value will throw this error. In the mapping step, you will have to remove the additional time zone value. This won't be supported by time field.

Regards,

Prateek

Former Member
0 Kudos

Hi Prateek

this is a problem. This means I have to write a java mapping to convert all local time to GMT time which could be time consuming. So:

1) This is a SAP bug in my opinion, does SAP provide any solution for itÉ

2) Anyone knows any java code that can convert xsd:time to GMT time?

Thanks

Jayson

Former Member
0 Kudos

Hi Prateek

this is a problem. This means I have to write a java mapping to convert all local time to GMT time which could be time consuming. So:

1) This is a SAP bug in my opinion, does SAP provide any solution for itÉ

2) Anyone knows any java code that can convert xsd:time to GMT time?

Thanks

Jayson

Former Member
0 Kudos

Hi Prateek

this is a problem. This means I have to write a java mapping to convert all local time to GMT time which could be time consuming. So:

1) This is a SAP bug in my opinion, does SAP provide any solution for itÉ

2) Anyone knows any java code that can convert xsd:time to GMT time?

Thanks

Jayson

Former Member
0 Kudos

duplicate

Answers (4)

Answers (4)

Former Member

Hi Jayson

Yes this is a limitation with ABAP proxy

While mapping XSD to ABAP

xsd:time is mapped to TIMS which is capable to handle only HH:MM:SS

Similar kind of problem you can face with xsd:datetime as ABAP understand xsd:date and xsd:time as DATS and TIMS

Most of the times i ended up using xsd:string in proxy targets or Java UDF/Map

Check if this can help



import java.util.*;
import java.text.*;
public class DateToGMT {
   public static void main(String[] args)throws Exception {
    
        java.text.SimpleDateFormat format = new 
SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        java.util.Calendar cal = Calendar.
getInstance(new SimpleTimeZone(0, "GMT"));
        format.setCalendar(cal);
        java.util.Date date = format.parse("2003-01-25 00:15:30");
        System.out.println(date);    
    } 
}      

Thanks

Gaurav

Thanks

Gaurav

Former Member
0 Kudos

Hi Gaurav,

ABAP proxy could handle it, basically the proxy takes the xsd:time string and convert it to TIMS, unfortunately seems like the proxy takes the xsd:time string as is and passes to TIMS. The proxy should exam the xsd:time string, if timezone is included in it, it should either ignore it or convert it to GMT. Maybe this is the reason why SAP didn't do it, it doesn't / shouldn't make sure decision of either ignore or convert.

Anyway, I am asking for java code that can take the xsd:time string and convert to time of any timezone. basically method like:

public DateTime convertXSDTime(String xsdTime, TimeZone tz)

Remember xsdTime already contains timezone information.

Thanks

Jayson

Former Member
0 Kudos

SAP cannot handle time zone, see note 839427 - Date and time modeling

Former Member
0 Kudos

Duplicated

Edited by: Gaurav Bhargava on Jan 7, 2009 2:35 AM

Former Member
0 Kudos

Duplicated

Former Member
0 Kudos

Duplicated

Edited by: Gaurav Bhargava on Jan 7, 2009 2:35 AM

Former Member
0 Kudos

Duplicated

Former Member
0 Kudos

duplicate

Former Member
0 Kudos

Hi Gaurav,

ABAP proxy could handle it, basically the proxy takes the xsd:time string and convert it to TIMS, unfortunately seems like the proxy takes the xsd:time string as is and passes to TIMS. The proxy should exam the xsd:time string, if timezone is included in it, it should either ignore it or convert it to GMT. Maybe this is the reason why SAP didn't do it, it doesn't / shouldn't make sure decision of either ignore or convert.

Anyway, I am asking for java code that can take the xsd:time string and convert to time of any timezone. basically method like:

public DateTime convertXSDTime(String xsdTime, TimeZone tz)

Thanks

Jayson

Former Member
0 Kudos

duplicate

Former Member
0 Kudos

duplicte

Former Member
0 Kudos

Actually the problem is: when the xml arrives at the ECC, the proxy tries to convert the xsd:time string (in my case it`s 07:03:14-05:00) to ABAP data type XSDTIME_T, this is the place where ABAP error occurs because proxy can`t handle timezone, I guess.

Is this a bug? is there a go around solution?

Former Member
0 Kudos

Hi Prateek

this is a problem. This means I have to write a java mapping to convert all local time to GMT time which could be time consuming. So:

1) This is a SAP bug in my opinion, does SAP provide any solution for itÉ

2) Anyone knows any java code that can convert xsd:time to GMT time?

Thanks

Jayson