how does sap convert the gregorian date to islamic date

Upload: sandy1412

Post on 07-Jan-2016

23 views

Category:

Documents


1 download

DESCRIPTION

How Does SAP Convert the Gregorian Date to Islamic Date

TRANSCRIPT

How does SAP convert the gregorian date to islamic dateThis question isAssumed Answered.

Shameel PadmanabhanNov 23, 2008 12:14 PMIf 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. 1578Views Topics:abapAverage User Rating(0 ratings) Re: How does SAP convert the gregorian date to islamic date

I FFNov 23, 2008 2:41 PM(in response to Shameel Padmanabhan)Hi,Use the class CL_ABAP_DATFMand the method CONV_ISL_TO_GREG_FORMULARegards,IFF Alert Moderator Like(0) Re: How does SAP convert the gregorian date to islamic date

Manish GargNov 23, 2008 2:50 PM(in response to Shameel Padmanabhan)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_DATFMDESare you the one from BCSS / Aramco? Alert Moderator Like(0) Re: How does SAP convert the gregorian date to islamic date

Shameel PadmanabhanNov 24, 2008 12:11 PM(in response to Manish Garg)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.