Using variable values form parametrized URL in Customer Exit in i_step = 1

Hello BW experts,
I call a parametrized URL to a Web Template that has a Query with the variable VAR1:
http://XXX?...&CMD=LDOC&template_id=TEMP1&VAR_NAME_1=VAR1&VAR_VALUE_EXT_1=2006
Then I try to access the value of VAR1 in i_step = 1 in the Customer Exit for BEx variables in order to determine the value for a customer exit variable VAR2:
WHEN 'VAR2'.
    IF i_step = 1.
      READ TABLE i_t_var_range INTO var_range
        WITH KEY vnam = 'VAR1'.
      fl_var_range-sign = 'I'.
      fl_var_range-opt = 'EQ'.
      fl_var_range-low = *some operation with var_range
      APPEND fl_var_range TO e_t_range.
    ENDIF.
The problem is that VAR1 contains either the default values (if the variable is set to have default variables) or is empty (if there are no default variables defined). It does not retrieve the value in the URL in the Customer Exit, but displays it correctly in the variable screen.
Is there any way I can acces the URL parameter in the Customer Exit?
Thanks for any answers in advance.
Michael

Gili,
thanks for your answer. The problem was, though, that the first value determines the behavior of the variable screen by setting the value of a customer exit variable.
My goal was to have two variable screens. In the first a date is chosen and in the second a node of a time-dependant hierarchy is chosen. If one enters the date in the same screen as the hierarchy, the valid hierarchy for the date is not displayed.
I solved the problem now in following way:
<b>1. Saving the value in SAP Memory as a parameter.</b> The parameter has to be defined in SE80. A Dummy Web Template with a query on the same Infoprovider with just the two InfoObjects (Year/Month) displays a variable screen for Month/Year. In addition there is a Dummy Customer Exit variable that is needed in order to pass the variable values (month/year) into SAP Memory. Using JavaScript in the Dummy WebTemplate the second Web Template with the actual query is called without displaying anything else than the variable screen.
WHEN 'DUMMY_CUSTOMEREXIT_VAR'.
    data: w_date like sy-datum
    IF i_step = 2.
      READ TABLE i_t_var_range INTO var_range
        WITH KEY vnam = 'VAR1'.
    do your peration
    i.e.  w_date(4)+2 = var_range-low.
             w_date(6)+2 = var_range-high.
      SET PARAMETER ID 'ZBW_PARA1' FIELD w_date.
    ENDIF.
<b>2. Retrieving the value from SAP Memory</b> Before displaying the variable screen, the chosen date is retrieved from SAP Memory and used to set the date for a customer exit variable for the hierarchy validity date.
WHEN 'VAR2'.
    IF i_step = 1.
      GET PARAMETER ID 'ZBW_PARA1' FIELD w_date.
    do some operation with     
      APPEND fl_var_range TO e_t_range.
    ENDIF.
It is quite a comlex construct, but it works....

