Variable and Exit

Hi all,
I have this problem: I need to create a variable, so I can filter values in a query. This variable needs to find a value in an infocube. The value i'm looking for is the same for every record in the infocube, it is an ID for the data load. The infocube holds only one dataload (the last one), because every time it loads something, it deletes the previous one.
I think I shouls use an exit to find this ID, but I don't know how to build one. Then I should create a variable that uses this exit, but I don't know how to do that.
Thanks in advance,
mauricio.

Hi Mauricio,
  See the documents below,
1. <b>User Exits in SAP BW (ppt)</b>
   https://websmp104.sap-ag.de/~sapidb/011000358700005475091999
2. <b>User Exits Examples (doc)</b>
   https://websmp104.sap-ag.de/~sapidb/011000358700005475101999
Hope it Helps
Srini

Similar Messages

  • Types of variables and exits with screen shots

    Hi folks,
    I want to know types of variables and Exits and  how they are useful in reporitng.
    Please can body send me the docs or procedures how to use this.
    Useful docs/screen shotts will be hightly appreciated n wiil be assigned points.
    thanks in advance.
    Urs,
    raki

    Hi,
    Variable types:
    http://help.sap.com/saphelp_nw04/helpdata/en/c1/759b3c4d4d8d15e10000000a114084/frameset.htm
    Customer Exits :
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a56f5e09411d2acb90000e829fbfe/frameset.htm
    regards
    Happy Tony

  • Management Cockpit: Variables and Exits

    Hello,
    Quick question for all of you.  Problem is that we are using the cockpit to view hierarchy information as per our BW query which has it defined to always bring back two levels of data.  CPM simply ignores the lower level and only displays information for the node chosen within the cockpit.
    Has anyone ever developed a management cockpit where the user is allowed to use a run-time dropdown variable within the cockpit to select a node in the Org hierarchy…..while having the system return only the sub nodes (next level below) in the result area? Or maybe the node chosen and the subnodes?
    User Scenario:
    The user would like to first run the cockpit (initial prompt) for one organization node and see (for that node) how actuals are tracking to budget for a number of KPIs. Next, they would like to....
    While remaining inside the cockpit, the user would like to change the view (by using the Org drop down) to only show the sub-nodes of the node that they pick. This will allow them to compare across the sub-nodes? We are trying to use a BW customer exit variable to trick the query into only returning the sub-nodes. We haven't had much success and we are looking for any suggestions.
    Let me know what you think and it will be much appreciated!

    Hi,
    Variable types:
    http://help.sap.com/saphelp_nw04/helpdata/en/c1/759b3c4d4d8d15e10000000a114084/frameset.htm
    Customer Exits :
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a56f5e09411d2acb90000e829fbfe/frameset.htm
    regards
    Happy Tony

  • Customer Exit Variable and Condition in a Query (Sequence of Execution)

    Hi,
      For a query i defined a Customer exit variable and a condition....
    Which will first execute...wether it is a  Variable and then Condition or vise versa
    Is there any way we can control sequence of execution
    My requirment is first to execute the condition and the variable how can i control this
    Thanks

    Hi
    In your customer exit you will be having a field by name I_STEP which will help you to handle the time of execution of the variable.
    Assign points if helpful
    Prathish

  • How to create customer exit for characteristic variables and for text vars.

    hi friends,
      can anybody tell me how to create customer exit for characteristic variables and for text variables in bw ides system.
    thanks,
    sree

    Hi,
    Please have a look at:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d
    Krzys

  • How to derive value from another variable and use it to read master data?

    Hi,
    I have following case:
    First I need to read the value from Cost Center -variable (ZIPCC) and then I need to use that value to determine the home currency of that cost center from the cost center master data table (field: OBJ_CURR).
    I know to basic idea on how to do this, but don't seem to get the syntax correct. Could someone point me in the right direction?
    So the objects in play are:
    ZIPCC = Cost center selection variable (mandatory, single value)
    ZIPCUR = Cost Center Currency variable (customer exit, single value)
    0COSTCENTER
    0OBJ_CURR = Field in cost center master data
    Help will be greatly appreciated!
    -m

    Hi,
    Thank you very much for your example I can see that this logic works! However I'm experiencing trouble in selecting the 0OBJ_CURR
    This kind of declaration isn't working: "D1 Like /BIC/0OBJ_CURR."
    And the same goes for the Selection:
    "Select single OBJ_CURR into D1 from /BI0/PCOSTCENTER where COSTCENTER = i_t_var_range-low."
    This is where my syntax also went wrong.
    0OBJ_CURR is a unit, is there a special way to declare it and use it in the code?
    (and 0CURRENCY is a reference unit for 0OBJ_CURR).
    Do you have adivce on this?
    -miikka

  • Text Variable(Customer Exit) displays variable name instead of its value.

    Hi Gurus,
    My requirement is to display the year(from variable) as the field name i.e Year end salary 2009.
    I was using the fields name as hardcoded values like 2009 but as per my requirement i need to display it from the variable.
    I tried using Text Variable using customer exit, but I'm getting variable name(zvariable) instead of value(2009).
    Please help me out, many thanks in advance.
    Regards,
    Ankur

    Hi,
    Actually I tried to create a Text Variable with Replacement Path.
    But here the problem is that we have a Characteristic Variable (Customer Exit) which is not listing in the selection box of Replacement Path.
    Hence we tried to create another Text Variable (Customer Exit) and refering to the same Customer Exit code.
    Regards,
    Ankur

  • Exclude in variable customer exit

    Hello,
    Can you help me solve problem with exclude in variable customer exit? I have z-table with name of variable and values. Primary I need save multiple values with exclude. I was tried this code:
    if i_step eq 2.
    select * from zbwsd_01 into table i_t_var
         where vname = i_vnam.
    l_subrc = sy-subrc.
    else.
    l_subrc = 4.
    endif.
    if l_subrc = 0.
      loop at i_t_var.
        CLEAR L_S_RANGE.
        L_S_RANGE-LOW  = i_t_var-value.
        L_S_RANGE-SIGN = 'E'.
        L_S_RANGE-OPT  = 'EQ'.
        APPEND L_S_RANGE TO E_T_RANGE.
      endloop.
    else.
    I have NW2004s. Have you some idea?
    Thanks a lot
    Jiri

    Exclude is ok, if I use variable type Selection option. For type Multiple value this is not valid

  • Problem in the variable customer exit in the query jump target

    Hi developers,
    we have problem because we have created a variable time on 0CALDAY who is mapped in the cube of the stock with posting date.We launch the query for example with range 01/8/2005 31/8/2005 and the resul is OK.
    Then we jump on the other query where the users wish see the result of the posting date for the period 01/8/2005 31/8/2005 For resolved this problem we have created a variable customer exit for the characteristic 0Postingdate and have inserted the code in user exit variable:
    WHEN 'ZV_CEREG'.
        IF i_step = 2.
          LOOP AT i_t_var_range INTO loc_var_range
                 WHERE vnam = 'Z_DAT_AN'.
            CLEAR l_s_range.
            CLEAR datastock.
            l_s_range-low  = loc_var_range-low.
            l_s_range-high = loc_var_range-high.
            l_s_range-sign = loc_var_range-sign.
            l_s_range-opt  = loc_var_range-opt.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
        ENDIF.
    When we effectued the jump the our objective is transfer the date inserted by user in the variable  of the query sender 'Z_DAT_AN' to the variable of the query receveir 'ZV_CEREG'.
    This step it does not work correctly, this why are different query?
    You can help me for resolved this problem!!
    Thanks Domenico

    Hi,
    I think, this approach does not work. Because customer exit will be finished before displaying the result set of 1st report. So the assignment to VAR2 from VAR1 does not execute then after.
    I hope, In RSBBS,after assigning receiver, in the assignment details,select 'Variable' for 'Type' of 'infoobject' 0calday.And select '0Postingdate' for 'fieldname' and select 'selection options' for selection type.
    Take help.sap.com help for further information.
    With rgds,
    Anil Kumar Sharma. P
    Message was edited by: Anil Kumar Sharma

  • Formula Variables and their use

    I have a scenario where I have a date selection using a variable.
    I get from and to date defaulted to 1st day of the month and current date
    Next, I created a formula variable to calculate the difference between these 2 dates.
    I can't uses replacement path variable to calculate the difference becaue the dates are not part of the transaction data.
    When ever I bring formual variable into a formual it gives an error
    Terminate: Variable D1QDQC684JU76RD3FQ10GECZ9 (D1QDQC684JU76RD3FQ10GECZ9) does not exist or is incorrectly used D1QUMP50BGW24SQ9PQMZDSMD1 [A418(BRAIN)]
    This error is not in the customer exit. This error happens in the query designer design phase during syntax checks.
    Thanks for your help
    Kartik

    there was a problem in defining the variables, while u r opening your query, and if its getting terminated means, definition of the variable and its usage is wrong somewhere else.
    Here is the step by step procedure for Formula variables:
    http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html

  • Filters with variables user-exits on queries

    Is it possible to define complex selection criteria by using the EXIT_SAPLRRSO_001?. Something similar to what we may do a select for Sap:
    Select * from table where ((field1 = value1 and field2 = value2) or (field1 = value3 and field2 = Value4)).
    I guess not, it seems that only allows a range for output as a single variable ...
    If this is not possible, is there any way to filter the data before the show?. I do not care who is among the infoprovider and Bex, who between Bex and Excel ...
    Filters with variables user-exits on queries

    The variable can take any combination that can be specified in a select-option. The criteria used to select these values to be populated for the variable can be as complex as any ABAP program. So all combinations in a select statement are allowed.

  • About Replacement Path, Text Variables & Cusomer Exit?

    Hi
    Please explain along with examples youwhen we use Replacement Path
                                                   Text Variables and
                                                   Customer Exit
    Please search the forum before posting a thread
    Edited by: Pravender on Apr 18, 2011 3:48 PM

    Hi,
    1. Customer EXIT :
    Business Scenario:
    The business department wants to check if the orders from the customers for a  certain week (e.g. 6 weeks from now) are already transmitted into their system. Therefore they run a report with a variable, that is calculated automatically.
    Note: Of course this is not the only suitable solution, but it will show you how the exit works.
    Step by Step Solution:
    A.You should create a variable on the info object 0CALWEEK like this:
     1.Technical Name: WS_FWEEK
    2.Description: Workshop Future Week
    3 Interval
    5.Mandatory variable entry
    6.Processing: Customer Exit
    7.NOT ready for input
    B.Call transaction CMOD for the definition of the customer exit.  
    C.Create a new project, maintain the short text and assign a development class.  
    D.Go to Enhancement Assignments and assign RSR00001. Press the button components to continue.  
    E.Double-click on EXIT_SAPLRRS0_001.  
    F.For documentation place the cursor an RSR00001 and use the menu GoTo => Display documentation.   
    G.Then double-click on ZXRSRU01.  
    H. If the include does not exist, you have to create it; assign a development class and a transport request
    Enter this code:
    INCLUDE ZXRSRU01                                        *
      data: l_idx like sy-tabix,
            workdate(8) type d,
            futureweek(6) type c.
      DATA: L_S_RANGE TYPE RSR_S_RAGESID.
    case I_vnam.
    when u2018WS_FWEEKu2019.
    if i_step = 2          u201C after pop-up
    Calculate Current day plus 6 weeks:
      workdate = sy-datum  + 42 .
    Calculate the week of this day
      CALL FUNCTION 'DATE_GET_WEEK'
        EXPORTING
          DATE               = workdate
        IMPORTING
         WEEK               = futureweek
    EXCEPTIONS
      DATE_INVALID       = 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.
      ENDIF.
      l_s_range-low = futureweek.
    l_s_range-high =
      l_s_range-sign = 'I'.
      l_s_range-option = 'EQ'.
      append l_s_range to l_t_range.
      p_subrc = 0.
    ENDIF.
    ENDCASE.
    I.Save and activate the codie 
    J.Activate the project. (Very important!)
    K. Define a query using the above created variable.
    L.For displaying the variable values in the executed query you also may define two text variables. These should, if necessary, be able to show the lower and the upper value calculated by the customer exit.
    2 Replacement Path :
    Example for filling variable values depending on an other variable /
    Deriving one variable value from another variable
    Business scenario.
    A query should show in one column the value for one period. The period should be entered by the user. In the second column the accumulated vale from the beginning of the year to the period of the first column should be displayed. The InfoCube contains only the InfoObject 0CALMONTH (Month/Year) and not single InfoObjects for period and year.
    Solution:
    For this scenario we need four variables: two variables for the column text and two variables for the period values. One of these period variables is defined as a variable with a customer exit
    Step by Step Solution:
    Create an input variable u201CMONTHu201D (you need this specific information for the coding example below). The variable is based on the InfoObject 0CALMONTH. Set the following attributes:
    Single Value
    Ready for input
    Mandatory variable entry 
    Create a variable  u201CCUMMONTHu201D (you need this specific information for the coding example below) with a customer exit as a processing type. The variable is based on the InfoObject 0CALMONTH. Set the following attributes:
    Interval
    NOT ready for input!
    Mandatory variable entry
    Create two text variables. Both variables use the u201CReplacement Pathu201D as processing type. The first text variable is filled with the text from the u201Cfrom valueu201D. The second is filled with the text from the u201Cto valueu201D.
    Enter this code
    INCLUDE ZXRSRU01                                        *
    DATA: L_S_RANGE TYPE RSR_S_RAGESID.
    DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
    case I_vnam.
    when u2018CUMMONTHu2019.
    if i_step = 2          u201C after pop-up
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
              WHERE VNAM = u2018MONTHu2019.
         CLEAR L_S_RANGE.
    l_t_range-low = loc_var_range(4).  u201Cgetting current year
    l_t_range-low+4(2) = u201801u2019 u201Csetting 1st period in cur. year
    l_t_range-high = loc_var_range-low u201Chigh value=input value
    l_t_range-sign = 'I'.
    l_t_range-option = 'BT'.
    append l_s_range to e_t_range.
    exit.
    endloop.
    endif.
    endcase.
    Save and activate the code.
    Activate the project.
    Define a query containing all the variables.
    Regards
    CSM Reddy

  • No Query Result After Using Hierarchy Node Variable (Customer Exit)

    Hi
    I have problem at my query. It doesn't show anything in BEx but when i check the data in BW using tcode LISTCUBE i can display the data.
    This problem happen when i change the restrictions for one of characteristic in filter value.
    The characteristic is custom Infoobject (ZCPARTNER), which like Infoobject Partner Unit.
    Previously I set the restriction with constant value, example : A500,A700,A710,A720,A730,A740 and it worked before.
    But when I change it using hierarchy node variable (customer exit), this problem is arise.
    Here is my code at ZXRSRU01
      WHEN 'ZHIEPART'. --> hierarchy node variable
       BREAK-POINT.
        IF i_step = 2.
        Read from ZZCONSGR information
          LOOP AT i_t_var_range INTO loc_var_range
             WHERE vnam = 'ZZCONSGR' OR vnam = 'ZOCONSGR'. --> read input value from consolidation group variable
            CLEAR l_s_range.
            CLEAR l_s_range-low.
            IF loc_var_range-low EQ '000000000000030000'
               OR loc_var_range-low EQ '000000000000010130'.
              l_s_range-low = 'MEZBUNITMDI'.
              l_s_range-high = '0HIER_NODE'.
            ELSEIF loc_var_range-low EQ '000000000000040000'
               OR loc_var_range-low EQ '000000000000010160'.
              l_s_range-low = 'MEZBUNITMPI'.
              l_s_range-high = '0HIER_NODE'.
            ENDIF.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
        ENDIF.
    Here the hierarchy in BW system:
    XXX Cons Unit Hierarchy Set; InfoObject ; Node Name
    - XXX Cons Unit Hierarchy Set; 0HIER_NODE; ZBUNITALL
      - XXX DownStream ... ; OHIER_NODE; MEZBUNITMDI
         - ME/A730; 0CS_UNIT; MEA730
         - ME/A740; 0CS_UNIT; MEA740
      - XXX Power ; OHIER_NODE; MEZBUNITMPI
        - ME A800 - A808; OHIER_NODE; MEZBUNITMPI
        - PT Mitra xxx; 0CS_UNIT;  MEA820
    Anyone can help my problem? Thank you
    Regards,
    Satria B Tandyono

    Hi Satria,
    Instead of following code ---
    CLEAR l_s_range-low.
    IF loc_var_range-low EQ '000000000000030000'
    OR loc_var_range-low EQ '000000000000010130'.
    l_s_range-low = 'MEZBUNITMDI'.
    l_s_range-high = '0HIER_NODE'.
    ELSEIF loc_var_range-low EQ '000000000000040000'
    OR loc_var_range-low EQ '000000000000010160'.
    l_s_range-low = 'MEZBUNITMPI'.
    l_s_range-high = '0HIER_NODE'.
    ENDIF.
    try this ---
    IF loc_var_range-low EQ '000000000000030000'
    OR loc_var_range-low EQ '000000000000010130'.
    l_s_range-low = 'MEZBUNITMDI'.
    ELSEIF loc_var_range-low EQ '000000000000040000'
    OR loc_var_range-low EQ '000000000000010160'.
    l_s_range-low = 'MEZBUNITMPI'.
    ENDIF.
    Note : whenver the option is EQ, the system takes only low value.

  • Variable Type EXIT - Locking Transaction Data

    Dear all,
    I have to use a variable type Exit in the level to identify all cost centers for a planner and his corresponding boss (master data lookup). Now e.g.
    the planner has cost center 1 and 2 as possible single values. The boss has cost center 1, 2, 3,and 4 because he also is the boss of an other one.
    The result is now that the boss locks all cost centers 1,2,3 and four even if he only plans e.g. the cost center 4. In this way it is not possible for the planner to enter data for 1 or 2 the same time.
    Does anybody has an idea to solve this situation or how to lock only the values of the variable that is really in use?
    Thanks a lot
    Dieter

    Hi Dieter,
    Refer to Marc's comment in the below post that Planning layouts lock all data
    How to avoid SEM-BPS Lock entries
    Hence the best option would be to create a different Planning level for Cost center based on the need for planning.
    You could also explore the possibility of creating a BEx report wherein the data just needs to be viewed by the boss and not planned.
    Hope it helps
    Cheers
    Anurag
    Also take a look at this document to get some more insight into locking in BPS
    https://websmp102.sap-ag.de/~sapdownload/011000358700004574572003E/SEMBPSLocking.pdf
    Hope you have access to the service marketplace.
    Message was edited by: Anurag  Khungar

  • Steps for Variable User Exit

    Hi All,
    I have to do some coding in my variable exit. I have followed the follwing steps to create a project a write the code. Anyone please confirm if my steps are correct or missing anything.
    1. Go to CMOD, give project name and Click on create.
    2. Enhancements -> give RSR00001. and click on Components.
    3. Double click on 'EXIT_SAPLRRS0_001'. This will bring up the functionmodule in which we can find an include.
    4. Double click on 'ZXRSRU01' Include.
    5. Press Enter for the warning message.
    6. It gave me a message saying that 'the Include doesnot exist, Do you want to create it'. Click Yes. This will bring up a blank ABAP editor.
    7. Write the required code using CASE Statement.
    Am I missing anything here?
    I would be grateful if someone can send me any documents relating to the variable User Exits.
    Best Rgds,
    James.

    Hi,
    Directly go se38 and execute ZXRSRU01 program. Then write a case statement. below is the sample code to calculate default year month variable.
    case v_name.
      when 'ZYRMTH'.
        if i_step = 1.
          read table i_t_var_range
          with key vnam = 'ZYRMTH'
               into ld_s_var_range.
          if sy-subrc ne 0.   " no value exists, assigns default
            c_year = sy-datum(4).
            c_month = sy-datum+4(2).
            if c_month = 1.
              c_year = c_year - 1.
              c_month = 12.
            else.
              c_month = c_month - 1.
            endif.
            concatenate c_year c_month into c_monyr.
            l_s_range-low = c_monyr.
            clear e_t_range.
            l_s_range-sign = 'I'.
            l_s_range-opt  = 'EQ'.
            append l_s_range to e_t_range.
          endif.
        endif. 
    endcase.
    Regards,
    Malli

