3
G e t t n g S t a r t e d N e w s l e t e r s S t o r e S e a r c h t h e C o m m u n i t y W e l c o m e G u e s t L o g n R e g s e r P r o d u c s S e r v i c e s & S u p p o r t A b o u S C N D o w n o a d s I n d u s t r i e s T r a i n n g & E d u c a t i o n P a r n e r s h p D e v e o p e r C e n t e r L i n e s o B u s i n e s s U n i v e r s i y A l i a n c e s E v e n t s & W e b n a r s I n n o v a t o n A d d e d b y A v i n a s h K o d a r a p u , l a s e d i t e d b y I F F o n M a y 0 2 2 0 0 9 A B A P D e v e o p m e n t / A B A P D e v e l o p m e n t a n d P r o g r a m m i n g F u n c t i o n M o d u l e r e l a t e d o n D a t e c a l c u l a t i o n s F u n c i o n M o d u e s D e s c r i p o n S A P N E A / J _ S C _ C O N V E R T _ D A T E C o v e r t D a e n J a p a n e s e F o r m a t S D F / C M O _ D A T E T M E _ D I F F E R E N C E C a c u a e s d f f e r e n c e b e w e e n t w o d a e s / m e s t a m p s . A D D _ T M E _ T O _ D A T E A d d t m e t o d a t e B K K _ A D D _ M O N T H _ T O _ D A T E A d d m o n t h s o d a t e B K K _ A D D _ W O R K N G D A Y B W S O _ D A T E _ G E T _ F R S T _ W E E K D A Y G v e s h e F r s t d a t e o f t h e w e e k f o r h e g v e n d a t e C A C S _ D A T E _ G E T _ T M E S T A M P C o n c a e n a t e s h e d a t e a n d t m e f o r m a t 1 1 - 1 2 - 2 0 0 8 1 0 : 1 1 : 1 1 C A C S _ D A T E _ G E T _ Y E A R _ M O N T H G v e s h e Y e a r a n d m o n t h f o r t h e g v e n d a t e C A C S _ T M E S T A M P _ G E T _ D A T E G e t d a t e a n d t m e f r o m T m e s a m p C O N V E R T _ T M E _ T E R M S D A T E _ C H E C K _ W O R K N G D A Y C h e c k h e d a y s w o r k n g d a y o r n o f o r g i v e n d a t e & c a e n d a r d D A T E _ C H E C K _ W O R K N G D A Y _ M U L T P L E C h e c k h e d a y s w o r k n g d a y o r n o f o r g i v e n d a t e n m u l p e c a e n d a r d D A T E _ C O M P U T E _ D A Y G v e s h e d a y n u m b e r n t h e w e e k ( E X 1 - M o n , 2 - T U E e c ) D A T E _ C O N V E R T _ T O _ W O R K N G D A Y D A T E _ T O _ D A Y G v e s h e d a y o f h e d a t e ( E x M o n d a y , T u e s d a y e c ) D A T E _ T O _ D A Y G e t h e d a y o f h e d a t e ( E x M o n . T u e e t c ) F 4 _ D A T E F M f o r F 4 h e p f o r D a t e F M A _ D A Y S _ A N D _ M O N T H S _ A N D _ Y E A R S F M A _ D E C M A L _ M O N T H S _ A N D _ Y E A R S G v e s h e d f f e r e n c e b e w e e n t h e d a t e s n d e c m a f o e m a o f n u m b e r o f m o n t h & y e a r s G E T _ W E E K _ N F O _ B A S E D _ O N _ D A T E G e t h e w e e k N u m b e r S u n d a y d a t e & M o n d a y d a t e f o r t h e g v e n d a e H R _ 9 9 S _ D A T E _ A D D _ S U B _ D U R A T O N A d d S u b t r a c m o n t h s ( M ) d a y s ( D ) y e a r s ( Y ) t o g v e n d a e t o g e t t h e f u u r e d a t e H R _ 9 9 S _ D A T E _ M N U S _ T M E _ U N T S u b t r a c t m o n t h s ( M ) / d a y s ( D ) / y e a r s ( Y ) t o g v e n d a t e o g e t h e f u t u r e d a e H R _ 9 9 S _ D A T E _ P L U S _ T M E _ U N I T A d d m o n t h s ( M ) / d a y s ( D ) y e a r s ( Y ) t o g v e n d a e t o g e t t h e f u u r e d a t e H R _ 9 9 S _ N T E R V A L _ B E T W E E N _ D A T E S G v e s h e d f f e r e n c e b e w e e n t h e d a t e s n d a y s , w e e k s y e a r s H R _ 9 9 S _ M O N T H S _ B E T W E E N _ D A T E S * R e t u r n s m o n t h s b e w e e n t w o d a e s B o t h d a t e s a r e n c u d e d i n t h e * c o m p u t a t o n A n n d v d u a p r o r a a s m a d e f o r e a c h m o n h * M e a n n g o f p a r a m e t e r p _ c o m p : * B a c c u m u a e a c o m p l e e m o n t h s a n d i n c o m p e t e f i r s t m o n t h * E ' a c c u m u a t e a c o m p e t e m o n h s a n d n / c o m p e t e a s m o n h * a c c u m u a e a l m o n t h s ( n c o m p l e e a n d c o m p e t e ) * X a c c u m u a e o n y c o m p e t e m o n h s H R _ C A L C _ Y E A R _ M O N T H _ D A Y G v e s h e d f f e r e n c e b e w e e n t h e d a t e s n d a y s , w e e k s y e a r s H R _ E _ N U M _ O F _ D A Y S _ O F _ M O N T H N u m b e r o f d a y s n t h e g v e n m o n h H R _ H C P _ A D D _ M O N T H _ T O _ D A T E A d d m o n t h s o d a t e

