`

Calculate the days, months and years between 2 dates.

    博客分类:
  • ABAP
 
阅读更多
FORM compute_2date_diff.
  DATA: lv_date1 LIKE sy-datum,
        lv_date2 LIKE sy-datum,
        lv_month TYPE pea_scrmm,
        lv_days  TYPE pea_scrdd.
*lv_date1 must be greater than lv_date2
  lv_date1 = '20120201'.
  lv_date2 = '20120101'.
  CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
    EXPORTING
      date1                         = lv_date1
      date2                         = lv_date2
     OUTPUT_FORMAT                 = '05'
   IMPORTING
*     YEARS                         =
     months                        = lv_month
     days                          = lv_days
   EXCEPTIONS
     invalid_dates_specified       = 1
     OTHERS                        = 2.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

ENDFORM.                    "compute_2date_diff
分享到:
评论

相关推荐

    DateCount.zip_Datecount_The Count_calender _carrym89_resultcqo

    this programm, count the days between two dates. Calculate in all situations.

    Scrum and Xp from the Trenches, 2nd Edition.pdf

    Teams need to know Scrum basics. How do you create and estimate a product backlog? How do you turn it into...Without dependable release dates, the company could fail and investors could lose their money!

    poj 1004 Financial Management

    Help Larry by writing a program to take his closing balance from each of the past twelve months and calculate his average account balance. Input The input will be twelve lines. Each line will ...

    This will calculate your midterm and final grade average.

    This will calculate your midterm and final grade average.

    Guide to Scientific Computing in C++

    Example: A Function to Calculate the Scalar Product of Two Vectors . . . . . . . . . . . . . . . . . . . . . . . Reference Variables . . . . . . . . . . . . . . . . . . . . . . . Default Values for ...

    ros by example for indigo volume 2

    3.8.11 Passing user data between states and state machines............................................44 3.8.12 Subtasks and hierarchical state machines...................................................

    计算机网络第六版答案

    Acknowledgments: Over the years, several students and colleagues have helped us prepare this solutions manual. Special thanks goes to HongGang Zhang, Rakesh Kumar, Prithula Dhungel, and Vijay ...

    Enviro - Sky and Weather.7z

    You can set the start and end days of each season. Enviro also supports temperature simulation, based on season, time of day and current weather. Clouds: Enviro new raymarching cloud system is ...

    systester.rar

    System Stability Tester began as a system stressing and benchmarking tool for overclockers, by the Greek pctechnology and overclockers community, the first months of 2005. Since its first release 0.1 ...

    Beginning Neo4j(Apress,2016)

    Using this book, you'll get everything up and running, and then learn how to use Neo4j to build up recommendations, relationships, and calculate the shortest route between two locations. With example ...

    Phased_Array_Impedance_Calculation.rar_antennas matlab_between

    Calculate the impedance between two antennas.

    SRIM介绍SRIM is a group of programs which calculate the stopping and range of ions into matter

    SRIM is a group of programs which calculate the stopping and range of ions into matter。

    雷达技术知识

    .2 ~ 04 02 00 000 __d=2° d=10 ° --d=200 --d=300 d=40o d=50o I I 2000 4000 60.00 sensing angle, degree I 8000 Figure 1. Return Factor vs. LiDAR Scan Angle. Figure shows relationship between water ...

    Model for seeking sweet spot

    By set up its dynamic model and energy formula, finding the sweet spot reduced to finding the spot which minimize the energy transferring between the ball and the bat. Numerical methods are given to ...

    The joint density of the maximum and its location

    between the maximum and present values of a stock or other security along with the time of occurrence of the maximum. At least for the usual model using a Wiener process with drift for the log of the ...

    Beginning.Neo4j.1484212

    Using this book, you'll get everything up and running, and then learn how to use Neo4j to build up recommendations, relationships, and calculate the shortest route between two locations. With example ...

    二级减速器课程设计说明书reducer design specification.doc

    According to the selected fullload speed of the motor nm and the drive shaft speed of the motor nw,we can calculate the total transmission ratio of the transmission device ia: (2)Allocate ...

    View Factor

    The purpose of creating this model is to calculate view factors between complex geometries. The view factor matrices of an enclosed space and of a geometry with openings on its surfaces are presented...

    PHP and MySQL by Example.pdf

    calculate and produce the error message, the other to display it in a bold red font. Keeping the design and program logic separated may be the goal, but it is often impossible with the complexities ...

    calculate_min_distance.zip_Euclid_Euclidean distance_Min_pixel_最

    计算2组象素的最小距离 minimum euclidean distance calculation between 2 groups pixels and returns the distance and pixel coordinations文件内容:test_min_distance5a.tif, CONTENTS.M, euclidean_distance.m,...

Global site tag (gtag.js) - Google Analytics