Query Design-Inputs required

Lets say we have a monthly report where . This report displays three columns Plan, Actual, %.
User inputs Sep08.
I am also required to show last year actual data for august 07,September 07, October 07 next to it.
i.e. Plan(sep08), Actual(sep08), %                 and          Actual(august07), Actual(Sepember07),Actual(october07)
If the user chooses March 08, the report should show
Plan(march08),Actual(March08),%                   and        Actual(Feb07), Actual(March07),Actual(April07)
How should i design this in query designer.

Hi,
Create a Cutsomer Exit Variable on 0CALMONTH and then write code to give  -1 Year and Month
Else
Set Offset values for 0CALMONTH
Eg: ZMONTH is normal input variable on 0CALMONTH, restrict it with -1.
if user Input Sep 2008
In selections:
ZMONTH-1    = It will give 2008 Agu
KeyFigure
In selections:
ZMONTH-2    = It will give 2008 July
KeyFigure
But you can't set it for 2007. So go for Customer Exit Code
See for Cutomer Exit Code in
https://wiki.sdn.sap.com/wiki/display/profile/Surendra%20Reddy
Thanks
Reddy

Similar Messages

  • Best design--inputs required

    Hi Frnds,
    I am working on PI7.11, it is new implementation ECC system version 6.0.
    There is one interface between ECC to .net application; it is web service integration without using PI, it is working fine, now my client decided implements this integration with PI.
    So now I am in a process to identify which one is best /easy /good performance oriented approach.
    The existing integration works like this
    u201C.net application will give input to RFC web service it returns the response details from SAP, these response will be send it to .net application u201C
    Implementing SOAP to SOAP
    Or .net(SOAP)-PI-RFC(Sync)
    Which one do you think best approach; my point of view SOAP to SOAP will be simple and easy.
    And if you have any other approach let me, so that I will think about that
    Put some light on this,
    Thanks in advance,
    Raj

    Hi DRAGON ,
    It is very simple, i have genarated web service for my functional module,it is alredy available.
    my current integration .net people calling my functional module web service URL direclt,so it is giving response .
    but now i decided to introduce PI in this, so i have imported request response WSDL for Functional module and sender side i have created request /reponse data types.
    i have used SOAP /SOAP receiver adapter with syn mode.
    i have genarated Web service forn source to.. i have shared this URL with .net application guy.
    .net Application---->SOAP sender adapter-->pi->SOAP receiver adapter---->Functional module(Response it returns).
    there is no major advantages in this,but my clinet interested thsi approch so i have implemented this.
    Thanks,
    Raj

  • Sap query designer (calculation of profit N-1 from an input year N entered by a user)

    hi,
    on the query designer i have a variable where the user fills in the year N, and In the query i need to calculate a profit of a year N-1 according to a year N entered by the user.
    here is my code abap in exit function where CA_N_1 is my variable BEX customer exit, and YEARN_1 is the variable bex that takes the year entered by a user :
    DATA: LS_T_VAR_RANGE like rrrangeexit,
    LV_CALYEAR type T009B-BDATJ,
    LV_FISCYEAR type T009B-BDATJ.
    WHEN 'CA_N_1'.
    IF i_step = 2.
    READ TABLE i_t_var_range INTO LS_T_VAR_RANGE
    WITH KEY vnam = 'YEARN_1'.
    LV_CALYEAR = LS_T_VAR_RANGE-low.
    LV_CALYEAR = LV_CALYEAR - 1.
    l_s_range-low = LV_CALYEAR .
    l_s_range-opt = 'EQ'.
    l_s_range-sign = 'I'.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    a copy of how i defined my variables and my ratio profit_N-1 is attached, when I compile the code with in input 2013 for example I can see that my variable Yearn-1 takes 2012 at the end, but in the query my ratio ^ profit_N-1 doesn't bring anything.
    Please help me i can't find where is the problem...
    Thank you for your help.

    Hello !
    Thks for your quick reply,
    I'm from France sorry for my bed english but i hope u're understanding me, I'm new consultant in BW and like u know woman are not very comfartable with IT so i'm going to ask u 2 others questions about hierarchy and saving query in roles if u don't mind
    1) I want to change some hierarchy node position in production system, do i change directly in rsh1 by adding a node to another level ? or i must to change in a file source or ECC system ? if i change just on rsh1, i will lost all i have changed when Info package will be executed (in daily process chain)...? that's right?
    2) I have a query already published in rôle, but i have to move it to another one, how can i do that in query designer please?
    PS : i can't send you direct message, is it possible to follow me ?
    Thks in advance have a nice day !

  • Error in Integradted Planning - Input Ready Query Design

    Dear Gurus,
    I am facing an error while designeing input ready query. I have created a query on Aggr. Level which is on Multi Provider.
    I have 2 key figs. In my second key fig. I have restricted Planning Infor priovider with Plan version for version info object , Calender Year/month , and other info object of version , I have selected Variable for input.
    When I am going to Planning tab of this key figure in change mode option I have selected Data Can be changed using user entries or Planning Functions. But my other options i.e. Disaggrgation and Type of Distriburtion are in the freezed state. That I can't select any of them. The system is giving Red hightlights and the highlight is showing error " Not Supported by Server"
    Can you please advice me where is the problem ?
    Regards,
    B. Rajesh

    Hi Rajesh,
    This like would help you to resolve the issue
    http://aiokeh.wdf.sap.corp:1080/SAPIKS2/contentShow.sap?_SCLASS=IWB_STRUCT&_SLOIO=C574D0123CD5DD44A8B271D6DADE8490&TMP_IWB_TASK=PREVIEW2&RELEASE=690&LANGUAGE=EN&_SEQNUM=253&_LOIO=4727759655EA6560E10000000A11466F&_CLASS=IWB_EXTHLP
    Thanks and Regards,
    Sateesh pasodi

  • Value input for screen and to apply it to formula in Query Designer

    Hi Gurus !
    How could i input an value for screen in BEx and soon to apply it to formulas resident in cells in Query Designer, the result must be appear for each cell in the report.
    Thank You for your helps.

    create a variable with Manual/user input option.
    use its value to populate the calculated field.

  • How to search in BI 7.1 query designer for the required key figures & chars

    Hi All,
         Can anyone plz tell me how to search in BI 7.1 query designer for the required key figures & characteristics. I have the query being built on a multiprovider which has many cubes.
    So, i have a huge list of key figures and characteristics. I am not able to search for the required one by the name or the technical name.
    How can we search and pick the required object from the enormous list of the Mutliprovider in the Bex Query Designer??
    Thanks
    Phani

    There is not a search feature available. You have to do an educated guess under what dimension your infoobject could be and select.

  • What role is required to open and execute query in BE query designer

    Hi,
    Am new to BE, need to know what role should i be assigned with to open and execute  a query in query designer.
    OPEN dialobox displays "NO role availabe".
    Is this a problem of role assignment or am i missing some steps
    thanks
    srikanth

    IN Enterprise portal plz check whether these roles are present or not.
    pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.ip.bi/Roles/com.sap.ip.bi.business_explorer_showcase
    pcd:portal_content/com.sap.gm.cnt/core/VCRole
    pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.ip.bi/Roles/com.sap.ip.bi.bi_showcase
    pcd:portal_content/administrator/content_admin/content_admin_role
    pcd:portal_content/com.sap.pct/platform_add_ons/com.sap.ip.bi/Roles/com.sap.ip.bi.business_planning_showcase
    pcd:portal_content/every_user/general/eu_role
    in BW front end , you have to create role with the auth objects S_RS_COMP, S_RS_COMP1, S_RS_MPRO, S_RS_ICUBE auth objects.
    include the t-codes if necessary. RSRT you can include.
    Hope this would help you.

  • CKF in BEx Query Designer

    Hello,
    I have following scenario in Query Designer:
    There is only one characteristic Material in row and 3 calculated Key figures in column Price (Current Year), Price (Current Year -1), Price (Current Year -2). The User gives the current year as Input Variable. It works so far fine.
    Query Output looks like:
    MATERIAL | PRICE (CURENT Y) | PRICE (CURRENT Y-1) | PRICE (CURRENT Y-2)
    1234 |10|20|--
    2345|10||
    3456|12|--|23
    4653|12|13|14
    7564|--|2|5
    6452|||8
    7362||7|
    You can see that at least one value of PRICE Current Year/Current Year-1/Current Year-2 per Material is always filled. All Prices are in EUR.
    Now my requirement is that I have to build a new Calculated Key Figure in Query designer which should calculate the minimum value of PRICE Current Year/Current Year-1/Current Year-2 per Material.
    The new Query Output should look like this:
    MATERIAL | MINIMUM (PRICE CURRENT Y to CURRENT Y-2)
    1234 |10
    2345|10
    3456|12
    4653|12
    7564|2
    6452|8
    7362|7
    I have tried to use Mathematic Function MIN but couldnu2019t get success as few cells are empty. So I cannot use function MIN. When I add empty cell with 0 then the minimum value calculates incorrect. It only works when all 3 cells are filled. How I can solve this problem in Query Designer?
    Many thanks for the help.
    Edited by: Moha Nan on Aug 26, 2011 1:07 PM

    Hi Moha Nan,
    Try this:
    PRICE CURRENT Y *
    ((PRICE CURRENT Y NE 0) *
    ((PRICE CURRENT Y-1 NE 0) * (PRICE CURRENT Y < PRICE CURRENT Y-1) + (PRICE CURRENT Y-1 == 0))
    ((PRICE CURRENT Y-2 NE 0) * (PRICE CURRENT Y < PRICE CURRENT Y-2) + (PRICE CURRENT Y-2 == 0)))
    +
    PRICE CURRENT Y-1 *
    ((PRICE CURRENT Y-1 NE 0) *
    ((PRICE CURRENT Y NE 0) * (PRICE CURRENT Y-1 < PRICE CURRENT Y) + (PRICE CURRENT Y == 0))
    ((PRICE CURRENT Y-2 NE 0) * (PRICE CURRENT Y-1 < PRICE CURRENT Y-2) + (PRICE CURRENT Y-2 == 0)))
    +
    PRICE CURRENT Y-2 *
    ((PRICE CURRENT Y-2 NE 0) *
    ((PRICE CURRENT Y-1 NE 0) * (PRICE CURRENT Y-2 < PRICE CURRENT Y-1) + (PRICE CURRENT Y-1 == 0))
    ((PRICE CURRENT Y NE 0) * (PRICE CURRENT Y-2 < PRICE CURRENT Y) + (PRICE CURRENT Y == 0)))
    replace the NE with the not equal to sign, the post forum doesn't seem to accept thos signs.
    Kind regards,
    Alex

  • Results based on From and To value in Bex query designer.

    Dear all,
    We are using BI7.00. In one of our report which pertains to PM user wants to get the details of number of breakdowns which falls in the value range 0 to 1 hours.
    I created a condition which has 2 variables, one is From value and the other is for the To value (since user wants to enter both the limits). I have written a condition that if the breakdown hour is greater than or equal to variable1 and less than or equal to variable2.
    Using the above condition if the query is run, i am not getting the desired output. The values avaialble in the report are 0.65,0.78,1.30,7.38,0 etc., when i give 0 to 1 i should get the values 0.65,0.78 and 0 but instead report displays "No valid results".
    I changed the condition and selected "Between" variable 1 and variable 2 - yet no change in the query.
    To my knowledge i foresee that system is not able to recognize the decimal and hence provides details only based on the whole numbers.
    How to get my requirement achieved in the Bex query designer.
    Experts suggestion with steps will be very useful to solve my problem.
    Regards,
    M.M
    Edited by: Magesh Magesh on Dec 26, 2008 11:28 AM

    Hi Magesh,
    I think you could try one more way.
    Create a formula inserting your two formula variables for limits .(FV -  are ready for input ) .
    The formula would return the result as 1 or 0 because it would have boolean condition in it.
    You could then place a condition in the query designer to only show all records where the value of the formula key fig is 1.
    You formula A would look like
    ( KF > FV1) AND (KF < FV2) * 1.
    And in the condition put A EQ 1.
    You could scale the key figures as well and multiply the limits mentioned by the users in FV1 and FV2 if decimals are still not recognized by SAP.(scaling)
    Regards,
    Sunmit.

  • How to write a condition in BEX Query Designer

    Hi
    How can i write a condition in Query Designer
    Scenario
    An employee can purchase any no of policies in a day or month.each policy will have start date and expiry date.
    My requirment
    Count all the policies(valid) by employee on a ranges basis exception reporting
    (0-10;10-20;20-30;30-40) and then able to drill down by policy start date and expiry date.
    As per the requirment is to show policies which are not yet expired (active) i need to write a condition that will count only policies whose Expiry date is > Current calender day
    As Policy Expiry Date is a char i am converting it to KF using fourmala variable so that i can write a condition on it using current cal day formula variable sap exit
    But i char assigment of a condition i find 4 option
    How can i achieve this
    Thanks

    Hi Aurun,
    Thanks for the help,Really appreciated
    As this is my first enhancement using ABAP & CMOD
    What type of key (either Access or developer ) do i require to perform the following  enhancement......so that i can raise request with basis team
    I shall be great ful if u can asnwer below question
    First, you need to create a variable for expiry date with processing type as customer exit, and then give the necessary info.
    In details tab, unchk ready for input as we wont be taking the value from the prompt.
    Now go to CMOD transaction.
    Open the correcsponding project which has the exit code
    (How can i identify the project which has exit code)
    and go to ZXRSRU001 module inside taht.
    Go to the module where u write the exit.
    (How to locate the required module)
    Then, under i step 1, write the code:
    IF I_STEP = 1.
    CASE V_NAME  (What is 'V_NAME',Is it my variable technical name)
    WHEN 'X' " X is the variable u created for the exit
    l_s_range-low = SY-DATUM.
    l_s_range-opt = 'I'.
    l_s_range-sign = 'GT'.
    APPEND l_s_range TO e_t_range.
    END CASE.

  • Drill down ( Collapsible Row ) Report in BEx query designer ?

    Dear Friends!
       I am supoosed to create a report drill down report for Purchasing History to be precise,  I know that we can have drill down feature using heirarchy but is it possible for Us to have PO & PO item heirarachy ? or any other way to do drill down reporting in SAP BEx Query designer ?
    like my current report is : -
    | Vendor | Purchasing Organisation | Purchasing Group | Plant | PO Number | Item | Material / Service | Description | .... ( keyfigures) |
    Now I am supposed to create a report  in which
    normal view
    | Vendor | Purchasing Organisation | Purchasing Group | Plant | |> PO Number| .... ( keyfigures) | Payment |
    drill down or collapsible view ( please consider the heading as data I am not talking about dynamically change of  headings ).
    | Vendor | Purchasing Organisation | Purchasing Group | Plant | V PO Number | Item | Material / Service | Description | .... ( keyfigures) |
    is there anyway to design the report in above mention manner ? you any input will be appreciated greatly.
    Thank you so much!
    Regards
    Naim

    Hi Naim,
    usually we don't do the transactional data as hierarchy.  not sure the reason behind your requirement.
    we can do one of the below :-
    1. To have the default view as
    | Vendor | Purchasing Organisation | Purchasing Group | Plant | | PO Number| .( keyfigures) | Payment |
    and then user can drill down on rest of the characteristics for detailed view later on.
    2. or if they don't want to drill down on characteristics;-
    we can build 2 reports , one for header level information and then jump to second query for detailed information(item level) using RRI.
    first query:
    | Vendor | Purchasing Organisation | Purchasing Group | Plant | | PO Number| .( keyfigures) | Payment |
    second query:
    | Vendor | Purchasing Organisation | Purchasing Group | Plant |  PO Number | Item | Material / Service | Description | .... ( keyfigures) |
    Let us know if this works out?
    Regards,
    Sakthi.

  • Query Designer restricted key figures using a prompt value

    Hallo Experts,
    I would like to restrict key figures after user has beeen prompted to enter a date. I have 2 key figures:
    a) KF1, Date1
    b) KF2, Date2
    User should be prompted to select a specific date: e.g. 01/2011. After selecting/entering the prompted date value, it should be given to date objects for intance Date1=01/2011 and Date2=01/2011.
    How could I achieve it in Query Designer without using customer_exit function? Reason is that non-experienced users will use this report and they should not be confronted with complex query. Do you have any idea?  
    Many thanks
    Mamadu

    Hi,
    I assume that you need to restrict the value of keyfigures by date based on user input data on variable selection screen.
    First create one user input variable on your date field say for eg calday.
    Now restrict your KF1 with calday and choose that vairable which you created.
    For second KF2 which seems to me need to be restricted with offset of +1 based on the date entered by the user.
    So restrict this KF2 with calday and use the same variable with offset of +1
    I just misunderstood you ned calmonth or day because in requirement you have given month but you are calling it as date.
    If its month then replace calday with calmonth..
    Hope it helps.
    Regards,
    AL:
    Edited by: AL1112 on Dec 21, 2011 9:42 AM

  • Combine two reports in query designer

    Hi experts,
    i want to ombine two reports which are using key figure with sap exit in query designer
    in the report 1 key figure calculation based on the open on key date(0P_DATE_OPEN)
    to calculate due and not due in two columns
    in report 2 key figure calculate in the time zones using given in variable Grid Width (0DPM_BV0) like due in 1 to 30 days, 31 to 60 days...the due amount based on the open on key date(0P_DATE_OPEN)
    to calculate in 1-30, 31-60, 61-90, 91-120, 121-150 and >150 days in 6 columns
    now i have requirement like this
    not due, 1-30, 31-60, >60, due,1-30, 31-60, >60 in 8 columns
    or
    not due, due, 1-30, 31-60, 61-90, 91-120, 121-150 and >150 in 8 col
    thank you

    Hi,
    Have you tried APD?
    You can combine them using workbook or from a multiprovider query. APD is another option. Have a look at these APD docs:
    In APD, you can take input from two queries, then combine them and load to another object (DSO).
    [Analysis Process Designer |https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/413ba6c1-0d01-0010-1980-ec450e30f23c]
    [AGSAP NetWeaver 7.0 Application Process Designer|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b06c3f96-ed4f-2a10-1693-f2c76a39988f]
    Let me know where you r stuck...
    Regards,
    Ashish

  • Query Designer - Variables - Replacement Path

    I need a help.
    In one query I need to select some data from the current Period until yesterday.
    In another query I need to select the same data, but from the current Month until yesterday.
    I created 2 restricted key figures:
    SEL_PERIOD restricts 0FISCPER by the variable 0FPER, wich is an exit SAP for current Period.
    SEL_MONTH restricts OCALMONTH by the variable 0CMONTH, wich is an exit SAP for current Month.
    Now in both RKFs I want to restrict 0CALDAY from the beginning of the Period or Month until yesterday.
    I found this variable 0DAT, wich is an exit SAP for current day.
    I'm trying to create an interval variable, type replacement path, with From Value not filled and To Value filled with 0DAT - 1.
    But it doesn't work, Query Designer points that 0DAT is not an allowed source for the target variable.
    And the documents that I searched state that "the target variable must represent a single value" and "the source variable must be input-ready".
    Does anyone have a suggestion on how I can restrict 0CALDAY, for this specification ???
    Thanks in advance.
    César Menezes
    Edited by: César Menezes on Jun 25, 2011 11:51 PM
    I forgot an important point:
    Sometimes I need current Period or Month, in other cases I need the same Period or Month from last Fiscal Year or Calendar Year.
    No problem with 0FISCPER and 0CALMONTH, I can off-set the variables by -12.
    But I would like a help on how to do it with 0CALDAY.
    Example: today is 25.06.2011. In some cases I need to restrict until 24.06.2011, in other cases I need to restrict until 24.06.2010.

    Hi Ceaser,
    This is a generic explanation to your scenario. Please make some changes as per your requirement. Just to give you some idea......................
    We  need to manipulate u201CKey Dateu201D values to achieve required analytics.
    Step 1: As a first step, create a variable on u201CSales Dateu201D (or whichever date is used for Sales Date) field (ZPDATE) with user input. It was meant to capture u201CKey Dateu201D through user entry.
    Step 2: Create a restricted key figure on Sales & restrict it on u201CKey Dateu201D value to get first analytics need i.e. u201CSales on Dayu201D.
    Step 3:Next step was to manipulate the value of u201CKey Dateu201D on which I could restrict u201CSalesu201D (Key Figure) again and again to get other values.
    Step 4: Create a new variable (e.g. ZPUTMNTH) and assigned it to be filled up by Customer Exit. (For simplicity purposes only u201CMonth to Dateu201D value is explained below. Same procedure can be repeated to fulfill other needs. Though in code section, ABAP code is available for almost all the variables)
    Create Variable
    Step 5:  Create one variable (ZPUTMNTH) for u201CMonth to Dateu201D with processing by u201CCustomer Exitu201D. This variable was created on u201CDateu201D characteristics.
    Sample ABAP Code
    *& Include ZXRSRU01
    DATA: L_S_RANGE TYPE RSR_S_RANGESID.
    DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
    Data: v_loc_date type d.
    Data: v_loc_date1 type d.
    Data: v_loc(4) type c.
    CASE I_VNAM.
    to calculate "month to date" user input is "Calday" Key Date
    WHEN 'ZPUTMNTH'.
    IF I_STEP = 2. "after the popup
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZPDATE'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(6). "low value, e.g.YYYYMM (200606) part of key date (20060625)
    L_S_RANGE-LOW+6(2) = '01'. u201C low value e..g. YYYYMM01 (20060601)
    L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW. "high value = input
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    EXIT.
    ENDLOOP.
    ENDIF.
    to Calculate no of days up to "month to date" (user input Calday Key date)
    WHEN 'ZDAYMTH'.
    IF I_STEP = 2. "after the popup
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZPDATE'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW+6(2). "YYYYMMDD - DD will indicate the no of days
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    EXIT.
    ENDLOOP.
    ENDIF.
    to calculate Previous year "month to date" (User input Calday u2013 Key date)
    WHEN 'ZDAYPMTH'.
    IF I_STEP = 2. "after the popup
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZPDATE'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW.
    L_S_RANGE-LOW(4) = L_S_RANGE-LOW(4) - 1. "low value previos year
    v_loc_date = L_S_RANGE-LOW. "take input value in another variable
    L_S_RANGE-LOW+6(2) = '01'.
    L_S_RANGE-HIGH = v_loc_date. "high value = input, taken into another variable
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    EXIT.
    ENDLOOP.
    ENDIF.
    to calculate "year to date" (User input Calday u2013 key date)
    WHEN 'ZPUTYEAR'.
    IF I_STEP = 2. "after the popup
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZPDATE'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(4)."low value, e.g.200001
    L_S_RANGE-LOW+4(4) = '0101'.
    L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW. "high value = input
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    EXIT.
    ENDLOOP.
    ENDIF.
    to calculate "Previous year to date" (User input Calday u2013 key date)
    WHEN 'ZDAYPYR'.
    IF I_STEP = 2. "after the popup
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZPDATE'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW.
    L_S_RANGE-LOW(4) = L_S_RANGE-LOW(4) - 1. "low value previos year
    v_loc_date = L_S_RANGE-LOW. "take input value in another variable
    L_S_RANGE-LOW+4(4) = '0101'.
    L_S_RANGE-HIGH = v_loc_date. "high value = input, taken into another variable
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    EXIT.
    ENDLOOP.
    ENDIF.
    to calculate "Previous year" User input Calday u2013 key date
    WHEN 'ZPYEAR'.
    IF I_STEP = 2. "after the popup
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZPDATE'.
    CLEAR L_S_RANGE.
    v_loc = LOC_VAR_RANGE-LOW(4) - 1.
    L_S_RANGE-LOW = v_loc. "low value previos year
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    EXIT.
    ENDLOOP.
    ENDIF.
    to calculate No of Days - "year to date"
    WHEN 'ZYRDAY'.
    IF I_STEP = 2. "after the popup
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZPDATE'.
    CLEAR L_S_RANGE.
    v_loc_date1 = LOC_VAR_RANGE-LOW.
    v_loc_date = LOC_VAR_RANGE-LOW(4). "low value, e.g.200001
    v_loc_date+4(4) = '0101'.
    L_S_RANGE-LOW = v_loc_date1 - v_loc_date. "get the difference between current date & first date of year
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    EXIT.
    ENDLOOP.
    ENDIF.
    Save and Activate the Include.
    Go back to Exit and activate again.
    Go back to Project and activate again.
    Variable (ZPUTMNTH) is ready (its values filled up with the manipulation of u201CKey Dateu201D) to be used in query to restrict Key Figure u201CSalesu201D on it and get u201CMonth to Dateu201D (MTD) Sales Value.
    Regards,
    Suman

  • Value display  in Query designer

    Hi Gurus,
      I have a  formula which i need to create .
    My requirement is now, i want the value entered in the input variable to be displayed in the report (designed by query designer), but a some changed one .
    ex: If  the input variable is for cal month .
    I enter "01.2009" in the variable screen.
    Now the display which i need in the report (in a column or row) is 05 or 5.
    Please let me know if this is possible(preferably not using a customer exit).
    Thanks and Regards,
    Balaji Raj

    Hi Balaji,
    If you want to use the number for calculation then neither customer exit nor text variablel will help you. For this you will have to create a formula variable.
    Create a formula and then in the left bottom pane ("Available Operand"), scroll all the way down and you will see a folder called Formula. Right Click on it and crete a new variable. Go to edit mode and put the description and technical name of hte variable and select "Repalcement Path" and select the char as calmonth.
    Go to next tab and make sure you have InfoObject and key selected. Click on "From Value", put offset as 4 and length 2.
    Save the variable and include the variable value in the formula.
    Now when you enter 200905, your 05 will be in the formula column.
    NOTE: make sure your calmonth variable is global to query and not part of any local (selection) restriction.
    - Danny

