Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Decreament working dates

Former Member
0 Likes
572

Hi gurus.

I want to calculate the current date - few working days days backwards.

The problem is that FKK_ADD_WORKINGDAY and BKK_ADD_WORKINGDAY takes negative numbers at input field I_DAYS as a zero.

Can sombodey help...??

Thanks,

Rebeka

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
429

i think you are checking in the SE37 directly executing, check it inside program. it is working fine..here is the code sample.

REPORT  ZTEST_WORKING_DAY.
data: e_date type sy-datum,
      i_days type i,
      e_return type sy-subrc.
i_days = 1 * -1.

CALL FUNCTION 'FKK_ADD_WORKINGDAY'
  EXPORTING
    i_date            = sy-datum
    i_days            = i_days
*   I_CALENDAR1       = I_CALENDAR1
*   I_CALENDAR2       = I_CALENDAR2
 IMPORTING
   E_DATE            = E_DATE
   E_RETURN          = E_RETURN
          .
BREAK-POINT.

1 REPLY 1
Read only

Former Member
0 Likes
430

i think you are checking in the SE37 directly executing, check it inside program. it is working fine..here is the code sample.

REPORT  ZTEST_WORKING_DAY.
data: e_date type sy-datum,
      i_days type i,
      e_return type sy-subrc.
i_days = 1 * -1.

CALL FUNCTION 'FKK_ADD_WORKINGDAY'
  EXPORTING
    i_date            = sy-datum
    i_days            = i_days
*   I_CALENDAR1       = I_CALENDAR1
*   I_CALENDAR2       = I_CALENDAR2
 IMPORTING
   E_DATE            = E_DATE
   E_RETURN          = E_RETURN
          .
BREAK-POINT.