Skip to Content
author's profile photo Former Member
Former Member

JOB_SUBMIT using variant issue

Hi Friends,

I have called job_submit with variant created through RS_CREATE_VARIANT inside a function module .

while calling the function module 2nd time the variant used in first call is getting copied (selection screen field values are copied and not cleared).

If i call this function module through submit program then the issue is not happening and old variant got cleared.

please help to solve this issue.

Thanks,

Shanmuga Senthil M.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Jul 27, 2016 at 10:44 AM

    I had faced this issue in the past, but couldn't get around it. It was in an older version of SAP though. I haven't tried this in the newer versions.

    I used the method of using a SUBMIT statement, which automatically dynamically creates a variant, and it worked fine.

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 27, 2016 at 01:32 AM

    Can you show us the code where this is happening?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 27, 2016 at 11:02 AM

    Hi Friend,

    Instead of using the FM you can use a program that will loop the values in variant RS_CREATE_VARIANT, and this program should call the program inside the job_submit. You can clear the variant within the calling program at the end of the loop.

    This entire calling program can be used in a job to run.

    Hopefully it helps.

    Thanks,

    Souvik

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.