BPS Variables of Type Exit (How To Document)

Hello,
I'm trying to restrict entries for (say) variable #2, based on the selection of variable #1. 
I've just realised characteristic relationships cannot be used and need to use a user exit.  I've gone through the "How To" on BPS Variables of Type Exit and have gotten the function modules to working properly. 
However when the function module attempts to pass the data to BPS Variable #2, BPS gives an ERROR saying that in order to write new values into variable #2, the variable must have a replacement path "USER DEFINED VALUES".
However this is not possible as the replacement path must be set to "USER EXIT" so the function module can be activated.
The only way around this is to tell the function module which BPS Variable it should choose to write the data to, if so does anyone the ABAP to store values into a BPS Variable.
Right now would appreciate any comment on this.
Kind regards,
Marinos

Hi Marc,
Yes, the How To paper answers my problem, and when I run the program via se37 the correct variable selections are being populated in table ETO_CHARSEL.  However when values are passed to the BPS Variable, the first information message read "The Conditions were Adapted"  but no values are passed to the variable.  Then a second error message "Entry not possible, var does not have replacement type user-spec vals."  This seems to be a conundrum as the variable needs to be set as user-exit.
Any thoughts?
Marinos
My Z_SIMPLE_RELATION code is
FUNCTION Z_SIMPLE_RELATION.
""Local Interface:
*"  IMPORTING
*"     VALUE(I_AREA) TYPE  UPC_Y_AREA
*"     VALUE(I_VARIABLE) TYPE  UPC_Y_VARIABLE
*"     VALUE(I_CHANM) TYPE  UPC_Y_CHANM
*"     VALUE(ITO_CHANM) TYPE  UPC_YTO_CHA
*"  EXPORTING
*"     VALUE(ETO_CHARSEL) TYPE  UPC_YTO_CHARSEL
Change constant according to your needs
TABLES: /BIC/MTASSTCAT.
CONSTANTS:
l_source_var TYPE upc_y_variable VALUE 'TCAPASST',
l_source_area TYPE upc_y_area VALUE 'TCAP001P',
l_use_restricted_values TYPE boole-boole VALUE 'X',
l_buffer_call TYPE boole-boole VALUE 'X'.
DATA:
l_subrc LIKE sy-subrc,
ls_return LIKE bapiret2,
l_type LIKE upc_var-vartype,
lto_varsel_all TYPE upc_yto_charsel,
lto_varsel TYPE upc_yto_charsel,
lto_var TYPE upc_yto_charsel,
lt_chavl TYPE /bic/PTASSTCAT occurs 0,
ls_chavl like line of lt_chavl,
lto_chanm type upc_yto_cha.
read source value
CALL FUNCTION 'Z_VARIABLE_GET_DETAIL'
EXPORTING
i_area = l_source_area
i_variable = l_source_var
i_buffer = l_buffer_call
IMPORTING
e_subrc = l_subrc
es_return = ls_return
e_type = l_type
eto_varsel_all = lto_varsel_all
eto_varsel = lto_varsel
eto_chanm = lto_chanm.
IF l_subrc <> 0.
MESSAGE i136(upc_fw) WITH l_source_var.
Values of variable &1 cannot be determined
EXIT.
ENDIF.
now, you are free to determine the logic on how to
derive the values based on the source values.
Example 1: determine the next year
Assumptions:
- we have only a single year in the selection
- the variable is of type characteristic
DATA: ls_varsel TYPE upc_ys_charsel,
l_next_year(4) TYPE n,
l_entries TYPE i.
We have a single value for the year and only one characteristic
=> our value is stored in the first line
IF l_use_restricted_values IS INITIAL.
lto_var = lto_varsel_all.
ELSE.
lto_var = lto_varsel.
ENDIF.
READ TABLE lto_var INTO ls_varsel INDEX 1.
check prerequisites:
- record found?
IF sy-subrc <> 0.
MESSAGE i147(upc_fw) WITH l_source_var.
Variable &1 does not contain any values
EXIT.
ENDIF.
- exactly one record and characteristic?
DESCRIBE TABLE lto_var LINES l_entries.
IF l_entries <> 1.
MESSAGE i534(upc) WITH l_source_var.
Variable &1 must be restricted to a value
EXIT.
ENDIF.
SELECT * FROM /BIC/PTASSTCAT INTO TABLE lt_chavl
  WHERE asset_clas = ls_varsel-low.
  if sy-subrc <> 0.
    MESSAGE e026(upc) WITH ls_varsel-low '0ASSET_CLAS'.
