Variable entry for replacement path

Hi Guys,
This is my scenario. I have query A which uses a set of results from query B via replacement path. I have a mandatory variable entry for Query A which I have used also for query B. I was under the impression that when I made a user entry for the variable for query A, that value would be copied over to query B and perform the filtering in Query B too. Is this not the case.
If I need to perform this operation, i.e use the value that I enter for variable entry in Query A in Query B, how can I do that?
Thanks,
Doniv

Hello Doniv,
we are using this scenario in our queries too, if we define the same variable in the query A and B,
this value is used for the selection in the query B.
Did you tried to search in OSS? (this could be the SAP error)
Regards,
Kirill

Similar Messages

  • Variables coding for replacement path customer exit

    i have to look up values in query for restricted keyfigure ..
    the values are stored in an ods table as below, as the values changes often during the year.:
    zdate123.......value1.....value2
    1/1/10............90..............91
    1/2/10............94..............87
    in a query i have to grab all the data for Value1 for different dates,
    so i created a variable ZVAR_VALUE1
    and write the customer exit for it as below
        DATA: l_s_table TYPE /BIC/AZODS00.
        data: l_s_range_low,    l_s_range,    l_s_range_sign,    l_s_range_opt.
        DATA: v_today type sy-datum.
        v_today = sy-datum.
    CASE i_vnam.
      WHEN 'ZVAR_VALUE1'.
        IF i_step = 1.
          CLEAR L_S_RANGE.
          SELECT SINGLE /BIC/ZVALUE1 INTO l_s_range FROM /BIC/AZODS00
          WHERE /BIC/ZDATE123 EQ v_today.
          APPEND l_s_range TO e_t_range.
        ENDIF.
    this gives error
    WInitial RANGE-OPT for customer exit variable zvar_value1 is corrected..
    Error for variable zvar_value1...
    i tried replace variable with query but i cannot use it in restricted keyfigure as it gives error...variable cannot be used in structure
    can anybody help correct the code??

    thank you
        DATA: l_s_range TYPE rsr_s_rangesid.
      and it works
    but now in query outpu t the value comes up as 0.00 for everything
    this is my code exactly as below
    ATA: l_s_table TYPE /BIC/AZODS00.
    DATA: v_today type sy-datum.
    v_today = sy-datum.
    CASE i_vnam.
    WHEN 'ZVAR_VALUE1'.
    IF i_step = 1.
    CLEAR L_S_RANGE.
    SELECT SINGLE /BIC/ZVALUE1 INTO l_s_range FROM /BIC/AZODS00
    WHERE /BIC/ZDATE123 EQ v_today.
    l_s_range-low = l_s_table-/BIC/ZVALUE1 .
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    and there exist the value for today for Value1 in ods

  • Problem in displaying dates for replacement path with text variable

    Hi all,
    I have to display dates in sequence as descriptions for 15 columns based on the the date entered by the user in Bex Report.I managed to display date as description using text variable with replacement path for single column.I could not able to increment date for other descriptions.Could you please help me to solve this issue.Its urgent.
    Ex: User enters 03/09/2007 then in the out put desciptions for the columns should be  03/09   04/09  05/09 ............ 17/09.
    Thanks in advance.
    Regards,
    Mandadi.

    Hi,
       goto the properties of your KF and click on the variable button side to that of the description field and click on new/Create option.Enter the technical name description for the text variable and select Replacement path as the Processing type and in the nxt screen select Fiscal year as the replacement variable and in nxt screen  specify as Key and provide offset values if necessary and click on finish.now select the variable by clickin on the variable button next to the description field.it comes after the description of the KF.Now run the query.
    Thanks,
    Sandeep

  • How to feed a query using a variable defined as Replacement Path-Query

    Scenario description : BI NetW 2004S - InfoCube with the following characteristics Customer, OrderDate, OrderYear and the following KeyFigure Number of Pieces.
    Objective: I need a query "QB" that shows how many pieces a set of customers has ordered in the year 2008. The set of customers is defined as all customers that in the previous years (the user can select one or more years) have ordered more than 500 pieces within the same year.
    Implementation: In general terms the idea is to build a query "QB" with the characteristic "Customer"  that is restricted (filtered) using a variable that is fed by another query "QA" (Replacement Path-Query).
    In order to have the selection of customers that for each of previous years (2007, 2006, 2005,...) have ordered more than 500 pieces, in the query "QA":
    - I put OrderYear as filter and defined a variable in order to ask the user which year/s he wants to analyse to define the selection
    - I put Customer and OrderYear in row
    - I put the KeyFigure Number of Pieces in column
    - I've defined the following condition: Number of Pieces > 500 with the option Caracteristic Assignment = All Characteristics in the Drilldown Indipendently
    Now if I run the query "QA" it works correctly showing me all customers that in the selected years have ordered more than 500 pieces within of the same year.
    If I run the query "QB" it shows a correct result only if I enter only one year (for example 2006) in the OrderYear field (coming from the query "QA"); if I enter more than one year (for example 2006 and 2007) the selection of customers showed is not the same defined by the first query "QB": I was expecting to see all customers defined from the first query less all customers that have no ordered any piece in 2008.
    Questions
    1) Why is query "QA" working on a different selection of customers when the user selects more than one year?
    2) Cosidering the scenario and the objective described above do you have any other idea?
    Thanks
    Ciao
    Roberto

    Hi Christophe,
         it's ok for me if I consider the customer only once in the final selection of customers that feeds the final query, this is my objective.
    However as test I've created 2 "input" queries, one related to 2006 and one related to 2007, and then in my destination query I've tried to restrict the customer using 2 variables of type replacement path-query (one attached to the 2006 query and one attached to the 2007 query). Unfortunately when I try to check and save the destination query, Query Designer tells me it is not possible to restrict the characteristic in this way.
    Could you please describe me steps you run in to order to restrict a characteristic using more than one variable of type replacement path-query?
    Thank you in advance for your answer.
    Ciao,
    Roberto

  • Formula variable of type replacement path not working

    Hi Folks,
    I have created formula variable of type replacement path and replaces with characteristic key.I wanted to use charecteristic infoobjects in coluns so that i have created formula variable for that.But when excecuting the query in web it is not displaying values for that formula.
    Can anyone plz solve this,if u come accross this situation before.
    Thanks and Regards,
    Ravikiran
    Edited by: MRK@SAPBI on Jun 11, 2011 1:13 PM

    Thanks vineet, for your quick reply.
    yes,i have used the characteristic in a row and it is a number.
    Still it is not displyaing values.But i need to calculate the couter for the same formula created on that charateristic and need to put condition in the query.
    thanks,
    Ravikiran

  • Use of variables in "FOR XML PATH"

    Other than using dynamic sql (which we don't want to use) is there a way to use a variable in For XML Path, e.g.
    select
    FOR XML PATH (@BookName), ROOT('Book'), TYPE
    TIA,
    edm2

    In terms of general XML design this is poor.  An element is normally a 'thing', and the attributes are normally the properties of that thing.  Therefore in your case you would have a Book property with a 'name' attribute.  It would be impossible
    to create an XSD for your xml, and makes it awkward for readers of your xml - how do they know the book name beforehand?  Creating this xml in the normal fashion would also make it easy to create without any messing around ( string manipulation,
    other hacks ), eg
    DECLARE @BookName NVARCHAR(20) = 'SomeBook'
    SELECT
    @BookName "@name"
    -- Other book attributes
    FOR XML PATH ('Book'), ROOT('Books'), TYPE
    So now you have a Book item(s) within a Books collection.  Easy!  : )

  • A formula with a formula variable with a replacement path delivers X

    A formula with a formula variable with a replacement path delivers X as a result if the characteristic of the replacement is not in the drilldown
    I have Created on ( date ) on which I have a Formula variable . I have used that Formula Variable in my calculated Key figure .
    Now the Problem is If I use Created on in ROW , The calculated key figure works . But if I don't use in Row , The calculated Key figure shows X . Situation is Users don't want to see Created on in ROW .
    If I use in row and hide also , then number of Records  will be same .
    Pls guide me what shoud I do .
    Is this problem related to support pack .

    hi
    i would like to know how to create the replacement path and authorisation variables.
    what are the steps we need to follow in rsa1.
    Edited by: vasu reddy on Apr 9, 2008 11:28 AM

  • Formula variable problem on replacement path

    Hi all,
    I created a characteristic value variable for the 0CALDAY (ZVAR1) with the following details.
    - Characteristic Value
    - Customer exit
    - Calendar day
    - Mandatory
    - Variable is ready for input  unchecked
    Now i need to give the calculated value in customer exit by I_STEP 2 in a new formula variable (ZVAR2).
    So:
    1) I create in columns a new Formula (zFormula)
    2) In edit mode I create a formula variable (ZVAR2)
    3) in edit mode of the formula I set the following details:
      - Replacement path
      - Replace variable with: Variable
    Here the problem: when I open the popup on selected box to choose the vcharacteristic value variable I don't see the ZVAR1.
    I don't understand where is the problem.
    May you help me ... regards, Roberto

    Ok solved.
    Roberto

  • Variable entry for offset

    Hi All,
    I was wondering if there was a way in which we can accept a user entry for the offset of a variable. I mean, in a report, I need to see all the records with the creation date of the last 'X' days, where 'X' can be entered by the user.
    Thanks,
    Doniv

    Hi Doniv,
      Lets take the case,
    ZINPDATE - User Entry Variable
    ZREQDATE - Customer Exit Variable
    CASE i_vnam. "variable name
    WHEN 'ZREQDATE'. "Customer Exit Date Variable
    IF I_STEP = 2.
          LOOP AT i_t_var_range INTO loc_var_range
            WHERE vnam = 'ZINPDATE'.
    CLEAR l_s_range.
    l_s_range-low = sy-datum - loc_var_range-low.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'GT'.
    APPEND l_s_range TO e_t_range.
      ENDLOOP.
    ENDIF.
    ENDCASE.
    Assign Points,
    Arun

  • FTPs connection error:When using Variable substitution for Directory path

    Hi
    I am transferring data from BI to xml file via PI: Here a Client proxy from BI sends the data to PI and the PI FTPs the XML file to a remote location. For FTP I am using FTPs SSL connection.
    It was working fine untill I used Variable susbstitution to determine Directory path dynamically. I am using this because different xml files are intended to goto the different locations.
    I did the variable substitution like this:
    Target Message Structure:
    ---> Target Directory: %var1%
    <?xml version="1.0" encoding="UTF-8" ?>
    <MT_BI_EXTRACT_FILE>
      <Header>
         <Directory>/Customer</Directory>
    </Header>
    <Detail>
    </Detail>
       </MT_BI_EXTRACT_FILE>
    And in the variable substitution I am doing it this way
    payload:MT_BI_EXTRACT_FILE,1,Header,1,Directory,1
    And the error I am getting is:
    Attempt to process file failed with Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure
    MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure
    Exception caught by adapter framework: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure
    Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error when getting an FTP connection from connection pool: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: iaik.security.ssl.SSLException: Peer sent alert: Alert Fatal: handshake failure.
    Does anybody have some Idea of this ??
    Regards
    Naina

    Hi,
    I guess the problem is not with Variable Substitution..
    Error when getting an FTP connection from connection pool:
    So its a connection problem..
    Also check the option Disable Security check and try again...
    Try to check again if the interface is executing properly without Variable substitution and let us know..
    Babu
    Edited by: hlbabu123 on Jan 7, 2011 2:46 PM

  • Error while creating a Characteristic Variable with Replacement Path

    Hi all,
        I am trying to create the Characteristic Variable ZVLOWDT (Low Date') with Replacement Path on characteristic ZSTARTDT (Start Date) and it gives the error 'Source to replace 'Low Date' is not defined.
       I have created a User Entry Variable VAR_DATE (Start Date) with interval like '01/01/2009 - 01/15/2009'  and  Customer Exit variable ZVCPDAY (does some calculation based on the input of VAR_DATE) on the same ZSTARTDT characteristic. I want to get the 01/01/2009 (lower range date of the selection) into this Characteristic Variable ZVLOWDT. We are in BI 7.0 and the following are it's properties:
    General Tab:
    Description: Low Date
    Technical Name: ZVLOWDT
    Type of Variable: Characteristic Value
    Processing by: Replacement Path
    Reference Characteristic: ZSTARTDT Start Date
    Details Tab:
    Variable Represents : Single value
    Variable is: Mandatory
    Variable is Ready for Input : unchecked
    Replacement Path Tab: Replacement Rule
    Replace Variable with : Variable
    Variable : VAR_DATE
    Replace with : KEY
    Why I am getting this error, PLEASE ?
    Thanks,
    Venkat.

    Hi Khaja,
       We could derive a Variable value from another Variable with out Customer Exit. There is a white paper.
    First have the User Entry Variable (ZV_X) and it accepts the date range like '01/01/2009 - 01/31/2009'. Next create the Characteristic variable (ZV_Y) of Replacement Path for which source variable will be ZV_X and we could get the 'FROM Date' (01/01/2009) from the selection (ZV_X) into it (ZV_Y).
    While creating the Characteristic variable (ZV_Y) of Replacement Path, I didn't find my newly created ZV_X variable in the list of available variables under 'Variable' header in 'Replacement Path' tab and it is causing the error  'Source to replace variable ZV_Y is not defined'. How could I create the Characteristic variable of Replacement Path, PLEASE ?
    Thanks,
    Venkat.

  • Creating Variable with Replacement Path to get value from ANOTHER Variable

    Hi all,
        Is anyone has created the Variable with Replacement Path to get the value from another User Entry Variable, PLEASE ? 
    First created the User Entry Variable (ZV_X) and it accepts the date range like '01/01/2009 - 01/31/2009'. Next created the Characteristic variable (ZV_Y) of Replacement Path for which source variable will be ZV_X and we should get the 'FROM Date' (01/01/2009) from the selection (ZV_X) into it (ZV_Y).
    While creating the Characteristic variable (ZV_Y) of Replacement Path, I didn't find my newly created ZV_X variable in the list of available variables under 'Variable' header in 'Replacement Path' tab and it is causing the error 'Source to replace variable ZV_Y is not defined'. How could I create the Characteristic variable of Replacement Path for my requirement, PLEASE ?
    The following is from help.sap..com:
    Replace with Characteristic Value
    Text and formula variables with the processing type Replacement Path can be replaced with a corresponding characteristic value. In the variable editor, on the General tab page, you specify under Reference Characteristic the characteristic that is to be referenced by the replacement. On the Replacement Path tab page, you can choose whether the variable is replaced with the From or the To Value and with the Key or the Name of the characteristic value. You can also specify the Offset Start and Offset Length for the output.
    Replace with Variable
    Characteristic value variables, hierarchy variables, text variables, and formula variables with the Replacement Path processing type can take their values from a different variable.
    The following prerequisites need to be fulfilled:
    Variable
    ●      The variable must not be input-ready
    ●      The variable must represent a single value
    Source Variable
    ●      The source variable must not be a hierarchy node variable
    ●      The source variable must be input-ready
    ●      The source variable must be available in the query
    ●      The source variable must represent a single value or an interval
    In the variable editor, on the Replacement Path tab page, you specify the source variable from which the value is to be determined. The value is either determined from the key, the external attribute of the key, the description, or the attribute value. You can specify an Offset Start and an Offset Length for the output here. The variable is replaced on the variable screen upon each data release.
    Thanks,
    Venkat.

    Hi Eve,
    It is possible to connect the 2 queries using a Replacement Path characteristic variable. You would need to create the variable on the char whose values you want to pass from Q1 to Q2. The variable will be of type replacement path and you will need to enter the name of Q1 from which it will get the values. Make sure that you include this char in the query definition of Q1 and Q2. In Q2 you will restrict the characteristic using this variable. DO not use this variable (replacement path) in Q1.
    In your query properties check if you have turned on the checkmark for Release for OLE DB for OLAP (3rd tab). If the check mark is there, then remove it.
    We are using the scenario in a couple of places, and it works very well.
    Hope this helps...

  • Formula variable with replacement path to another input variable

    Hi @ all,
    i have a question regarding "Formula variable with replacement path to another input variable".
    My Problem is that in selection screen and for info-fields the input variable is shown with its key and not with its description.
    Scenario:
    A formula variable (X) is used to get an input value of a characteristic variable (Y) for 0Fiscper3 to realize a IF-Then scenario.
    The formula variable (X) uses replacement path by variable (Y) replace by "key".
    In selection screen of the query variable (Y) is named with its key "ZAB_BUPE01" and not with its description " fiscal period". Same as for info-fields where the description is "ZAB_BUPE01" and not " fiscal period".
    Does anybody have a solution to display the selection variable correctly?
    Regards
    Tobias

    Issue Solved!
    The input varaible (y) for 0Fiscper3 was saved globally on the InfoProvider. This results in that the formula variable with replacement path only shows its technical name. I put the input variable in the query itself and it soved the problem. The variable is displayed with its description in selection screen.
    Regards

  • Replacement path with text variable

    Hi experts,
    My client requirement is " when he enters the current year or current day then it should display the Description of that particular year r month r day."
    Can anyone explain me in detail how to create replacement path with text variable on FISCAL YEAR?
    Hope will solve my issue soon.
    Thanks in advance
    Jani Sk.

    Hi,
       goto the properties of your KF and click on the variable button side to that of the description field and click on new/Create option.Enter the technical name description for the text variable and select Replacement path as the Processing type and in the nxt screen select Fiscal year as the replacement variable and in nxt screen  specify as Key and provide offset values if necessary and click on finish.now select the variable by clickin on the variable button next to the description field.it comes after the description of the KF.Now run the query.
    Thanks,
    Sandeep

  • Replacement Path variable cannot be used in filter

    After creating a variable of type replacement path with query I get the error message:
    Errors: Variable ... cannot be used in 'Filter' 'Default Values'; remove
    Does anyone know what is causing this message and how to prevent it?
    Thanks.
    Regards,
    József.

    Thanks for your response Bhargava,
    Your answer did help me find the solution. When using a replacement path variable with query, you can only use the variable in the Characteristic Restrictions part of the Filters (not in the Default Values).
    The characteristic itself can still be used for navigation.
    p.s. Found that when copying a query some links to structures, like restricted key-figures, are kept in the metadata repository, even after removing them from the query. This can also cause error messages.
    Regards,
    József.

Maybe you are looking for

  • Cannot delete keywords

    I am working with an iPhoto library which has repeatedly developed a problem where I am unable to delete an incorrectly applied keyword from an image or series of images.  This is iPhoto 9.5.1, but has been happening intermittently for months, both w

  • Does GRANT CREATE ANY PROCEDURE auto grants EXECUTE on created obj to user?

    I have a User ABC which has GRANT CREATE ANY PROCEDURE on schema XYZ. Now, I create a new Function in schema XYZ using my ID ABC named "func123". My question is, would my User ID ABC being creator of func123 be able to EXECUTE it by default ??? Note:

  • How to get the el expression foruserrole in custom template jspx from secob

    Hi All, I am working on webcenter template customization . My requirment is based on the user roles i want to control the visibility of certain webcenter tabs and link . I foundd a security object which holds all user related data information . Like

  • Outlook 2013 SEND AS Default

    Hello, We have Exchange 2013 and using Outlook 2013. is it possible to make SEND AS option as default sending e-mail option?

  • Finding and averaging multiple rows

    Hello, I am having a little problem and was wondering if anyone had any ideas on how to best solve it.  Here is the problem:  - I have a large file 6000 rows by 2500 columns.  - First I sort the file by columns 1 and 2 - then I find that various rows