cancel
Showing results for 
Search instead for 
Did you mean: 

Date format issue coming from RFC

0 Kudos

Hi ,

I am working on SAP Screen Personas , using persona editor we created additional fields on the standard screen of VA03 transaction on fiori launchpad. There is one parameter of date in that RFC and its in format of mm/dd/yyyy. And this is the required format . But when we call that RFC in our personas script its be default taking the yyyy/mm/dd.

How to change the format of the date as required . PFA the screenshots of the code written in script and date format in RFC .

Accepted Solutions (0)

Answers (2)

Answers (2)

bwills
Contributor

As Personas can also use javascript in the script, use javascript to reformat the date as you need. w3schhols.com has some good information.

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

When testing a function module in transaction SE37, the date format will reflect the current user's setting according to what is maintained in transaction SU3. However, date fields internally have the YYYYMMDD format and that is what the RFC expects as input and also how it returns a date. Thus, you must format the date returned by the RFC and change it to the user's date format before populating a screen field with it.

session.info.dateformat( ) provides the current user's date format setting. It will return a value according to the XUDATFM domain's values, which you can use in your script to perform the date formatting, so the screen input will accept it.