Attribute value not found
  exit.
endif.
ls_varsel-seqno = '0000'.
ls_varsel-chanm = '/BIC/TASSTCAT'.
LOOP AT lt_chavl INTO ls_chavl.
ls_varsel-seqno = ls_varsel-seqno + 1.
ls_varsel-low = ls_chavl-/BIC/TASSTCAT.
APPEND ls_varsel TO eto_charsel.
ENDLOOP.
ENDFUNCTION.

Similar Messages

  • How To ... BPS Variables of type exit

    Dear All,
    I am reading the How To ... BPS Variables of type exit sap document.
    On chapter 3.3.1 step 10 to 12 it's explain how to populated variable, and check user exit action to display one value in fonction of an other one.
    Unfortunately on step 11, when I click on F4 I got nothing. I can't enter value.
    Would you please let me know if the system should be configured in a particular way ?
    Thanks

    Hi Luminy,
    If you have followed Step 2 with 2002 then you would have got that at f4
    regards
    Happy Tony
    <b>Points == Thanks</b>

  • BPS Variables of type Exit  Problem !

    During processing using the default settings,
    if i change values of a variable internally it do
    not change the set of variable values that are displayed after the initial execution of a WEB planning
    application.
    Refresh is KO after a new choice of variable.
    I append a record to table upc_dark2 with param=
    WEB_REFRESH_ON_CHANGE and value=X. : refresh always KO
    I have tested  with l_buffer_call = 'X' and with l_buffer_call = ' ' ---> always KO
    Is-it a problem of buffer ?
    Is-it dependent of leading ?

    Hi Dieu,
    Thanks for your reply, but the main purpose is to limit the number of options available to the user. If I start at level 3 all options will be available to the user.
    Regards,
    -Jacob

  • SEM-BPS: Variables of type hierarchy node user exit

    Hi,
    I read the "How to.." document "Variables of Type Exit".
    This document has example for variable type caracteristic.
    I need to use this kind of solution for global variables:
    I have the same variables in several planning areas. I have defined one ‘leading’ area containing the variable that should automatically set/adjust the corresponding variables in the other planning areas.
    I've created a SEM variable of type hierarchy node and with the replacement type user exit. There is a standard function module API_SEMBPS_VARIABLE_GETDETAIL which has to provide the selected hierarchy node in leading area to other areas.
    The function works ideally in test mode, but it doesn't work as the SEM user exit.
    Does anyone have experience in this problem?
    Thanks

    Your function module shall follow the expected interface (required for exit type). Function API_SEMBPS_VARIABLE_GETDETAIL is not for such usage.
    To see an example FM that is fit for a 'user exit' processing for hierarchy node, have a look at FM UPF_VARIABLE_USER_EXIT_HIER. There is inline documentation in the source code that shall help you create your own FM if required.
    cheers,

  • How to access BPS variables in ABAP Exit Function

    Hi Experts,
    I am using a Exit Function. My BPS variables contain multiple values. I want to trasfer then (may be directly read) to an internal table from where I can loop over then.
    Could you please suggest me the code for this?
    Points will be awarded.
    Thanks in advance,
    Shiwesh

    Did you try using the FMs API_SEMBPS_VARIABLE_GETDETAIL or Z_VARIABLE_GET_DETAIL for this?

  • Using BPS Variable of Type Authorization

    Hi,
      I have tried to use a variable of type 'Authorization' to effectively control the access of a certain set of users for certain version of plan data.
    Example: User A can have access (change) to both plan version 01, 02
                   User B can have change access to version 01 and only display access to version 02 of plan data.
    I am trying to have both the version displayed in the single layout (web as well as excel).
    I couldn’t find detail info on this, any help is appreciated.
    Thanks

    Hello,
    Authorization variables are not the appropriate option to restrict display/write access for the scenario you mention.
    My suggestion would be to create 2 layouts. In one layout the users can write to both the versions and in the second you can have the option to write to version 1 and display version 2.
    You can then have authorizations set on these layouts to restrict access.
    Hope this helps.
    Sunil

  • BW-BPS Variables of type hierarchy node - user exit

    Hello,
    I created a variable SEM of type hierarchy node and with the replacement type "user exit". So I created a function to fill this variable and I don't find the right type for import and export parameters of my function. I have a dump : CALL_FUNCTION_CONFLICT_TYPE in the method GET_HIE_NODES
    Thank you for your help.
    Catherine Bellec

    Hello,
    For your information :
    the input parameter has the type UPC_YS_HIE_KEY and
    the export parameter the type UPC_YT_HIESEL
    Catherine Bellec

  • Hierarchy authorization with variables of type exit

    Hi all,
    I am trying to implement hierarchy based authorizations with variables. After collecting information from the SAP documentation and this forum, I think I know more or less how to do it, but it's not working and it has me very confused.
    These are the steps I have followed:
    - From RSSM, I have created a hierarchy authorization object including my characteristic and 0TCTAUTHH
    - From RSSM again, I have created a hierarchy authorization pointing to the node $ZG_V_008
    - From the Query designer, I have created a hierarchy node variable of processing type customer exit ZG_V_008 (are any special settings needed here?)
    - From the Query designer, I have created <b>another</b> hierarchy node variable of processing type authorization, and I have used this variable to restrict the hierarchy for my characteristic
    - I have edited the EXIT_SAPLRRS0_001 to watch for I_STEP = 0 and give values to ZG_V_008 (we'll get to my code later in case we solve this issue first
    It is my understanding that with this setup, the user exit will be called to process the value of ZG_V_008 in I_STEP = 0, however, when debugging, I don't see any calls for the function with I_STEP = 0.
    What have I done wrong?
    Thanks a lot in advance.
    Guillermo

    Thanks, Jimmy, but that does not help much: my problem is that my user exit is not evaluated with I_STEP=0, but there are no error messages or anything like that.
    I have created a test user <b>without</b> a developer role to see if that could have any impact, but it's still not working.
    Any ideas?

  • Set a value for a variable of type exit

    Hello,
    I am filling some variables with multiple values in user exit.
    Now, i would like to place some of these characteritics in Header area. It's of course impossible because there is multiple values but ...
    I will put dropdown box in the web application for these chars. The problem is that by default, any value is assigned to the dropdwom ( any variable value is set).
    Do you know how i can set a value for theses variable after filling all values by the user exit. SO that only one value is selected for the header and all others values available in the dropdown ?
    Regards,
    Jarod

    Hi,
    Off late, this seems to be a usual requirement.
    Just create a Z program to call the FM API_SEMBPS_VARIABLE_SET and then call the FM API_SEMBPS_POST.
    you should be preparing the content/set value to pass to the FMs. check the whereused list to see how this FMs can be used/called.
    finally, run this program for your variable, after the loading/filling the exit variable. Please note that to set 'exit' variables, the sourcing variable's content need to be read/set first before setting the exit varible.
    HTH,
    Regards,
    Nataraj.

  • BPS variable exit takes more execution time

    Hi,
        I am having a BPS variable of type exit in the planning level and it is taking very long time to execute the layout even though my planning cube is having very little data.
    Can any one tell me how to reduce the excution time of the layout .
    Thanks,
    Ramkumar.

    Hi Ravi,
            I excuted the FM in se37 with a SQL Trace and it was working fine . there are no expensive statements .
    The same FM performs well if the output record count is less say 10, but taking more time when the output record count is more say 8000.
    Is there any way to increase the performance of the BPS layout . or do i need to apply any notes for it.
    if any one faced the same problum kindly let me know how to resolve this . your help is greatly appreciated.
    Thanks
    Ramkumar

  • BPS Variables

    Hi there
    May somebody help me with the following problem: I have two variables in a BPS package and I want the second variable to show only these entries/values which are possible to select according to the combinations which are in the cube or maybe in the reference data. eg. i have the two variables, controlling area and cost center. so when I select a controlling area, I want the cost center variable only to give me these cost centers for selection which are in the selected cost area. as it's possible in BEX.
    Thank's
    Message was edited by:
            Martin Studer

    Hi Ravi
    First thanks.
    If my understanding of the How To BPS Variables of Type Exit is right, then what I'm looking for is descript in chapter 1.4 / 3.6 "One variable restricts the selection of another variable". But therefore in my exemple controlling area had to be a master data attribute of cost center. But my problem is that one costcenter can be in different controlling areas, so i can't define the controlling area as a master data attribute of costcenter. So can i still use this exit variable? May someone is working with the BI-content in this issue and can give me an input from there?
    Thanks again.
    Martin Studer
    Message was edited by:
            Martin Studer

  • BPS variable F4 help

    Hi,
       I am having a BPS Variable of type exit and if the output records are less ,say 10 iam getting the correct records in F4 help but if the record count is high like 8000 it is returning all values in the F4 help.
    Can any one tell me how to rectify this error.
    Thanks,
    Ramkumar

    Hi Ravi,
            Depending upon the planner my exit will return records. If the manager logs into the system them my exit will return 8000 records where as if a sales rep logs into the system then my exit will return 10 records and assume the records in the master data tables as 15000.
    The problum is that when the output record count is 10 iam getting all the 10 values in the F4 help. if the out put record count is 8000 then i am getting all the values from the master data tables (15000 records ) irrespective of the 8000 record what exactly the exit is populating .
    Even in the secound case also i want to see only the 8000 records in the F4 help not all the 15000 records.
    Is there any note that had to be applied to this issue. or did i missed any thing .
    Thanks,
    Ramkumar

  • Variable type exit with two source variables

    I have a case where I should determine a variable (A) value according to two other variables (B) and (C). That is, e.g.
    - IF (B)=x AND (C)=y THEN (A)=z
    - IF (B)=i AND (C)=j THEN (A)=k
    It seems like I cannot call the user exit with more than one exported variable, the standard call below:
    call function m_user_exit
      exporting
        i_area      = m_area
        i_variable  = m_variable
        i_chanm     = l_chanm
        ito_chanm   = mto_chanm
      importing
        eto_charsel = rto_value
    Any suggestions?
    Regards, Aki

    Thanks to everyone especially to Natarajan,
    Both source variables are type exit, so I did the following:
    A-variable was the “standard source”
    B-variable was determined by function call (source below)
    C-variable then determined by combination of A and B
    I added this simple code in the beginning of “your own logic”  and I had source_var_B as a “B-variable”.
    DATA: source_var_B TYPE upc_yto_charsel.
    call function 'ZDETERMINE_B'
      exporting
        i_area      = 'AREA'
        i_variable  = 'VAR_B'
        i_chanm     = 'CHAR_B'
        ito_chanm   = ito_chanm
      importing
        eto_charsel = source_var_B.
    Do you see any risks or inconsistencies or whatever I should take into account?
    Aki

  • Planning Function of type EXIT in IP

    Gurus,
    How do we use planning functions of type EXIT in planning modeler ( IP ).I Know how to use existing BPS functions of type exits in IP, but how can we create a new planning function of type EXIT in IP ?.

    Hello Sappie,
    please check the online documentation:
    http://help.sap.com/saphelp_nw70/helpdata/en/43/332530c1b64866e10000000a1553f6/frameset.htm
    The concept is similar to BPS but has a few enhanced capabilities.
    Regards,
    Marc Bernard
    SAP NetWeaver RIG

  • Authorization check without using variable of type u0093Authorizationu0094

    In WEB-reporting we want to authorize on a navigational attribute without using the variable of type
    “ Authorization”. Why would we do this?
    1. In a lot of queries we have to replace the existing variable of type “User entry” to a variable of type “Authorization”. We would like to avoid this work.
    2. When the variable is not ready for input the Report will always include all the characteristic values for which the user is authorized. We don’s want this.
    3. When the variable is ready for input on the selection screen all the authorized values are displayed and the user is able to select / deselect the values he/she wants to report. In case of a lot of authorized characteristic values the screen does not appear user-friendly.
    What we want is a behavior like some parts of R/3. For example: Controlling Area X consists of the Costcenters C1000, C2000, C3000, C4000, C5000 and C6000. A particular user has authorization for Cost centers C1000, C3000 and C5000. When running a ABAP-report with Cosctcenters the user is able to select certain Costcenters. Three possibilities:
    1. The user selects Costcenter C1000, C3000 and / or C5000: the ABAP reports the selected Costcenters.
    2. The user selects Costcenter C2000, C4000 and / or C6000: the ABAP gives an error-message: “no authorization”.
    3. The user does not select any Costcenters: the ABAP reads all the Costcenters and reports – on the basis of the users authorization – only Costcenters C1000, C3000 and C5000.
    In term of BW: we would like to introduce authorizations for a specific InfoObject which is used as an navigational of an other InfoObject. In the queries a variable is used of the type “User entry”. The user can select one or more values on the selection screen; an authorization check is fulfilled. He may – however – choose to leave the selection field empty; in this case the OLAP processor should report only the authorized values (in our case the last situation results directly in an error-message “no authorization”).
    Anyone has a suggestion?
    Thx in advance,
    Henk

    If you change the variable to type exit, and user input enabled, you can then build your logic in the user exit.
    If users have entered unauthorised values, it will be checked (by the system??). If this assumption is correct then all you need to do in your exit is to continue with the values entered by the user; and in case user has entered no values, populate the variable with values valid for the user (by reading the user authorization and corresponding charactertistics values and moving these to the variable).
    --> Adding further
    Since the authorization will not be checked by the system (I missed that these are not of authorization type variables), user exit will need to do this check. The logic for doing authorization checks / error messages / restricting based on authorizations - will have to be done in the user-exit.
    cheers,
    Message was edited by: Ajay Das

Maybe you are looking for

  • DataSource No Longer Fills Data Calls VB 2010

    I am using a DataSource in my form app, and it was working fine for calls made across the board, Fill, Add, Delete, etc... It suddenly stopped working. I get no errors on build, no data is added to any ComboBoxes, and no new Adds work either. I creat

  • MacBook Conundrum

    So I have a MacBook that I acquired with the common problem of not turning on. However it is a conundrum I have not found the specific answer to in the forums. When I got it the power button didn't work, but it would go to sleep and wake up. It would

  • I've got a green light but express not connecting to speakers

    I've configured my express to my home's wireless network and its attached to my stereo and speaker inputs via rca cables, but when I try connecting to them via iTunes Airplay drop down menu, i can't get no satisfaction, or connection. There is a soli

  • ITunes quits constantly.  How to diagnose the source of the problem?

    If I continued to use iTunes, I would easily get a dozen of these a day. How to I properly diagnose this console log and replace the offending piece of software? Host Name: ****** Date/Time: 2005-12-28 11:01:34.365 -0600 OS Version: 10.4.3 (Build 8F4

  • End of life cycle for BOXI 3.1 SP3

    Hi all, Could you please help know about End of life cycle for BOXI 3.1 (SP3) Thanks