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: 

Programatically schedule released background jobs

Kartik2
Contributor
0 Kudos

Dear all,

Is there any function module, which can change the status of a released status job to scheduled status ?

Thanks and regards,

Kartik

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi karthik,

please try with this function module.

TMS_BCM_JOB_STATE_CHANGE

CALL FUNCTION 'TMS_BCM_JOB_STATE_CHANGE'
        EXPORTING
             iv_domname   = iv_domname
             iv_sysname    = iv_sysname
             iv_client          = is_tmsjob-authckman
             iv_operation    = 'DERELEASE'
             iv_jobname     = is_tmsjob-jobname
             iv_jobcount     = is_tmsjob-jobcount
*           IV_TARGETSRV =
*           IS_JOBCTL    =
        IMPORTING
             es_exception = ls_exception
        EXCEPTIONS
             alert        = 1.

regards,

Ramya R

2 REPLIES 2

Former Member
0 Kudos

Hi Kartik,

You can use FM BP_JOB_MODIFY. This is how SM37 does it.

Also look at subroutine CHANGE_JOB_STATUS_SM37B in include LBTCHFXX. This will do the necessary checks and populate the FM as SM37 does.

Regards,

Shravan

Former Member
0 Kudos

Hi karthik,

please try with this function module.

TMS_BCM_JOB_STATE_CHANGE

CALL FUNCTION 'TMS_BCM_JOB_STATE_CHANGE'
        EXPORTING
             iv_domname   = iv_domname
             iv_sysname    = iv_sysname
             iv_client          = is_tmsjob-authckman
             iv_operation    = 'DERELEASE'
             iv_jobname     = is_tmsjob-jobname
             iv_jobcount     = is_tmsjob-jobcount
*           IV_TARGETSRV =
*           IS_JOBCTL    =
        IMPORTING
             es_exception = ls_exception
        EXCEPTIONS
             alert        = 1.

regards,

Ramya R