cancel
Showing results for 
Search instead for 
Did you mean: 

Dates read from an RFC service are incorrect in Visual Composer

Former Member
0 Kudos

Hi,

We are having trouble with dates being returned by RFCs in Visual

Composer.

To test the problem I have created a simple RFC that returns todays

date using data type DATUM. When I run via SAPGui it returns 22.07.2009.

When I test this RFC service in Visual Composer, it returns the

date "Wed Jul 22 00:00:00 BST 2009". Interestingly this looks like a

timestamp.

When I use the RFC Service in a model and run it, it display the date

30/11/1921 which is obviously wrong.

We are having this problem across a number of RFC services.

Any ideas would be greatly appreciated.

Many Thanks

Gary

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello,

Check the below link for details and look at my answer:

this may help you, good luck

Martin

Former Member
0 Kudos

Hi Martin,

Thanks for the response. I think I followed your solution. This is obviously a bug in VC.

I changed the RFC to return a CHAR8 field that contained the date in the format YYYYMMDD (i.e. SAP internal date format). This is received into VC as a text field.

I then used the expression DATE(LEFT(@E_DATE,4),MID(@E_DATE,4,2),RIGHT(@E_DATE,2)) to assign the date string to the form field in VC.

I tried going via a Data Store value and using this as a default for my form field but this didn't work. I assume this is down to a timing issue (i.e. the form was displayed before the value got into the data store.

Thanks for the help

Gary

Former Member
0 Kudos

Hi Martin,

Thanks for the response. I think I followed your solution. This is obviously a bug in VC.

I changed the RFC to return a CHAR8 field that contained the date in the format YYYYMMDD (i.e. SAP internal date format). This is received into VC as a text field.

I then used the expression DATE(LEFT(@E_DATE,4),MID(@E_DATE,4,2),RIGHT(@E_DATE,2)) to assign the date string to the form field in VC.

I tried going via a Data Store value and using this as a default for my form field but this didn't work. I assume this is down to a timing issue (i.e. the form was displayed before the value got into the data store.

Thanks for the help

Gary

Former Member
0 Kudos

Hi

Check the following wiki link i think this will help -

https://wiki.sdn.sap.com/wiki/display/VC/DateandTime+Formats

If you have ant doubts please let me know.

Regards

Sandeep

Former Member
0 Kudos

Hi Gary,

Use DSTR function to change the date format. Check the below link for details.

http://help.sap.com/saphelp_nw70/helpdata/en/2b/6c37121f28462a8710c0c7493506dd/content.htm

Regards

Basheer

Edited by: Basheer on Jul 23, 2009 10:33 AM