05-16-2007 11:02 AM
Hi friends,
I have a Report Program with selection screen.
I have created a variant for that.
<b>How can we lock and then unlock that Variant ?</b>
Regds,
Rama.Pammi
05-16-2007 11:25 AM
05-16-2007 11:04 AM
While saving the variant, there is a checkbox called
"Protect Variant".
This allows only the creator to change a variant.
Hope this helps you
05-16-2007 11:25 AM
05-16-2007 11:36 AM
Hello,
In the Variants screen check the checkbox Protect Variant.
Protect variant
If you select this option, the variant can only be changed by the
person who created it or the last person to change it. If you start
a program using a protected variant, none of the fields on the
selection screen accept user input.
Regards,
Deepu.K
07-04-2007 8:23 AM
Hello
How do you take the Protect Variant off.
We have created transportable variants using variant prefix CUS& and it automatically selects the protect variant checkbox. You cannot deselect it and so only the user can change this variant.
I have tried Program RSVARENT which is supposed to cancel variant protection but this did not work.
Is it because the variant was for an SAP query report?
Really appreciate any help
cheers
Louisa
07-29-2013 12:03 PM
Problem:
How do you take the Protect Variant off.
We have created transportable variants using variant prefix CUS& and it automatically selects the protect variant checkbox. You cannot deselect it and so only the user can change this variant.
I have tried Program RSVARENT which is supposed to cancel variant protection but this did not work.
Protect variant:
If you select this option, the variant can only be changed by the
person who created it or the last person to change it. If you start
a program using a protected variant, none of the fields on the
selection screen accept user input.
Solution:
*&---------------------------------------------------------------------*
*& Report ZCV_RSVARENT
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT zrsvarent_partha.
TABLES: varid,rsvar.
DATA: i_varid TYPE STANDARD TABLE OF varid WITH HEADER LINE.
SELECT-OPTIONS: s_report FOR rsvar-report,
s_vari FOR rsvar-variant.
PARAMETERS: p_mandt LIKE sy-mandt OBLIGATORY DEFAULT '000'.
START-OF-SELECTION.
SELECT * INTO TABLE i_varid
FROM varid CLIENT SPECIFIED
WHERE mandt = p_mandt
AND report IN s_report
AND variant IN s_vari
AND protected NE space .
IF sy-subrc = 0.
LOOP AT i_varid.
CLEAR i_varid-protected.
IF NOT i_varid-variant(4) EQ 'SAP&'
AND NOT i_varid-variant(4) EQ 'CUS&'.
MOVE 'F' TO i_varid-transport.
ENDIF.
MODIFY i_varid.
ENDLOOP.
MODIFY varid CLIENT SPECIFIED FROM TABLE i_varid .
WRITE:/ 'SY-SUBRC = ' , sy-subrc.
WRITE:/ 'No. of records updated = ' , sy-dbcnt.
COMMIT WORK.
ELSE.
WRITE:/ 'No records found for the selection criteria.'.
ENDIF.
Inputs:
S_REPORT – Report/Program name.
S_VARI – Variant.
P_MANDT – NO CHANGE (Let it be as ‘000’).
Your variant will be unprotected.
Regards,
Partha S Goswami
07-29-2013 5:25 PM
07-31-2013 11:15 AM
Hi Mayur,
This function module (RS_VARIANT_DELETE) deletes a specified variant.
But here the topic is to unchecked the protect variant. So that any any one can go and change the variant values.
If the protect variant is check for any variant then only the person who have created or the last person who have made some change in the variant can only do some change in variant values.
Hope you got my point.
Thanks
Partha S Goswami
06-20-2014 11:03 AM
Hi Partha,
I used your program to unlock the variant. Unfortunately it did not work. I have got 5 different clients in the system. Not sure, if I am doing it incorrectly. However, I used the program RSVARENT directly in 000 and it worked.
P.S: I used your program in ECC 6.0..
06-23-2014 8:13 AM
Rama,
Any reason why you created the variants as CUS& ? We can create the varinat as Z.... and still can transport it using RSTRANSP.
K.Kiran.