Query for: 'jan. to cur. mth.' and 'whole year' in 2 rows

hi,
i try to define a query as follows:
the query consists of a row structure with 12 columns, one for each month.
furthermore the query has a key figure that can be restricted to "actual" or "plan" values.
now i want to display two rows in the query result. in the first row i like
to display the "actual" values for all columns from january to CURRENT
month. the REMAINING columns should be EMPTY or filled with zeros.
the second row of the query result should be filled with "plan" values for ALL columns from january to december.
does anyone has an idea how to achieve this result without using the cell editor?
my problem is anything i define/restrict in the columns structure affects ALL rows. if i could differentiate between the rows from the columns selections my problem would be solved. or maybe there is another way?
thanks very much for your help!

Hi,
Create two structure one for rows and one for columne
In the rows create a structure .
in the first selection add the keyfigures and restrcit it to plan
and name it as plan value
in the second selection add the keyfigure and restrict it to actual and name it as actual.
in the column  put calmonth structure .
Hope it helps.

Similar Messages

  • Query for inserting data into table and incrementing the PK.. pls help

    I have one table dd_prohibited_country. prohibit_country_key is the primary key column.
    I have to insert data into dd_prohibited_country based on records already present.
    The scenario I should follow is:
    For Level_id 'EA' and prohibited_level_id 'EA' I should retreive the
    max(prohibit_country_key) and starting from the maximum number again I have to insert them
    into dd_prohibited_country. While inserting I have to increment the prohibit_country_key and
    shall replace the values of level_id and prohibited_level_id.
    (If 'EA' occurs, I have to replace with 'EUR')
    For Instance,
    If there are 15 records in dd_prohibited_country with Level_id 'EA' and prohibited_level_id 'EA', then
    I have to insert these 15 records starting with prohibit_country_key 16 (Afetr 15 I should start inserting with number 16)
    I have written the following query for this:
    insert into dd_prohibited_country
    select     
         a.pkey,
         b.levelid,
         b.ieflag,
         b.plevelid
    from
         (select
              max(prohibit_country_key) pkey
         from
              dd_prohibited_country) a,
         (select
    prohibit_country_key pkey,
              replace(level_id,'EA','EUR') levelid,
              level_id_flg as ieflag,
              replace(prohibited_level_id,'EA','EUR') plevelid
         from
              dd_prohibited_country
         where
              level_id = 'EA' or prohibited_level_id = 'EA') b
    My problem here is, I am always getting a.pkey as 15, because I am not incrementing it.
    I tried incrementing it also, but I am unable to acheive it.
    Can anyone please hepl me in writing this query.
    Thanks in advance
    Regards
    Raghu

    Because you are not incrementing your pkey. Try like this.
    insert
       into dd_prohibited_country
    select a.pkey+b.pkey,
         b.levelid,
         b.ieflag,
         b.plevelid
       from (select     max(prohibit_country_key) pkey
            from dd_prohibited_country) a,
         (select     row_number() over (order by prohibit_country_key)  pkey,
              replace(level_id,'EA','EUR') levelid,
              level_id_flg as ieflag,
              replace(prohibited_level_id,'EA','EUR') plevelid
            from     dd_prohibited_country
           where level_id = 'EA' or prohibited_level_id = 'EA') bNote: If you are in multiple user environment you can get into trouble for incrementing your PKey like this.

  • Query for Customer site Phone number and Fax number  in Oracle Apps

    Dear All,
    Can anyone guide me how to write qurey for Customer site phone number and Fax number for Acive customers.
    Thanks in advance.
    Best Regards
    NRC

    Hi Team,
    This is a shipping report in header level we have the customer information with site address. The requirement is along with site address we need to show the phone number and Fax number .For this we need to write the formula column.Thes are the comes through HZ parties only. I have no idea how to achieve this.
    Best Regards
    NRC

  • ABAP User Roles and Query for accessing particular T- codes and Reports

    dear Gurus
    I have one problem, i want to know about ABAP User Query ,i have one requirement my user wants to Lock all the HR Std versus Customized reports in T- code SQ01,other department peoples also see the Payslips and Hr personal reports which is harmfull to the dept so i want to Lock all the reports in Std T- code in SQ01 and i have created one Customized User Roles or Query in which the T-codes and Reports are assigned only those particular user can access the T-codes and Std reports .how can it be possible i dont have any idea about user roles and Queries .
    kindly help me out or send me some documents related to user roles and queries
    regards ritesh sharma

    Hi Ritesh,
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/103cafc2-7a64-2b10-14b3-eddb7d324561
    Regards,
    Flavya

  • SAP query for asset report with retirement and depreciation retirement

    Hi Expert,
    Can anyone tell me in table ADA which filed is holding the figure of retirement and retirement depreciation?
    Thank oyu

    Hi,
    Max.
    For your question you can check the tables ANEP for asset transactions line items and for asset value fields you can check out ANLC.
    I hope this may help you.
    If you have any doubts feel free to ask.
    Regards,
    Pankaj A Bhalerao.

  • Query For Retrieving Data With Date and grouping

    Hi Guys
    I am having a hard time to figure out the sql query.
    I have a table with data. Below is the illustration.
    date location  item description
    1 jan 14 A  apple desc1
    2 jan 14 A  apple desc2
    3 jan 14 B  apple desc1
    4 jan 14 B  apple desc2
    1 jan 14 A  orange desc1
    2 jan 14 A  orange desc2
    3 jan 14 B  orange desc1
    4 jan 14 B  orange desc2
    My question it how to get the latest date on each location and item along with the description field
    This is the result I want
    date location  item description
    2 jan 14 A  apple desc2
    4 jan 14 B  apple desc2
    2 jan 14 A  orange desc2
    4 jan 14 B  orange desc2
    Thanks.

    provided it a datetime/date field you've for date you can do this
    SELECT [date],location,itemdescription
    FROM
    SELECT [date],location,itemdescription,
    ROW_NUMBER() OVER (PARTITION BY location ORDER BY [date] DESC) AS Rn
    FROM table
    )t
    WHERE Rn = 1
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • SAP Query-for  Reporting   how to create and use it

    Hi SAP Gurus,
    i need your help. in my project, client is asking to create queries to generate reports, i am not familiar with queries, so would appreciate it if any one can guide me and tell me the procedure for writing and creating queries soon.
    also if you have any study material on steps on How to write and create queries for PP module
    thank you very much

    Hi
    Please refer below document
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
    Also refer below
    How to Create Infoset Query (SAP Query)
    Steps on how to proceed to create a Query:
    ADHOC QUERY
    A query can be created to extract information from master records  i.e  Infotypes.  For example, by creating a query , the data relating to an employee contained in various Infotypes can be extracted.
    Proceedure :  
    Decide on  the various Infotypes we  want to make the query.  Decide on the area where we  want to query  i.e  Global area or Standard area.  Standard area is client specific and globel area will include all clients.
    Menu : HR – PM – Admn -  Information System -  Adhoc Query
    Select area standard and select the  user group already created
    Creation of new query  :  
    TC SQ03  -  Select Environment – Select Standard Area -  Enter  --  If new user group is to be created, enter name of the user group, click on create and enter necessary information and  exit after saving
    TC SQ02  -  Enter name of the Infoset – Create – enter name of Infoset -  Data source -- >  Table join by basis table – give name of table e.g  pa0000 -  Enter -  Click on insert table if we  want to include more tables – give name of table one by one and after finishing,  place cursor on the joining lines and right click to delete unwanted relationships  - check  - and go back  - field groups  -  include all table fields  - click on generate button   -  go out
    TC SQ03  -  Select user group  -   eg.  Payroll
    Infoset  - Enter name of newly created Infoset 
    Assign users and Infosets  -  Assign infosets  -  put tick on payroll  - save and go back
    TC  PAAH  -  Expand the nodes and put tick on relevant fields depending upon necessity
    Save the query  by giving the same name as infoset for easyness..
    For executing a query which is already created
    1. Go to SQ01 transaction
    2. Go to Environment menu->query areas->std areas
    3. Then choose the user group where the query is created
    4. It will display all the queries created for the group.choose the query you want to executeand click execute.
    5. will take to the initial screen
    6. Enter the required parameters and execute
    Regards
    Ranga
    Message was edited by:
            Ranganathan Srinivasamurthy

  • How to write a query for grouping them the columns and give the sequence order to each group/

    Hi i have table that contains country columns .
    India,USA,UK like these when ever the group changed into the differt country i make a group and arrange them the sequence into those Countries
    like below
    1)India
    2)India
    1)USA
    2)USA
    like these to write a query ..........pls help me for this query

    Assuming you're using SQL Server you can ask here:
    http://www.sqlteam.com/forums/forum.asp?FORUM_ID=23
    Otherwise, please ask in the relevant forum for the type of technology you're using.
    Basically it's either:
    select *
    from [table name]
    order by country
    If you want to do something with groups do something like:
    select (max) income, country
    from [table name]
    group by country
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • Af:query for transients attribute in VC and NO DATA after RowMatch

    Hi,
    I have a VO having two transient attributes (example, JoinDate, DeptName) out of which DeptName defined as LOV. I have a VC VC which run on 'database' mode and DeptName present in this VC and having default value like 'Computer'. VC configured to run automatically so that on page load data should display.
    Next, I have a af:query from this VC on jasff page. Before page load programatically we define query criteria and on page load query runs fine and data display on UI.
    Issue here is,
    When we add one more transient attribute JoinDate from 'Add Fields' (without adding any data) and click on submit we don't get data even if page load query is same as this query. Change is only a new attribute added from Add Fields and it not having any value.
    The changes observed in log is that, when we add one more criterion attribute JoinDate OR DeptName we find below entry in the log.
    VCs converted to RowMatch: ( (UPPER(DeptName) LIKE UPPER(vc_type1) ) )
    This means after query execution framework doing RowMatch for transient attribute WHICH IS PRESENT IN VC. Here freamework passing vc_type1 as null. So we are not getting any rows.
    I have tried like
    before VO executeQuery, setRowMatch(null) but NO luck.
    before VO executeQuery, setRowMatch("DeptName='Computer'") but NO luck.
    So please suggest me How Can we avoid RowMatch execution after execute query ?
    If not, how to get data which we got from executeQuery ?

    Please suggest.

  • Query for Turnover per Customer / article and from wich agent in one file.

    Hello Experts -  basicly the subject tells it all, what I whant to see in the query is:
    Turnover Per Customer wich articles and wich agent is responsible for the customer.
    Many thanks in advance.

    Hi,
    Actually there are two field in the INV1 table
    1) Price = Net Price (after the adjustment of the Discount at row level)
    2) pricebefdi = Gross Price ( which does not include the discount at the row level)
    I have amended the query again based on the above fields :
    select distinct t0.CardName as 'Business Partner Name',
    CASE WHEN t1.discprcnt != 0 then ROUND(SUM((t1.Quantity*t1.PriceBefDi)*((100-t1.DiscPrcnt)/100)),2)
    WHEN t1.DiscPrcnt = 0 then ROUND(SUM((t1.Quantity*t1.PriceBefDi)*((100-t0.DiscPrcnt)/100)),2)
    WHEN t1.DiscPrcnt !=0 and t0.DiscPrcnt != 0 THEN
    ROUND(SUM((t1.Quantity*t1.price)*((100-t0.DiscPrcnt)/100)),2)
    END as [Total Turnover after Discount],
    t1.DiscPrcnt as 'Discount Percentage Rows',
    T0.Discprcnt as 'Header Discount',
    t1.VatSum as 'Vat Amount', t1.Dscription as 'Item Name',
    sum(t1.Quantity) as 'Qty Sold', t3.SlpName as 'Sales Employee Name'
    from OINV t0 inner join INV1 t1 on t0.DocEntry = t1.DocEntry
    inner join OSLP t3 on t3.SlpCode = t0.slpcode
    where t0.DocDate >= '2011.01.01' and t0.DocDate <= '2011.12.31'
    Group BY t3.SlpName, t0.Cardname,t0.slpcode, t1.Dscription,t1.DiscPrcnt,t1.vatsum,
    t1.DiscPrcnt,t0.discsum,t0.discprcnt
    order by t1.Dscription
    I have incorporated the one where discount is there both on header and rows.
    Kind Regards,
    Jitin
    SAP Business One Forum Team
    Edited by: Jitin Chawla on Oct 12, 2011 11:17 AM
    Edited by: Jitin Chawla on Oct 12, 2011 11:18 AM

  • Query for SAP NW 7.0 and ECC

    Dear ALL ,
    We  have purchased SAP NW 7.0  License .We have installed it with 2 components WAS ABAP and WAS as JAVA.
    Now my question is: this SAP NW 7.0 installation does not contain any functional module like SAP HR.MM,FI  etc...
    for this requirement do we need to take a separate license of SAP  ECC or do we need to install some contentson this SAP NW 7.0 server  so that we can run  functional code on this server????
    Please suggest....
    Thanks
    sandeep

    Hi Sandeep.
    The problem is not only the license, but also the application itself. If you have installed NW, your system don't have the tables and programs needed to execute business modules like FI, SD, MM, etc.
    If you need those modules, you have to install an ERP 6.0 from scratch.
    Regards
    Francisco

  • Query for top 10 selling products and their current stock

    Hi ppl
    I am using the sales overview cube 0SD_C03 to get top 10 selling products. What I want is to get the current stock available of the top 10 products from Material Stocks/Movements cube 0IC_C03. From what I know, we have to make a multiprovider to get this information. Can anyone guide me how to go about it?

    Hello Javed,
                         You can use Replacement path for this.
    1.Create a report for Top 10 Products in InfoCube 0SD_C03 - Exampls Report A
    2.Create another report with Stock and use a variable for Product with processing type replacement path in InfoCube0IC_C03 - Example Report B
    3. In Report B and assing the Report A to this variable.
    When you execute the Report B it will execute the Report A in background and displays it in Report B.
    Hope it helps,
    thanks
    Chandran

  • Query for fiscal month till current month of year

    Hi,
    can you please help me to show only fiscal months till current month of year?
    e.g. Current month is Apr of 2012.
    I have to show the fiscal months till the Apr 2012 of year 2012.
    if the date is 24th of Apr then it would show May month also.
    Regards,
    Nilesh

    with t as (
    select to_date('04232012','MMDDYYYY') d from dual union all
    select to_date('04252012','MMDDYYYY') from dual)
    select
    d,
    case
    when to_char(d,'DD') >= 24 then
    to_char(trunc(add_months(d,1),'MONTH'),'MM-YYYY')
    else
    to_char(d,'MM-YYYY')
    end fin_month
    from t
    D     FIN_MONTH
    23.04.2012     04-2012
    25.04.2012     05-2012

  • SQL query for custom alert view

    I have created a custom alert view and scoped to show alerts related to group of servers.
    Alert view Criteria: Resolution State - New, Severity - Warning and Critical, Group - "Group 1"
    I am trying to query the Operations Manager database to show the alerts with same criteria using below query.
    select MonitoringObjectName, ResolutionState, Priority, Severity, TimeRaised, TimeAdded, TimeResolved, AlertStringName, AlertStringDescription from AlertView where ResolutionState = '0' AND (Severity = '2' or Severity = '1')
    AND
    MonitoringObjectId IN (select TargetObjectId from RelationshipGenericView
    where SourceObjectDisplayName = 'Group 1')
    in Console i see both warning and critical alerts where as in SQL query output i see only critical alerts.  Could you please correct if I am using wrong query. also please share your suggessions if i am completely wrong on this.
    Kind Regards,
    Bommi
    ~Bommi

    your query looks perfectly fine. Are you sure if the alerts you see in the console are of the 'Resolution State =0' (New). It might be the case where the alert have moved to a fidderent resolution state.
    Also, take a sample warming alert from console, query for the same in DB and check the Severity value. If it is '2'.
    Regards,
    Saravanan

  • NI License manager does not start; says it's querying for current license status

    I currently have the evaluation version of Labview. I tried to use a volume license from my university by typing in the server name in NI License Manager, but after that, whenever I try to open the license manager, it looks like it's stuck saying "querying for the current license status" and never actually opens. Also, when I try to open Labview, it freezes during the setup finalization. I realized afterward that students don't have access to the university license for their own PC's, so I can't use that volume license anyway. 
    I uninstalled everything having to do with NI on my PC and reinstalled the evaluation version of Labview, but the same problem still exists. Is there anything I could do besides erasing my hard drive? 
    Solved!
    Go to Solution.

    Hi amize,
    When you say the same problem still exists, is it both the NI License Manager and LabVIEW that are still having the issues? When you open the License Manager and it is not actually opening does that mean you cannot interact with it or the licenses never finish loading in the tree view on the left hand side. If you do have access to the Options menu, open preferences and make sure you have deselected "Use Volume License Servers". At some point, if the windows is not interactive, it should timeout with attempting to make its server connection, especially if you are disconnected from any network connection.
    Also, how long do you wait when you open LabVIEW and see the setup screen? Does it just become unresponsive?
    If you could follow up with that information it would be much appreciated
    Regards,
    James W.
    Applications Engineer
    National Instruments

