Retrieve values of other exit variable

hi gurus
i have to build an input ready query where on rows u have:
funds center          cost center         profit center     account
and on columns:
0fiscper3
0amount
the user enter on the variable screen this:
0comp_code
0fiscyear
funds center
currency
0account
So just using the funds center I have to show cost center (matched with funds center on a Z Characteristic that I ve created) and the profit center for every costcenter (consulting 0costcenter on 0profit_ctr attribute).... I m using 2 exit variables  on cmod ( one for getting costcenter and other for getting profit center), but when i have to feed profit center variables I have to retrieve the values for costcenter that were got for this variable... but how can I do this? Can I retrieve the values of other exit variable when filling profit center variable?
By the way I can use relation characteristic over this infocube because there already is an abap program that makes some logic over this infocube.
some suggest? point will be assigned
regards

hi Ashish Tewari :
That s the way I was doing...
in ur example, are u considering 'ZCOST_CTR' as other exit variable? Because it s an exit variable that I fill through funds center variable whis user input...
If its not, what do u suggest? 
here s my code, it works but it match every costcenter with all profit centers , which is wrong, every costcenter hast just 1 profit center...
** VARIABLE FOR 0costcenter
  WHEN 'ZECCVAR045'.
    IF i_step = '2'.
      READ TABLE i_t_var_range INTO l_s_var_range WITH KEY vnam = 'ZECCGE001'.*this variables contains funds center
      centro_gestor = l_s_var_range-low.
      SELECT * INTO TABLE it_cenges_ceco
      FROM /BIC/MZECFM012
      WHERE objvers   = 'A'
      AND funds_ctr = centro_gestor.
      LOOP AT it_cenges_ceco INTO ls_cenges_ceco.
        l_s_range-sign = 'I'.
        l_s_range-opt  = 'EQ'.
        l_s_range-low  = ls_cenges_ceco-/BIC/ZECFM012.
        APPEND l_s_range TO e_t_range.
      ENDLOOP.
    ENDIF.
** VARIABLE for profit center for each cost center
   WHEN 'ZECCBE010'.
    IF i_step = '2'.
      BREAK-POINT.
      CLEAR it_cenges_ceco.
      CLEAR ls_cenges_ceco.
      CLEAR centro_gestor.
      READ TABLE i_t_var_range INTO l_s_var_range WITH KEY vnam = 'ZECCGE001'.
      centro_gestor = l_s_var_range-low.
      SELECT * INTO TABLE it_cenges_ceco
      FROM /BIC/MZECFM012
      WHERE objvers   = 'A'
      AND funds_ctr = centro_gestor.
      LOOP AT it_cenges_ceco INTO ls_cenges_ceco.
          CLEAR ls_ceco.
          ceco = ls_cenges_ceco-/BIC/ZECFM012.
          SELECT SINGLE * INTO ls_ceco
          FROM /BI0/MCOSTCENTER
          WHERE objvers   = 'A'
             AND costcenter = ceco
             AND dateto = '99991231'.
          l_s_range-sign = 'I'.
          l_s_range-opt  = 'EQ'.
          l_s_range-low  = ls_ceco-PROFIT_CTR.
          APPEND l_s_range TO e_t_range.
      ENDLOOP.
*     BREAK-POINT.
    ENDIF.
ENDCASE.

