Variable exit requirement -  which i_step?

Hi,
I have created a variable on comp code which is input ready and single value. Second variable is created on fiscal year, this is also ready for input and defaultly it should get the fiscal year values for the company code user inputted.
for example,  if the user entered 1000 for comp code, and the ztable has 3 entries for 1000. The variable whcih I created for fiscal year should get 2009, 2010, 2011 in the input screen. then user will choose only one value from these and execute the report.
1000   -  2009
1000   -  2010
1000   -   2011
1100  -   2010
to achieve this, I tried the following ways.
1. Created a variable on fiscal year as customer exit processing type, tried to keep the logic in i_step1. it is not useful. the problem    is   I can't read the comp code value in i step1. 
2. I can' t write the code in i_step 2, because fiscal year should be getting values in the pop up.  I step 2 is executed after the pop up.
3. I tried to keep the code in i_step3, I do not see this also working. I kept a break point in the code and debugged but it is not going to i_step3 itself.
So please suggest me, how to get a solution to this problem.
How exactly i_step3 works means, Can I populate values using i_step3 or this is only checking values?

"Sorry Nadia, I forgot to tell you that the company code and Fiscal year values are maintained in ztable manually. for fisc year according to the user input, I go and read that table and retrieve the respective fiscal years and show them on the variable screen of fiscal year. user will select one among them."
That is actually what i was suggesting by using compounded infoobject - 0fiscyear \ comp code.
If you create this infoobject and populate its master data accordingly - then insert Both comp_code and fiscyear in query filter with input- ready variables for the  selection screen.
so when user selects comp code on selection screen - after that - he  will see only those fiscyears that are compounded with selected comp code on selection F4 help for fiscyears.
I realized that it might not be very convenient - creating\maintaining MD for these IOs, but it s the only option I know of.
So if you get any luck with writing code for step 3 please share.

