How to derive value from another variable and use it to read master data?

Hi,
I have following case:
First I need to read the value from Cost Center -variable (ZIPCC) and then I need to use that value to determine the home currency of that cost center from the cost center master data table (field: OBJ_CURR).
I know to basic idea on how to do this, but don't seem to get the syntax correct. Could someone point me in the right direction?
So the objects in play are:
ZIPCC = Cost center selection variable (mandatory, single value)
ZIPCUR = Cost Center Currency variable (customer exit, single value)
0COSTCENTER
0OBJ_CURR = Field in cost center master data
Help will be greatly appreciated!
-m

Hi,
Thank you very much for your example I can see that this logic works! However I'm experiencing trouble in selecting the 0OBJ_CURR
This kind of declaration isn't working: "D1 Like /BIC/0OBJ_CURR."
And the same goes for the Selection:
"Select single OBJ_CURR into D1 from /BI0/PCOSTCENTER where COSTCENTER = i_t_var_range-low."
This is where my syntax also went wrong.
0OBJ_CURR is a unit, is there a special way to declare it and use it in the code?
(and 0CURRENCY is a reference unit for 0OBJ_CURR).
Do you have adivce on this?
-miikka

Similar Messages

  • How to derive a variable value from another variable of a different IO?

    Hi Gurus,
    I am aware that using BEx variables and Customer Exit you are able to derive a variable value from another variable of the same infoobject (for example, Fiscal Year/Period (0FISCPER) and Calendar Day (0CALDAY)).
    However, is is possible, using the same approach to derive a variable value from another variable that is in a different InfoObject? (for example, Input Fiscal Year/Period (0FISCPER) but derive Output of Required Start Date (0REQSTDAT))?
    There are 2 BEx variables involved,
    1) A user entry variable that is restricted in 0FISCPER
    2) A customer exit variable that is restricted in ZREQSTDAT
    In CMOD under EXIT_SAPLRRS0_001, Include ZXRSRU01, the code (I assume, correct me if I'm wrong) should perform 3 functions in I_STEP = 2,
    1) After the pop up, capture user entry of Fiscal Year/Period
    2) Identify or convert Fiscal Year/Period to Calendar Day range (unsure on how to code this portion)
    3) Use the Calendar Day to lookup on matching Required Start Date and display all Required Start Date that matches. (unsure on how to code on this portion)
    Hope to hear your thoughts soon.
    Regards,
    Eric

    Hi Shanthi,
    I've made the necessary adjustments. The only difference in my code is,
    Instead of,
    If I_VNAM = 'ZREQSTDAT'
    I use,
    CASE I_VNAM.
    Instead of,
    PARAMETERS: ZFISCPER TYPE /BI0/OIFISCPER.
    ZYEAR = ZFISCPER(4).
    ZMM = ZFISCPER+4(3).
    I use ,
    This is the Customer Exit Variable in ZREQSTDAT
    WHEN 'ZRSD_CX'.
    The loop I use for the User Entry Variable in 0FISCPER-ZFYP_IN
      LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
          WHERE VNAM = 'ZFYP_IN'.
        IF SY-SUBRC = 0.
            CLEAR L_S_RANGE.
    ZYEAR = LOC_VAR_RANGE(4).
    ZMM = LOC_VAR_RANGE+4(3).
    The codes were checked with no errors.
    However, when I input the Fiscal Year/Periods and hit 'Execute'. The report went blank, not sure what is the cause. I've tried it several times. No error message appeared.
    Regards,
    Eric

  • How to Get Value from a Variable to restrict a Key Figure ?

    I am trying to make a query in Query designer, we are running BI7.
    I have a user entry veriable on the Fiscal year period, the user will need to enter a period they want the report for, i.e. 07.2008 for July 2008 report and 04.2008 for April 2008 report.
    Based on what the user entered as the starting period (in the variable entry), I have to then use that initial value and show the Year to date value (of sales etc) in the next column.
    To Clarify, if user entered 07.2008 then all the data from 01.2008 to 07.2008 needs to be in the next column.   if user entered 04.2008 then all the data from 01.2008 to 04.2008 should be in the next column.
    So to summarise according to my understanding, I want to get the value from a variable and pass it onto another variable to restrict a key firgure (sales amount)...
    Can someone please clarify what i need to do here?  
    Many thanks in advance, points will be awarded accordingly.

    hi,
    please follow the below steps:
    1. Create a new varialbe , this variable should be processed by customer exit.
    2.  In the column section, create a new column and drag the sales key figure, also drag fiscal year period and restrict with the new variable.
    3. In the cmod tcode write a customer exit code to extract the value of the user entry and assign it your variable, you can refer to the below code.
      WHEN '< New VAR name>'.
        IF I_STEP = '2'.                                 "AFTER THE POPUP
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
            WHERE VNAM = '<Fiscal Year Period VAR Name>'.
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW      = LOC_VAR_RANGE-LOW(4).
            L_S_RANGE-LOW+4(3) = '001'.
            L_S_RANGE-HIGH     = LOC_VAR_RANGE-LOW.       "LOW E.G. 2001006
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'BT'.
            APPEND L_S_RANGE TO E_T_RANGE.
            EXIT.
          ENDLOOP.
        ENDIF.
    For ex- if the user enters 008/2008, this code will create as range assign 001/2008 - 008/2008 value to the variable.
    hope it helps,
    rgs,
    Parth.

  • How to remove item from my iPhone and iPad on my reading list?

    How to remove item from my iPhone and iPad on my reading list?

    Swipe across its name in the list and it should get a Delete button on it - tap that and it should be removed from the list

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

  • 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

  • How to change value of instance variable and local variable at run time?

    As we can change value at run time using debug mode of Eclipse. I want to do this by using a standalone prgram from where I can change the value of a variable at runtime.
    Suppose I have a class, say employee like -
    class employee {
    public String name;
    employee(String name){
    this.name = name;
    public int showSalary(){
    int salary = 10000;
    return salary;
    public String showName()
    return name;
    i want to change the value of instance variable "name" and local variable "salary" from a stand alone program?
    My standalone program will not use employee class; i mean not creating any instance or extending it. This is being used by any other calss in project.
    Can someone tell me how to change these value?
    Please help
    Regards,
    Sujeet Sharma

    This is the tutorial You should interest in. According to 'name' field of the class, it's value can be change with reflection. I'm not sure if local variable ('salary') can be changed - rather not.

  • Filling up a variable value from another variable

    Hi,
    I have two date fields, one calmonth characteristic ZCALMON (as char) and other calmonth charactaeristic 0CALMON as time dimension (standard bw).
    But at query level, I would like to user enter only one variable value 0PCALMON for 0CALMON (say only for date characteristic as time dimension). This date variable value should get copied to other date characteristic ZCALMON (as char).
    I can do this by using the customer exit varibale (without writing any abap code) and using the copy variable from other variable options. But I am not able to use the offset on ZCALMON.
    How can i Use offset using customer exit variable on ZCALMON.
    cheers
    raj

    Hi,
    you can use customer exit variable which will read the value of the 0calmonth variable and pass it to the zcalmonth.
    While populating the value, do the calculation or the off-set and send the value to zvcalmonth (Variable).
    WHEN 'ZVCALMON'.
       IF i_step = '2'.
      Loop at i_t_var_range into i_s_var_range where vnam = '0PCALMON' .
        zdat = i_s_var_range-low.
      endloop.
          CALL FUNCTION 'GO_BACK_MONTHS' *Sample Function
            EXPORTING
              currdate   = zdat
              backmonths = '012'
            IMPORTING
              newdate    = from_period.
          CALL FUNCTION 'GO_BACK_MONTHS' *Sample Function
            EXPORTING
              currdate   = zdat
              backmonths = '000'
            IMPORTING
              newdate    = to_period.
          CLEAR l_s_range.
          lyear  = from_period+0(4).
          lmon   = from_period+4(2).
          lday   = from_period+6(2).
          CONCATENATE lyear lmon lday INTO l_s_range-low.
    Hope you got it
    Regards
    Happy Tony

  • How do you copy the templates from another webstie and use them as your own?

    Hi Everyone, I was told that with Dreamweaver it is possible to copy another websites templates? What are the steps in copying another websites template with Dreamweaver? I would like to know I am a newbie when it comes to this program so please make your statement understandable for me, thanks. Also, I am having problems creating a drop down menu for each of my web pages. When I go to highlight a specific box on my homepage I want the dropdown menu to appear vertically and not horizontally. I may have missed something when watching the video tutorials or I didn't quite understand what they meant. Thank you for any information on the series of questions that I have asked in this new thread.

    Hi Everyone, I was told that with Dreamweaver it is possible to copy another websites templates? What are the steps in copying another websites template with Dreamweaver?
    This is difficult to understand.   How are you copying templates from another site?
    If you have all the files that make up the template, then it's only a matter of saving all the files to a folder on your hard drive and setting up a site definition pointing to this folder.  You then work on the files as usual.
    Also, I am having problems creating a drop down menu for each of my web pages. When I go to highlight a specific box on my homepage I want the dropdown menu to appear vertically and not horizontally. I may have missed something when watching the video tutorials or I didn't quite understand what they meant. Thank you for any information on the series of questions that I have asked in this new thread.
    Without seeing the page it's difficult to judge what your problem is.  If possible, please upload the files to a remote server and provide a link to the page. It's the only way people can help - if they see your page in action.
    Nadia
    Adobe® Community Expert : Dreamweaver
    Unique CSS Templates | Tutorials | SEO Articles
    http://www.DreamweaverResources.com
    Web Design & Development
    http://www.perrelink.com.au
    http://twitter.com/nadiap

  • How to show value from another Object as Default value from Prompt

    Hi,
       I am creating a web Report with the following filter :
    Enrollment Date FROM :   01/01/2011 12:00:00 AM  (Default 1st day of previous month)
    Enrollment Date TO :     01/02/2010 12:00:00 AM    (Default: 1st day of current month)
    There are values for Enrollment date from 01/01/ 2004 till today but user want to have a default value as in brackets above.
    When I select prompt option for 'Enrollment Date' all the dates (from 01/01/ 2004 till today) are shown as usual. Database is Oracle and I am able to create Objects in Universe that show the default required dates, but not sure how I use them in the prompt. Is there any way or workaround?
    Nanda Kishore.

    If i Understand Correctly you requirement you want to set a default value for date in prompt but user should have the ability to change these values if the want ?
    In order to implement this you can create a Object in Universe with definition
    Date Choice - @prompt('Default or Custom Date','A',{'Default','Custom'},mono,constrained)
    Then use this along with the date prompt in query filter as follows.
          Set Data choice =Default
            Date1= Default Date
            and
            Date2= Default Date
      OR
           Set Date Choice=Custom
            Date1 = Prompt
            and
            Date2= Prompt

  • How to calculate value from perticular column and row in pivot table

    Hi all,
    I am having following pivot table.
    Country
    A
    B
    C
    D
    F
    G
    H
    J
    K
    L
    M
    Grand Total
    Canada
    1
    1
    3
    3
    12
    14
    13
    97
    China
    8
    4
    3
    19
    India
    2
    47
    448
    176
    395
    3656
    1964
    1360
    8077
    USA
    1545
    352
    380
    26
    10
    4
    8
    32
    2054
    1023
    758
    4624
    UK
    12
    19
    13
    23
    33
    298
    Grand Total
    1545
    352
    381
    29
    72
    474
    184
    427
    5743
    3028
    2167
    13114
    Now I want sum of Columns A, B, C, K, M where Country = India in one field.
    and sum of D, F, g in another field. and sum of remainig columns in another field.
    How can i get sum of values with some where condition in pivot table.
    Thanks,

    Hi Michael,
    Following is the representation which i want
    CouRntry
    ROW LABLES
    A
    B
    C
    Total of
    ABC
    F
    G
    Total
    Of FG
    J
    K
    L
    TOTAL
    of JL
    Grand
    Total
    Canada
    1
    1
    3
    3
    12
    14
    13
    97
    China
    8
    4
    3
    19
    India
    2
    47
    448
    176
    395
    3656
    1964
    1360
    8077
    USA
    1545
    352
    380
    26
    10
    4
    8
    32
    2054
    1023
    758
    4624
    UK
    12
    19
    13
    23
    33
    298
    Grand Total
    1545
    352
    381
    29
    72
    474
    184
    427
    5743
    3028
    2167
    1
    Also if i get sum how can i add a column in between of the fields.
    Thanks

  • Find value from another workbook and input cell value

    I'm trying to add the cost of products from one workbook to match with another.  Both 'Product' numbers are in both workbooks.  I would like to match those product numbers and insert the cost from one workbook to the other.  Can anyone help?  I've searched and haven't been able to figure this out.  Here are some images:
    Image of workbook that I want to add the cost to:
    Image of workbook I am taking the cost from:

    wcousin,
    let's get the terminology consistent:
    a file contains a document and is stored on your hard drive.  You open a file which, when open, presents a document window.
    a document contains sheets.
    a sheet contains tables, text, media
    a table contains cells
    a cell contains text, dates, durations, numbers
    I cannot tell whether the screenshots you provided are from the same document (file) or not.  If they are from different documents then you cannot make references between them.  If they are in the same document then you can refer to on sheet from another by using the following...
    To refer to a cell in a different sheet and/or table use the format:
    <SHEET NAME>::<TABLE NAME>::<CELL RANGE>
    for example:
    If you have two sheets, each with two tables:
    Sheet 1:
    - Table 1
    - Table 2
    Sheet 2:
    - Table 1
    - Table 2
    then you can put a formula in Sheet 1 Table 1 cell A1 like this to get the value from Sheet 2 Table 2 cell A1
    Sheet 1 Table 1:
    A1=Sheet 2::Table 1::A1
    I will try to provide a specific formula for you with the following assumption... THE TWO TABLES ARE IN THE SAME DOCUMENT:
    For the table show in the top picture (sheet name "Sales by Class Detail", not sure what the table name is and not sure what cell this is.  In the image you posted it is the cell with the triangle in it in column J):
    =vlookup(G, Product Service List::<Table Name>::B:E, 3,0)
    you will need to fill in the <Table Name>
    you can fill this formula down by selecting the cell you just entered the formula in, then hover the cursor over the bottom edge and drag the yelllow fill handle down as needed

  • How to get value from option box and submit accordingly

    Sorry for posting my question. I have been trying to edit message and repost it and not successful. Hence I am reposting my question. Please let me know.
    I am right now exploring JSF for presentation layer. I am designing a form with <h:outputLabel..> and <h:inputText...> for the user to input his value. I also have a radio button as below. <h:outputLabel..>
    <h:inputText...>
    <h:selectOneRadio id="libraryList" >
                                <f:selectItems value="#{libraryList}"/>
                            </h:selectOneRadio>And I have included the following piece of code in faces-config.xml as below.
    <managed-bean>
            <managed-bean-name>libraryList</managed-bean-name>
            <managed-bean-class>java.util.HashMap</managed-bean-class>
            <managed-bean-scope>application</managed-bean-scope>
            <map-entries>
                <map-entry>
                    <key>Pass</key>
                    <value>Pass</value>
                </map-entry>
                <map-entry>
                    <key>Fail</key>
                    <value>Fail</value>
                </map-entry>
            </map-entries>
        </managed-bean>Hence I get two option box as Pass and Fail.
    I am also bit aware of navigation rules of JSF. Now I want the user to take to the step 2 if he chooses the option Pass and if the user chooses Fail, then I want to reset the values of the above form and display the same form.
    I have not done any Java part of the application yet as I am a newbee and hence started doing JSP pages and config-faces.xml part. Please let me know how to proceed further.

    Create a bean, bind the value to the bean, let the action method return that value and add navigation-case entries for those outcomes.

  • Need Text variable for Bex which take values from another variable

    Hello ,
    I have a requirement to show date values in query description.
    User want to run a query which runs for 5 sept till last sunday.
    I have one exit which provides last week date range ( low= last week monday  & high = last week sunday )
    i have acheieved this by restricting 0calday by range = (5 sept 2011 to exit (above metnioned exist's low) + 6 (offset)
    now the problem is user wants to show this date range in query description .
    ie suppose user is runnig this query today so the query description should be  "5 sept  2011 to 2 oct 2011 "
    This could be possible with text variable  by using replacement path , but i am unable to figure ot the logic .
    Kindly advice .
    Regards,
    CR

    Thanks Sushant ,
    In the Tab "Replacement Path " ..there is a drop down -
    "Replace variable with" what should be choose in this ?
    I have used this selections for genearl tab  -
    General Tab -
    Processing By = Replacement Path

  • How to store values in session variables for use later

    I am trying to read user input from a form, lookup some values from a database,
    store the combined data into session to retrieve later in the subsequent pages
    in a pageflow application. Could someone guide me as to how exactly to do this?
    The documentation doesn't seem to be of much help.
    Thanks,
    Krishna K

    Krishna,
         If you will be using the data within the course of the same page flow
    or nested page flows then you should store the data in the page flow
    itself. Simply declaring variables in the .jpf will do this. The page
    flow is stored in the session for you and it is deleted when the user
    exits the page flow. This is good because it keeps down session size.
         If you have data that you want to use across page flows then you will
    need to store in the session or globalApp.
         Here is a link to "Using Data Binding in Page Flows" it has an example
    of storing data into the session and it goes into the pros and cons of
    using each data binding scope.
    http://edocs.bea.com/workshop/docs81/doc/en/workshop/guide/netui/guide/conDatabindingXScript.html
    - john
    Krishna Kuchibhotla wrote:
    I am trying to read user input from a form, lookup some values from a database,
    store the combined data into session to retrieve later in the subsequent pages
    in a pageflow application. Could someone guide me as to how exactly to do this?
    The documentation doesn't seem to be of much help.
    Thanks,
    Krishna K

Maybe you are looking for

  • "Open sql" report no data sourced defined in windows

    when I want to import data from sql database, the Open sql window report error "There are no data sourced defined. Please create one to continue", but I have defined the odbc data source using windows 's odbc administrator, why the error? chuliang

  • EBS R12.1.1 Synonyms

    Hi, I came across an interesting issue: In Oracle EBS R12's database, there are two synonyms - APPS.ar_system_parameters_all - APPS.ar_system_parameters on the same table AR.ar_system_parameters_all. Ex: Query: select count(*) from ar_system_Paramete

  • Grid in flex

    Hello everybody, to begin, I want to apologize myself for my english. To continu, I currently study grid on flex 4 and I search an grid like excel which can be editable, support multi-header, with drag n drop ... I saw that it is possible to put the

  • PowerMac 9500 System 9.1 keeps becoming "corrupted"

    HELP!!! (anybody) I have a Powermac 9500/200 with a Sonnett G3 466 upgrade card, but this problem also occurs with the original 200 MHz Apple card as well. This machine has 256 MB of ram and two 4GB SCSI drives... otherwise it is all original. This 9

  • Indeterminate progressbar freezes when executing thread

    Hi people, Here is my problem. In my GUI application, at some point the user needs to perform a time consuming application. I want to tell the user that the task is performing as it is supposed to by displaying an undeterminate progressbar. However,