Variable Function Group: svar
It basically includes the variant operation. The following example shows how to modify the variant.
DataI _valutabLikeRsparamsOccurs 0 With Header Line.
DataI _objectsLikeVanzOccurs 0 With Header Line.
*-> Obtain the variant content and attributes and place them in the internal table.
Call Function 'Rs _ variant_contents'
Exporting
* ----> Here isProgramName
Report = 'Zpp301' "Se38 program name
* ----> Here is the variant name.
Variant = 'Test' "Variant
Tables
* ----> Variable content and attribute internal tables
Valutab = I _valutab
Objects = I _objects.
* -----> Then, you can modify the field value in the variable table to change the variable value.
* -----> Modify the variant value.
Call function 'rs _ change_created_variant'
Exporting
Curr_report = v_report
Curr_variant = v_variant
Vari_desc = I _desc
Tables
Vari_contents = I _valutab
Objects = I _objects.