Similar Messages

  • Variable Exit Code i_step = 2

    Hi There
    I have an issue with the code of type i_step = 2. What i want to do is to check a table and if a certain value is in that table i want to include a restriction for all values for the caracteristic on which the variable is based.
    My code looks like this:
    IF zuser_auth-comp_code = '*'.
              ls_range-low = '*'.
              ls_range-sign = 'I'.
              ls_range-opt = 'CP'.
              APPEND ls_range to e_t_range.
              EXIT.
    ENDIF.
    THE CP = * restriction is used without problems for i_step = 0 variables but it does not work for i_step = 2. Does anybody know why or know another way to restrict to all values in a i_step = 2 variable exit??
    I hope that you can help me.
    /Chris

    Hi again
    You are right the I_step = 2 is executed after execution of the query. When i debug the exit my exit variable code is executed but the result is that the program ends with an illegal state.Below i have inserted the complete code.
    WHEN 'ZCECCST2'.  "Authorization check for Company Code
        IF i_step = '2'.
          READ TABLE i_t_var_range into loc_var_range with key IOBJNM = '0COMP_CODE'.
          if sy-subrc <> '0'.
          SELECT * FROM ZUSER_AUTH WHERE
              username = l_uname.
          IF zuser_auth-comp_code = '*'.
              SELECT comp_code from /bi0/mcomp_code into ls_range-low.
              ls_range-low = '*'.
              ls_range-sign = 'I'.
              ls_range-opt = 'CP'.
              APPEND ls_range to e_t_range.
              ENDSELECT.
              EXIT.
          ELSE.
              ls_range-low = zuser_auth-comp_code.
              ls_range-sign = 'I'.
              ls_range-opt = 'EQ'.
              if ls_range-low <> ''.
                APPEND ls_range to e_t_range.
              endif.
          ENDIF.
          ENDSELECT.
          ELSE.
              ls_range-low = loc_var_range-low.
              ls_range-sign = 'I'.
              ls_range-opt = 'EQ'.
              APPEND ls_range to e_t_range.
          ENDIF.
      endif.
    /Chris

  • Variable exit not taking multiple single values...urgent pls

    Hi BW Guru's
    I have created an variable exit where the variable represents mulitple single values.
    In the customer exit when i trying to populate mulitiple values and move it to e_t_range it is not taking multiple values. I have also observed that it is a line item type. I want to know if there is anyway out since it is an urgent requirement. Any help would highly appreciated. I shall also award points accordingly. Thanks.

    Hi Anil,
    Thanks for your prompt response.
    I guess i am missing out some thing.
    The scenaio is like this I want to hard code some values which have to be removed from the selection hence I have created the variable  with multiple single value variable and I have removed (unchecked) ready for input as it is not required. After your suggestion I have also made it mandatory but after running the query I am getting a message Abort no value determined. I have written this code under if i_step = 1.
    My code goes like this….
    DATA: BEGIN OF I_SO_VENDNO occurs 0,
            SOURCSYS TYPE /BIC/TZSO_VEND-/BIC/ZSOURCSYS,
            ZSO_VEND TYPE /BIC/TZSO_VEND-/BIC/ZSO_VEND,
            TXTMD TYPE /BIC/TZSO_VEND-TXTMD,
          END OF I_SO_VENDNO.
    select * from  /BIC/TZSO_VEND into table i_so_vendno.
      loop at i_so_vendno where TXTMD CS 'GREAT LAKES'.
          l_s_range-low = i_so_vendno-zso_vend.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'NE'.
          append l_s_range to e_t_range.
          clear: e_t_range, l_s_range, i_so_vendno.
      endloop.
    Want to know if I am missing out something.
    Thanks.

  • Help in Variable exit in Bi 7.0

    Hi Experts,
        For my requirement  I need write a variable exit in BI 7   based on start date and end date.1)If  user enquiry date is  lies between current month +last 2 month then get data of 3 months ie current month( complete data   before current week) + last 2month.  2)If user enquiry date lies beyond (current month + last 2 months ) then he get only data on which date lies.Can any suggest me how write variable exit  for requirement and what would be abap code i need  in variable exit.
    Thanks
    Vinod
    Edited by: vinod  kumar on Jan 27, 2009 5:35 AM

    Hi Vinod,
      Check here.........
    Customer Exit variable
    Customer Exit for Query Variable
    Customer Exit for Query Variable
    Re: variable customer exit
    Thanks,
    Vijay.

  • How do I...Mimic Replacement Path with Query using Customer Variable Exits?

    Hello SDN:
    We are on BW 3.5 SP16.
    We are currently using a replacement path Query(RP) with variables
    to populate a variable in another Query(T).
    The problem we are having is with performance.
    The entry of variables in replacement path Query(RP) is optional (This is necessary there cannot be required values)
    When results from Replacement Path Query are small performance is fine. (e.g. 10 seconds)
    When results from Replacement path query are large performance suffers. (e.g. 1+ minutes)
    Users are free to leave the replacement path variables empty resulting in a large set of data to be replaced. This is the worst performance case.
    We would like to discover a way to conditionally execute the replacement path query. That is if users do not enter values for the replacement Query(RP) variables do not execute the replacement path query(RP).
    Does anyone know if this is possible within reason and in customer exit space?
    We have reviewed the situation from all angles and the requirement for the replacement path FUNCTIONALITY and the freedom for the user to leave variable values blank remains.
    I've been searching and reading SDN and SAP notes for about a week and do not find threads which address this situation.
    We are also exploring Customer variable exits to mimic replacement path functionality
    (different topic subject="How do I...Mimic Replacement Path with Query using Customer Variable Exits?")
    Any help will be appreciated
    Many thanks
    David Schuh

    My appologies-I posted this message with the wrong subject. I will repost it with appropriate subject.
    dave schuh

  • Custome variable exit for fiscal year/period

    Hello BW Gurus,
    Q1[1,2,3] Q2[4,5,6] Q3[7,8,9] Q4[10,11,12] quarterly periods
    I have a custom variable exit as shown for fiscal year period
           IF LOC_VAR_RANGE-LOW+4(3) =< '003'.
              L_S_RANGE-LOW+4(3) = '001'.
           ELSEIF LOC_VAR_RANGE-LOW+4(3) > '003' AND
                                              LOC_VAR_RANGE-LOW+4(3) =<'006'.
              L_S_RANGE-LOW+4(3) = '004'.
           ELSEIF LOC_VAR_RANGE-LOW+4(3) > '006' AND
                                                LOC_VAR_RANGE-LOW+4(3) =< '009'.
              L_S_RANGE-LOW+4(3) = '007'.
           ELSE.
              L_S_RANGE-LOW+4(3) = '010'.
           ENDIF.
    Now this works fine to give me the Current Quarter ....say if user puts 005/2007 i get the data Current quarter as [4+ 5] i.e. April and MAy data. Now for <b>Previous Period</b> I gave an offset as -3 to -1 inorder to get data for Q1[123] but the requirement is changed and I want the same time period i.e. [1+2] and not the entire quarter since the Current Quarter calculates only for 4 and 5.
    I hope u are getting my point....please give your suggestions will reciprocate with lots of points

    Hi gaurav,
    Basically If I am selecting period 005 I am getting the data for 4 and 5 as Current Quarter i.e. April is the starting period of that Q2.
    Similarly the previous Quarter should also give me data for period 1 and period 2.
    Right now the offset I gave is -3 to -1 on my custom variable so i am getting data for the entire previous quarter which is Q1[1,2,3] but in reality i just want data for period 1and period 2.
    Can you please help me in this
    Appreciate your concern
    Thanks

  • The window to select dimensions simply does not appear and I can't move forward, due to variables exit in the report

    Dear experts,
    I am having an issue when I try to create a WEBI document using Bex query through OLAP connection (Bics).
    Due to variables exit, it is not possible to open query pannel in webi to choose wich dimensions to add to the webi document.
    The window to select dimensions simply does not appear and I can't move forward!
    In RSRT ou Bex Analyzer, the query is running fine without errors.
    CMOD code is like this (I believe there is not any error as it is working flawless on other reports for other variable names):
    WHEN 'ZREDT1'.
         IF i_step = 2.
           CLEAR wa2.
           READ TABLE i_t_var_range INTO wa2 WITH KEY vnam = 'ZRE_DT_IN'.
    *      wa2-low = |{ v_year_h }12|.
           IF sy-subrc EQ 0.
             v_year_h = wa2-low(4) - 1.
             CONCATENATE v_year_h '12' INTO wa1-low.
    *        wa1-low = wa2-low.
             wa1-opt  = 'EQ'.
             wa1-sign = 'I'.
             APPEND wa1 TO e_t_range.
           ENDIF.
         ENDIF.
        WHEN 'ZREDT2'.
         IF i_step = 2.
           CLEAR wa2.
           READ TABLE i_t_var_range INTO wa2 WITH KEY vnam = 'ZRE_DT_IN'.
           IF sy-subrc EQ 0.
    *        wa2-low = |{ v_year_h }12|.
             v_year_h = wa2-low(4) - 1.
             CONCATENATE v_year_h '12' INTO wa1-low.
             wa1-opt  = 'EQ'.
             wa1-sign = 'I'.
             APPEND wa1 TO e_t_range.
           ENDIF.
         ENDIF.
    Please provide assistance,
    Thanks in advance,
    Kind regards,
    André Oliveira

    I solved it.
    The problem was due to date coming to exit - as you know some time intervals start at 01-01-1000, and as I was calculating 1000-1 = 999
    I was getting and interval from 99901 to 201405. Do not know if it was not working because CHAR NUMC6 was failing trying to recognize interval 99901 - 201405, but probably, this was the issue.
    Thanks for your inputs,
    Best regards,
    André Oliveira

  • Input variables not available in i_step = 2

    Hi Experts,
    In my filter in the planning modeller I have three variables. 1. ZSY(Source Year) 2. ZTY(Target Year) and 3. ZCNO(Customer number). All three variables are input ready variables ie. Manual entry/Default value.
    For a customer exit variable I need to read version using a fm. Here I need values inputted for all three variables in i_step = 2. In planning modeller I gave values for all three variables. But in i_step = 2 I only got ZSY and ZTY. I did not get ZCNO. Is there anything wrong in the way I did or is there any ohter alternative.
    Please help.
    Thanks in advance.
    Jerry.

    Hi Durgesh,
    Thanks for the reply. I already checked that table in debugging mode. It contains only two variables.
    The flow is like:- At first it enters i_step = 2 there are only ZSY and ZTY and after that when it enters in i_step = 3 it jumps automatically to i_step = 2 and now it contains ZCNO with its value. That is
    1st time. i_step = 2 - ZCNO is not there in i_t_var_range
    1st time. i_step = 3 - it jumps back to i_step = 2
    2nd time i_step = 2(jumped from i_step = 3) now it contains ZCNO in i_t_var_range.
    I would like to get the ZCNO in i_t_var_range when the first time i_step = 2 is called.
    Thanking you,
    Jerry
    Edited by: jerryabap on Aug 3, 2011 7:00 AM

  • BPS variables exit F4 help

    Hi,
       I am having a BPS variable exit which is listing all the records from the master data table in the F4 help screen but  i want to see only those values which are populated by my exit .
    Did any one faced the same problum? Do we have a note or patch to fix this.
    Thanks,
    Ramkumar

    Hi Ramkumar,
    Check the ABAP code behind the variable.Make sure that it is fetching the right records based on the logc in the code.Check the select statement in the ABAP.
    Debug the code and find out if its fetchin the right values into the export parameter  ETO_CHARSEL.
    hope this helps.
    regards
    Sai Vishnubhatla.

  • BPS Hierarchy - variable exit

    Requirement is to restrict the countries based on the selected Geography, I have created a hierarchy on country and trying to write a hierarchy user exit on country variable . UPF_VARIABLE_USER_EXIT_HIER is the one I am using, Can somebody explain how this works or any better I approach to resolve this issue.
    Thanks

    I am using a variable exit on Geography, to populate based on the entires from previous tab. My initial approach was to create a variable exit on country and then call API_SEMBPS_GETDATA to read the geography from the header and then call API_SEMBPS_HIERARCHY_GET for getting countries to populate. This sounds good but when I tried, API_SEMBPS_GETDATA is kicking me out running into infinite loop. Not sure but I think the reason could be, on the first run the value for country is initial. After failing this approach, I was looking into other alternatives.
    Can you please send me that how to document if possible.
    Your guidance much appreciated

  • Debugging the variable Exit  -  EXIT_SAPLRRS0_001

    Hi Guys
    Not sure how to debug the variable exit with setting break point.
    I need to check if my variable it correctly populated after written code in ZXRSRU01 .
    Any help will be awarded.
    Thanks in advance
    Kirk

    Hi Kirk,
    after When'Data Source'.
    Write : <b>BREAK-POINT</b>
    Save and activate the code and execute the report. Provide required input and execute. It will go into debugging more.
    Dont forget to remove the "break-point" before transporting to Quality/Production.
    Hope it helps.

  • Variable Exit

    Hi People,
    I am trying to make a Variable Exit on the caracteristic 0SEM_POSIT. I Already made the code in the program ZXRSRU01 and when i make some test on the transaction RSRT, its showed the erros below:
    00000005  EError for variable in customer enhancement V_CTPL BRAIN 649
    00000005  EVariables contain invalid BRAIN               633
    00000005              I>> Row: 78 Inc: LRRMSU13 Prog:SAPLRRMS                                                                                RS_EXCEPTION        301
    00000005              ASystem error in program CL_RSR_OLAP_VAR and form INIT-02- (see long text)                                                           BRAIN               299                                                    
    Someone already saw these erros ??
    Thanks

    Hi,
    Note specified for this issue: 1042703, which suggests to install Support Pack 14.
    Do a manual correction for the Program as specified in the correction instructions of the note 1042703.
    Corrections:
    Delta 001Context Block 
      CLEAR: p_sx_seldr.
    *... read the VREP
      readvrep( i_vrnid ).
    Delete Block 
      IF p_sx_vrep-range IS INITIAL. RETURN. ENDIF.
    Insert Block 
      IF p_sx_vrep-range IS INITIAL.
      arbritary seltyp (initial is not allowed)
        r_seltyp = rsdd_c_seltyp-range.
        RETURN.
      ENDIF.
    Regards,
    Srinivas.

  • Please help me to correct the Variable exit

    Hello,
    I am trying to calculate the previous month from the user input 0CALMONTH variable 0I_CALMO. I have created another variable ZVPCALMON and have restricted a key figure Amount with this variable.
    I have written the below code. When I debug the query I am able to get below in E_T_DATA
    Sign -> I
    OPT ->      EQ     
    LOW -> 200508
    when I enter the variable 09/2005 but I dont get the data in the report. However when I run the report without restricting the keyfigure with ZVPCALMON and input the calmonth as 08/2005 I am able to get the data.
    IF i_step = 2.
      CASE i_vnam.
    WHEN 'ZVPCALMON'.
            CLEAR : l_s_range,
                    l_month_low,
                    l_year,
                    w_var_range.
          LOOP AT i_t_var_range INTO w_var_range WHERE vnam = '0i_CALMO' .
            l_year  = w_var_range-LOW(4).
            l_month_low = w_var_range-low+4(2) - 1.
            IF l_month_low = 0.
              l_month_low = c_12.
              l_year  = l_year - 1.
              CONCATENATE l_year
                          l_month_low INTO l_s_range-low.
            ELSE.
              CONCATENATE l_year
                         l_month_low INTO l_s_range-low.
            ENDIF.
            l_s_range-sign = c_sign_i.
            l_s_range-opt  = c_range_opt_eq.
            APPEND l_s_range TO e_t_range.
          ENDLOOP.
        WHEN OTHERS.
      ENDCASE.
    ENDIF.
    I think I am missing something. Could anyone suggest what could have been wrong.
    Thanks,
    KK

    Hi KJ,
    Thanks for the reply. I don't know why but a simple offset doesnt work either. I have restricted the key figure with 0CALMONTH Variable and put the offset '-1' but still I dont get the result. Thats the reason I have gone for the variable exit.
    thanks,
    Kalyan

  • About Variable exits(Customer exits)

    Hello gurus
    Could u give me some documentation on variable exits. How and when it is required? Give me some examples mainly on customer exits so that i can practice it.
    It will be very much thankfull to u all guys. u can send me a mail to me i.e [email protected]
    regards
    Ajay

    Can you send me those documents to [email protected]
    Thanks,
    Nikki
    Hello Gupta, I am not able to give you points. Can you direct me again.
    Thanks for the docs

  • Variable exit in sap bi 7.0  is not working in web report

    Hi Experts,
        I had wrote a variable exit to get latest run date at variable screen for a variable.On the base query i have created query view.This query view is working fine when i am viewing from analyzer  but on  the web Im not getting latest run date but it taking some other date.
    Can  any body suggest any thing why system is behaving so strange.
    Thanks
    Vinod

    Hi, Succhi
    Note 1621031 - Incorrect status I1054 "To be distributed"
    Note 1620893 - Screen output without connection to user - SMQ1
    also check program CRM_DATAEXCHANGE_TOOLBOX
    Denis

