Date to Month Conversion at Query Level.

Hi,
I have Net due date in the Info provider.
At query level i have to create a restricted keyfigure based on Net Due Month.
Is there any way i can calculate Net due month at runtime and then create the restricted keyfigure using the net due month instead of using net due date directly(linke 01-10-2010 to 31 -10-2010 for october 2010).
Thanks and Regards,
MuraliManohar.

Hi,
Is there any way i can calculate Net due month at runtime and then create the restricted keyfigure using the net due month instead of using net due date directly(linke 01-10-2010 to 31 -10-2010 for october 2010).
you can calculate , but as he said you can add in cube ,  may be for cal month you are taking som eother date field.
in this case write one customer exist code .
create one varaibel on netdue date with customer not ready input (if user wants to enter input then ct=reate user entry varaible with reday input by using customer exit).
in routine wriet the code as when that varaible .
l_s_range - high , low and give then take the month form that date
like netdue date +0(6)-- gives month and year
      netdue date +0(2)-- gives month
then rtestrict that variable with your keyfigure.
Thanks & Regards,
sathish

Similar Messages

  • Currency Conversion at Query Level

    Guys,
    Can some one tell me step by step procedure to do Currency conversion from USD to Mexican PESO at query level in BI 7.0. I have read lot of threads but not clear in maintaining the Exchange rates and also in creating the variables. 
    Thank you,
    Kumar

    Hi Kumar ,,
    You're able to convert the currency amount on the routine ...
    Using this function :
    CONVERT_TO_LOCAL_CURRENCY
    Sample:
    CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
         EXPORTING
            DATE             =  " current date.
            FOREIGN_AMOUNT   = " local currency amount (peso)
            FOREIGN_CURRENCY =  " local currency
            LOCAL_CURRENCY   = 'USD'
         IMPORTING
            LOCAL_AMOUNT     = RESULT " result.
         EXCEPTIONS
            NO_RATE_FOUND    = 1
            OVERFLOW         = 2
            NO_FACTORS_FOUND = 3
            NO_SPREAD_FOUND  = 4
            OTHERS           = 5.
    To maintain the exchange rate, you can go to tcode: OB08
    Hopefully it can help you a lot..
    Regards,
    Niel
    thanks for the points you choose to assign.

  • Time conversion at Query Level

    Can anyone suggest any methods to convert the time from UTC time zone to PST time zone at Query level without changing at backend level???

    If it is a key figure you can create a formula and add the offset.
    If it is a characterisitc and you want to limit the selection you can use customer exit variables. If you want to display the characteristic value, then you may be able to do a replacement path variable to convert characterisitc to KF and then use a formula to adjust the offset.

  • Date and Month format - BW Query- Universe

    Hi All,
      We have a requirement that the Web Intelligence report should be on the between date range.
    We have BW query, the time key figure format is MM-YYYY(its is character)  and we created universe on top of the Bex Query
    I am trying to create the Web Intelligence report using the month as the filter and I am using between option. When I run the query its not considering the date function and its bringing everything without concerning the the filter.
    Should I create new object in universe using the existing Billing Month(MM-YYYY) object ? If yes could you please give the function how to convert. I tried to convert right click on the object>object properties>Definition-->type(Date) but its giving error.
    Please advice me how can I convert the char function to date function when we use the BW query as a source to the universe.
    Thank in advance.
    Muvva

    Can you share your solution to this?

  • Filtering data to be shown at query level

    I am still on BW 3.0. I am developing queries for a cube. Is there a way to restrict characteristics (rows shown for a characteristics) by looking at a master data?  For example,
    my characteristics are showing orders, but I have a table which contains orders to be excluded. I do not want to show those orders in queries.
    It is difficult for me to implement filtering logic in ods, cubes while loading data because of various incremental loads. I want to do it at query time. If yes, can one point to me any documents. I will be willing to write whatever ABAP code is needed.
    Thanks a lot.

    Hi zigzagdna,
    You can create a variable of type "customer exit" in the query designer and write the abap code in the customer exit for variables, reading the values of the orders that need to be excluded from the table and excluding them.
    Check this link for more information about customer exit variables: http://help.sap.com/saphelp_nw2004s/helpdata/en/f1/0a56f5e09411d2acb90000e829fbfe/content.htm
    Hope this helps.
    Regards,
    Diego

  • Unit Conversion in Query Designer

    Hi All,
    In one of my report, i have to show the gross weight in column against material which i am reading from material master.
    Now the weight is stored in two different unit's KG & G.
    But i have to show the weight finally in KG.
    Does any body has any idea of performing unit conversion at Query level i.e. in Query Designer.
    Thanks.

    Rakesh the same i am doing, that is reading the weight value from material master through formula variable using replacement path.
    Now when i create a key figure like this, there is a tab of 'Conversion' in that there is mentioned the 'Unit conversion'
    In there, there are 2 options
    1. Conversion type - this is a drop down but with no vlaue
    2. Target Unit - Where i selected KG.
    But output remains the same, i.e. in KG.
    M I missing something ?

  • Data at Query level

    Good Afternoon everyone,
    data is loaded correctly in my infocube thru flat file.but wen i create query on this provider n drill down on one of the object i see different data then cube(field is 'assigned to' which actually store the person's name who the ticket is assigned to but in query it is showing some data which look as some date in single quotes.ex- '20080101').wat can be possible reson for this?
    Regards,
    Deepika

    Hi,
    You are trying to see a assignne name but u are getting a date.
    Thats only possible if the mappings are wrong(identifications) in multicube or u are giving different restrictions at the cube level and at the query level.
    The cube is defenately going to contain the values shown in the report for that infoobject.
    Again go through the restrictions and filters in the query.
    Query will show whatever is in the cube based on the restrictions.
    It will not do the conversions as u have said in your case.
    If it is a multicube check for the identifications again in the multicube for this charactritics.
    It is possible that update rules are correct but the identification in the multicube is incorrect and assignne is mapped to some date.
    Thanks
    Ajeet

  • Currency conversion by Calendar month in the query?

    Hellow...
    Users want DB currencies when executing query at first. And then want to change currency conversion by Calendar month in the query, if navigating by target currency. Tried as created TEST Currency Translation Key. Database currency is different currencies.
    Appreciate your help.
    Don.

    Hi,
    Create Currency conversion type using Trans: RRC1.
    1.Specify your Exchange rate type.                     
    2.Dynamic Exchange rate type
    3.Source curency from data rec.
    4.Fixed currency say USD.
    5.Select Variable Time reference "Start Month" and Special Info Object - 0calmonth
    Secondly In the key figure field to be converted in the query,   select properties - select the currency conversion key name .
    Thanks,
    Nagesh
    Sony Singapore

  • How to find the date difference in query level?

    Hi All,
      I have to find the difference between Delivery Date and Posting Date in the query level. Canyou please let me know whether it is possible or not?
    Thanks in advance!!
    Regards,
    Ramanathan.R

    Hello,
    If both infoobjects are key figures , then you can do the calculations. Create new formula and do the calculations.
    If infoobjects are characteristics, then also you can perform the calculations but you can do this by creating a formula variable using replacement path.
    Thanks,
    Praveen Tati

  • Conflict between Date values at Infocube & Query Level

    Hi Folks,
    I am stuckup with a strange situation and it is:
    The value of date fields are coming correctly at infoprovider level and when i call the same infoprovider at query level the values are totally different.
    Any suggestions in this regard.
    Thanks

    Hi,
    Are you using the same user for running the query and for checking data in InfoProvider, otherwise there might be personal settings difference.
    Execute your query in RSRT and check the output.
    Regards,
    Durgesh.

  • Query has to display completed quarters and Data loaded month.

    Hi All,
    I have  2 issues in  BEX .
    1. I need to display  data  loaded month(0calmonth):
    Ex: Jan  2007  data has loaded in May 2007, my query has to display  for  3 months JAN 2007, Dec 2006, November 2006.
    2. completed quarters :  if we are in mid of 3 quarter, query has to display Quarter1 and quarter2 (completed)  ,nothing has to display in quarter 3.
    Thanks in advance for your inputs.

    1. you mentioned data loded month... but you are pointing Calender month that data belongs to? Are you want display based on Calender Month that data belongs to (Jan 2007) or Loded Month (May 2007) or Last Loded Month?
    2. create User Exit variable on Quarter or Month IO. in the User Exit Code, check which Quarter that current month belongs to? if it is mid of 3rd quarter, pass Quarter 1 and 2 (or for month 1 to 6).
    hope this helps.
    Nagesh Ganisetti.
    REMOVED

  • MDX for Start of Month Values at Daily level

    Hey Guys,
    I am dealing with a requirement as below, the solution i have is either not addressing the complete problem or is extremely slow and in many cases just not feasible. Need a little help on the same.
    Problem: Need a query with cross join of 4 dimension (10 levels) and a date dimension, i need to determine a measures's first
    available value across time periods such as Start of month, start of year Etc.. 
    I have 
    dimA - Level A1
    dimB - Leve B1,B2,B3
    dimC - Level C1
    dimD - LevelD1, D2,D3,D4,D5
    Date Dimension - Date, Month, Year as levels.
    Measure - M1 To M5
    Query: 
    SELECT
    NON EMPTY
    [Measures].[M1]
    ,[Measures].[M2]
    ,[Measures].[M3]
    ,[Measures].[M4]
    ,[Measures].[M5]
    ,[Measures].[M1SOM]
    } ON COLUMNS
    ,NON EMPTY
    [DimA].[A1].[A1].ALLMEMBERS*
    [DIMB].[B1].[B1].ALLMEMBERS*
    [DIMB].[B2].[B2].ALLMEMBERS*
    [DIMB].[B3].[B3].ALLMEMBERS*
    [DIMB].[B4].[B4].ALLMEMBERS*
    [DIMB].[B5].[B5].ALLMEMBERS*
    [DIMC].[C1].[C1].ALLMEMBERS*
    [DIMD].[D1].[D1].ALLMEMBERS*
    [DIMD].[D2].[D2].ALLMEMBERS*
    [DIMD].[D3].[D3].ALLMEMBERS*
    [Date].[Date].[Date].ALLMEMBERS*
    [Date].[Month].[Month].ALLMEMBERS*
    } ON ROWS
    FROM
    [Cube]
    ***The above query has all those cross joins as this query would power an SSRS report dataset.
    Need to create a new calculated measure or a real (persisted measure) that displays the Start of month & Start of year Values. Below are the options i have currently. Lets assume, Measure M1 is the one for which i need the SOM and SOY values.
    Create a persisted measure (M1SOM) based off the measure M1 and provide an aggregation function of "FirstNonEmpty" : This works perfectly when we run a query at Month level i.e. in the above query have [Date].[Month].[Month].Allmembers instead
    of [Date].[Date].[Date].Allmembers. It displays the first available non empty value of the month. However, this means the rest of the measures are aggregated at month level. If i want to display the daily values of the other measures along with SOM values
    for this measure it wont work, cause the scope now changes to a single date and i just get the daily value in the M1SOM measure as well.
    Create a calculated measure (M1SOM) as below, along with the query above and the same thing happens. Cant display the SOM values at a daily date level.
    WITH
    MEMBER [Measures].[M1SOM] AS
    [Date].[Date].FirstChild
    ,[Measures].[M1]
    3. Create a calculated member as below, This works! however, the query
    absolutely kills my machine and takes forever to execute, if i run it with more than 3 levels in the cross join. 
    WITH MEMBER M1SOM AS Head(NonEmpty({[Date].[Date].Parent.Children}*[Measures].[M1SOM])).Item(0)
    Is there a better way to achieve the SOM and SOY calculations at a daily level?
    Thanks
    Srikanth

    Hi Srikanth,
    Basically you want to get the cell values on different granularity for date dimension in the same result set. For performance consideration, we suggest to use MDX to get the 2 types of value separatedly and merge with T-SQL.
    Below is an example on how to get data from MDX within T-SQL for your reference.
    SET
    @mdx
    =
    '{some
    dynamic MDX}' 
    SET @sql
    =
    'SELECT a.* FROM
    OpenQuery(LinkedAnalysisServer, '''
    +
    @mdx
    +
    AS a' 
    BEGIN TRY 
    INSERT INTO #result 
    EXEC sp_executesql @sql 
    END TRY 
    BEGIN CATCH 
      IF ERROR_NUMBER <>
    'The error number you are seeing' 
      BEGIN 
        RAISERROR('Something happened that was not an empty result set') 
      END 
    END CATCH 
    SELECT * FROM
    #result 
    Regards

  • DATE vs DATETIME conversion

    I am running into a strange issue which is preventing me to finish my project. Any help would be greatly appreciated. 
    It looks like the CONVERT (the same goes for CAST) function treats DATE and DATETIME conversions differently when executed by a user with the Dutch language settings.
    Here is what I mean, I run the following query:
    SELECT CONVERT(DATE, '2014-09-01 23:00:00'), CONVERT(DATETIME, '2014-09-01 23:00:00')
    The results are:
    2014-09-01, 2014-01-09 23:00:00
    The conversion to DATETIME swapped the month and the day around, while this doesn't happen for the DATE conversion. The DATE conversion is the correct format, since I supplied it YYYY-MM-DD HH:mm:ss.
    When I run the same query using a user with the default language settings (en-US I assume) the same query works fine (no swapping of month and day values). 
    Can someone explain why this is happening? And maybe more important how to prevent it or workaround it (changing the language for the user from Dutch to default is not an option)? 
     

    >> Can someone explain why this is happening? And maybe more important how to prevent it or workaround it (changing the language for the user from Dutch to default is not an option)? <<
    CONVERT() is an old Sybase string function. It was created to keep 960's COBOL programmers happy since SQL does not have a PICTURE clause to put data in display formats. 
    CAST() is the ANSI/ISO Standard function to convert data types and this is what you should be using. It is not a string function. It uses the ISO-8601 standard for dates (yyyy-mm-dd), as you have seen. This is the only -– repeat, only! -- format allowed in
    SQL. Microsoft is a few decades behind and trying to catch up now.
    A good SQL programmer will do any local display formatting in the presentation, which will handle local languages that are never used in the database. Want to have some fun? The names of months in Polish, Czech, Croatian, Ukrainian and Belarusian not based
    on the Latin names used in most European languages. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Infoset resulting multiple results at query level

    Hi,
    I have joined 1 DSO and 1 Infocube in Infoset.. Mapped Plant, Material and Batch
    DSO
    Plant     Material      Batch      Caldate         Qty
    P1          M1          B101          01/02/2014     1000
    P2          M2          B102          05/02/2014     2000
    Infocube
    Plant          Material         Batch     Caldate               %
    P1               M1               B101          02/02/2014          20
    P1               M1               B101          05/01/2014          20
    P2               M2               B102          07/02/2014           15
    I'm considering date only on DSO and ignoring Infocube date. When I execute the report for the month of February, report output is as follows.
    Plant   Material     Batch     DSODate         Qty           %
    P1          M1               B101     01/02/2014          1000          40 (Summing up with January Date)
    P2          M2               B102     05/02/2014          2000          15
    I want data % value to be 20%.
    Is there any possibility to change at query level or join level.
    If we have one line item, data is correct but not the case with multiple line items.
    Kindly do the needful!
    Thanks
    SS

    Hi,
    When you join the two infoproviders in the infoset ignoring infocube date, you are creating as many records for each record in DSO. That means for the first record the infoset creates :
    Plant     Material      Batch      Caldate         Qty     %
    P1          M1          B101          01/02/2014     1000  20   (for first row in infocube)
    P1          M1          B101          01/02/2014     1000   20  (for second row in infocube)
    I also think same as Anshu, you have all the common characteristics, you can as well use a multiprovider.
    regards
    Yasemin...

  • Incorrect data for proportional factor in query based on Planning Book

    hi,
    We have upgraded from APO 3.1 to SCM 5.0.
    Post upgrade, the proportional factor is being displayed incorrectly in the BEX query based on the Planning Book data if we run the query for multiple months.
    for eg,
    if, in the planning book, the proportional factor for months 10.2009 and 11.2009 are as follows :
    Brand  >> Month >> Proportional Factor
    B1 >> 10.2009 >> 70%
    B2 >> 10.2009 >> 30%
    B1 >> 11.2009 >> 80%
    B2 >> 11.2009 >> 20%
    When we execute the query for the above brands for months 10.2009 and 11.2009,
    then, at the total level, the % displayed is 100% and the data at brand level is halved.
    We do not have any exits or formulae operating at the key figure level in the query and hence are unable to figure out why this is happenning...
    Any clue on this ?
    regards,
    Anirudha

    Resolved.

Maybe you are looking for

  • One page report.

    Dear SAP Friends, one common suituation is observed while doing implimentation project that is Owner required One page Report through the SAP System same as he get through the other ERP System or in Excell formate. Initially he is not ready to dropdo

  • Can't see certain things (invisible) when using internet on Windows 7.

    I think this is a Windows 7 issue I am having.  I just got my Ideapad with Windows 7.  When using both Internet Explorer and Firefox, certain text, image, and boxes are invisible..or so faint I can barely see them.  Fox example, as I type this, I see

  • Poor quality video when burning a DVD

    Hi All, I have recently purchased & installed Premiere Elements 11 on my Windows 7 64bit Dell laptop. I found the tutorials very helpful and was able to successfully create my first project - importing a 46 minute AVCHD file4GB m2.ts shot on my Panas

  • CProjects 4.0 : Task and subproject connection table record

    Hello! Could u please name tables where connection task and it's subproject is recorded in data base? I'm using multi-project management with subprojects but I haven't found any connection in DPR_TASK table. I wounder where it records how master proj

  • VA05 fields functional enhancement

    Hi gurus.. In VA05 selection criteria sold to party is the first field in selection screen (and further criteria tab is having only  7 fields additionally available,there we don't have the asked fields) If we want to bring ship to party or other part