on 02-01-2010 4:15 PM
Hi Gurus,
I am trying to setup my transports to import on a different time interval other than hourly or daily. I have tried to creat an hourly import in STMS and then copy the job in SM37 to schedule it to run at different times but then it only runs once and than fails from that point on. This is documented in oss note 398589 but I can not find any procedure that tells me how I can schedule more than one import job or how to adjust the import times.
What I am trying to do is not import from 8am -5pm into our QA system but after that, hourly imports or scheduled times for imports would work fine.
Any suggestions?
Lee
I would suggest you create the automated import job as an event control job.
You then use sapevt to trigger event at whatever time you need and the job will run at that time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Imtiaz,
Thanks for your reply. I was looking at that but Im not familiar with how to set that up. Is there any documentation on this that you know of.
If I select After Event
then where it says Event I put "SAPEVT" (is that right).
Then what do I put in Parameters?
I selected the execute import periodically but when I try to save it I get an error.
Can you give me some additional details?
Lee
Hello,
In the field Event you have to put a unique name for your event.
This unique event name must exist in transaction tcode SM62, I suggest you create a new one, example Z_START_IMP
Parameters is optional, you can use 1 unique Event name with different parameters to trigger different jobs (all based on the same Event name but different parameters).
You also have to flag the checkbox "Execute Import Periodically", otherwise the job will only be executed once after the first trigger of your event.
You can use function module BP_EVENT_RAISE to raise the event and test your result.
You can write a small ABAP program around BP_EVENT_RAISE, schedule this program periodically, every time it will raise the event and start your import job.
Success.
Wim
Thank You. I got it working based on the input you both provided.
Here's what I did:
First, I Made the event in SM64 called STMS_KICKOFF
I checked this help page to show me how to trigger an event.
http://help.sap.com/saphelp_nw70/helpdata/en/fa/096f33543b11d1898e0000e8322d00/frameset.htm
In SE38, I copied the code in the above help page ...
&----
*& Report ZSTMS_EVENT_RAISE
*&
&----
*&
*&
&----
REPORT ZSTMS_EVENT_RAISE.
DATA:
p_eventid TYPE btceventid,
p_eventparm TYPE btcevtparm,
p_server TYPE btcserver.
Obligatory parameter: EventID.
EventID should be an existing event already defined in transaction
SM64 or using CREATE method of class CL_BATCH_EVENT:
p_eventid = 'STMS_KICKOFF'.
Optional parameters: event parameter and target server.
p_eventparm = 'Event parameter'.
p_server = ''.
CALL METHOD cl_batch_event=>raise
EXPORTING
i_eventparm = p_eventparm
i_server = p_server
i_eventid = p_eventid
EXCEPTIONS
excpt_raise_failed = 1
excpt_server_accepts_no_events = 2
excpt_raise_forbidden = 3
excpt_unknown_event = 4
excpt_no_authority = 5
OTHERS = 6.
CASE sy-subrc.
WHEN 0.
EXIT.
WHEN 1 OR 2 OR 3.
Raise failed.
WHEN 4.
Event does not exist.
WHEN OTHERS.
u2022 Raised failed due to unknown reason.
I then went into STMS and selected the system and hit the big truck to schedule the jobs.
I selected AFTER EVENT
And under event name I put the event I created in SM64 (STMS_KICKOFF)
I selected execute import Periodically and saved it.
Then I went into SM36 and Created a job called STMS_JOB_1700 using the step ZSTMS_EVENT_RAISE to run daily at 1700. I copied the job to run at the times I wanted. It ran and kicked off the import job which ran properly too.
It's working great. Thanks.
Lee
User | Count |
---|---|
78 | |
10 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.