Exit variable on exit variable

Dear Friends,
If I have a exit variable using i_step 2, can another exit variable also i_step 2 use the result of the 1st exit variable to get the result for this 2nd variable?
Or is it that i should use I_step = 3 to process an exit variable of i_step = 2?
regards
Bass

Try storing the result of your 1st exit variable in a local data field you define in the exit. But I am not sure if the value will be retained once the exit is called again for the 2nd variable - worth a try.
If that doesn't work, try the old fashioned way for the 1st variable, you export to memory
data: l_vnam like i_vnam.
   export l_vnam to memory id l_vnam.
For the 2nd variable you import
import l_vnam from memory id (name of 1st variable).
For this you may want to try using differnt i_step points.
If it's still not working go for the suggestion above.
Best,
Ralf

Similar Messages

  • Error in customer exit variable

    Hi All,
    My requirement is end user will enter fiscal year and in report out put I need to display fiscal year periods.
    For this I have created two variables
    1.Fiscal year-Manual Input/Default value-Single value-Mandetary-Variable is ready for input.
    2.FiscalyearperiodCustomer ExitInterval-Optional
    DATA : fiscyear1 TYPE numc4,
          i_fiscper_high TYPE /bi0/oifiscper.
    DATA: datein LIKE  sy-datum .
    CMOD Code is as below
    CASE i_vnam.
    WHEN  'ZFISCVAR'.
        LOOP AT i_t_var_range INTO loc_var_range
                             WHERE  vnam = 'ZFISCYER'.
          CLEAR l_s_range.
          fiscyear1 = loc_var_range-low(4).
          CONCATENATE fiscyear1 '001' INTO i_fiscper_high.
          l_s_range-low = i_fiscper_high.
          l_s_range-high = i_fiscper_high.
          l_s_range-sign = 'I'.
          l_s_range-opt  = 'BT'.
          APPEND l_s_range TO e_t_range.
        ENDLOOP.
    But we are getting error after entering fiscalyear
    error message --Value 2009001 for uesr exit variable xxxx is invalid.
    Regards
    Albaik

    Hi All,
    Below is the code and there is no problem with code but there was some problem with Fiscal year varient and solution is we went to source system -right click-Transfer global settings---- and maintained  Fiscal year varient 
    DATA: l_s_range TYPE rsr_s_rangesid.
    DATA: loc_var_range LIKE rrrangeexit.
    DATA: datein LIKE  sy-datum .
    DATA: L_S_RANGE_2 TYPE RSR_S_RANGESID.
    DATA : I_FISCPER_HIGH TYPE /BI0/OIFISCPER ,
           I_FISCPER_LOW TYPE /BI0/OIFISCPER.
    DATA : FISCYEAR1(4), FISCYEAR2(4),CALMONTH TYPE /BI0/OICALMONTH .
    WHEN  'ZFISPERIOD'.
        LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
                             WHERE  VNAM = 'ZFISYEAR'.
          CLEAR L_S_RANGE.
          FISCYEAR1 = LOC_VAR_RANGE-LOW(4).
          CONCATENATE FISCYEAR1 '001' INTO L_S_RANGE-LOW .
             L_S_RANGE-SIGN = 'I'.
          L_S_RANGE-OPT  = 'EQ'.
          APPEND L_S_RANGE TO E_T_RANGE.
        ENDLOOP.
    ENDCASE.

  • Using a variable not in the Export,Import, table Parameters in USER EXIT

    Hi all,
       During the Invoice Creation, I need to add an entry in the VBFS table, so that it will be displayed in the system log.  In the FM 'RV_INVOICE_CREATE', the structure corresponding to it is XVBFS.  There is a user-exit   CALL CUSTOMER-FUNCTION '002', in this FM 'RV_INVOICE_CREATE'.  But the import, export or Table Parameters does not have XVBFS.
      How can I use XVBFS inside the User exit?..
    Please help.
    Regards,
    Asha

    Hi,
    I dont know whether this will help u...
    write this in user exit...to access variables/tables of main program..
    FIELD-SYMBOLS: <komv>.
    ASSIGN ('(SAPLMEPO)TKOMV[]') TO <komv>.
    where.. SAPLMEPO is the main program...and TKOMV[] is a internal table in SAPLMEPO.
    regards
    Sukriti....

  • Can i assign a string to a variable in User Exit?

    Friends,
    I would like ot write a User Exit that will assign a string to a variable depending on the value of the other variable.
    I just wanted to know if such a code is valid:
    When zimport
    IF i_step = 2.      " read user input parameter
            l_s_range-low = 'Important'.
         APPEND l_s_range TO e_t_range.
        ENDIF.
    If so, my second problem is that in the variable exit definition with processing Customer type you need to identify a "Dimension" for the variable. Non of them really fit, because the value is a string so why convert it to another format?
    Your input is appreciated in advance,
    Xibi

    hi Xibi,
    say you have var1 and var2, var2 will be filled depend on value of var1, you can write something like following.
    please be remind that var2 is not marked as “ready for input” and is set to “mandatory variable entry”.
    hope this helps.
    The second step (I_STEP = 2) is called after the processing of the variable pop-up. This step is called only for those variables that are not marked as “ready for input” and are set to “mandatory variable entry”.
    WHEN 'var2'.
        IF I_STEP = 2.
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
                  WHERE VNAM = 'var1'.
            CLEAR L_S_RANGE.
            if LOC_VAR_RANGE-low = ...
              L_S_RANGE-LOW = 'IMPORTANT'.
            else.
              L_S_RANGE-LOW = '....'.       
            endif.
            L_S_RANGE-SIGN   = 'I'.
            L_S_RANGE-OPT    = 'EQ'.
            APPEND L_S_RANGE TO E_T_RANGE.
          ENDLOOP.
        ENDIF.

  • Which system variable is reset at the exit of a loop of an internal table

    which system variable is reset at the exit of a loop of an internal table
    a)sy-loop b)sy-index c)sy-dbcnt d)sy-tabix

    You might want to revist your threads from Friday, and award points and mark as "Answered" or "Solved".
    Regards,
    Rich Heilman

  • 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

  • Need help in creating a user exit variable

    Hi all,
    I have created a query in which a key figure needs to be automated with an user exit variable.I want to derive the value of this key figure 'x' based on calender month.
    This key figure should get the cumulative value from the first month of the fiscal year till the calender year month entered while executing the query.
    I got a basic understanding on the User exits from SDN. But Im not sure how to implement this logic.
    I would really appreciate if you could provide me a detailed explanation of how to do this.
    Thanks in advance,
    Vinoth

    Hi
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/208811b0-00b2-2910-c5ac-dd2c7c50c8e8
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6378ef94-0501-0010-19a5-972687ddc9ef
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2d99121a-0e01-0010-e78c-b1ae566a2413
    http://sap.ittoolbox.com/groups/technical-functional/sap-bw/how-can-i-set-bex-variables-in-i_step3-exit_saplrrs0_001-335232

  • How to select several values from a user exit variable in a planning folder

    Hello,
    I have created a user exit variable for limiting the values only to which the user need to access.
    For a simulation part, it is then necessary for him to select several values from these values (not only one, and not all)
    But It seems in this case the user has only two possibilities :
    - keep all the values without any restriction
    - restrain the selection to only one value.
    It seems possible for the user to access to a multiple choice window, but this possibility doesn't seems to work : in all tests we did, only the first value was taken into account by BPS.
    If this method is not good do you know an other manner to permit the user to choice several values amongst a set of pre-selected  (because the original set is too important) values ?
    Thanks for your help.

    Hi Mayank,
    Thanks for your response, but I don't think it corresponds to my problem.
    I my case, I use a user exit variable to filter some data. It seems BPS offers the possibility to the user to select several values amongts the pre-selected values presented by the user exit variable, but it doesn't work. We can use a popup in which we enters the required values, but in final, only the first value is taken into account.
    I don't know if it is due to a BPS bug or if it is not a good solution in regard to BPS philosophy. In this case, the concerned caracteristic isn't in the header but in lead columns.
    I must present a solution to my client next monday, so I have not enough time to open an OSS message.
    An alternate solution should be interesting too.
    My need is to present to a user a selection of values amongst all values from an infoobject (the user exit variable seemed to be a good solution) and the user must have the possibility to select some values amongst these as filter.
    Regards

  • Sqlplus exit with bind variable gives error

    Hi,
    I want to return the ID-value from an insert-statement back to the OS, but I can't catch it properly in a variable to exit that variabel. here's the script:
    variable logid NUMBER;
    select id_seq.nextval into :logid from dual;
    -- insert into Tab_A .....
    ---values :logid..... -> nothing to do with the problem
    exit :logid;
    I get this:
    SP2-0670: Internal number conversion failed
    To make a minimum test, I do:
    variable logid NUMBER;
    select 5 into :logid from dual;
    exit :logid;
    but I still get that error !
    what am I doing worng here ?
    it is a number isn't it ?
    why do i get a conversion-error than ?
    how do I fill and return a variable correctly ?
    thanks for any help, Lao De

    Your problem is with your select statement. SELECT...INTO is PL/SQL, not SQL, and can not be used to set a variable. Alternatives:
    $ sqlplus scott/tiger
    SQL*Plus: Release 9.2.0.3.0 - Production on Fri Dec 9 13:52:19 2005
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Connected to:
    Oracle9i Release 9.2.0.3.0 - Production
    JServer Release 9.2.0.3.0 - Production
    SQL> variable logid number
    SQL> exec :logid := 5
    PL/SQL procedure successfully completed.
    SQL> exit :logid
    Disconnected from Oracle9i Release 9.2.0.3.0 - Production
    JServer Release 9.2.0.3.0 - Production
    $ echo $?
    5
    $ sqlplus scott/tiger
    SQL*Plus: Release 9.2.0.3.0 - Production on Fri Dec 9 13:53:39 2005
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Connected to:
    Oracle9i Release 9.2.0.3.0 - Production
    JServer Release 9.2.0.3.0 - Production
    SQL> variable logid number
    SQL> begin
      2  select 6 into :logid from dual;
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL> exit :logid
    Disconnected from Oracle9i Release 9.2.0.3.0 - Production
    JServer Release 9.2.0.3.0 - Production
    $ echo $?
    6Note that, on a unix platform, your return value must be a positive integer <= 255.

  • Exit with bind variable from sqlplus and then echo $?

    Hello world.
    I don't know why they are different between :v_num and the value of "echo $?"
    thanks.
    SANOWT:oratest:/data3/oratest/oratest/hgjung> cat t.sql
    select count(*) from all_objects;
    variable v_num number;
    begin
    select count(*) into :v_num from all_objects ;
    exception
    when no_data_found then
    :v_num := 1403;
    end;
    exit *:v_num*
    SANOWT:oratest:/data3/oratest/oratest/hgjung> \sqlplus scott/***** @t
    SQL*Plus: Release 10.2.0.3.0 - Production on Wed Feb 17 10:11:59 2010
    Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    COUNT(*)
    *50497*
    PL/SQL procedure successfully completed.
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SANOWT:oratest:/data3/oratest/oratest/hgjung> echo $?
    *65*
    SANOWT:oratest:/data3/oratest/oratest/hgjung>

    The $? variable in UNIX is the exit code for the program. In most *NIX versions that I am aware of, it is limited to values between 0 and 255 (i.e. one byte), so the value is truncated.  The hex value of 50497 is C541, or two bytes, so the $? variable is only getting the last byte 0X41 which is decimal 65.
    John

  • Displaying Customer Exit Variable with derived value from another ODS

    Hi All,
    Sorry if this question has been answered before.  I searched the forums and could not find anything specific to my problem.
    I am new to BEx Query.  Customer is requesting a variable(s) be created which will be displayed as a column along with other CKF and RKF.  This query is a payroll query for US/Canada.  This new variable will be based on the user input date for the query.  We are to take this date and go look up the actual pay date for the pay period to which the user input date belongs.  The pay date is stored in another ODS.
    So far, as far as the changes to the Customer Exit ZXRSRU01 are concerned, I would perform the logic when I_STEP = 2.  Do a basic selection off the second ODS, derive the pay date, and store in range table E_T_Range.
    The data displayed off the user input date is displayed in rows.  This is done six times, going back seven days for each row (first row is data for period user entered date to user entered date - 7 days; second row is data for period user entered date - 7 days to user entered date - 14 days; etc ...).  For this to happen  correctly, I am assuming the variable(s) are to to have characteristic types 'Not ready for input', 'Mandatory', 'Customer Exit', and 'Single Value'.
    My question is ... How do I display the six variables in columns (how are they to be defined in the query) and the characteristics I list above, are they correct? Does this need to be a replacement path variable?
    Thanks.
    Edited by: Amir Hasan on Jun 11, 2009 6:24 PM
    Edited by: Amir Hasan on Jun 11, 2009 6:25 PM

    Hi Amir,
    What i can understand from u r requirement is you want to few columns that will show something like below,
    User entered date = x
    Period of X to Period of (X-7)       Period of X to Period of (X-14).....
    This can be done by CMOD for variable only.
    Logic steps :
    1) Take the user input.
    2) Find out the period by using T009B table and store in temp variable.
    3) Do day -7 and find out period for the same
    4) Assing period of X to ls_range-high range and X-7 to ls_range-low.
    Let me know if you have any doubt
    Regards,
    Viren

  • 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

  • Display Error Message in BW Report based on Customer Exit Variable

    Hi
    I need to display an error message in the BW report based on the value of a customer exit variable - i was able to do this successfully in BW3.5 using the below code.
      WHEN 'ZUPN'. "Here ZUPN is the customer exit variable
        IF i_step = 1.
          <check for condition -- if successful, variable flag = 1, else variable flag = 0>
          IF flag = 0.
            MESSAGE e157(00). "Error Message
          ENDIF.
        ENDIF.
    I have upgraded my system to BI 7.0 now. Whenever the variable check is not successful, it displays a blank screen instead of the error message in the report. Please advice if we need to change the code and how ??

    Bhanu,
      Thanks for u r reply.This warning message appears every time i execute the report through portal.
    Any idea ?
    Regards
    Mano

  • How to use the variables of Function exit in the include program

    i have a problem of using the variables of a function exit in the include program..
    If i use those variables there will be an error indicating 'Field FEBVW_IN is unknown. It is neither in one of the specified tables nor defined by a DATA statement'. Please help... Below is the code of the function exit:
    FUNCTION EXIT_SAPLIEDP_202.
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(IDOC_CONTROL_INDEX)
    *"     VALUE(IDOC_DATA_INDEX)
    *"     VALUE(FEBVW_IN) LIKE  FEBVW STRUCTURE  FEBVW
    *"     VALUE(FEBKO_IN) LIKE  FEBKO STRUCTURE  FEBKO
    *"     VALUE(FEBEP_IN) LIKE  FEBEP STRUCTURE  FEBEP
    *"     VALUE(FEBRE_IN) LIKE  FEBRE STRUCTURE  FEBRE
    *"     VALUE(FEBPI_IN) LIKE  FEBPI STRUCTURE  FEBPI
    *"  EXPORTING
    *"     VALUE(I_FIMSG) LIKE  FIMSG STRUCTURE  FIMSG
    *"     VALUE(FEBVW_OUT) LIKE  FEBVW STRUCTURE  FEBVW
    *"     VALUE(FEBKO_OUT) LIKE  FEBKO STRUCTURE  FEBKO
    *"     VALUE(FEBEP_OUT) LIKE  FEBEP STRUCTURE  FEBEP
    *"     VALUE(FEBRE_OUT) LIKE  FEBRE STRUCTURE  FEBRE
    *"     VALUE(FEBPI_OUT) LIKE  FEBPI STRUCTURE  FEBPI
    *"  TABLES
    *"      IDOC_CONTROL STRUCTURE  EDIDC
    *"      IDOC_DATA STRUCTURE  EDIDD
    *"      IDOC_AVIP STRUCTURE  AVIP OPTIONAL
    *"      IDOC_AVIR STRUCTURE  AVIR OPTIONAL
    *"      IDOC_AVIT STRUCTURE  AVIT OPTIONAL
    *"  CHANGING
    *"     REFERENCE(IDOC_AVIK) TYPE  AVIK OPTIONAL
    *"  EXCEPTIONS
    *"      PROC_ERROR
      INCLUDE ZXF08U10.
    Here is the code for the include program.
      INCLUDE ZXF08U10
    MOVE febvw_in TO febvw_out.

    Sometimes you will get this error message when checking include code in exits even though there is really no error - it happens because the include does not realise it is in the function due to the navigation index being out of date.
    Try activating the code - it may work even though the check said there were errors.
    You can also get this issue when trying to drill down on the field in the include to view its structure.
    Andrew

  • Current Workday SAP EXIT variable not aligned with correct work days

    Hello,
    I am trying to use the Current Workday variable within a report so that the data will only be refreshed when the calendar day is Monday - Friday. Users look at this report every day, but when they get the report on Monday we would like for the date to be restricted to the previous Friday, and then switch back to Monday's date when they view the report on Tuesday. In order to do this we have placed the Current Workday variable from the Calendar Date characteristic with an offset of negative 1, but it is showing Sunday's date when they look at the report on Monday.
    My questions are:
    -Does this variable use the factory calendar that can define the work days?
    -If so, which Factory calendar does it use? I have gone to the Tcode SCAL but I can see there are many different factory calendars and I have no idea which calendar this variable pertains to. I have also transferred the global settings for the factory calendar from the source system, and I see no change within the variable.
    -How can I see the program name behind this SAP Exit variable? My thinking is that I could at least look at the code to see if perhaps I can find out the factory calendar ID the variable refers to from there.
    Any help on this would be greatly appreciated! Until this is fixed I have to manually adjust this report every Monday and Tuesday morning!! Not ideal.

    Hi Kelly,
    I am not sure whether this can be done by an SAP Exit variable.
    But you may try this using a Customer exit variable by using the Function module DATE_COMPUTE_DAY.
    The function module "DATE_COMPUTE_DAY" will return the day by 1 to 7 when you input date.
    Monday : System will return value = 1
    Tuesday : System will return value = 2
    Wednesday : System will return value = 3
    Thursday : System will return value = 4
    Friday : System will return value = 5
    Saturday : System will return value = 6
    Sunday : System will return value = 7
    So input sy-datum to this FM and find the number of day. If it is Monday, the number will be 1.
    If output is 1, then offset date by -3 to that of Friday, else offset by -1 to previous day.
    Hope this helps,
    Regards,
    Hari

  • How to look at sap exit  for bex variable

    hi gurus
    how can i read a sapexit for a standard variable created by sap. i need to replicate that same code and modify it and make my own user exit for a custom variable.
    thanks

    hi Adnan,
    sap variable exit is process with function module RSVAREXIT[variable name],
    e.g you want to see code for 0date, run SE37, RSVAREXIT0DATE and display.
    hope this helps.

Maybe you are looking for