Skip to Content
author's profile photo Former Member
Former Member

Schedule Batch Job based on User Profile

Hi All,

I wanted to know if we can schedule a batchjob based on user profile. Assuming the my user profile is JAPAN(Japan Timezone) and my System timezone is GMT - When I try to create a batch job in the start condition the date and time - comes as User Profile Timezone - However when the batch job is created the system will execute at system timezone(GMT).

for example : I create a batch job to execute at Japan Timezone 08/18/2011 at 01:00:00(AM). the System however executes it at GMT 08/18/2011 at 01:00:00 - Corresponding Japan time when the batch is executed is 08/18/2011 - 09:00:00 AM.

So I just wanted to check if there can be any kind of conversion that can be done - Such that the user if schedules at user profile time zone in the background system creates a batch job at corresponding system timezone.

in the above example if user schedules at 08/18/2011 at 01:00:00(AM) Japan Time Zone - batch job should execute at 08/17/2011at 16:00:00 PM.

Do let me know if there are any suggestion - to handle the timezone conversions.

Thank You,

Regards,

Swaroop

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Aug 17, 2011 at 06:30 PM

    Hi Swaroop,

    as with the vast majority of SAP applications, the date/time is displayed (unfortunately) based on the system's time zone. I don't think SAP has planned to allow users to view dates and times based on their own time zones, because it could give wrong information if it was automatically applied to all date/time fields. For example, the birth date must remain unchanged, holiday dates, working start and end hours, ... (in fact I think that ideally SAP should have linked a "time type" to date/time fields, as it did for currency amount/code and quantities/units)

    So, you'll probably have to deal with that.

    Note: one funny thing, when you schedule a program with a program variant with date field calculated automatically (i.e. "today", or "today +/- number of days), is that it is initialized with the date of the logged in user's time zone. We must be very careful with that and schedule with a user with same time zone as system.

    Sandra

    Edited by: Sandra Rossi, 2 minutes later

    PS: you may also create your own program to schedule jobs (use the job APIs), and you'll define input fields as being local date/time and convert them using CONVERT DATE ... TIME ...

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.