Application Development 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: 

updating db table from itab in a seperate process

Former Member
0 Kudos

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.

5 REPLIES 5

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

0 Kudos

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.

Former Member
0 Kudos

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