11-23-2008 11:14 AM
If the date format in user profile (defaults) is set to Islamic Date 1 format, how does SAP convert the gregorian date to islamic date while displaying or using write statements in ABAP. When the abap program reads the date field from the database, the value in database is stored as YYYYMMDD, while writing the list output, it converts to islamic date.
My requirement is to read the hiring date from HR infotype 0041, convert into islamic date and add 1 Hijra year to the islamic date to come up with one year hijra period (example 1429/11/29 to 1430/11/28). Note this is not the same as reading the gregorian date and find one year period and then converting to islamic date. Islamic calendar has 354 or 355 days instead of 365.
11-23-2008 1:41 PM
Hi,
Use the class CL_ABAP_DATFM
and the method CONV_ISL_TO_GREG_FORMULA
Regards,
IFF
11-23-2008 1:50 PM
you can use either function - CONVERT_DATE_TO_EXTERNAL but there it will take user default format.
or you can use CL_ABAP_DATFM method CONV_DATE_INT_TO_EXT; here you can specify your date format A or B using parameter IM_DATFMDES
are you the one from BCSS / Aramco?
11-24-2008 10:41 AM
It works. I wonder what is the significance of table TISLCAL (islamic calendar) !! I am not sure about the date format parameter in the method A and B. Both gives different outputs. In fact, 1 day difference between A and B.
I am the same one from BCSS and Aramco also ... and you Garg?
Edited by: Shameel Padmanabhan on Nov 24, 2008 12:11 PM
11-24-2008 12:07 PM
08-01-2009 3:19 PM
Hi there,
Another question ... if you select islamic date as your default date type, on any date field, if you do F4 (possible entries), it shows only 2 years of calendar. Whereas, if your default date type is Gregorian, you can scroll N number of years. Why is this restriction? Any idea?
Thanks,
Shameel