Similar Messages

  • How to pass session variable value with GO URL to override session value

    Hi Gurus,
    We have below requirement.Please help us at the earliest.
    How to pass session variable value with GO URL to override session value. ( It is not working after making changes to authentication xml file session init block creation as explained by oracle (Bug No14372679 : which they claim it is fixed in 1.7 version  Ref No :Bug 14372679 : REQUEST VARIABLE NOT OVERRIDING SESSION VARIABLE RUNNING THRU A GO URL )
    Please provide step by step solution.No vague answers.
    I followed below steps mentioned.
    RPD:
    ****-> Created a session variable called STATUS
    -> Create Session Init block called Init_Status with SQL
        select 'ACTIVE' from dual;
    -> Assigned the session variable STATUS to Init block Init_Status
    authenticationschemas.xml:
    Added
    <RequestVariable source="url" type="informational"
    nameInSource="RE_CODE" biVariableName="NQ_SESSION.STATUS"/>
    Report
    Edit column "Contract Status" and added session variable as
    VALUEOF(NQ_SESSION.STATUS)
    URL:
    http://localhost:9704/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FQAV%2FTest_Report_By%20Contract%20Status&RE_CODE='EXPIRED'
    Issue:
    When  I run the URL above with parameter EXPIRED, the report still shows for  ACTIVE only. The URL is not making any difference with report.
    Report is picking the default value from RPD session variable init query.
    could you please let me know if I am missing something.

    Hi,
    Check those links might help you.
    Integrating Oracle OBIEE Content using GO URL
    How to set session variables using url variables | OBIEE Blog
    OBIEE 10G - How to set a request/session variable using the Saw Url (Go/Dashboard) | GerardNico.com (BI, OBIEE, O…
    Thanks,
    Satya

  • Unable to pass  presentation variable value to Go url with narrative view

    I am trying to use navigate option of Go URL. I have Dashboard prompt with presentation variable (pv)defined. I am able to see the pv value in compund view but unable to see in Narrative view. Any thoughts?

    Check my blog entry here http://oraclebizint.wordpress.com/2007/11/26/oracle-bi-ee-101332-same-page-navigation-drills-and-passing-parameters/. It has an example.
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • Error Message : " No value could be determined for Customer Exit Variable "

    Hello BI Experts ,
    I have created a "ZYTD_PERIOD" Customer Exit Variable  Interval  Mandatory and ready for input check mark removed.
    The reference character is '0FISCPER' .
    I want to have YTD figures when the user enter single Fiscal Year Period for variable 0P_FPER.
    So I have written below code in SE37 : EXIT_SAPLRRS0_001 and include program : ZXRSRU01
    ==================================================================
      case i_vnam.
                  WHEN 'ZYTD_PERIOD'.
                  IF I_STEP = 2.
                  LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = '0P_FPER'.
                  CLEAR L_S_RANGE.
                  L_S_RANGE-LOW0(4) = LOC_VAR_RANGE-LOW0(4).
                  L_S_RANGE-LOW+4(3) = '001'.
                  L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
                  L_S_RANGE-SIGN = 'I'.
                  L_S_RANGE-OPT = 'BT'.
                  APPEND L_S_RANGE TO E_T_RANGE.
                  EXIT.
                  ENDLOOP.
                  ENDIF.
    ===================================================================
    After that I use this 'ZYTD_PERIOD' variable in the query .
    Also I have used the variable 0P_FPER in another structure.
    When I execute the query by entering the value of 0P_FPER as 010.2009 or any other value ,
    I am getting below error message ,
    *No value could be determined for variable ZYTDPERIOD*_
    Below is details of this Error message ,
    Note that I have proper Master and Text data for 0CO_AREA and 0COMP_CODE loaded into BI.
    =======================================================================
    Diagnosis
    This error diagnosis is specific only to the variables 0P_FVAEX or 0P_CTPCA !
    Termination message BRAIN 632 appears:
    Could not determine value for variable 0P_FVAEX (or 0P_CTPCA).
    System Response
    1. Operation method of SAP-Exit-Variables 0P_FVAEX or 0P_CTPCA
    With queries from the CO application, both SAP-Exit-Variables look for an entry for 'controlling area'. With this controlling area from the selection screen, the SAP-Exit-Variables program reads the attributes for InfoObject 0CO_AREA (controlling area).
    With queries from the FI application, the SAP Exit Variable 0P_FVAEX looks for an entry for 'company code'. With this company code from the selection screen, the SAP Exit Variables program reads the attributes for InfoObject 0COMP_CODE (Company Code).
    0P_FVAEX determines the fiscal year variant (attribute 0FISCVARNT) from the attributes for 0CO_AREA (CO queries) or 0COMP_CODE (FI queries). 0P_CTPCA determines the currency type of the profit center local currency (attribute 0CURTP_PCA) from the attributes for 0CO_AREA.
    2. Cause of Error
    The attributes for the controlling area (InfoObject 0CO_AREA) or company code (InfoObject 0COMP_CODE) were not loaded into the BW system, or the attributes for the controlling area are not active in the BW system.
    Check whether this is the cause of the error in your BW system. Display the contents of table /bi0/mco_area or /bi0/mcomp_code using transaction se16.
    Application CO:
    Check whether the attributes 'fiscal year variant' (field FISCVARNT) and 'profit center local currency currency type' (field CURTP_PCA) are filled in the 'A' version (field OBJVERS) for the selected controlling area. If the fiscal year variant in the OBJVERS = 'A' is empty, then the error is with variable 0P_FVAEX. If the currency type of the profit center's local currency in OBJVERS = 'A' is empty, then the error is with variable 0P_CTPCA.
    Application FI:
    Check whether or not the attribute 'fiscal year variant' (field FISCVARNT) is filled in the 'A' version (field OBJVERS) for the selected controlling area. If the fiscal year variant is empty in OBJVERS= 'A', then the error is with variable 0P_FVAEX.
    Procedure
    Using InfoSource 0CO_AREA, load the attributes for the controlling area or company code into your BW system.
    Afterwards, activate the attribute changes in your BW system. To do this, use transaction rsa1, path 'Tools > Hierarchy/Attribute changes', functions button 'InfoObject list'. Choose InfoObject 0CO_AREA or 0COMP_CODE from this list, and activate the attribute changes.
    =====================================================================================
    Is there any special settings needed before writing BEx Customer Exit ?
    I have already created a project in CMOD and assinged a proper RSR00001
    and EXIT_SAPLRRS0_001 and project is active.
    Any help please ....
    Regards ,
    Amol

    My Code is as below ,
              case i_vnam.
                  WHEN 'ZYTD_PERIOD'.
                  IF I_STEP = 2.
                  LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = '0P_FPER'.
                  CLEAR L_S_RANGE.
                  L_S_RANGE-LOW0(4) = LOC_VAR_RANGE-LOW0(4).
                  L_S_RANGE-LOW+4(3) = '001'.
                  L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
                  L_S_RANGE-SIGN = 'I'.
                  L_S_RANGE-OPT = 'BT'.
                  APPEND L_S_RANGE TO E_T_RANGE.
                  EXIT.
                  ENDLOOP.
                  ENDIF.
                  ENDCASE.

  • Pass variable value form one Operational mapping to other

    Hi,
    Can a variable value be passed form one Operational mapping to other in Interface determination?
    So that a Condition check to excute the second operational mapping depending on variable value obtained form first operational mapping.
    Can globalContainer could be used in UDF?
    Thankx
    Edited by: kevindass on Aug 25, 2011 9:13 AM

    Hi,
    You can try these two options:
    1) Create a key in Dynamic Configuration and use it to store the value and retrieve the value back in second operation from Dynamic Configuration.
    OR
    2) Use Export and send the value to BPM, then in BPM using the value decide on if to execute the second operation.
    Regards,
    Aravind

  • Using Variable values to populate virtual key figure

    Hi Gurus,
    I want to populate virtual key figure in my report. I am using BADI for this. To populte VKF I want to use the variable values in my calculation. For eg. variable name is ZCAL_MON based on 0CALMONTH. When the user enters some value in this variable say 03.2010 I want to populate VKF for the last 12 months (sum for a period 04.2008 to 03.2009). I have written a customer exit in CMOD for variables but for vkf I am using BADI. Can anyone tell me how do I pass the variable value in populating vkf and also how do I total for the last 12 months?
    Utpal

    Hi,
    Did you find a solution. I'm just looking for the same thing.
    best regards..

  • Use Variable value name???

    Is there a way to use a variable value's name to load data?
    What mean is, if I have a variable called "var1" and I load
    "var1" from an XML file so the value of "var1" == "XYZ", is there a
    way to use the value "XYZ" to load data to a Dynamic textbox call
    "XYZ"?
    var1 = "XYZ"
    ( XYZ is a dynamic textbox on the stage and I need to load
    XYZ with incoming data )
    Example: XYZ = "What ever text I have"
    ( but XYZ is really the vaue of "var1")
    Thanks - Gary

    yes, you can resolve strings into objects by using array
    notation. for example, if XYZ is the instance name of a textfield
    on the _root timeline and var1="XYZ", you can use:

  • Authorizations by use of customer-exit: in  i_step = 3,   i_vnam is empty

    Hello all,
    I have checked multiple scenarios and they do not work:
    Current situation/setup:
    1. <b>Creation of several variables and adding each of them to different queries</b> :
    Variable   Type   Processing      Infoobject                     Selection  ready for input
    COB     1     6     ZCCOSTCTR__ZCCOB     S     
    CB2     1     6     ZCCOB                                     S     
    CBV     1     3     ZCCOB                                     S     
    2. <b>Adding values in a role</b> (currently 3.0 is used and we want to check the exit and if it works before upgrading to 7.0) and assign it to the user:
    Old active Object:ZCKS_COB:
    1KYFNM    *                                                                            
    9ZCCOB    $C-B2, $C-OB , $C-BV    
    added new object without 1KYFNM:                                                                               
    ZCCOB      $C-B2, $C-OB, , $C-BV             
    3. <b>Marked the used object auth. relevant</b> for the cube of the query
    4. Enhanced ZXRSRU01 via CMOD with coding and activated also the project:
      WHEN 'COB' or 'RESPNO'.
       IF I_STEP = 0.
        IF I_STEP = 1.
       IF I_STEP = 3.
          CALL FUNCTION 'Z_VARIABLE_BY_AUTH'
            EXPORTING
              I_VNAM           = I_VNAM
            TABLES
              E_T_RANGE        = E_T_RANGE
            EXCEPTIONS
              NO_AUTH          = 1
              NOT_VALID        = 2
              MISSING_OPERATOR = 3
              OTHERS           = 4.
          IF SY-SUBRC = 1.
            MESSAGE W007(EYE).
          ENDIF.
          IF SY-SUBRC = 2.
            MESSAGE W707(BRAIN).
          ENDIF.
          IF SY-SUBRC = 3.
            MESSAGE W999(BRAIN).
          ENDIF.
          IF SY-SUBRC = 4.
            MESSAGE W649(BRAIN) with I_VNAM ''.
          ENDIF.
        endif.
    The function 'Z_VARIABLE_BY_AUTH' was tested separately and fills in E_T_RANGE as expected.
    I also changed the variable names each time to all the other existing variables while debugging.
    If I use a variable of <b>type customer-exit</b> and process it with <b>i_step =1</b> the value selection and query result is OK.
    But this <b>scenario works without roles</b> and authorization values triggered by a variable $<VARIABLE> and is not the intended and documented way proposed by SAP. The documentation says to create a variable of type authorizations and to process it in I_Step = 3. But in this step I_VNAM is empty and so there is no processing ot the function module.
    Has anyone a solution? I could not find the issue during several debugging sessions. One strange thing is the protocol of rssm: the authorization buffer is not reflecting the enhanced role but only the value $C-B2 for object ZCKS_COB.
    Thanks in advance to have a look on this tricky issue.
    Bye,
    Petra

    Try this:
    IF i_s_rkb1d-compid = 'Query Name'
    Validation of data for the value entered in your Variable
        READ TABLE i_t_var_range INTO yourworkarea
                    WITH KEY vnam = yourvariable
        IF sy-subrc = 0.
          IF w_s_var_range-low(4) <>  w_s_var_range-high(4).  " Your condition or Logic
            l_msgv1     = c_qtr_com1.  " Your message
            i_handle = 9998.
            CALL FUNCTION 'RRMS_HANDLE_MESSAGE_INIT'
              EXPORTING
                i_handle         = i_handle
                i_msg_handler_id = sy-uzeit.
            CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
              EXPORTING
                i_class  = 'RSBBS'
                i_type   = 'I'
                i_number = '000'
                i_msgv1  = l_msgv1
            RAISE again.
          ENDIF.
        ENDIF.
      ENDIF.

  • Using variables in CURL for urls.

    Hello, I am fairly new here and new to programming. I am trying to make a program that will ask for a url and store it in a character array and use that variable as the URL for the url argument, in quotations, using libcurl, of course.
    curl_easy_setopt(curl, CURLOPT_URL, "<here>");
    However, when I do it the way I would with printf()
    curl_easy_setopt(curl, CURLOPT_URL, "%c", &...);
    it says prg.c:12:53: error: macro "curl_easy_setopt" passed 4 arguments, but takes just 3
    Is there a way to do what I am trying to do?
    Last edited by fawx (2008-08-20 13:06:24)

    I don't know what u really want to do. And what I found is that there is not an overloaded function like the one you are trying to use, in fact there is no overloaded functions for that one.
    http://curl.haxx.se/libcurl/c/curl_easy_setopt.html
    CURLcode curl_easy_setopt(CURL *handle, CURLoption option, parameter);
    If you want to pass a URL that dynamically fills the parameter variable you can first create a string and copy the info from another one then concatenate another.
    Here is an example that maybe could help you.
    char url[128];
    char *page = "hello.html";
    strcpy( url, "www.google.com" );
    strcat( url, page );
    for this you must include string.h, then you can use url to send as parameter in your function.

  • Using variables in Form and in BR

    I need to pass the members that has been selected in the user variable in the Form to the BR. How do I do that without prompting the user (using a Variable) ?

    Hi,
    you can only pass a member to a business rule that is in the POV.
    This can be defined on the web form. Here you can tell Planning to take the members and do not prompt for the variable.
    I hope this answers your question.
    Regards,
    Philip

  • Changing TS title using variable value

    Hi
    Is there any way to change TS title (it takes TS name as default) dynamically. In MDT I know we can define few stuff as title like
    "_SMSTSOrgName=ABC:%TaskSequenceID% v3.0"
    Do we have such variables in config manager that can be changed for Config manager TS (like adding some step for task sequence variable and define value there) . Any pointers will be appreciated
    Thanks
    Regards

    You can also do this quite easily:
    http://blog.coretech.dk/mip/extending-osd-progress-ui-info-in-sccm/

  • Use variable on form

    Where do I set my user variable in planning?

    Read - http://download.oracle.com/docs/cd/E17236_01/epm.1112/hp_user/user_var.html
    File, then Preferences > User Variable Options
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Calculations on customer exit using input variable

    hi,
    suppose i have a date input variable on my query, and i want to use the input value as an input for a calculation to be done in a different characteristic variable whose value is derived via a customer exit. how could this be done?
    as an example - i have an input date field, and say, the user enters 1/15/2005. the other characteristic variable is, for example, sales for a given date, restricted against a characteristic variable (customer exit) which should restrict the KF to say, the start of the month of the input date up to the input date (in this case, 1/1/2005 - 1/15/2005).
    thanks in advance. =)
    ryan.

    Hi Ryan,
    you have to use parameter I_STEP = 2 in your exit (IF I_STEP = 2. (...))
    This second step is called after the processing of the variable pop-up and only for those variables that are not marked as “ready for input” and are set to “mandatory variable entry”.
    Build your second variable in this way and then you can use this step to see first (pop-up) variable value.
    For details see www.service.sap.com/bw -> SAP BW InfoIndex -> Variables -> How to... Derive a Variable value from another variable 2.x (pdf).
    Hope it helps (and please don't forget to assign some points by clickin'on the yellow star to the contributors that help you !!!)
    Bye,
    Roberto

  • Using Characteristic value with Replacement path variable

    Hi All,
    Could you please let me know if it is possible to use charecteristic value instead of key figure with replacement path variable. My requirement is to use factory calendar id as the replacement variable on plant characteristic, now when I choose replcaement variable with Attribute value, the dropdown menu only gives the list of key figures assigned as an attributes to Plant.
    Now I am looking for a solution to use factory calendar id as the attribute.
    Thanks for your help in advance.
    Regards
    SS

    Hi sachin
    U can use it
    Look at these links
    Re: Customer exit &  Replacement path........?
    Variable with Replacement Path
    Re: Replacement Path for Charastrictics Variable
    http://help.sap.com/saphelp_nw04/helpdata/en/03/6ba03cc24efd1de10000000a114084/frameset.htm
    Regards
    KR

  • Customer Exit Variable - Variable Value Error BRAIN 000

    I created a variable which is processed by 'Customer Exit'. This variable is 'optional' and NOT user input required.
    And i have written my code in customer exit under I_STEP EQ 1.
    I used the variable in my query as a default value for a free characteristic.
    The query runs fine and return me the correct result.
    The problem is when i used the same variable as a default value of a free characteristic in another query which has another user input variable for another characteristic, i got a warning message after input a value for another variable.
    Variable Value Error BRAIN 000 <<i>my variable name</i>>
    How to make it work in the second query?
    Please help as I am new to this.
    Thanks,
    CH

    Hi Fernanda,
    Try this:
    DATA:  LS_RA_SID  TYPE   RSR_S_RANGESID.
    DATA:  fst_date LIKE sy-datum.
       CASE i_vnam.
              WHEN 'ZRANGE_PREVMONTH'.
    fst_date = sy-datum - 1.
    concatenate fst_date(6) '01' into ls_ra_sid-low.
          ls_ra_sid-sign = 'I'.
          ls_ra_sid-opt = 'BT'.
          ls_ra_sid-high = fst_date.
          APPEND ls_ra_sid TO e_t_range.
    ENDLOOP.
    ENDCASE.
       ENDIF.
    Just post here for any queries..
    Regards,
    Loed