Maybe you are looking for

  • Sequence header at the end of the sequence in the report

    Good afternoon everyone, I have a strange issue with my TestStand Report (any kind of report type) : some time ago the headers (with the name, the parameter's values, the module time, the status) of the sequence and sub-sequence were at the begining.

  • Apple releases Faulty program in Logic 9

    Please note very important posts and test showing conclusive errors with certain plugins at post numbers: 55 56 71 79 (This is using Logic 9.1.1 in Snow Leopard 10.6.3) Ok, so Logics ram usage has been mentioned many times before, mainly from people

  • Installing modem in Windows 8.1

    I'm having difficulty installing my MultiTech MT9234ZPX-PCIE faxmodem in my new Windows 8.1 desktop. MultiTech has not issued drivers specifically for Win 8.1 yet. I may have an IRQ conflict.  Someone answered a similar question by suggesting that FX

  • In me21n tcode pr field as validate

    hi guru's in me21n tcode in item level i want to check purchase requestion field initial or not if its not initial it should trow the message 'please enter pr' how to do it .... it can be done by user exits r badi .. if it possiable please sen the co

  • Regarding output type and idoc trigger issue

    Hi i need to copy pgi quantity into sales order quantity for that i write a code into user exit MV50AFZ1. code is working fine but output type and idoc is not trigger due to this. In this exit to update sales order quantity i used bapi *BAPI_SALESORD