2015 Jun 24 9:57 AM
Hello guys,
I am using function RS_VARIANT_CONTENTS for displaying variants of reports. For getting the available variants I select entries of table VARI first.
Unfortunately there are some variants which are incorrect/obsolete which results in a dump when calling the function.
Is there any way (table or something else) where I can catch these variants before using the function so that I can avoid the dump?
Thanks!
Regards
Michael
2015 Jun 24 10:34 AM
Hi,
Few Variant Related tables are VARID VARIS VAIRD. Put VAR* in SE11 you will find many more, I am not sure which one would help you.
How ever if you debug the FM and find out why the particular Variant went into Short dump you can surely rectify the issue.
Hope this helps.
2015 Jun 24 10:50 AM
Hi Michael,
you can catch these errors under FM exceptions.
However to check if the variant exists or consistency of the variant you can use the FM RS*VAR_VARIANT_EXISTS FM.
If you refer to Transaction Variants (Dynamic ones) then you can go to STVARV transaction to see the variants and its corresponding tables are TVARV and TVARVC.
2015 Jun 24 11:11 AM
Hi Michael,
obsolete variants may be caused by an update or by changing the type of an object on the selection screen. This may occur, when you change a parameter from type char80 to type string, or if you make a parameter a select-option for example.
To rescue an obsolete variant there is a repair report named in SAP note 1953229, normally it should be RSVARDOC_610 now for your release.
If you can catch the dump using TRY CATCH ENDTRY with class CX_ROOT, then you can submit this report in case of error and then retry the fm cal. If not, then you can try to submit the report for all variants before calling the fm. Or you can submit the report once or twice per report, 1st for system variants and 2nd for remaining variants.
Regards,
Klaus