12-01-2005 10:22 PM
Hi,
i need to update a db table from my internal table, for which im using ''UPDATE db_tab FROM TABLE itab''.its working fine but i need to wait.... till the update gets done. is there any way to submit that as SEPERATE PROCESS and to continue with my program.
Your help would be appreciated.
Thanks,
kranthi.
12-01-2005 10:30 PM
Hi
Does this update take so long that you need to move on with your program.
If so , you can put your update in a FM and use this variant of call function.
CALL FUNCTION func STARTING NEW TASK taskname
Regards
Kalpana
12-01-2005 10:31 PM
You can call function
call function 'CIF_GEN_SLEEP'
exporting
iv_seconds = g_seconds.
to introduce some wait time. Here wait tile needs to be passed using G_SECONDS in terms of seconds.
Or you can use Commit work and wait after update. Which will wait till the commit takes place.
12-01-2005 10:33 PM
Hi, i appreciate your answers.
is there any other way to do the update as seperate background process, b'cos i can not place that code in an FM.
Thanks,
Kranthi.
12-01-2005 11:59 PM
Hi Kranthi,
out of imnterest what was wrong with Kalpana's suggestion to do the update in an FM? You can create the FM yourself and simply call that as Kalpana said. It would be easier than writing a program, scheduling that dependent on an event and raising the event.
12-01-2005 10:44 PM
Another option could be raising an event that will trigger a job which in turn calls a program that will do the update for you.
You can raise event by FM BP_EVENT_RAISE in your main program. Define an event id in SM62. Define a job that starts at this event and assign the program name in the steps.
Also you can use FM GET_JOB_RUNTIME_INFO in the update program to valiate the eventid.
Internal table that you want to use can be exported /imported using cluster id.
This job should be a periodic one.
Regards
Kalpana
Message was edited by: Kalpana Tyagi
Message was edited by: Kalpana Tyagi