06-28-2010 10:09 AM
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.
06-28-2010 1: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??
06-28-2010 2:12 PM
Dear Friend,
I am submitting the job with job name and job number and with selection-table ( variant).
Here the issue is if I re run the same failed job( after few mints) with out any changes , it get's executed successfully, Here the issue is time conflicts, between the variant creation and job submission, during the job submission a vraint existence is being checked, there it''s failing..
please let me know what could be the possible reasons..
Thank you!
Best Regards
Kumar.
06-28-2010 2:53 PM
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
06-28-2010 2:03 PM
Have you tried commit work and wait after creation of your variant?
Regards,
M