cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate Business day

Former Member
0 Kudos

Hi,

Iam working on a logic to calculate the posting date in XI. I have used graphical mapping in the scenario.

The logic is to claculate the 3rd business date of the month. You need to look at the calendar and exclude Saturdays, Sundays and Holidays.

For example if we take February 2008 the 3rd business day is 5th Feb 08 as 02/Feb and 03/Feb are saturday and sundays.

If monday(04/Feb) was a holiday then the 3rd business day will be 6th Feb.

Can you give this logic in XI graphical mapping.

Best Regards

Suresh

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks. Issue Resolved.

nisarkhan_n
Active Contributor
0 Kudos

Which approach you followed to fix?

Former Member
0 Kudos

Hi suresh,

U can try date functions in Message mappint by using

Current date, Datetrans,DateBefore,Date after,,,

Plz award points

thnq

Former Member
0 Kudos

Hi Ram,

Thanks for the immediate reply. The XI scenario is File to IDOC. But the scenario is already developed using graphical mapping and I just need to change the posting date logic in it. I believe the holidays are maintained in SAP tables. Is there a way to get the holidays list from SAP using User defined functions in XI.

Best Regards

Suresh

Former Member
0 Kudos

Hi Suresh,

This is possible, you have to do RFC Loookup functionality in SAP Xi for it. It is bad way. I suggest you to do the coding for this in IDOC Function module.

Former Member
0 Kudos

Hi Suresh,

Through java coding, U can exclude Saturdays and sundays, But not possible to exclude hoilday as this need to be maintained somewhere.

The Best option is if you are using SAP as your target then code it in abap on SAP side before posting it.