Maybe you are looking for

  • Mavericks 10.9.5 Build 13F34 on a MacBookPro 11,3 | iTunes 11.4 (18) crashes each and every time i try to update my iOS 8.02 Apps

    This is more than annoying, the attempt to update my iOS Apps via iTunes 11.4 (18) ends each and every time with a crash of itunes, no way to update. The iPhone refuses to update via WLAN, the only way to update is to get updates via mobile data conn

  • Sample code on how to populate data in DropDownListbox

    Hi all i am new to the webdynpro for java. i have one UI element called DropDownListBox and i want to populate some desired values to the dropdown list box. what are the different ways are there to populate data in DropDownList box. for example i hav

  • Sql Plus linux problems

    Hi I just completed installing oracle 10g R2 on RHEL 3. When I tryed to login as sydba by sqlplus " /as sysdba" I get an invalid option error. However, sqlplus /nolog SQL>connect /as sysdba worked fine ?

  • Using API

    Hi I am a beginner to java. I want to use javamail API to send a mail which is to be part of my java program. I downloaded javamail API from sun. How can I incorportate in the Java program? Thanks in advance Kuttan

  • Inserts and GB1, GB2, GB3 Signal Chain???

    When using a mixing desk you can pick and choose where to insert any effects in the signal chain. An effect could be pre-fader, it could be post-fader, you could have an eq before a compressor. You could have an eq after a compressor. You could do bo