Maybe you are looking for

  • One computer, but two user-accounts active, at the same time, in 10.6?

    I'm contemplating this setup: A current generation MacPro (running SL), with two monitors. Can I have two separate user-accounts (the Admin account and one additional user-account) active and running simultaneously from the MacPro, but, of course, di

  • I do not know the password for the icloud account on my iphone 5S. I also want to delete the account and reset it?

    I do not know the password for my icloud account on my iphone 5S, I also want to elete the account and set a new one?

  • Compatibility of Essbase V11.1.2.2

    Hi All, We have a plan to upgrade the essbase from V11.1.1.3 to V11.1.2.2. could you please let me know the - compatability of Essbasae V11.1.2.2 with SQL Server 2008 R2? - compatability of Essbasae V11.1.2.2 on OEL 5.3 operating system. and also I h

  • Stuck with comparison!!

    Hi I'm attaching my vi. I'm doing serial Visa read to get the data. My algo goes like this: I compare my serial port visa read string with  char "x". If x is received than I increament the index in the structure. There is another control(steps) which

  • Travel Management in ECC 5.0 - EP 7.0

    Hi everybody, We have to implement Travel Management in the Portal (7.0), and we have a ECC 5.0 as backend system. When I look at the documentation, I find it strange that for example, you cannot create a travel request before ECC 6.0, but you can de