Calculate years, months, days & calender days between 2 given dates

原创 2007年10月06日 16:47:00

I first use this FM in a HR ABAP program. For checking specifiy  qualification to an employee.The result of this FM is present as year , month and day. Below is the sample code

 

  METHOD check_qualifications.
    DATA: l_v_beg_da     TYPE D,
          l_v_end_da     TYPE D.
    DATA: l_v_no_day     TYPE I,
          l_v_no_month   TYPE I,
          l_v_no_year    TYPE I,
          l_v_no_cal_day TYPE I.

    l_v_beg_da 
= l_v_dat01.
    l_v_end_da 
= l_v_endda.
    CALL FUNCTION 
'HR_SGPBS_YRS_MTHS_DAYS'
      EXPORTING
        BEG_DA        
= l_v_beg_da
        END_DA        
= l_v_end_da
      IMPORTING
        NO_DAY        
= l_v_no_day
        NO_MONTH      
= l_v_no_month
        NO_YEAR       
= l_v_no_year
        NO_CAL_DAY    
= l_v_no_cal_day
      EXCEPTIONS
        DATEINT_ERROR 
= 1
        OTHERS        
= 2.
    IF l_v_no_month GE 
3 OR l_v_no_year GE 1.
      l_v_subrc 
= 0.
    ELSE.
      l_v_subrc 
= 1.
    ENDIF.
  ENDMETHOD.                    
"check_qualifications
版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

How to Run Cron Every 5 Minutes, Seconds, Hours, Days, Months

How to Run Cron Every 5 Minutes, Seconds, Hours, Days, MonthsQuestion: How do I execute certain shel...

Learn Emacs in 21 Days: day 2 学习笔记

配置emacs 优化emacs 改进package 系统 js 编程支持 其它

Conclusion of these days

Well I think the details about how I welcomed the Spain Professor will not be talked here. He arrive...

寒假10days总结

其实本来也有这个想法的,然而总觉得这种东西还是一起写好一些QAQ所以就把十天一起来做一个总结叭☆关于1-3days—–Gromah!!!首先就来一场考试QAQA题和B题其实都是简单的暴搜,然而却发现自...

vc·net21days 源代码 2

  • 2009-07-29 16:14
  • 8.81MB
  • 下载
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)