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...

Similar Messages

  • Formula variable with replacement path on system date

    Hi Experts,
    I got a requirement to calculate "Days without payment" in report level.
    Days without payment = System Date - Payment Date.
    (Payment date field is available in CUBE, but system date field is not available in the CUBE)
    As we know, the difference b/w 2 dates is not possible directly.It can be possible by creating 2 formula variables with replacement paths on the dates and by writing aformula on these 2 formula variables.
    But the thing is I dont have system date readily available, and I tried by using SAP Exit. But we cant create formula variable replacement path on another variable (SAP EXIT).
    Do we have any SAP variable  for formula with replacement path readily avaliable to get system date (or) any other suggession.
    Please suggest me.
    Thanks,
    Sai Chand.S

    Hi Arminder,
    Thanks for your valuable answer.
    I tried doing the same previously.As u said we can get system date by creating customer exit variable.
    But the thing is to find difference b/w 2 dates, we cant do it directly, we need to create 2 formula variables with replacement path.
    1) Var1 = Formula variable with replacement path on system date(custoer exit variable).
    2) Var2 = Formula variable with replacement path on paymanet date.
    Number of days = var1 - var2.
    But as in 1st point, we cant create formula variable with replacement path on another variable, as system date is already a variable of type customer exit.
    We can create replacement paths only on characteristics.
    Please suggest me .
    Thanks,
    Sai Chand.S

  • 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.

  • Variable with Replacement Path

    Hi, I have two queries. The results of the first one should be the input for the second one. E.g. the first query shows a list of personnel numbers and additional information. These personnel numbers shall be overtaken by the second query. The personnel numbers belong to "Dimensions" in the Query Designer. I alread tried to create a variable with replacement path to the dimension personnel number. I implementet this variable in both the first and the second query (under: "rows"). It`s no "Formular variable" and no "Calculated Key Figure" but a "Characteristic Value Variable" of a Dimension. The problem is now that I cannot execute any of the two queries. The error "Abort the query cannot be released for OLE DB for OLAP. System error in programm CL_RSR_REQUEST and form PREPARE_VQUERIES:INVALID_
    What is my mistake? Thank you in advance! Eve

    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...

  • Used of Sap text variable with replacement path in Bo designer

    Dear experts,
    I created a univers based on a SAp BW query. In this query I used a text variable in order to get dynamic header columns.
    The text variable is done by using "replacement path" that is the text is derived automatically from the user input triggered by a sap bw variable.
    example :
    the query contains a restricted key figure which shows net values for a selected year based on variable PYEAR.
    The name of this restricted keyfigure is &ZYEAR& where ZYEAR is the text variable with replacement path from the variable PYEAR.
    When generated the univers based on this query I get component &YEAR&.
    When I use this unvers in WebI my result containts header with &YEAR& althougth I selected for example the year 2006.
    According to several how to and white papers on SDN , it seems that text variables with replacement path are supported. So I am disapointed by this result.
    Can you give me advise to get a rigth result ?
    thanks a lot
    Olivier Doubroff

    Hi Rishit,
    I am trying to achieve the same as you, but it seems like text variables in restricted key figures do not work. I am using BO XI3.1 SP3 and SAP BW 7.01 SP6.
    A work-around for me has been to use the "user response" function in webi to create a webi variable that holds the dynamic text title. If the user inputs Jan 2010, I change the input to a date using the "user response" and "ToDate" functions in the webi variable editor. After changing the input to a date I use the RelativeDate to extract 1 month (e.g. 25 days) from the user input. Then I have both Jan 2010 and Dec 2010 as webi variables to use as headers for my restricted key figures.
    The formulas can easily become a little long, but by tweaking the user response string, you should be able to get dynamic headings by using webi functionality. But be aware that you need one webi variable for each dynamic heading if you use this method.
    Let me know if it works or if I can help more:-)
    Best regards,
    Morten

  • Text Variable with Replacement Path

    Hi,
    I want to create a report which will show me 5 years of data. I have used a variable for Fiscal year which will be given by the user. Now I created a 5 key figures with offset to show the 5 years of data. 
    I used a text variable with replacement path based on Fiscal Year, to display the year in the column heading. But I am only able to get the correct year in the first column. Rest of the column is showing me the same heading. Actually the offset is not working for the text variable.
    Can anybody let me know how could we achiev the column heading for the columns with offset.
    Thanks

    Prashanth,
    I have used a replacement variable in the exact situation. Instead of years, I have different months. I have used this variable on 0CALMONTH. I also have two more keyfigures where CALMONTH is offset by -12 and +1.
    This variable works perfectly for me as expected.
    Did you check the data to make sure that your offset is working? This is was I did for Offsetting and i am sure you have done the same thing.
    Right click on the variable, "restrict". A window opens with the values. With the variable selected in the right side, right click "Specify Variable Offsets". If the replacement variable is built on this infoObject, it should work.
    Hope it helps. Let me know if you still can not find a solution.

  • BW 3.5 - Issue with formula variable with replacement path

    Dear experts,
    I'm facing an issue with formula variable with replacement path.
    Just to clarify, I know replacement paths is raising a lot of questions but I've been using this functionnality extensively in the past, both in 7.0 and 3.5, so I'm not looking for basic information about how to use it.
    I'm trying to setup a simple report that would show total values per plant of Purchase Order < 100 €
    To do so I've setup a calculated key figure as follow:
    VAR1 * ("PO value" < 100 ) * "PO value"
    VAR1 is a formula variable with replacement path on 'purchase order' and value attribute 'constant =1'.
    (The report has to show values summarized by plant but should not show the detail PO by PO, so I'm not looking at a solution based on condition)
    The report as characteristic "plant" in rows and my CKF in columns.
    Now let's take an example. I have 3 POs in Plant 1:
    PO1 -> 150€
    PO2 -> 90€
    PO3 -> 80€
    Because of the variable with replacement path, the result in my query should be:
    plant1 = 170 (even though characteristic "purchase order" is not in my rows, system should evaluate PO one by one and return values only for those two that are below 100).
    But the result coming is 320, which is wrong.
    I've done the same report on many other 3.5 systems and it worked perfectly, and I am not able to get proper support from SAP OSS who keep saying that this functionnality is not ready in 3.5 (although I've provided screenshot of this working on another 3.5 system!!! how frustrating...)
    They have also pointed to problems of Before and After aggregation but that has absolutely no impact. Once again, the scenario is working perfectly on other 3.5 systems with the same query design, so i'm sure it has nothing to do with Query Designer options.
    Would anyone have ever come to an equivalenet problem? I'm wondering whether the DB itself could not play a role in the variable with ref  characteristic 'constant =1' ...
    Any though is welcome!
    thanks

    Hi,
    The text variable is replaced when the exact date is clear for this key figure column according to the restriction.
    To achive this, please make sure that either the variable is directly restricted in the key figure selection, or that the date characteristic is in drilldown.
    Regards,
    Patricia

  • 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

  • Issue - Formula Variable with Replacement Path

    Hi,
    Is it mandatory to include the base characteristics in the rows on which the formula variable(replacement path) is based on. As long as the base char is in the rows the variable works fine. The moment I take that off, the variable doesn't produce any result. I know the char can be put in the rows and can be hidden, but then in that case I don't get the desired aggregation level.
    Has anybody come across this probelm and managed to sort this out? Kindly suggest any solution.
    Thanks,
    Anurag.

    Hi,
    a formula variable with replacement path only works if the replacement object is in the query in either the rows or colums. The data can never be aggregated on a higher level then the infoObject in the replacement path. If you want a higher aggregation you can add a new key figure as an attribute to your infoObject and fill it with the value you want in the loading process. You can use that key figure in your queries every way you want.
    Kind regards,
    Alex

  • Regarding text variable with replacement path.

    Hi Friends,
    Please can any one tell me good scenario where we can use text variable with replacement path..
    i have already searched in forum,but that scenario's i did not under stand.
    Please send.
    i will assign points.
    Thanks in advance.
    Thanks & Regards,

    Hi,
    There is a scenario:
    One has to show, a Period like May 2008 for a report. i.e the report which u r showing is common for May 2008. So u create a text variable on this Fiscal Year Period. When u do this, the Text appears on the Top of the report. So later, whenever u execute a report for a particular month, u get that Header as Jue, July etc etc.
    Its just a header. Text Variable promts u to display the Header with our own uploaded Desire Data.
    Steps.
    1) Edit your query
    2) Right click 'keyfigures' or other structure, choose 'new selection',
    3) beside description there is 'variable' button, click and then choose 'new', a variable screen will come out, type in your variable name, description, choose 'replacement path' for processing by. click 'next'.
    http://help.sap.com/saphelp_nw04/helpdata/en/ac/789b3c4d4d8d15e10000000a114084/content.htm
    Assign Points if helped
    Thanks
    Edited by: Noor Ahmed khan on Jul 21, 2008 5:43 PM

  • Characterstics variable with replacement path?

    hi friends,
    what scenerio we use characterstivs variable with replacement path in reporting?
    Thanking u
    suneel.

    Hi Suneel,
    If you set a query as a replacement path, you can use that query to fill a characteristic's variable which is used in another query. In this way you can take advantage of the OLAP engine to perform e.g. complex selections on a characteristic's values. Obviously you need to format the replacement path query's layout appropriately. the replacement path technique is intended to fill a characteristic's variable. You use that variable on that characteristic in another query
    check this link for creating step by step
    http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
    Hope this helps,
    Thanks,
    Sudhakar

  • Formula Variable with Replacement Path - drillup ref.char and still working

    Hi all,
    I have a requirement, where formula variable (with replacement path) shouldn't work when I remove the reference characteristic from the rows. But this is not the case at the moment
    I have 'Brand' and 'Material' in the rows and there is 'Material Indicator' in the columns. This 'Material Indicator' is a formula and there is formula variable in it with the type replacement path.
    Reference char is 'Material'; Replace with 'Attribute Value' is selected also. As attribute I am selecting one of the attributes of the 'Material'.
    In the report output, I am seeing relevant attribute values when Material is in the rows. But when I remove the Material from the report, I still see the values for this Material Indicator column. But I expect to see blank instead..
    Can you please share your comments?
    Thanks in advance.
    S.P.

    hi,
    Irrespective of the drilldown on Material, the fomula variable will be replaced by material value. This is how replacement variable should behave. You might have to change the design. For  more inputs, let me know your requirement exactly.

  • Time Format using text variable with replacement path

    Hi Friends,
                                 I've used "Text variable with replacement path" to make the column heading dynamic by replacing the values referring from "0calday"...
    everything is working fine, but here it is displaying the time format like
    YYYYMMDD (20030101), i want it to be displayed DDMMYYYY (01012003) in the column heading... how to make it possible?
    pls waiting for ur inputs, it's an urgent...
    Regards,
    Pattnaik

    Hi Satyakam,
    In the text variable properties make sure that in the replacment path you have chosen "Text" to appear date as per user setting . Other wise as in your case it must be set to "Key" which always shows in the format YYYYMMDD.
    Hope that helps.
    Regards
    Mr Kapadia

  • Text Variable With Replacement Path : supported in Webi 4.0 or Not.??

    Hello to All WebI Gurus,
    We are on BO 4.0
    We are building WebI report on top of Bex query using the BICS connection from IDT.
    Our BW query is having some Text Variable with processing type "Replacement Path".
    Also its having fiscal year period in filter with user input variable.
    the text variables references Fiscal year period and are used in Key figure description,
    hence whatever value the input variable will capture the description of Key figure changes accordingly/dynamically.
    But when I try to use it in BO it throws me an error msg saying :
    Unknown error occured in SL Services
    I am Aware that text variable in this fashion were not supported in BO XI3.1
    Used of Sap text variable with replacement path in Bo designer
    So are Text variable Supported in BO 4.0 in this fashion.
    Any response will be highly appreciable.
    Thanks & Regards
    Neeraj

    Hi,
    Here's a great SDN article, which includes several slides covering u201CWhich BEx features are supported using BICS connectivityu201D : http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/d056e1bc-2794-2e10-959e-8779c5623cc5
    Pages 8 -> 12 cover these topics.
    If your design choices are compliant (supported) then i'd avise opening a support case if this issue persist after checking again on Patch2.11 (release recently)
    Regards,
    H

  • BEx Analyzer: Formula Variable with Replacement path change Month with Day

    Hi experts I'm facing this issue in BEx Analyzer.
    I need to have some dates in format DD/MM/YYYY in Index Structure, in order to do this I've created a formula variable with replacement path referenced to 0CALDAY characteristic.
    The formula works but it behaves in a strange way:
    if the day is higher than 12 the displaied result is correct (DD/MM/YYYY)
    if the day is lower or equal 12 the displaied result is wrong (MM/DD/YYYY)
    I'm on BW 7.01 SP6 and BEx Analyzer 7.10 SP12, excel 2007.
    anybody has faced this issue before?
    any help will be appreciated
    Daniele Cortopassi

    Hi Daniele,
    This seems pretty strange. Pls. redo validation with the dump data, as being a flat struture BEx does not apply any logic changes. May be it might have been MM/DD/YYYY format as in workbooks. Else you may change the property of 0calday display as "Text". Business Explorer > Display > KeyMaster Data/Texts > Texts (Plese check this option). If you are using some text table you may maintain the same using BI0/TCALDAY (Similar to BI0/TCALMONTH2). Guess it should be an excel based issue; if not you may try the same in WAD/Report designer to verify the nature of the issue. If you don't face these inconsistencies in WAD/RD then you may change excel formatting options. Lastly, please let us know if the infoobject has some predefined settings in RSA1 > Infoobject > (BEx) Properites.
    Thanks,
    Arun Bala

Maybe you are looking for