Skip to Content
avatar image
Former Member

background job is cancelled dut o variant not exist

Dear friends,

In my program I have created a variant using FM 'RS_VARIANT_CREATE', and after the creation of variant , i'm submitting the job immediately, but the job get canceled with error message, specified variant is not defined.

when i checked the VARID table the variant gets updated, the time differnce is approximately 8 sec for both varaint creation and job start timre. Can any one face this type of issue, could any one help on this.

Thanks for your time.

Best regards

Kumar.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jun 28, 2010 at 12:40 PM

    At the time of SUBMIT (see this keyword in ABAP help), are you supplying the name of the variant? Are you supplying a job name and getting a job number first? or??

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Kumar,

      Right after you create your variant use the statement COMMIT WORK AND WAIT.

      If it doesn't work you can do something like this

      While f_found = space.

      select * from varid

      where report = 'XYZ'

      and variant = 'MYVAR'.

      if sy-subrc = 0.

      f_found = 'X'.

      else.

      wait up to 1 seconds.

      endif.

      endwhile.

      I still think try COMMIT WORK AND WAIT after calling RS_VARIANT_CREATE.

      Kind regards,

      Marius

  • Jun 28, 2010 at 01:03 PM

    Have you tried commit work and wait after creation of your variant?

    Regards,

    M

    Add comment
    10|10000 characters needed characters exceeded