Application Development 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: 

JOB_SUBMIT using variant issue

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Juwin
Active Contributor
0 Kudos

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

5 REPLIES 5

paul_bakker2
Active Contributor
0 Kudos

Can you show us the code where this is happening?

0 Kudos

Hi Paul Bakker,

It is a big code and could not be copied here.I am explaining what i did.

calling CFM1 transaction dynamically using variant creation and job submit for different batch.

For first batch things or going good while calling next batch(loop) using variant creation and job submit the first batch variant is copied(only checkbox are not refreshed but select-options are refreshed).

I used Function module for the above logic and called this function module within do enddo of se38 program. used clear and refresh correctly still i am facing the issue.

I believe Juwin Pallipat Thomas faced similar issue. calling this function module through submit program solves the issue...is this a standard bug do we have any SAP note? can any one help?

Thanks,

Shanmuga Senthil M.

Juwin
Active Contributor
0 Kudos

I checked in my current system version and the problem doesn't exist anymore. I am on 7.4 SP10.

Thanks,

Juwin

Juwin
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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