TO FIND OUT SALES FOR PREVIOUS MONTHS

Hi,
I need to determine the previous period from the current period , is there any function module to derermine to subtract the period of month from the current month.
thanks ,
ravi.s

Hi Ravi,
just pass on the variable and you'll get what u need,
Hope thuis helps,
Thanks,
Arun N
91 9443167531
form current_week_number chngng p_week_no.
data: l_dys_crnt type i,
            l_dys_yr type i.
data: l_yr_begin type d.
concatenate sy-datum+0(4) '0101' into l_yr_begin.
l_dys_crnt = sy-datum.
l_dys_yr = l_yr_begin.
l_dys_crnt = l_dys_crnt - l_dys_yr.
p_week_no = l_dys_crnt / 7.
endform.

Similar Messages

  • Need reporting logic for Previous months sales compared to current month

    Dear Folks,
    I need to design a report that  should give cumulative sales for the month compared with cumulative sales for the same date for previous months e.g. Sales upto 21st May should be compared with sales from 1st to 21st April, from 1st March to 21st March and so on.
    Can anyone provide me a logic or CMOD code how to develop this report.
    Will be great helpful.
    Thanks in Advance.
    Rakesh

    Hi Rakesh,
         To accomplish the required output, you need to create variables that are input enabled and of processing type user eixt in the columns of your report in the query designer. I am assuming that, you would have atleast one variable which is input enabled and of processing type manual entry.
    The user would input a date ( for example may 21) in this variable. You need to capture this value in the user eixt in I-STEP 2. From this value you need to calculate the previous month and pass it to the user exit variable. Below is a sample code,
    ----variable ZPREVDATE:pass the to value from variable ZCURRDAT -
    DATA : LV_CALDAY TYPE SY-DATUM,
               LS_T_VAR_RANGE TYPE i_t_var_range,
               LV_YR(4), LV_MN(2), LV_DY(2).
    WHEN 'ZPREVDATE'.
    IF i_step = 2.
          READ TABLE i_t_var_range INTO LS_T_VAR_RANGE
          WITH KEY vnam = ZCURRDAT'.
          LV_CALDAY = LS_T_VAR_RANGE-high.
          LV_YR = LV_CALDAY+0(4).
          LV_MN = LV_CALDAY+4(2).
          LV_DY = LV_CALDAY+6(2).
    LV_MN = LV_MN - 1.
    CONCATENATE LV_YR LV_MN LV_DY INTO LV_CALDAY.
          ls_range-low = LV_CALDAY.
          ls_range-opt = 'EQ'.
          ls_range-sign = 'I'.
          APPEND ls_range TO e_t_range.
    ENDIF.
    The above code is a rough code that would help you to acheive your logic
    Regards,
    Prem

  • Check 3G data usage for previous months?

    Where do I go to check my 3G iPad2 data usage for previous months?
    I look in the Settings / Cellular Data / View Account - but only see the current month.
    I tried to create a My Verizon account on the verizon wireless web site using my iPad phone number but I get the error "We're sorry, but at this time you cannot register your account for My Verizon. Please access your account information on your device."
    I installed the "My Verizon" app for ipad from the App Store but I get "System under maintenance.  Please Try again." all the time.
    Is there someplace else I can see previous months data usage?  I would like to get a sense how much I have used in the past.
    Thanks
    Joe

    Dear AdamE+VZW and AntoniioC_VZW
    Have you actually tried the advice you gave?  I'm 6 days into my billing cycle.  The furthest back I am able to see data traffic is 6 days.
    The specific navigation path "View Bill --> I Want To...  --> Month ---> Usage Details --> Data"  does not currently exist.
    As far as I can tell, AdamE's claim that "You can easily see the past six months of data usage on our website " is untrue.
    The report generated by the "Account Analysis" is plainly false as well.  It reports that both of my data phones used exactly 1024.00 MB in February, March, and April. (sic: 2 decimal points!!).  That is an exceedingly unlikely coincidence, and flatly contradicts the current month summary which reports that one of my phones has used only 23 MB, and the other line even less.  The "Account Analysis" has a bug so serious as to render its data traffic output absolutely useless.  Since it is providing false output, it should be removed from the site until it can be fixed to generate accurate reports.
    I can't even find a way to see my prior month's summary bill, though I can't be sure it is unavailable since the site is large.  But I can say that when a customer spends 15 minutes clicking around a site trying to find their prior month's bill (not merely the bill's dollar amount, but the bill's usage summary) and fails, the site navigation should be improved!!

  • SAP XI runtime workbench doesnot display data for previous months

    Hi,
    We are experiencing an issue in our XI system. When we try to extract messages from the Integration engine we recieve data only for two months including the present month and not for previous months.
    Can you pleaes suggest which SAP job or any set parameter is creating such a scenario.
    Thanks in advance and suggestion are welcome.
    Regards,
    Subhram

    You should check the archiving/deletion jobs in the PI Admin Check guide..
    Kind regards,
    Mark

  • Statement of CST Sales for the Month.....

    Hi All,
    I have to make a report named "Statement of CST Sales for the Month....." for one of my client. This report contains the fields CST Payable and CST Paid (invoice wise). Please help me by telling where can I get CST Paid per invoice (Table Name, Field Name).

    hi,
    You can get it from TaxSum from Table PCH4 with staType for CST.
    Try this query
    SELECT T0.DocNum as 'Ap INV. No.', T0.DocDate, T0.CardName as 'Vendor Name',
    T1.TaxSum AS 'CST on Purchase'
    FROM [dbo].[Opch]  T0 INNER JOIN pch4 T1 ON T0.DocEntry = T1.DocEntry WHERE T1.staType = 4
    Jeyakanthan

  • HT1657 Is there a way to search for movie rentals only? I don't want to buy movies and I'm tired of clicking on a movie only to find out its for purchase only

    Is there a way to search for movie rentals only? I don't want to buy movies and I'm tired of clicking on a movie only to find out its for purchase only?

    The best solution I've come across so far is to dump all movies into a shareware app called iVI. It'll show whether each movie has subtitles or not.

  • How to find out Sales organization of a sold to party from tables

    Hi all experts, I have the following questions:
    1. How to find out Sales organization of a sold to party using tables?
    2. Also please tell any function module which gives relationship between sold-to-party and sales organization to which it belongs.

    Hi,
    Check table CRMM_BUT_LNK0141 to obtain the sales area of a BP (by BP Guid).
    If you need the sales office and sales group, read GuidSet of that table and check table CRMM_BUT_SET0140 to list the sales office and sales group by that Guid set.
    There are some function modules too:
    CMS_BUPA_ORGDATA_GET_BL among others.
    Regards,
    Susana Messias

  • Problem in measure for previous month

    i have columns like following
    d_name Value
    JAN-11 4586236
    FEB-11 2121512
    MAR-11 32121
    APR-11 12121
    p_name is varchar2 type
    Now i need value for previous month can u do it without using queries or obiee
    I am unable to build hierarchy cause of its type. any suggesions

    You might have month numbers in rpd, use ago function to get previous month value

  • Billing call data for previous months

    I have always been on paperless billing to save money. As Kerry said in a previous post to encourage paperless billing:
    "Get organised
    Signing up to paper-free billing with My BT can save you time – and it makes finding your latest bill much easier than searching through endless cabinets and drawers for that elusive bit of paper.  Copies of your bills are stored online for 15 months, so they're always there to view, download and print when you need them. One secure online log-in gets you instant access to your bill.:"
    I now find that you can only look at call data for the latest months bill. It is no good having paperless billing if you have to use loads of your own paper to print out all the data.

    Patty-L wrote:
    @    john46  You could of course store the data on your computer in pdf format each month I do  and can go back years.
    Thank you John for the information it has worked (I can now save on paper usage)    
    Regards Pat
    And Ink, and wear and tear on the printer
    toekneem
    http://www.no2nuisancecalls.net
    (EASBF)

  • Need help with SQL retrieval for previous month till current date

    Hi ,
    Need help generating statistics from previous month from date of enquiry till current date of enquiry.
    and have to display it according to date.
    Date of enquiry : 03/02/2012
    Application Type| 01/01/2012 | 02/01/2012 | 03/01/2012 |...... | 31/01/2012 | 01/02/2012 | 02/02/2012 | 03/02/2012 |
    sample1 20 30 40
    sample 2 40 40 50
    sample 3 50 30 30
    Hope you guys can help me with this.
    Regards

    Hi,
    932472 wrote:
    Scenario
    1)If i run the query at 12 pm on 03/2/2012. the result i will have to display till the current day.
    2)displaying the count of the application made based on the date.
    Application type 01012012 | 02012012 | 03012012 | ..... 01022012| 02022012|03022012
    sample 1 30 40 50 44 30
    sample 2 35 45 55
    sample 3 36 45 55Explain how you get those results from the sample data you posted.
    It would help a lot if you posted the results in \ tags, as described in the forum FAQ. {message{id=9360002}
    SELECT     application_type as Application_type
    ,     COUNT (CASE WHEN created_dt = sysdate-3 THEN 1 END)     AS 01012012 (should be getting dynamically)
    ,     COUNT (CASE WHEN created_dt = sysdate-4 THEN 1 END)     AS 02022012
    ,     COUNT (CASE WHEN created_dt = sysdate-5 THEN 1 END)     AS 03022012
    , COUNT (CASE WHEN created_dt = sysdate-6 THEN 1 END)     AS 04022012
    FROM     table_1
    GROUP BY application_type
    ORDER BY     application_typeThat's the bais idea.
    You can simplify it a little by factoring out the date differences:WITH got_d     AS
         SELECT     qty
         ,     TRUNC ( dt
              - ADD_MONTHS ( TRUNC (SYSDATE, 'MON')
                        , -1
              ) AS d
         FROM table1
         WHERE     dt     >= ADD_MONTHS ( TRUNC (SYSDATE, 'MON')
                        , -1
         AND dt     < TRUNC (SYSDATE) + 1
    SELECT     SUM (CASE WHEN d = 1 THEN qty END)     AS day_1
    ,     SUM (CASE WHEN d = 2 THEN qty END)     AS day_2
    ,     SUM (CASE WHEN d = 62 THEN qty END)     AS day_62
    FROM     got_d
    See the links I mentioned earlier for getting exactly the right number of columns, and dynamic column aliases.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • No Posting Block for FB50 for Previous Month Period

    Hi All,
    Unexpected Behavior : SAP allow posting to previous period in SAP as shown below with below message. (OB52 period been closed for the previous month.)
    Extra Information : Fiscal Year for the company is from 01.04.2013 to 31.03.2014, 01.04.2014 with new fiscal year.
    Please guide any settings been missed out.
    Thank for the guide.

    Hi Ravi,
    Below is our OB52 screen shot. Referring to 0100, only period 1,2016 is opened.
    We tested to post to 15.03.2012, which is actually period 3,2013. System prompt a warning message and we are able to post.
    Result of posting.
    Kindly advice.
    Thanks.
    Regards,
    Chew

  • Month name displayed in month calendar view for previous month

    In iPad IOS 7.04 iCal month view the month name displayed at the top of the window is incorrect. The previous month name show when viewing a calendar month. Test by selecting year view and the any month from the year. The month view will be for the selected month, but the month name will be for the preceding month. The incorrect month name in month vie is also displayed if the month view is scrolled to new months.
    I observe this on my iPad II.
    Ha s anyone seen this error? Does anyone know if Apple has seen this and has a plan to correct it?

    Imhave the same exact problem on my iPad2.  It was not fixed in the recent iOS 7.1 release, even though modifications were made to the calendar app.  Very frustrating, since this is such an easily observable problem.

  • How to show a report for 'Previous Month' Data

    Hi Gurus,
    I have a requirement, where i have to default my report to show previous month data.
    Scenario:
    My prompts by Default are set to CURRENT (current year,quarter,month). once the user logs in, the report should display data for month 'Nov' instead of 'Dec'.
    I tried using TIMESTAMPADD() in the formula , but it didn't work, though i don't see any error. Not sure if i 'm missing something.
    Is there a way to achieve this.I 'm using OBIEE 11.1.1.6.
    Any help is highly Appreciated ! Please.
    Thanks,
    Ramya

    From what you wrote I am assuming the user can manually save the report results to the Excel file.
    If your report uses ALV Grid it is possible to export the data to a spreadsheet (one of the functions available in the ALV tool bar).
    If you have used WRITE statements it is also possible to save the output as a spreadsheet (menu System -> List -> Save), but the latter will not produce as nice a spreadsheet if the data don't form a matrix. In other words, some work may be necessary in the spreadsheet afterwards before it has the format your user wants.

  • How to find out the userid  is ddic,  how to find out thepassword for this.

    hi
      i am mohan. We user-id is DDIC. we forgot the password for this user id. how to find out the password for this. we find the table for this usr02. but it is hexa decimal code. how to find that code

    hi
      check these threads
    Re: Check SAP username and password.
    Re: Validation of user name, pwd  in ZXUSRU01 exit
    if helpful, reward
    Sathish. R

  • How can i find  out field for a particular component type

    hi,
    how can i find out for particular component name is belongs to this field.....that means REF_DOC_NO componemt is belongs to xblnr field ..../.if we know only component type ...how to find the field...
    plz tell me
    thanks&regards,
    kalyan

    keep the cursor on component
    press F1
    select technical information
    you will find the field name and table or structure name
    regards
    sateesh

Maybe you are looking for

  • Need help to choose a DAQ for simultaneous sampling

    We need to choose a DAQ for simultaneous sampling. The restrictions are: a) 2 channels b) The signals on both channels are not continuous. A valid input on the channels is signaled by a falling edge in a third line that can be used as a trigger. c) T

  • Displaying a theme-based FOI layer as a whole image with javascript API v2

    Hi, I have looked the Oracle maps V2 tutorial developed in mvdemo.war application provided with Oracle Mapviewer v11.1.1.7. I have looked how to use theme-based FOI layers and I have not found how to set the "whole image" property for these layers. T

  • Hp Printer Control App

    I have got a HP ENVY 4502 priner, i installed the hp printer control app it has quit workin and the store cant repair it so i went to uninstall it from the apps and all it says there is remove from start its not givin me choice to uninstall what do i

  • Cant  we create a custom PA infotype whose size is more than 1000 chars?

    can we create a custom PA infotype whose size is more than 1000 characters i have tried this way i have given 4 fields in PM01 transaction with the data element 255 so the total size is 1020 it is throwing an error. pls help......

  • Trouble Opening CS6 Files

    We upgraded from CS5.5 to CS 6. Whenever we click on a file to open, it asks to "Open With."  The desired program is not an option, so we browse to locate it.  Nevertheless, the file still can not be opened with the right program.  To open it, I have