cancel
Showing results for 
Search instead for 
Did you mean: 

Date Subtraction/Addition based on Factory Calendar in SRM

0 Kudos

Hi experts,

I am new to ABAP.

My requirement is :

I need to calculate sy-datum - somedays = date based on factory calendar.

But there is a function module BKK_ADD_WORKINGDAY but it is in ECC and it is not RFC enabled.

Is there any alternate method or logic to this to compute this in SRM?

Regards,

Sushanth

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

I found the solution :

CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'
     EXPORTING
       correct_option               = '+'
       date                         = lv_date
       factory_calendar_id          = lv_factory_calendar_id
     IMPORTING
       factorydate                  = lv_factorydate

ADD lv_num_days TO lv_factorydate.



CALL FUNCTION 'FACTORYDATE_CONVERT_TO_DATE'
     EXPORTING
       factorydate                  = lv_factorydate
       factory_calendar_id          = lv_factory_calendar_id
     IMPORTING
       date                         = lv_new_date



Found the solution:

ABAP – Add working days to a date using Factory Calendar | Spider's web

Answers (1)

Answers (1)

vinita_kasliwal
Active Contributor
0 Kudos

Hi Sushanth

This is a known issue in the SRM system you have to use the factory calendar in ECC and use this in BADI in SRM BBP_DOC_CHECK_BADI

Refer note 1467113 - Factory Calendar is not available in SRM

and in this note there is a sample code also on how you can use this in SRM system

Let me know if this helps

Regards

Vinita