SAP Function RS_CREATE_VARIANT - Creating a variant (not using a selection screen)

Parameter Reference Type Length Default Optional Text
CURR_REPORT RSVAR-REPORT C 40 Report Name
CURR_VARIANT RSVAR-VARIANT C 14 Variant name
VARI_DESC VARID u 132 Variant description (structure VARID)

Parameter Reference Length Optional Text
VARI_CONTENTS RSPARAMS 102 Contents (STRUCTURE RSPARAMS)
VARI_TEXT VARIT 88 Variant text (structure VARIT)
VSCREENS RSDYNNR 5 X

Exception Text
ILLEGAL_REPORT_OR_VARIANT Incorrect report or variant name (VARI_DESC)
ILLEGAL_VARIANTNAME Variante name space or contains '&' or '%'
NOT_AUTHORIZED No authorization
NOT_EXECUTED Not executed
REPORT_NOT_EXISTENT Report does not exist
REPORT_NOT_SUPPLIED Report is not type '1'
VARIANT_EXISTS Layout Already Exists
VARIANT_LOCKED Variant locked

Functionality
This function module creates a variant using information from:
VARI_DESC (variuant description with the structure VARID)
VARI_TEXT (variant text: internal table with the structure VARIT)
YOu must specify the technical name and contents of the selection
fields in the table
VARI_CONTENTS (structure RSPARAMS).