Is there a way to quicly delete all the variable values (user ID and cost center) for a user-specific variable in BPS without access to the configuration (BPS0) or do I need to write a small piece of ABAP for that ?
You either have to access the BPS0 and delete each of the variable values or write a little ABAP program. You could include this ABAP in a planning function type Exit so the user can press a button in a web interface or planning folder to delete the settings. The coding using internal methods you need is:
lr_variable TYPE REF TO cl_sem_variable.
Get variable instance
CALL METHOD cl_sem_variable=>get_instance
i_area = 'name of area where the variable is defined'
i_variable = 'name of the variable'
rr_variable = lr_variable
not_existing = 1
OTHERS = 2.
IF sy-subrc <> 0.
do s.th., eg send a message
delete the restrictions
CALL METHOD lr_variable->set_user_restriction
i_user = 'user name, e.g. sy-uname'
i_delete = 'X'
failed = 1
OTHERS = 2.
SAP NetWeaver RIG BI
We are using transaction UPSPL in order to perfrom PBS folder .
We activated function exit for enhancing user defined variable .
We used method :
then we used methode to get instance attribute (gr_var is the instace )
then we change the user variables as requierd , and set them using method :
as the user perfroming the function ( via ICON ) the values are displayed and set on the screen properly , but ..
when the user hit the SAVE icon in order to save the variable the data is lost and not saved .
can you help me ?!?!?