Maybe you are looking for

  • Slow basic GUI operations in After Effects, mouse clicks 'sticky'

    Hi guys, I've been experiencing very lacklustre performance from the After Effects interface, in any project larger than a few title cards. By that I mean just dragging keyframes, reordering layers, selecting options from context menus, etc. Sometime

  • "Merge with values" not merging values

    Hello, I have quite a problem with LDAP provisionning and LDAP groups management: - "user1" and "user2" already exist in the LDAP directory and are members of "group1" - I create user1 in IDM and give him the LDAP ressource => he gets linked correctl

  • Almost impossible to revive this machine??

    Hey, Got a macbook pro 15, mid-late 2007 Was installing updates on my computer but it froze, screen went black and no movement for 12 hours, so decided to take my chance and force it off. Big Mistake. Upon starting laptop blue lines are now on screen

  • Item level security not available to accounts with manage content?

    Though I'd post this here before trying metalink. Environment: App Server Portal 9.0.4 (10g) on Win200 The scenario: I have set up a page with one item area. This is set to be a portlet on another page and act as a message board. I wish to set up a g

  • Native SQL from ABAP - ORA 02396 max idle time exceeded

    Hello,   I am trying to read a table outside of the R/3 environment using native SQL statements. I'm getting the data just fine. But every other time (depending on elapsed time), I get the ORA-02396 exceeded maximum idle time, connect again. Here's t