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

background job problem-

Former Member
0 Likes
640

Hi,

The situation is like this - I have some values in table control and i do the background processing on selected records then since the selected records are processed in bakground job so those records should no more appear in the screen now ....this was happening when i tried without background job..so for this background i put 'refresh' which was able to not let the processed record appear in the screen. but i dont want the refresh button......

how to let the table control get refershed after the background job is over so that the processed record will not appear after the job completion.

thx,

m

Moderator message: please use more descriptive subject lines from now on.

Edited by: Thomas Zloch on Jun 9, 2010 5:00 PM

6 REPLIES 6
Read only

Former Member
0 Likes
569

At the time you submit the background process, you could delete the data row(s) and refresh your display. Or, show a status indicating that a job has been submitted. Sounds like your background job is running a while...

I have something similar in SALV. When the users fires the background job, I put out a message, change the status to in progress, and it stays that way, regardless how many times the user presses refresh, until my screen close and new data retrieval (from refresh button) for the display finds the data updated.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
569

in PBO build your new internal table values.

Check whether any change has happened to any of the records existing in the internal table.

@breakpoint - i agree with you, but what if the background process fails for the particular record ?

Edited by: Keshav.T on Jun 10, 2010 1:13 AM

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
569

Can't you replace the table control with an ALV grid? I think this would be possible there... I recall at least several posts regarding the refresh, including automated (e.g. timed) one.

Read only

Former Member
0 Likes
569

i did some change befor the submit prog. to achieve this

Read only

Former Member
0 Likes
569

Hi,

in this case u can use auto refresh option...

Thanks & Regards,

Rahul Kanth Reddy

Read only

Former Member
0 Likes
569

Hi,

try this: after you submit a job call aRFC (asynchronous RFC) function module. And in this FM check the job status from TBTCO table and wait for the job to complete. Once job completes exit the FM. SAP will call the subroutine 'REFRESH' once FM completes and in the subroutine you write logic to refresh the screen.

START-OF-SELECTION.

submit job.

CALL FUNCTION 'ZKUM_TEST' DESTINATION 'NONE' STARTING NEW TASK 'TEST'

PERFORMING REFRESH ON END OF TASK

EXPORTING JOB_NAME = 'TEST'.

AT USER-COMMAND.

sy-lsind = 0.

IF SY-UCOM EQ ''.

  • write logic to refresh the

ENDIF.

FORM REFRESH USING P_C type clike.

set USER-COMMAND 'REFRESH'.

ENDFORM.

-