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

Problem creating job steps variants

Former Member
0 Likes
337

Hi Gurus!

I have a problem with job steps creation.

In my program I need to copy the exist job with some condition accords to job steps variants.

But when I create the new job and it steps and variants in SM37, I can not see the variants names, only number.

For example in template that I am copying it looks like that:

No. Program name/command Prog. type Spool list Parameters User Lang.

1 RMCVNEUA ABAP BW_TEMPLATE aaa EN

But in job that I create it is:

Program name/command Prog. type Spool list Parameters User Lang.

RMCVNEUA ABAP &0000000000271 ddd EN

How can I create steps with variant names instead of numbers/indexes? BW_TEMPLATE instead of &0000000000271.

My code:


CALL FUNCTION 'JOB_OPEN'
    EXPORTING
      jobname          = lv_jobname
      sdlstrtdt        = lv_date
      sdlstrttm        = lv_time
    IMPORTING
      jobcount         = lv_jobcount
    EXCEPTIONS
      cant_create_job  = 1
      invalid_job_data = 2
      jobname_missing  = 3
      OTHERS           = 4.

.
.
.
SUBMIT (ps_tbtcp-progname) VIA JOB pv_jobname NUMBER pv_jobcount
                                 USING SELECTION-SET ls_cat-variant
                                 AND RETURN.
.
.
.
CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
      jobcount                          = lv_jobcount
      jobname                           = lv_jobname
     direct_start                      = lv_imm_run
   EXCEPTIONS
     cant_start_immediate              = 1
     invalid_startdate                 = 2
     jobname_missing                   = 3
     job_close_failed                  = 4
     job_nosteps                       = 5
     job_notex                         = 6
     lock_failed                       = 7
     invalid_target                    = 8
     OTHERS                            = 9

Edited by: Dani_K on Oct 27, 2010 4:35 PM

Hi Gurus!

I have a problem with job steps creation.

In my program I need to copy the exist job with some condition accords to job steps variants.

But when I create the new job and it steps and variants in SM37, I can not see the variants names, only number.

For example in template that I am copying it looks like that:

No. Program name/command Prog. type Spool list Parameters User Lang.

1 RMCVNEUA ABAP BW_TEMPLATE aaa EN

But in job that I create it is:

Program name/command Prog. type Spool list Parameters User Lang.

RMCVNEUA ABAP &0000000000271 ddd EN

How can I create steps with variant names instead of numbers/indexes? BW_TEMPLATE instead of &0000000000271.

My code:


CALL FUNCTION 'JOB_OPEN'
    EXPORTING
      jobname          = lv_jobname
      sdlstrtdt        = lv_date
      sdlstrttm        = lv_time
    IMPORTING
      jobcount         = lv_jobcount
    EXCEPTIONS
      cant_create_job  = 1
      invalid_job_data = 2
      jobname_missing  = 3
      OTHERS           = 4.

.
.
.
SUBMIT (ps_tbtcp-progname) VIA JOB pv_jobname NUMBER pv_jobcount
                                 USING SELECTION-SET ls_cat-variant
                                 AND RETURN.
.
.
.
CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
      jobcount                          = lv_jobcount
      jobname                           = lv_jobname
     direct_start                      = lv_imm_run
   EXCEPTIONS
     cant_start_immediate              = 1
     invalid_startdate                 = 2
     jobname_missing                   = 3
     job_close_failed                  = 4
     job_nosteps                       = 5
     job_notex                         = 6
     lock_failed                       = 7
     invalid_target                    = 8
     OTHERS                            = 9

Edited by: Dani_K on Oct 27, 2010 4:35 PM

1 REPLY 1
Read only

Former Member
0 Likes
286

No any suggestions?