Application Development 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: 

Due Date

Former Member
0 Kudos
108

Hi

all

Can any one help me to get the due date??

W_Due_DAte = posting date + days

1-how i will determine that whether W_DUE_DATE is a non-working or a working day.

2- if it is non working day then how i will get next working Day( Not previous)..

Thnanks

Saurabh

2 REPLIES 2

Former Member
0 Kudos
54

After that calculation pass W_Due_DAte to the below function module.

this function module will give you either today or tomorrow(as we place '+' for CORRECT_OPTION), based on the factory calendor id.

v_FABKL can be 'US' etc.

CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'

EXPORTING

CORRECT_OPTION = '+'

DATE = W_Due_DAte

FACTORY_CALENDAR_ID = V_FABKL

IMPORTING

DATE = V_DATE

EXCEPTIONS

CALENDAR_BUFFER_NOT_LOADABLE = 1

CORRECT_OPTION_INVALID = 2

DATE_AFTER_RANGE = 3

DATE_BEFORE_RANGE = 4

DATE_INVALID = 5

FACTORY_CALENDAR_NOT_FOUND = 6

OTHERS = 7.

now V_DATE will have either today if its a working day or tomorrow if today is holiday.

regards

srikanth

Message was edited by: Srikanth Kidambi

laxmanakumar_appana
Active Contributor
0 Kudos
54

Hi,

Use FM : 'DATE_CHECK_WORKINGDAY' to check the given date is working day or not. if it is holiday then add + 1 to date and check once again till you find next working day.

check this link :

Regards

Appana