Skip to Content

Personas 3.0 : Compare Dates in a table control

Mar 03, 2017 at 10:26 AM


avatar image

Hi Experts

I have a requirement for transaction Display HR Master Data (PA20) to get the relevant entry from info type Action (0000) table for a particular date input.

Hence need to compare the date with the dates in the action table control in infotype 0000.

But the dates are in string format and cannot be compared.

Please suggest a way around for the same.

Thanks in Advance.



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Steve Rumsby
Mar 03, 2017 at 10:39 AM

The dates should be presented in a standard format in the screens, so if you are looking for exact matches a string compare should still work. If you need to to use < or > then you'll need to use JavaScript string operations to break apart the date string and build JS Date objects, and do the comparison on those.

You'll need to beware of the user settings that control the presentation of dates, and the order of the components - "mm.dd.yyyy" vs "" vs "". There's no easy way around that...


10 |10000 characters needed characters left characters exceeded
Betsy Grant Nov 10, 2017 at 03:46 PM


How do you handle dates in the Personas Javascript per the user settings?

My current report script has this code: session.findById("wnd[0]/usr/ctxtBDTER-LOW").text = month + "/" + day + "/" + year;

How do I handle a user setting that may have their date set up as MM-DD-YYYY? Right now the report doesn't work correctly due to their user settings being different than the coded script.


Show 2 Share
10 |10000 characters needed characters left characters exceeded will give you the current user's date format, according to values of domain XUDATFM . You can code your date handling based on that.


Thank you, this is great. Much easier than using a BAPI.