Function Module Related

Embed Size (px)

Citation preview

  • Getting Started Newsletters Store

    Search the Community

    Welcome, Guest Login Register

    Products Services & Support About SCN Downloads

    Industries Training & Education Partnership Developer Center

    Lines of Business University Alliances Events & Webinars Innovation

    Added by Avinash Kodarapu, last edited by IFF on May 02, 2009

    ABAP Development / ABAP Development and Programming

    Function Module related on Date calculations

    Function Modules Description

    /SAPNEA/J_SC_CONVERT_DATE Covert Date in Japanese Format

    /SDF/CMO_DATETIME_DIFFERENCE Calculates dif ference betw een tw o dates/timestamps.

    ADD_TIME_TO_DATE Add time to date

    BKK_ADD_MONTH_TO_DATE Add months to date

    BKK_ADD_WORKINGDAY

    BWSO_DATE_GET_FIRST_WEEKDAY Gives the First date of the w eek for the given date

    CACS_DATE_GET_TIMESTAMP Concatenates the date and time format 11-12-2008 10:11:11

    CACS_DATE_GET_YEAR_MONTH Gives the Year and month for the given date

    CACS_TIMESTAMP_GET_DATE Get date and time from Timestamp

    CONVERT_TIME_TERMS

    DATE_CHECK_WORKINGDAY Check the day is w orking day or not for given date & calendar id

    DATE_CHECK_WORKINGDAY_MULTIPLE Check the day is w orking day or not for given date in muliple calendar id

    DATE_COMPUTE_DAY Gives the day number in the w eek (EX 1-Mon,2-TUE etc)

    DATE_CONVERT_TO_WORKINGDAY

    DATE_TO_DAY Gives the day of the date(Ex Monday, Tuesday etc)

    DATE_TO_DAY Get the day of the date (Ex Mon.Tue etc)

    F4_DATE FM for F4 help for Date

    FIMA_DAYS_AND_MONTHS_AND_YEARS

    FIMA_DECIMAL_MONTHS_AND_YEARS Gives the difference betw een the dates in decimal foemat of number of month & years

    GET_WEEK_INFO_BASED_ON_DATE Get the w eek Number, Sunday date & Monday date for the given date

    HR_99S_DATE_ADD_SUB_DURATION Add/Subtract months(M)/days(D)/years(Y) to given date to get the future date

    HR_99S_DATE_MINUS_TIME_UNIT Subtract months(M)/days(D)/years(Y) to given date to get the future date

    HR_99S_DATE_PLUS_TIME_UNIT Add months(M)/days(D)/years(Y) to given date to get the future date

    HR_99S_INTERVAL_BETWEEN_DATES Gives the difference betw een the dates in days, w eeks, years

    HR_99S_MONTHS_BETWEEN_DATES * Returns months betw een tw o dates. Both dates are included in the

    * computation. An individual prorata is made for each month

    * Meaning of parameter p_compl:

    * 'B' accumulate all complete months and in/complete f irst month

    * 'E' accumulate all complete months and in/complete last month

    * ' ' accumulate all months (incomplete and complete)

    * 'X' accumulate only complete months

    HR_CALC_YEAR_MONTH_DAY Gives the difference betw een the dates in days, w eeks, years

    HR_E_NUM_OF_DAYS_OF_MONTH Number of days in the given month

    HR_HCP_ADD_MONTH_TO_DATE Add months to date

  • HR_IN_GET_DATE_COMPONENTS Splits rge given date in DAY, MONTH, YEAR, Month Small TEXT & Month Long TEXT

    HR_MONTHS_BETWEEN_TWO_DATES Gives months btew een the tw o dates

    HR_SGPBS_YRS_MTHS_DAYS Gives the difference betw een dates in Day,Months, years 7 calendar Days

    HRAR_SUBTRACT_MONTH_TO_DATE Subtract's one month from the date

    IDWT_READ_MONTH_TEXT Read the month Text

    LAST_WEEK Get the Last w eek Number, Sunday date & Monday date for the given Year and Week number

    LOOK_FOR_TIME_TABLE

    MONTH_NAMES_GET Gives the list of 12 months text in the given language

    MONTH_PLUS_DETERMINE Add months to date

    MONTHS_BETWEEN_TWO_DATES Gives months btew een the tw o dates

    MONTHS_BETWEEN_TWO_DATES_NEW

    NEXT_WEEK Get the Next w eek Number, Sunday date & Monday date for the given Year and Week number

    NUMBER_OF_DAYS_PER_MONTH_GET Gives you the number of days per month considering the Year

    OIL_LAST_DAY_OF_MONTH Gives the last day of the month

    OIL_LAST_DAY_OF_PREVIOUS_MONTH Gives the last day of the prevous month

    OIL_MONTH_GET_FIRST_LAST Gives the month f irst day date & last day date

    RE_ADD_MONTH_TO_DATE Add months to date

    RH_GET_DATE_DAYNAME Gives the day number in the w eek and day text

    RH_PM_CONVERT_DATE_TO_MONTH

    RH_PM_CONVERT_DATE_TO_MONTH Gives the difference betw een the dates in month

    RH_PM_CONVERT_DATE_TO_YEAR

    RP_CALC_DATE_IN_INTERVAL To calculate the new date by adding/Sub days, months & Year

    SG_PS_GET_LAST_DAY_OF_MONTH Last day of the month

    TIME_CONVERSION

    TM_DATE_CHECK_WORKINGDAY

    WDKAL_DATE_ADD_FKDAYS

    DATE_CHECK_PLAUSIBILITY

    DATE_IN_FUTURE Calculate Future Dates

    DURATION_DETERMINE Calendar: Determine duration betw een tw

    DELTA_TIME_DAY_HOUR Difference Betw een Date & Time

    CALCULATE_DATE Year entry: 2-charact. to

    HR_SEN_CRULE_0100_DATE Calculation of a Date (1 Year = 12 Months, 1 Month = 30 Days)

    DATE_2D_TO_4D_CONVERSION

    No labels

    4 Comments

    J@Y

    Good one Avinash.

    Guest

    many typo's in description. example: Gives months btew een the tw o dates

  • Guest

    Hi Avinash,

    Some of the function modules listed above behave oddly...and give ouput w hich doesnot have any reason...

    LIke:

    RP_CALC_DATE_IN_INTERVAL :

    Date: 28.01.2011

    Days: 10

    Months: 1

    SIGNUM : +

    And the output : CALC_DATE : 07.03.2011

    w hereas:

    HR_99S_DATE_ADD_SUB_DURATION :

    Date: 28.01.2011

    IM_OPERATOR : +

    IM_DURATION: 0 1 10

    And the output : CALC_DATE : 10.03.2011

    so the difference in date calcutions differ .

    Can I know the reason.

    I need the future date by giving the source date, number of months,days and years to be added.

    Need to know the exact function module for this scenario.

    Please help me out.

    Regards

    harish

    Guest

    Hi Avinash,

    Some of the function modules listed above behave oddly...and give ouput w hich doesnot have any reason...

    LIke:

    RP_CALC_DATE_IN_INTERVAL :

    Date: 28.01.2011

    Days: 10

    Months: 1

    SIGNUM : +

    And the output : CALC_DATE : 07.03.2011

    w hereas:

    HR_99S_DATE_ADD_SUB_DURATION :

    Date: 28.01.2011

    IM_OPERATOR : +

    IM_DURATION: 0 1 10

    And the output : CALC_DATE : 10.03.2011

    so the difference in date calcutions differ .

    Can I know the reason.

    I need the future date by giving the source date, number of months,days and years to be added.

    Need to know the exact function module for this scenario.

    Please help me out.

    Regards

    harish

    Follow SCNContact Us SAP Help Portal

    Privacy Terms of Use Legal Disclosure Copyright