Similar Messages

  • Passing multiple single values in Customer Exit Variables

    Hi,
    I have one requirement to Pass multiple single values in Customer Exit Variable.
    If the user gives 2010 i need to get value previous fisacal year(2009),if its 2009, we need to get 2009.
    Just requirement is like how to pass multiple single values?
    Thanks.

    Hi..
    For this create a variable- Types of variable= Characteristics Value> Processing type as Customer Exit-->Reference Char as Fiscal year..
    Try this code..
        when 'xxxx'.
          DATA: lv_zp0003_month(2) TYPE n,
                  lv_zp0003_year(4) TYPE n.
          CLEAR: lv_zp0003_month, lv_zp0003_year.
          lv_zp0003_month = sy-datum+4(2).
          lv_zp0003_year = sy-datum(4).
    If the month is January the year is set to previous year
          IF lv_zp0003_month = '01'.
            lv_zp0003_year = lv_zp0003_year - 1.
           l_s_range-low = lv_zp0003_year.
    Else the year is set to actual
          ELSE.
            l_s_range-low = lv_zp0003_year.
          ENDIF.
          IF l_s_range-low = l_s_range-high.
            l_s_range-opt = 'EQ'.
          ELSEIF l_s_range-high IS INITIAL.
            l_s_range-opt = 'EQ'.
          ELSEIF l_s_range-low LT l_s_range-high.
            l_s_range-opt = 'BT'.
          ENDIF.
          l_s_range-sign = 'I'.
          APPEND l_s_range TO e_t_range.
    Hope this helps.
    Regards.
    AKG

  • Value for user-exit variable  is invalid

    Hi Gurus,
    My Value for a Fiscal Year Prd returns a invalid value for the 12th month of each year( for Example 12/2004, returns the error "Value 200313 for User-exit variable is invalid.
    This is the code that is being used.
    *Rolling 12 months for entered month
    when 'ZCALM12'.
          clear: v_mth, v_yr.
          REFRESH E_T_RANGE.
          CLEAR L_S_RANGE.
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
                   WHERE VNAM = 'ZCALMON'.
            exit.
          endloop.
          v_yr = LOC_VAR_RANGE-LOW+0(4) - 1.
          v_mth = LOC_VAR_RANGE-LOW+4(2) + 1.
          L_S_RANGE-SIGN = 'I'.
          L_S_RANGE-OPT = 'BT'.
          concatenate v_yr v_mth into L_S_RANGE-LOW.
          L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
          APPEND L_S_RANGE TO E_T_RANGE.
    Thanks in Advance.

    Hi Ravi,
    when 'ZCALM12'.
    clear: v_mth, v_yr.
    REFRESH E_T_RANGE.
    CLEAR L_S_RANGE.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZCALMON'.
    exit.
    endloop.
    <b>-->> Here, you are not checking any thing.</b> <i>On which logic you are reducing year by one and increasing month by 1..?</i>
    v_yr = LOC_VAR_RANGE-LOW+0(4) - 1.
    v_mth = LOC_VAR_RANGE-LOW+4(2) + 1.
    -->><i>IF month is 200512 you will get output from above code is :</i> please check.
    v_yr = 2005 - 1 = 2004
    v_mth = 12 +1 = 13.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    concatenate v_yr v_mth into L_S_RANGE-LOW.
    L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
    APPEND L_S_RANGE TO E_T_RANGE.
    Try to debug the code by keeping break point after When. and execute the report, you will be debugging mode.
    Hope it Helps
    Srini

  • Cannot determine a value for an exit variable in the Formula fn w/p empty

    Hi All,
    We have an exit variable Z_EX_AR_VAR, the would read a hierarchy node input variable (Z_HN_AREA), which is furthur based on a hierarchy input variable (Z_HR_AREA), and wouuld return the first leaf of it.
    We have implemented a input ready query based on this exit variable and it is getting the first node and is input ready and saves the data to the database.
    It works well in the query when we have filtered the characteristic with the hier and hier node and the exit variables.
    We need to use the same value to be used in the Fox function.
    As per the requirement, the Fox function has to process the zero (empty) records.
    So, we have customized formula function to process emptry records.
    And in the function of type formula function that processes empty records, we have used the following statement.
    DATA AR type ZAREA.
    AR = VARI ( Z_HN_AREA, HIENM=Z_HR_AREA, 1).
    We are getting the following error message:
    Cannot determine a value for the variable Z_HN_AREA.
    Planning function ended with errors.
    What is that we are doing wrong here. Is it with the 'Process Empty Records' function that cannot read the variable.
    How come this variable is working in the query and it is not working in the FOX.
    We have done the variable to variable binding in the WAD also. Still the same problem.
    Any ideas? Thanks in advance.
    Best Regards,
    - Shashi
    Thanks in '

    Hi All,
    Michael Wolf from SAP confirmed that we cannot use VARiable read functions in the customized Formula function that processes the zero (empty records) as he spoke to SAP AG about the issue.
    Hence we have made a work around by creating a valid record using a dummy key figure in the Custom Formula function that processes empty records so that in the next step, the regular Formula function would get executed, where we could access the variable values by using VARV, VARI functions.
    Thanks,
    - Shashi

  • How to exclude values in an exit variable?

    Hello experts,
    I try to exclude special values from my selection via exit variable but I get an error of invalid values.
    could it be that something in my selection table is wrong? Do I have to use an other value for SIGN or OPT to exclude values?
    my Coding is:
    l_s_range-low  = '0000000404'.
    l_s_range-sign = 'E'.
    l_s_range-opt  = 'EQ'.
    APPEND l_s_range TO e_t_range.
    I tested my values with include them (SIGN = I) and this works fine.
    settings of the variable are:
    Type of variable:      characteristc value
    processing by:         Customer exit
    variable represents: Multiple single values.
    Where is the Error?
    Thanks in advance
    Johannes

    Hi there,
    I tried once to do that, i.e., with customer defined variable use the exclude sign 'E' for a variable but it doesn't work.
    Don't know why, but excluding values with 'E' doesn't work.
    Although it seems stupid you might consider excluding that value directly in the query in filter, or use BT from a value till 0000000403 and other BT from 0000000405 to above.
    Diogo.

  • Table look up using value from customer exit variable

    I have a customer exit variable, CURRMON, which the user enters in the format MM/YYYY. From this entry, I would like to do the following to calculate and display the number of business days in the selected month:
    Do the following to get Business Days in month.
    Use the KF "FBA Day"  (CTAFBAD) from the CTA_M01 infocube and write ABAP routine.
    1. Based on user entry cal month get the last calendar day .
    2. Do a master data look up (CTAFBAC is the master data object), using the last calendar day from step 1.
    3. CTAFBAD is the attribute of CTAFBAC so move the value of CTAFBAD to the result, and display this result
    Can anyone help me with this?

    Hello,
    You can use i step = 1 in SMOD transaction and write the code there.
    l_s_range-low = sy-uname.
    append ls_range to e_t_range.
    regds,
    Shashank

  • Current filter values in Customer Exit variables

    Hi!
    I have a pretty hard question here that I would be impressed if someone has an answer to:
    The scenario is:
    I have a customer exit variable that should de dependent on the current filter setting in the query. Is it possible from within the customer exit code get information about the current filter(s)?
    I know that I can access other variables values, but in this case I would like to know which values that has been filtered on within BEx (after the popup screen).
    Regards
    Marty

    You asked for:
    1. In the field I_S_RKB1D-COMPUID (or GENUNIID I'm not quite sure) you get the internal query name.
    2. Look in RSZELTXREF with SELTUID = I_S_RKB1D-COMPUID.
    3. The filter values have LATYP = FIX (if they are in the filter box).
    4. Search table RSZRANGE with ELTUID = RSZELTXREF-TELTUID.
    5. Don't wonder if this doesn't work anymore after an upgrade
    Best regards
    Dirk

  • Based on select list, i need to retrieve values in other select list

    Hi,
    am new to apex using apex3.2, i need to retrieve values in select list based on the other select list vale with out refreshing page.
    ie i have region select list and country select list,in country corresponding region country must be display but with out refreshing page.
    can you please any body guide me.
    Regards
    shashidhar
    Edited by: 871140 on Jul 7, 2011 10:34 PM

    Hi,
    you can use cascading LOV for that, i which the other LOV field will be changing depending upon the selection of other value(which is in LOV).
    http://www.inside-oracle-apex.com/oracle-apex-4-0-cascading-lovsselect-lists/
    Regards,
    Mini
    Mark Answers Promptly

  • Excluding values in Customer exit variable

    Hi,
    I need to excludes some values, but should have a option to include these values in variable screen depends on different users requirement.Default this values will be excluded.Please help me writing this code.
    Will assign points,
    VJ

    Hi,
    You can try using a select option variable without writing any code.
    There you can specify default values as exclusion and if user enters their own values those will be included automatically.
    Else you need to create a dummy variable (user input) to get the user input and other variable (customer exit) to include the values if user enters / exclude default values. If you still need some code sample let me know.
    hope this helps.
    regards
    rajesh

  • Problem with Bex Customer Exit Variable

    Hi Friends,
    I have a customer exit variable which is getting filled based on the User Input.  I have written the code inside the If condition checking i_step = 2. The code is working as required.
    But the problem is when I try refreshing the query or change the user variable selection, the Customer exit variable is not changing.  I tried to debug the code and realized that the  values for the exit variable based on the previous selection is not cleared and the i_step = 2  is not being executed for the variable.
    While I close and reopen the query, the code is working fine.  
    Does anyone know why this is happening?  Please suggest..
    Thanks in advance..
    Regards,
    Priya

    Hi Binu,
    Here is the code sample.  I am trying to populate the month based on the input Week number '0I_WEKIN'
    .  For eg.  If I give 37.2011, the month value should be 08.2011.  If I give 39.2011, month should be 09.2011.
      WHEN 'ZC_MONTH'.
        IF i_step = 2.     "after the popup
            READ TABLE i_t_var_range INTO lw_var_range WITH KEY vnam =
        '0I_WEKIN'.
           IF lw_var_range-high IS NOT INITIAL.
              l_week  = lw_var_range-high.
              l_week = l_week - 3.
              CALL FUNCTION 'WEEK_GET_FIRST_DAY'
                EXPORTING
                  week = l_week
                IMPORTING
                  date = l_date.
              lw_range-low = l_date+0(6).
            ENDIF.
            lw_range-sign = 'I'.
            lw_range-opt  = 'BT'.
            APPEND lw_range TO e_t_range.
        ENDIF.
    Regards,
    Priya

  • Problem with User exit variable

    We're using an user exit variable (var2) for YTD calculation (For getting the first month of current year). It gets value from another exit variable (var1) which has by default value last month of current year(populated in I_step1 from sy-datum). If the user wants he can change the default value of var1. It works fine when the query is executed the first time. But if the user calls the variable screen again, the variable screen does not show var1 in the popup and the user gets an error message that no value could be determined for var2. How can this issue be resolved or is there any other method to satisfy this requirement.
    Your help would be appreciated and rewarded.
    Thanks & Regards
    Hari

    Hi Ravi,
    Sorry, there's a correction. <b>var2 is used for getting the first month of the year selected by the user in var1</b>. If the user doesn't enter a value for var1, then var2 should take first month of current year from var1 which has by default last month of current year (populated in i_step1 from sy-datum). The user can select the value of var1 according to his requirement. Then var 2 should get first month of the year selected. That's why I'm using two exit variables.
    It works fine during the initial run of the query. But when the user clicks on the variable button in the toolbar and executes the query, var1 is not being displayed and an error message <i>No value could be determined for var2</i> is shown. All other variables used in the query are displayed except var1.
    Krzys, Is the option <i>Can be changed in Query Navigation</i>  available for Exit variables. I'll check that and get back to you.
    Boujema, Thanks for the OSS note.
    Thanks
    Hari

  • Exit variable in query

    Hi,
    I am in BI 7 and I want to restrict the values for a exit variable when the user press the match code in the selection screen of the query. I have the code in the step = 0, I fill the variable with values but when the user press the macth code could chose other values,
    thanks
    jaime

    Hallo Jaime,
    you could do this using i_step = 3 in the variable exit. As an example see this thread [I_STEP=3 this is urgent , please help.|I_STEP=3   this is urgent , please help.; If you need further assistance, don't hesitate to write again - we have implemented this and it works very well....
    Regards
    Martin

  • Preferred Vendor serch help does not retrieve values

    Hi,
    SRM 5.0, Classic scenario
    I have successfully replicated the Vendors. But I don't see the vendors in the "search help" when I create a SC.
    It seems to me that I have implement the OSS note 845883. Can someone please confirm it.
    With regards,
    Pranav

    Hi,
    Apply this note and it should fix your problem:
    Note 845883 - Preferred vendor search help does not retrieve values
    Some other useful OSS notes ->
    968251 BBPSC02:In source of supply preferred vendor not validated
    1017288 SRM@ERP : no vendor replication into follow-on documents
    831833 Search help for preferred vendor does not update data
    980450 Shopping cart: search help for preferred vendor
    860886 Incorrect search results for deleted 'Preferred Vendor'
    711197 Preferred vendor not copied from template
    739531 Preferred vendor/service agent must not be changeable
    733899 Complete shopping cart: Preferred vendor disappears
    634794 Preferred vendor: partner not found
    726102 Performance in vendor search help
    647760 Shopping cart: Preferred vendor / partner not
    BR,
    Disha.
    <b>Pls reward points for useful answers.</b>

  • Customer Exit Variable in formula to get values for multiple keyfigures

    Hi to all,
    I have query as defined in following scenario:
    CHAR_X     C_KF1 (based on KF1)     C_KF2 (based on KF2)     u2026     C_KFn (based on KFn)
    Value1                    
    Value2                    
    u2026                    
    Valuem                    
    C_KF = calculated key figure
    I need to create a customer exit variable that will search through selection e.g. CHAR_X/KF1 and give some result. I need this variable for every keyfigure (KF1-KFn). Using customer exit variable is the only solution.
    My question is: do I have to create formula variable (customer exit) representing every keyfigure separately (VAR1 u2013 VARn, like in below example)?
    CHAR_X     C_KF1 (using VAR1)     C_KF2 (using VAR2)     u2026     C_KFn (using VARn)
    Value1                    
    Value2                    
    u2026                    
    Valuem                    
    Or is it possible to create one general formula variable since the way to retrieve the value in variable is always the same (like in below example)? In this case, how do I pass the value of the respective keyfigure to this variable?
    CHAR_X     C_KF1 (using VAR_X)     C_KF2 (using VAR_X)     u2026     C_KFn (using VAR_X)
    Value1                    
    Value2                    
    u2026                    
    Valuem                    
    Thanks for your replies, points will be awarded!
    Cheers

    That is my concern, the value of variable is not the same.
    What variable should do is:
    take KF1 id, go through values for CHAR_X, get back one value
    This value would always be different, and also "KF" part in code of variable should be different, based on the column where the variable is being used (so, in column C_KF1 ,variable should "pick up" id of KF1, etc.).
    I hope it makes it more clear. For now, I do not have the code for variable yet, I am just interested in concept whether it is possible to pass the ID of keyfigure dynamically so I can make decision how to model this request.
    Thanks

  • Default value of BeX customer Exit variable not Displayed in WeBI??

    Hello Experts,
    We are stuck with a problem where WeBI report is created on top of BeX query and we are not able to see the default value of Bex Customer exit variable in WeBI run. Here is the complete scenario:
    1. One restricted KF is created in BeX, restricted with Customer exit variable on net Due date. And this variable is mandatory, ready for input, and Default value in calculated is user exit as current Week's Monday.
    2. So, by default KF data should be restricted to Monday of current week, if user does not change this value.
    3. Now, WeBI report is created on top of this Bex query, and all is working fine, i.e. we are getting variable as Prompt in WeBI, but Default value is not shown while Running the Webi Report.
    So, need your inputs on the same, if default values from BeX in WeBI is supported or not? If yes, why this is happening, and how to resolve it?
    Please notice, the restrcition is in KF only, it is not a separate restrcition on Net Due date in Filter area or in Defualt area of BeX
    and we are on SAP BW 7.1 and BOXI 3.1 SP4.
    Regards,
    Vipul
    Edited by: VIPUL GOYAL on Nov 23, 2011 9:44 PM

    Hi,
    See 1285993 - Support of Customer Exit Variables from BEx query into WebIntelligence via OLAP universe
    WebI will prompt when executed, but the default values calculated by the user exit  - do not appear.
    Note: If the BEx variable has property 'ready for input' set / enabled, then its WebI prompt shows ok, but no default value appears.
    Cause
    This behaviour expected 'by design' (in the context of the product's current limitations) as explained in the online guide below:
    Please refer to Chapter 7, page 44, document link here: http://help.sap.com/businessobject/product_guides/boexir3/en/xi3_sap_olap_universes_en.pdf
    Characteristic variable > processing type > Customer Exit  is "Supported, without user entry"                                                                               
    -->  This should be understood as meaning "User will not be shown a prompt"
    regards,
    H

Maybe you are looking for

  • Outlook calendar problem - can only select PM

    This is probably in the wrong forum so please forgive the error. When using the outlook client on my new MacBook Air, I only have the option to select PM for scheduling appointments in the calendar.  I can't select AM when creating the appointment an

  • Imported songs show in "recently added" but not in  the general "music" tab

    I imported two Amy Winehouse albums to iTunes, adding to one of her albums I already had. When I order my list in iTunes by "artist", I only see one Amy Winehouse album, which I added long ago. The only way I can see the new albums I imported is to l

  • Livetype to FCS problem

    Hi, having problems importing titles from livetype into final cut studio. Ive created the titles with no problem and rendered them in LT but when I import into FCS I get a blank screen with unrendered right across the middle. What am I doing wrong???

  • Unable switch on iMac What should I do?

    Hi I am unable to switch on my iMac When I turn it on I get the Apple symbol and the small spinning (non-coloured) wheel. I am unable to start it in SAFE mode. I switch it on and then hold down shift key (aftr hearing start sound) but I believe that

  • Import tablespace and index seperately

    dear gurus, i created two tablespace testtbs, and testtbs_idx. so when i try to import the dump file. so complete file is going to tablespace. can you suggest advised as starting or beginner level what best practice should i do. so that both goes sep