Reporting on day

Hi,
Is there any option at the query level if I want to see the data based on day i.e., if user wants to see the records from 17/5/2002 to 23/5/2002 so along with the date it should also display day like Mon(17/5/2002)
Tue(18/5/2002)

Hi Priya,
I hope your report looks like this..
         Monday(17/5/2002) Tuesday(18/5/2002)
A               X            X
B               XX           XX
For this, you have to define  two text variable and one variable for user input on 0CALDAY which i think you have created.
Now for creating the two variable
1) Replacement variable on 0CALDAY..which very Easy.
2) Customer exit Text variable for showing Mon and tue..etc.
Now Query Structure
1) In column, Create a new Structure and in nEw selection
name. Click "Select Text Variable"-> New ->Press next->
set following attribut:
name : ztvcal
des: Calender Month
process by: Replacement path
press next.
Select 0CALDAY as charcteristic.
press next.
Replace with Key,press next.finish.
Now again Click "Select Text Variable"-> New ->Press next->
set following attribut:
name : ztvday
des: DAY
process by: Customer exit
press next.
variable entry is mandatory.
remove that check (ready for input)
length->10
press next.finish.
Now, Drag..your keg figure in right panel.
drag your 0CALDAY and restrict it by that variable which you have created for user entry ( let's say ZCAL)
3) Go to CMOD
Write this code.
DATA: L_S_RANGE TYPE RSR_S_RANGESID.
DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
DATA : ZDAY LIKE  SCAL-INDICATOR.
DATA : ZDATE LIKE SCAL-DATE.
CASE I_VNAM.
WHEN 'ZTVDAY'. 'TEXT VARIABLE FOR MONDAY
    IF i_step = 2.
      LOOP AT i_t_var_range INTO loc_val_range
                     WHERE vnam = 'ZCAL'. ' USER-ENTRY  VARIABLE ON 0CALDAY
        EXIT.
      ENDLOOP.
      IF sy-subrc EQ 0.
        ZDATE =  loc_val_range-low.      
     CALL FUNCTION 'DATE_COMPUTE_DAY'
     EXPORTING
     DATE = ZDATE
     IMPORTING
     DAY = ZDAY.
        IF sy-subrc EQ 0.
        CASE ZDAY.
     WHEN '1'.
          l_s_range-LOW = 'Monday'.
        WHEN '2'.
          l_s_range-LOW = 'Tuesday'.
     WHEN '3'.
          l_s_range-LOW = 'Monday'. 'change them
     WHEN '4'.
          l_s_range-LOW = 'Monday'.
     WHEN '5'.
          l_s_range-LOW = 'Monday'.
     WHEN '6'.
          l_s_range-LOW = 'Monday'.
     WHEN '7'.
          l_s_range-LOW = 'sunday'.
        ENDCASE.
        ENDIF.
      ENDIF.
      l_s_range-sign = 'I'.
      l_s_range-opt = 'EQ'.
      APPEND l_s_range TO e_t_range.
    ENDIF.
ENDCASE.
4)Activate the project. This is very important.
5) go to rsrt-> choose  your query and generate report.(make sure that your have saved your query)
  execute.
6) go to query and create a new structure and use offset for next day.
Hope u m clear.
Regards,
San!

