Skip to Content

Maintain a variable in web application with user restrictions


My users are planning more than 200 cost centers. Our process is to generate a version by copying actual and plan data for these 200 cost centers (maintained with authorization).

Some users would like to restrict cost centers when they generate a new version :

- CC A, B, C and Z for version 1

- CC B,Z for version 2


instead of these 200 CC (gain in performance and data volume).

They really want to generate some cost centers they'd choose in the web interface.

I tried to do this with a variable maintained in the web with several cost center values but i didn't succeed in.

So, is there a way to include several values in one variable and modify it or make it empty ?

Thanks for your help

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jan 31, 2005 at 09:39 PM

    I forgot to precise that I work on a BPS appli.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 01, 2005 at 01:06 PM


    The concept of a BPS variable is that in the BPS0 an administrator can maintain a set of values and the end- user can select one value or one interval from these values if necessary. If the variable is "user input allowed" then the user can maintain and choose an additional single value. Unfortunately using the standard web functions a user cannot enter a number of values for a variable.

    A work around could look like this: create a variable type exit that returns a list of variable values. In order to fill this list create an own entry screen (using a BSP application) to fill the ABAP table that the exit returns. Make sure that the variable is not set to "user input required".

    Best regards,

    Gerd Schoeffl,

    SAPNetWeaver RIG BI

    Add a comment
    10|10000 characters needed characters exceeded

    • Hello,

      We tested the workaround and it doesn't work.

      About the code you provided, here the info coming from my Abap teammate :

      We want to remove restrictions set for variables. We use two methods : the first one to get variable instance and the second one to remove the restrictions.

      We have noticed an unormal functionality of the following second method :


      • method sets values for one user

      check m_type = upcfw_cs_var_type-char.

      • we check if its possible

      call method is_user_input_allowed

      exporting i_restrict = 'X'

      exceptions not_allowed = 1.

      if sy-subrc <> 0.

      message id sy-msgid type sy-msgty number sy-msgno

      with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4

      raising failed.


      if i_delete is initial.



      • insert to the buffer

      delete mto_sel_act where user = i_user.

      insert lines of lto_usel into table mto_sel_act.

      • update table of users, who have set their values

      delete mto_user_act where uname = i_user.

      data ls_uname type upc_ys_uname.

      ls_uname-uname = i_user.

      insert ls_uname into table mto_user_act.


      If we check with a break-point this method, we remarks that our data are not present in mto_sel_act but only in mto_sel.

      The treatment delete so no rows and we have replaced the following method 'CALL METHOD lr_variable->set_user_restriction' in our function module z_bps_reset_var with the following coding :

      • The work table w_charsel is empty when we call the following method

      • Remove restrictions

      CALL METHOD lr_variable->set_user_value "restriction


      i_user = sy-uname

      ito_charsel = w_charsel


      failed = 1

      OTHERS = 2.

      Moreover, we noticed that The method read_db is called via the two methods: The following methods are called the following lines :

      call method read_db_char_sel.

      call method read_db_char_sel( i_active = 'X' ).

      If we analyze this , we see that the i_active flag determine which table should be filled (mto_sel or mto_sel_act).

      It seems that the two preceding sentence should be inversed for our case. How can we modify the value of this field i_active.

      At last, the workaround in note 755459 doesn't work for us (we have BW BPS 3.5 st 10).


Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.