on 01-12-2005 9:21 PM
Hi,
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 ?
Thanks
David
Hello David,
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:
DATA:
lr_variable TYPE REF TO cl_sem_variable.
Get variable instance
CALL METHOD cl_sem_variable=>get_instance
EXPORTING
i_area = 'name of area where the variable is defined'
i_variable = 'name of the variable'
RECEIVING
rr_variable = lr_variable
EXCEPTIONS
not_existing = 1
OTHERS = 2.
IF sy-subrc <> 0.
do s.th., eg send a message
EXIT.
ENDIF.
delete the restrictions
CALL METHOD lr_variable->set_user_restriction
EXPORTING
i_user = 'user name, e.g. sy-uname'
i_delete = 'X'
EXCEPTIONS
failed = 1
OTHERS = 2.
Best regards,
Gerd Schoeffl,
SAP NetWeaver RIG BI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
We are using transaction UPSPL in order to perfrom PBS folder .
We activated function exit for enhancing user defined variable .
We used method :
cl_sem_variables=>get_instance
then we used methode to get instance attribute (gr_var is the instace )
gr_var->get_attribute
then we change the user variables as requierd , and set them using method :
gr_var->set_attribute
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 ?!?!?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.