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,

Similar Messages

  • 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

  • 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 (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.

  • SEM BPS Variable

    I have created a BPS input screen for users to enter data that will end up in a transactional InfoCube.  I've created the Planning Area, levels, etc and it all works fine.  When I am in BPS0, in the layout, I have fiscal week in the header area.  So when I execute the planning screen, I have a popup box that ask what fiscal week I want to enter for.  What I want and have done is to create a variable that looks at the system data and determines our fiscal week.  I put this function module (date_to_period_convert)in the planning area and when I execute it in test mode, it returns the fiscal week.  However, when I try to have this function module populate the fiscal week field on execution, I get nothing. 
    Again, I am just trying to pre-populate a date field based on the system date.
    Thanks for any help you can offer.

    Hello Keith,
    Could you please verify if I get your problem right:
    You have created a variable type User exit. When testing (in se37) the function module used in the exit returns the proper week. Now you use the variable in a planning level. In this planning level you have a layout and the calendar week is in the header of the layout. When executing the layout the calendar week is not filled. Is that your set up?
    Best regards,
    Gerd Schoeffl,
    SAP NetWeaver RIG BI

  • SAP BW SEM-BPS Variables

    Hi All,
    We are upgrading SAP BW SEM-BPS system from 2.0B to 6.O, in this process i need to collect some information as like below from tables,
    like BPS Variables----- UPC_VAR ,
    planning sequence----- UPC_PROFILE_BU
    planning folder(Web)---- BPS_WB
    planning folder(GUI)---UPSPM
    BPS variable exit--UPC_VAR_EXIT
    respectively, but these tables like UPC_VAR,UPC_PROFILE_BU etc are  NOT there in my system ( SAP BW SEM-BPS 2.0B), So can anyone please suggest me alternative table name OR tell me where can I get aobve information like (BPS Variables, Planning Sequence etcc. ).
    Thank you,
    CCC

    Hi,
    I need to collect same information.
    Will you share it.
    Thanks,
    Ajay

  • 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

  • Hierarchy BW User Exit code EXIT_SAPLRSAP_004 ZXRSAU04

    Hi All,
    We are loading Hierarchy data in BW using User Exit by taking data from master dat InfoObject.
    As we thought it's working fine; but on every 2nd load it's getting failed (1st load is success, 2nd load failed, 3rd load success likewise; so every alternate load is getting failed). We tried with all the options in Infopackage.
    As per our assumptions and the requirement we could able to load the data through user exit.
    We need your help in the following code where we are missing or we are missing some process in BW.
    We request you please give us suggestions ASAP.
    thanks in Advance.
    *&  Include           ZXRSAU04
    data:y_i_/BIC/PYIOSID type standard table of /BIC/PYIOSID,
         y_wa_/BIC/PYIOSID type /BIC/PYIOSID,
         lwa_upmode type char1.
    data:y_i_/BI0/HCRM_OBJ_ID type standard table of /BI0/HCRM_OBJ_ID,
         y_wa_/BI0/HCRM_OBJ_ID type /BI0/HCRM_OBJ_ID,
         y_wa_hienode type RSAP_S_HIENODE.
    data:y_I_table like standard table of C_T_HIENODE.
    data: y_v_active type char1.
    data:y_v_n(8) type n.
    *refresh C_T_HIENODE[].
    case I_DATASOURCE.
      when '80CRM_OBJ_IDH'.
    To load the data from YIOSID master data into 0CRM_OBJ_ID hierarchy
       delete  C_T_HIENODE where nodeid ne '00000001'.
        select single *
           from /BI0/HCRM_OBJ_ID
           into y_wa_/BI0/HCRM_OBJ_ID
           where nodeid = '00000002'.
        if sy-subrc eq 0.
         move:C_T_HIENODE[] to y_I_table[].
         refresh C_T_HIENODE.
         move  y_I_table[] to C_T_HIENODE[].
         refresh y_I_table[].
          CALL FUNCTION 'RSHIER_HIER_SUBTREE_DELETE'
            EXPORTING
              I_HIEID                   = y_wa_/BI0/HCRM_OBJ_ID-HIEID
              I_DEL_IOBJNM              = y_wa_/BI0/HCRM_OBJ_ID-IOBJNM
              I_DEL_NODENAME            = y_wa_/BI0/HCRM_OBJ_ID-nodename
      I_DEL_DATETO              =
           EXCEPTIONS
             FOREIGN_LOCK              = 1
             HIERARCHY_NOT_FOUND       = 2
             CANCELED                  = 3
             OTHERS                    = 4
          IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          else.
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
           delete C_T_HIENODE where nodeid ge '00000002'.
            commit work and wait.
           wait up to 15 seconds.
            CALL FUNCTION 'RSHIER_HIER_CHECK_AND_ACTIVATE'
              EXPORTING
                I_HIEID        = y_wa_/BI0/HCRM_OBJ_ID-HIEID
              IMPORTING
                E_ACTIVE_STATE = y_v_active
              EXCEPTIONS
                CANCELED       = 1
                OTHERS         = 2.
            IF SY-SUBRC <> 0.
              MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                      WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       wait up to 3 seconds.
            else.
             commit work and wait.
              CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
            ENDIF.
          endif.
        endif.
        select *
                from /BIC/PYIOSID
                into table y_i_/BIC/PYIOSID.
        if sy-subrc eq 0.
          sort y_i_/BIC/PYIOSID by /BIC/YIOSID OBJVERS.
        endif.
        if y_i_/BIC/PYIOSID[] is not initial.
          move: '0HIER_NODE' to C_T_HIENODE-IOBJNM,
               'OPP_NUM' to C_T_HIENODE-NODENAME,
               '00000002' to C_T_HIENODE-NODEID,
               '02' TO C_T_HIENODE-TLEVEL,
               '00000001' to C_T_HIENODE-PARENTID,
               '00000001' to C_T_HIENODE-childid.
          append C_T_HIENODE.
       move:
             '0HIER_NODE' to c_t_foldert-IOBJNM,
              'OPP_NUM' to c_t_foldert-NODENAME,
              'E'       to c_t_foldert-langu,
              'OPP_NUM' to c_t_foldert-txtsh.
       append c_t_foldert.
          loop at y_i_/BIC/PYIOSID into y_wa_/BIC/PYIOSID.
            if y_wa_/BIC/PYIOSID-/BIC/YIOSID is not initial.
              if y_wa_/BIC/PYIOSID-/BIC/YIOSID gt 2.
                move: '0CRM_OBJ_ID' to C_T_HIENODE-IOBJNM,
                y_wa_/BIC/PYIOSID-/BIC/YIOOBJ to C_T_HIENODE-NODENAME,
                y_wa_/BIC/PYIOSID-/BIC/YIOSID to y_v_n,
                y_v_n to C_T_HIENODE-NODEID,
                y_wa_/BIC/PYIOSID-/BIC/YIOTLEV TO C_T_HIENODE-tlevel,
                y_wa_/BIC/PYIOSID-/BIC/YIOPLEV to y_v_n,
                y_v_n to C_T_HIENODE-PARENTID.
                append C_T_HIENODE.
              endif.
            endif.
          endloop.
        endif.
    endcase.
    *ROSHIENODE

    Hi!
    I had the same problem during this user exit run.
    When load failed a new dump DBIF_RSQL_INVALID_CURSOR appeared.
    My problem appeared because system was loosing cursor during a SELECT...ENDSELECT run.
    I made my SELECTs smaller and everything become fine.
    SDN gives some notes:
    SAP Note Number: 1124093 70SP17: Extraction terminates with DBIF_RSQL_INVALID_CURSOR
    SAP Note Number: 401847   DBIF_RSQL_INVALID_CURSOR during extraction
    SAP Note Number: 675 Unexpected abends in SELECT loops (COMMIT)
    Hope it helps.

  • SEM-BPS Variable buffer clearing issue

    Hello experts,
    I have a situation where my user wants to use BPS functionality to perform direct data entry and validations. I know it's not standard, but that's not the point.
    How do I clear the variables buffer so that each time the user enters the plan layout they are requested to enter fresh variables to determine the selection combinations?
    Is there a function module?
    What tables store this info?
    Any suggestions will be appreciated. Thanks!

    I guess I'll answer my own question.
    There are two tables I've found that holds variables they are as follows:
    UPC_VAR_CHA_SEL - Variables - Selections
    UPC_VAR_CHA_ACT - Variables - Restricted Values
    A function module was created to read these tables and delete the values, based on the userid, hence causing a refresh.
    The function module needed to be executed in the planning folder on 'save'.
    This has worked fine.

  • SEM-BPS Variable with exit function

    Hi,
    this is my problem. I use a variable for period and I increment the variable dinamically in a sequence of execution. When I try to read the variable with a exit function, the function is only called the first time and return ok the value, but the next time the function not called and the value is returned from the buffer (I think this, because always is the same value).
    How can I change this? I need to my function return the variable value, because is changed.
    Thanks.

    Hi,
    thanks for replys.
    I think the problem occurs after update the patch level to level 15. This is the code of class_constructor in class cl_sem_variable:
    method CLASS_CONSTRUCTOR.
    data ls_dark type upc_dark2.
    select single * from upc_dark2 into ls_dark
       where param = c_param_dark_buffer.
    if sy-subrc = 0 and ls_dark-value = 'X'.
        m_buffer = 'X'.
    endif.
    endmethod.
    The flag m_buffer is always X and for that reason my the value of the variable is read from the buffer and the exit function for read variable isn't called.
    What do yo think about this?
    Thanks.

  • 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

  • Exclude a hierarchy node by using exit variable (not in query designer)

    Hi gurus!!
    I have a hierarchy for the infoObject 0COSTELMNT. Depending on the user who executes the report, the node '0599ADJUSTMENTS' must be displayed or not.
    I am trying to solve it by using an exit variable:
    Varible Type: Hierarchy Node
    Processing : Exit
    On the exit, I have entered the following code:
          IF ( sy-subrc = 0 ).
              l_s_range-sign = 'E' .
              l_s_range-opt  = 'EQ' .
              l_s_range-low = 'AJUSTES'.
              APPEND l_s_range TO e_t_range.
         ENDIF.
    But unfortunately does no work!!
    Any ideas?
    Thanks in advance
    Regards.
    Carmen Rodríguez

    Hi,
    Check the below link gives good knowledge on variables:
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/579b3c494d8e15e10000000a114084/content.htm
    Reg
    Pra

  • Creation of  Variable for Hierarchy Node

    Greetings...fellow matez,
       I am using Characteristic "0PROFIT_CTR" : PROFIT CENTER
       Here, I created used SAP <b>Standard</b> variable 0N_PCTR (Profit Center/Profit Center Hierarchy)
       This meets my requirement of allowing User to Input the TOP MOST Hierarchy Node basically means my Hierarchy.
       Now, what I need is the ability of a User Input/Key In Variable to ask for a specific Node of my Hierarchy instead of just the <b>'main'</b> hierarchy
      Let me demonstrate with an example :-
      At the moment, I have a variable defined for "0PROFIT_CTR". So, I am able to choose "XXX GROUP" as my hierarchy.
      Now, under this "XXX Group" I have several Sub-Nodes like XXX-Functional Groups ; XXX-Business Units; XXX-Subsidaries.
      How can I create a variable which prompts for this Subnodes of my hierarchy ?

    Matez,
      Issue remains unresolved.
      What I need is a <b>Hierarchy - NODE</b> variable for my "Profit and Loss" Hierarhy
      But, when I use the variable option in the 'Selecting Variable for Hierarchy' scree, I only get to choose my Hierarchy instead of my Hierarchy Node.
      How can I created a variable of type Hierarchy-NODE instead of Hierarchy for my characteristic "0Account"
    Kindly advice matez!

  • Hierarchy node variable - successor node data not displayed

    Hello,
    I have a query with a hierarchy in the ‘rows’ section. This hierarchy is restricted by a hierarchy node variable with the following settings: variable type ‘hierarchy node’; customer exit; single value; mandatory; not ready for input; cannot be changed in query navigation.
    The customer exit correctly supplies the node. However, only data for THIS node is displayed in the query results. And data for successor/underlying nodes is NOT displayed.
    I tried several things, including:
    - rightclick ‘Rows’ > ‘Display as a Hierarchy’
    - customer exit variable: multiple values instead of single value; optional instead of mandatory
    In the ‘Hierarchy Attributes’ for the hierarchy, nothing is checkmarked, except for Root/Totals Item Appears Above’ and ‘Drilldown start level = 00’. The hierarchy and its nodes are valid from 01.07.2005 to 31.12.9999.
    I have a feeling in what area the solution can be found, but I have no clue what to do further on with it. As a test I replaced the customer exit variable with a user entry variable. If I then execute the query, I can select either the ‘node’ or the ‘value’ (both with the same technical value!). If I select the node, I get all data, including data for successor nodes. If I select the value, I only get the data for the node, not the underlying successor nodes. For some reason, the customer exit variable behaves like the latter and not like the first. I do not know how to solve this.
    I would greatly appreciate if you could help me out of this issue here.
    Kind regards,
    Frank

    Hi,
    no, it doesn't. It just returns the data for the node and not for the underlying nodes.
    Frank

  • Run Time Error when trying to select hierarchy node

    Hy all,
    the situation is the following:
    i attempt to create a variable of type "hierarchy node" (for cost center cha) in my planning area, i used the replacement type "user defined value", check on "input allowed by user" and then i create the user entry, in selection condition i run match code and when i try to select a single cost center (not a hierarchy node) expanding the hierarchy tree the system goes dump with the following message:
    Runtime Errors         MESSAGE_TYPE_X
    Error analysis
    Short text of error message:
    Program is inconsistent -> see long text
    Technical information about the message:
    Diagnosis:
    An inconsistent program status has occurred. The program cannot be continued.
    System response:
    The system crashes.
    Procedure
             1.  Look in OSS for a note under the error message UPC099.
             2.  When you open a problem message, send the first pages of the
                 system crash message including the section 'Source code excerpt
                 ' with the message.
         Procedure for System Administration
        Message classe...... "UPC"
        Number.............. 099
    Selecting a hierarchy node (not a single cost center but a text node grouping more cost conter) this problem does not occur.
    I appreciate (and reward) any hints.
    Thanks in advance
    Fabio

    Hi,
    Go through the oss notes with error message UPC099
    Dump during hierarchy selection:<b>536694</b>
    Dump when reading a hierarchy with intervals :<b>423953</b>
    Regards-
    Siddhu
    Message was edited by: sidhartha

Maybe you are looking for

  • How can i declare 2 or more dimension array as function parameter???

    I am new to Objective-C and Cocoa. and now I have a problem. I want to send 2 dimension array to function but it cannot compile the error is "array type has incomplete element type" Please help me This is my Interface + (void) reValueInArray: (int[][

  • Can I install Solution Manager 7.0 in Window Server 2008 R2 Enterprise ed.?

    Hi, SDN experts. I am trying to install Solution Manager 7.0 in in Window Server 2008 R2? I checked the the software requirement for SAP Solution Manager 7.0, it only mentioned Window Server 2003 and 2008  enterprise edition. I am trying to install S

  • ? Horizontal Menu Bar not loading in IE

    Our horizontal menu bar does not load into IE.  It works fine in Safari, Firefox and Chrome.  It used to work on all four browsers so I've gone back and uploaded an older version of our site to see if I could get it to work in IE.  Even this older si

  • My buttom Auto Brightness is gone - iphone 5 ios6.1

    my buttom Auto Brightness is gone - iphone 5 ios6.1 how to fix ?

  • Join third party wireless network

    I have an AE, not (n), and would like to connect it to my working Thomson wireless router to be used as the iTunes streamer. What do I do? I have tried a few suggestions I found but what happens is that when AE is rebooting it freezes and then the co