10-10-2007 3:55 PM
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.
regards
Steffen
10-10-2007 4: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
or
SUBMIT zprogram WITH sel_field1 = wfield1.
This way you avoid the issue of creating and deleting variants. I hope this helps.
- April King
10-10-2007 4: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
or
SUBMIT zprogram WITH sel_field1 = wfield1.
This way you avoid the issue of creating and deleting variants. I hope this helps.
- April King
10-10-2007 4:25 PM
Hi,
thanks for the answer
actually i wrote a class that can be fed with a lot of selection parameters, converts them into variants and then submits the report with one of those created variants.
I just want to replace the 'normal' variant (created with FM 'RS_CREATE_VARIANT') with a temporary variant (e.g. &0000000000).
Is that possible?
regards steffen
10-10-2007 6:07 PM
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
10-11-2007 12:45 PM
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.
regards
STeffen