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

Programatically schedule released background jobs

Kartik2
Contributor
0 Likes
1,567

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
Read only

Former Member
0 Likes
669

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
Read only

Former Member
0 Likes
669

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

Read only

Former Member
0 Likes
670

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