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

Terminate the job for a particular Day

Former Member
0 Kudos
496

Hi ,

I want logic to Terminate my ABAP- Program if the day is Sunday.

Please suggest possible ways to do this in Program code.

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
470

Hi Gaurav,

You can use the FM DAY_IN_WEEK

It will return 7 for sunday.

Regards,

Amit Mittal.

4 REPLIES 4
Read only

Former Member
0 Kudos
471

Hi Gaurav,

You can use the FM DAY_IN_WEEK

It will return 7 for sunday.

Regards,

Amit Mittal.

Read only

Former Member
0 Kudos
470

Hi Gaurav,

Welcome to SDN, Please search in SDN before poasting.. (There are serevral similar thread available for the same)

For your ref:

[I above link] ]In your case if Wtonr = 7 (sunday) exit the program

Nag

Read only

viquar_iqbal
Active Contributor
0 Kudos
470

Hi Gaurav,

go to sm36 to schedule the job. enter job name and start the wizard. the wizard will ask you at a point as according to which factory calander do you want to excute the job. select appropriate one which doesnt list sunday .

Hope this resolves the issue.

Thanks

Viquar Iqbal

Read only

Former Member
0 Kudos
470

Hi,

This you can do while creating a variant.You can create variant such that the job should not execute on a particular day.

Hope it helps.

Regards

Basav