Maybe you are looking for

  • Mac 10.5.8 and itunes 11.1 compatability when using ipad2 with ios7

    I have updates my ipad to iOS7, but now it says on my mac (10.5.8) that i hav eto have Itunes 11.1 or later which i can't get. Would of been nice to have had some kind of compatability as I use the 2 devices in tandem regularily. Is there anything i

  • Corner pin is all messed up

    In CS3, corner pin isn't working right. If I use the Adobe corner pin, the video corners don't follow the cross-hairs at all. I can put the 4 corner pins just where I want them, but the video itself isn't anywhere close to where it's supposed to be.

  • How to delete a technical scenario

    Hello, how can I delete a technical scenario from managed system configuration? There are only buttons for create new/configure/maintain/export ... Thank you. (Solman 7.1 SP1) Edited by: Hauke Ihnen on Jan 24, 2012 12:55 PM

  • ECC 6.0 Trial Setup

    HI, Please let me know if i can download ECC 6.0 trial version. If yes, let me know the link. thanks, SJ

  • TS3988 Can't access photo stream and icloud, despite having the right id/password

    I can access icloud online, and on my macbook pro. But for some reason, I can't access my storage preferences (it says: Details not available), nor can I access photo stream. I get an error message that says: Photos for the iCloud account "[email pro