Skip to Content
avatar image
Former Member

temporary variants

Hi all,

if i run a SUBMIT statement to run a report, a temporary variant

(like '&0000000000000') is created for this report.

Question 1: How are these Variants deleted? (must be a periodic job or something)

Question 2: Is there any Function Module to create this kind of variants?

Background: I create a lot of variants to run jobs. If I create 'normal' variants i have to deal with the deletion myself ... i don't want to do that if not necessary.

Thanks in advance.



Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 10, 2007 at 03:03 PM

    Instead of submitting with a variant, you can populate the selection fields yourself inside the calling program and use a statement like this:

    SUBMIT zprogram WITH SELECTION-TABLE rspar. "rspar is an internal table


    SUBMIT zprogram WITH sel_field1 = wfield1.

    This way you avoid the issue of creating and deleting variants. I hope this helps.

    - April King

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I haven't been able to find anything on creating temporary variants. But in your class you could define internal selection sets and then submit the program with that selection set. That would avoid creating anything external. There's an example in this document (look for the SUBMIT statement, page 3):

      If it only needs to be available temporarily anyway then I don't see the advantage to creating an external variant. But you can try looking through the code in program SAPLBTCH (transaction SM37), since that can create temporary variants when you schedule a job.

      - April

  • avatar image
    Former Member
    Oct 11, 2007 at 11:45 AM

    Hi April,

    i guess that the temporary variants are created by the submit statement interally.

    I just wanted to take the complexity of all the select-options and parameters away by first saving them as a variant instead of taking them along all the way to the submit statement.

    ... seems not possible what i wanted to do

    Thanks again for your support.



    Add comment
    10|10000 characters needed characters exceeded