Similar Messages

  • Pivot sales analysis report by day for a particular month - sap has by month and annual

    Hi guys,
    I'm trying to come up with a pivot sales analysis query report for items for the month by displaying individual days sales, sales amount, gross profit, gross profit %
    e.g
    Month of March
    1st, 2nd, 3rd, 4th.....31st march. In sap their is a sales analysis report by
    days of the month
    1st March
    2nd march
    31st march
    item no
    item description
    Qty
    sale amount
    gross profit
    gross profit%
    qty
    sale amt
    gross profit
    gross profit %
    Qty
    sale amt
    gross profit
    gross profit %
    sugar
    20
    20,000
    5,000
    25
    30
    30,000
    10000
    33.3
    40
    40000
    15000
    37.5
    n02
    n03
    no4
    Regards Brian

    Hi,
    Due to pivot limitation, not possible to get above data in pivot table.
    Try this simple query which matches system sales analysis by item.
    SELECT t1.itemcode as Itemcode, T1.[Dscription] as 'Item description',  sum(T1.[Quantity]) as Qty, sum(T1.[LineTotal]) as 'sales amount', sum(T1.[GrssProfit]) as 'Gross Profit'
    FROM OINV T0  INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry WHERE month( T0.[DocDate]) = '1' and year( T0.[DocDate]) =2014 GROUP BY T1.[ItemCode], T1.[Dscription]
    Thanks & Regards,
    Nagarajan

  • Organizer will not open after I tried backing up photos on external hard drive on Mac. Editor opens, but not Organizer. This is a repost of a problem first reported 10 days ago.

    Organizer will not open after I tried backing up photos on an external hard drive on Mac. Editor opens, but will not launch Organizer. Have tried clearing the catalogs, but nothing works. This was first reported 10 days ago. Had to be out of the country for a week - without photoshop working-- and now I'm back with the same problem. Can someone please help, or do I dump this and try to get some help just reloading the program?

    jnrmendonca
    It had 4 years of photos and videos on it.
    To what did your camera record those photos and videos - camera's internal memory, inserted memory card, other?
    Any remote chance that the latter may still exist for you to use to download the camera files to your new external hard drive?
    ATR

  • Report for day 0PCA_C01

    HI Gurus
    I am extracting data from R3 to BW for the state of results based on 0PCA_C01, now require reports drawn per day but finished just shows me once a month
    as these reports could draw?
    BW:learnng

    Do your users really require DAILY balance sheets?
    ie balance as at the end of a day?
    You cannot do this in SAP (without building in <4.6 special ledgers and ECC6 segment ledgers nevermind BW!)
    0PCA_C01 gets fed either from the R3 table GLPCT which is a monthly summary table or get fed from 0EC_PCA_3 which is the line items of PCA for non sub ledger postings
    If your eally eanted to do this you would need to put cal day in the a Z version fo the PCA cube and generate 365 daily postings (as per the standard start routine - check the OSS notes)
    But to be quite honest it won;t work as the balance sheet will still not balance due to the AR, AP and AA ledgers only transfering once a month via the 1KEK and 1KES jobs (these are monthly jobs)
    If you wanted to use only P&L then yes you coudl create a z version and use 0EC_PCA_3 as a feeder
    If you dont; understand any of this then talk to your FICO guy he wil help you

  • Stock Ledger Report in Day Wise not giving correct values for Opening Stock

    Dear Experts,
    I m working on Sock ledger report to give the day wise data.
    since yesterdays closing Stock will become opening stock of today,
    To get Opening Stock,
    I have restricted the stock key figure with 2 variables on calday        
                                  (DATE FROM var with <=(Lessthan or equal to) and offset -1
                                   DATE TO      var with <=(Lessthan or equal to) and offset -1)
    To get Closing Stock,
    I have restricted the Stock key figure with 2 variables on calday        
                                  (DATE FROM var with <=(Lessthan or equal to)
                                   DATE TO      var with <=(Lessthan or equal to) )
    But in the output Opening stock values are not coming correctly and for given range of dates,
    for last date, opening stock is showing as Zero.
    Could you please tell me how can I achieve the correct values for opening stock.
    Thanks in advance.

    Hi Arjun,
    Seems like you are making it more complicated. What is your selection screen criteria?
    Ideally you should only use the offset.
    You will have say Calday in rows and stock in Column
    ____________Opening Stock_____________Closing Stock
    01/06/2009___(Closing stock of 31/05/2009)_(Stock of 01/06/2009)
    02/06/2009___(Closing stock of 01/06/2009)_(Stock of 02/06/2009)
    03/06/2009___(Closing stock of 02/06/2009)_(Stock of 03/06/2009)
    So, from above scenario, create one RKFs and include Calday in it. Create a replacement path variable on calday and apply the offset as -1.
    So, your Opening Stock will be calculated by closign stock of previous day.
    - Danny

  • Stock closing balance report: per day

    Hi
    I wonder if someone could help.
    I require a report that will show me the closing stock balance over a specified period, but I want it to show the closing balance on each day, even if there is no movement.
    I have used, and adapted, the following query from another thread. However I want it to show data for each day within the time period.
    Thanks, Andy
    Declare @FromDate Datetime
    Declare @ToDate Datetime
    Declare @Group nvarchar(10)
    Set @FromDate = (Select min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >='[%0]')
    Set @ToDate = (Select max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <='[%1]')
    Set @Group = (Select s2.ItmsGrpCod from dbo.OITB S2 Where S2.ItmsGrpNam = '[%2]')
    Select
    a.Itemcode,
    min(a.Dscription),
    ((sum(a.[Opening Balance]) + sum(a.[IN])) - Sum(a.OUT)) as Closing
    from(
    Select
    N1.Itemcode,
    N1.Dscription,
    (sum(N1.inqty)-sum(n1.outqty)) as [Opening Balance],
    0 as [IN],
    0 as OUT
    From dbo.OINM N1
    Where
    N1.DocDate < @FromDate
    Group By
    N1.ItemCode,N1.Dscription
    Union All
    select
    N1.Itemcode,
    N1.Dscription,
    0 as [Opening Balance],
    sum(N1.inqty) as [IN],
    0 as OUT
    From dbo.OINM N1
    Where
    N1.DocDate >= @FromDate and N1.DocDate <= @ToDate and
    N1.Inqty >0
    Group By
    N1.ItemCode,N1.Dscription
    Union All
    select
    N1.Itemcode,
    N1.Dscription,
    0 as [Opening Balance],
    0 as [IN],
    sum(N1.outqty) as OUT
    From dbo.OINM N1
    Where
    N1.DocDate >= @FromDate and N1.DocDate <=@ToDate and
    N1.OutQty > 0
    Group By
    N1.ItemCode,N1.Dscription) a, dbo.OITM I1
    where
    a.ItemCode=I1.ItemCode and
    I1.ItmsGrpCod = @Group
    Group By
    a.Itemcode
    Having sum(a.[Opening Balance]) + sum(a.[IN]) + sum(a.OUT) > 0
    Order By a.Itemcode

    No, not entirely.  It does show Ins and Out, but only days where there is an In or an Out and it also show ALL the Ins and Outs on one day.
    I need the report to show me just the closing balance for each day, and also every day even if there is no In or Out.  Basically I need the query above to show me each day rather than the aggregate for the whole date period.

  • Can you report which days absence quotas accrued?

    Through PT50 transaction, I can see that relative day when hours are accrued to an absence quota.  This data seems to be pulled from table ZKO in B2 cluster.  I would like to run a report for a group of employees to get the actual dates within a year that hours accrued to the quota.  Does anyone know how to do this?
    Thanks,
    John.

    Hi John,
    the following link describes how to read from cluster. At the end there is an example program:
    http://help.sap.com/saphelp_47x200/helpdata/EN/fc/eb3c46358411d1829f0000e829fbfe/frameset.htm
    Hope this helps.
    Regards
    Bernd

  • Report by Day/Week/Month/Year

    Hi All,
    I have the table showing below
    Empid     name     tikcetno     Completed date
    694     anil     10051     23-Jun-09
    695     madhu     10052     23-Jun-09
    694     anil     10053     23-Jun-09
    695     madhu     10054     22-Jun-09
    695     madhu     10055     6-Jan-09
    I need to create the report which will show employee wise count of tickets in a day,week,month and year.                  
    Day: count(tickets) for current date
    Week: count(tickets) for current week
    Month: count(tickets) for current month
    Year: count(tickets) for current year
    I need to show all these four columns in a horizantal table. I am using crystal reports2008. Please help me. ur help would be appreciated.
    Anil.

    Hi,
    create 4 formulas for day, week, Month and year
    for ex, in Day formula
    IF Date Field = CurrentDate then 1 else 0... similarly for other ranges. Create a Group based on employee, and insert a SUM  summary field of these formulas in Group header.
    Hope this will help you.
    Jyothi
    Edited by: Jyothi Yepuri on Jul 13, 2009 3:04 AM

  • Date data from Crystal Report one day less than Date from Source

    Hi,
    I am creating a Crystal Report 4.0 for Enterprise Users (Client Version only) based on a BEx query. I have a field called 'Date' that I am bringing over from the BEx query. It has a format of MM/DD/YYYY. When I view the 'Date' in Crystal Reports, it is displaying as 1 day less from the actual data. For example, in the BEx Query, 'Date' = 11/01/2011.  In Crystal Reports, it is showing up as 10/31/2011, which is one day behind.  I'm not sure what's going on.
    Please help!

    Well, this is as weird as it gets!
    Here are the observations on SP02:
    1) The Date Characteristic is a day off in the report while the 'Key' shows correct date
    2) It displays in the '30.01.2011' (DD.MM.YYYY)format
    3) When you right-click this field to change the date format, the date option is missing
    4) You create a formula to see if this is a date and it returns True. The formula you can try is :
    isdate(). It returns False for any other function like isnumeric() etc
    5) So, this is a date filed, or CR4E thinks this is a date field, however doesn't let us change the format
    6) You cannot use this field with date functions like cdate(); weird!
    7) The only way you can show it the way you want is to write this formula:
    *mid(,4,2)&"/"&left(,2)&"/"&Right(,4)*
    This is still a string field, however displays as MM/DD/YYYY.
    In Crystal Reports 2011, however, the following formula on the same date field returns a date value, meaning you can further right-click this formula field to change the date format like a normal date field:
    cdate(tonumber(Right(,4)),tonumber(mid(,4,2)),tonumber(left(,2)))*
    The same formula, however, throws a 'String is non-numeric error in CR4E and I found that it doesn't like this:
    *tonumber(Right(,4)) ; same error
    I've tried a lot of combinations to make this a date field in CR4E, however none works!
    So, the only option is to use the formula that I mentioned above.
    P.S: If you install Patch 2.10, you'll notice that the Characteristic value shows the correct date. For some reason though, it is in the same format as the 'Key' and if we wish to change the date format, the only possible workaround is to extract the numbers and join like I suggested above.
    Hope this helps!
    -Abhilash

  • E-mail or export pdf from report every day

    Hi
    My report is finished. Now i want that this report gets generated and get send by email every day at 02:00 am.
    I have Crystal Reports and Crystal Reports Server.
    When i open my report, i first have to do this. (i try to translate into english)
    Report  -->  Selection-expert  -->  (i have one sql command there,that selects just the value's of past day, or any other day)
    Tabel.ServerTimestamp is between 24/07/2009  00:00:00  and 24/07/2009  23:59:59
    Then i change the two value's, press OK and my report is up to date.
    So i want that every day, at 02:00 am, the report gets updated automatically with the values of pasted day. And email it to someone@somewhere
    Can you help me please.
    Thanks in advance.
    Deleersnyder Maarten

    Now my formula looks like this:
    {Table.ServerTimestamp} in DateTime (2009, 07, 27, 00, 00, 00) to DateTime (2009, 07, 27, 23, 59, 59)
    In what do i have to change it?
    Thanks
    Maarten
    Ah, I found it myself.
    What do i have to do when i want to email this report automatically every day at 02:00?
    Edited by: deleersnyderm on Jul 27, 2009 10:05 AM

  • Daily orders report (show day wise created, shipped, open orders)

    I have to create crystal report for the following
    Daily  orders - created, shipped, open (not processed till date) for a previous week (last seven days)
                                          Created                   Shipped                  Open
    Tuesday
    Wednesday
    Sunday
    Monday
    What is the best approach to accomplish this in crystal report?
    I appreciate your help

    Hi,
    I am guessing the values of Created, Shipped and Open are in a field like an OrderStatus.  You can create a group on the OrderStatus so the report is broken out by the different statuses. 
    Create a second group on the OrderDate.  You can set it to Group on Each Day. 
    In the Record Selection Formula you can create a formula like:
    {table.OrderDate} In LastFullWeek;
    This will have the report query your data for all records with an OrderDate from last week. 
    Good Luck,
    Brian

  • Account receivable summary report by day

    Hi expert,
    Is there any reports in SAP that can show account receivable by each customer by day?
    i.e.
    Customer A
    1 Oct: 1,000
    2 Oct: 2,000
    3 Oct: 1,500
    Customer B
    1 Oct: 3,500
    2 Oct: 2,000
    3 Oct: 4,500

    Hi:
            FBL5N....Open item date...also select normal and special GL transactions , date wise receivables can be sought from this report . BAPI_AR_ACC_GETKEYDATEBALANCE -
    >Customer account balance at a key date can also be used to generate date wise receivables from customer..
    Regards

  • Report - Return days since LAST activity

    Hi,
    I need a report that returns "All open SRs with the amount of days since the LAST completed activity of type X" (so we can see when the activity needs to happen again)
    I have managed to create a report that brings back "all open SRs with the amount of days since EVERY completed activity of Type X (so if the activity happened 10 times i get the report returning the SR 10 times).
    I was hoping i could use something like a min function in a pivot table to just return the days since the LAST one but am getting nowhere.
    Any ideas?!?!?!
    Thanks in advance
    Rich

    Hi Guys,
    I'm doing a similar report also.
    I have a analysis based on Activities that returns a list of service requests.
    I have inserted a column with a timediff function to tell me how many days old the activity is. e.g.:
    SR 1, act1, 2 days old
    SR 1, act2, 4 days old
    SR 2, act1, 6 days old
    SR 3, act1, 3 days old
    SR 3, act2, 9 days old
    Using a pivot table i display only the first activity for each SR.
    SR 1, act1, 2 days old
    SR 2, act1, 6 days old
    SR 3, act1, 3 days old
    However i now want to be able to sort the pivot table in descending order of the Day Old column.
    Unfortunately i can't get this to work.
    Any idea's?

  • Creating new report 1st day of each month

    Hello, all!
    I have a vi that I run to record pressure on test units.  I want to create a new excel report on the 1st day of each month.  If it is not the 1st day of the month I want to just add the data for each test unit as a new worksheet.  I have looked around and can't find a post for what I need to do exactly.  If anyone can help, greatly appreciate.

    Hey END82,
    I agree with RTSLVU's suggestion of using the Seconds to Date/Time vi. From there you can wire the day of the month into a case structure, and have the case for day number 1 to be where you create a new excel report and have the other default case add the data to the report. 
    I attached a VI Snippet which you can drag onto a block diagram to look at.
    Hope this helps!
    Joe S
    Applications Engineer
    National Instruments
    Attachments:
    date.png ‏13 KB

  • SAP MM Agewise Stock Standard report in Days

    <b>Dear MM Guys
                 In sap mm Any standard report available for Agewise stock in days. format. pls tell me..
    Regards
    Anandkumar.</b>

    Hi,
    There is no such report available in SAP at the most you can use MC46
    BUT IT DOES NOT PROVIDE AGEWISE ANALYSIS
    So you will have to develop Z report
    BR
    Diwakar
    reward if useful

Maybe you are looking for