Previous months requirement.
Any report or T-code for check previous months requirement.So please help me.
There is no standard t code for your requirement. go for ABAP development
Similar Messages
-
Getting data in a query on last date of all previous months
Dear Experts,
I need your help with a query.
I am trying to create a query which when run should pick the number of Open Sales Order on the last date of all the previous months from the start of company.
I could create the query for fetching the required data on last day of the previous month, say today is 25th June 2014, so my query only fetches data for May 31st 2014 but I need data for all previous month, May 31st 2014, April 30th 2014, March 31st 2014 & so on.
Please advise how to achieve this is SQL query.
Thanks & regards,
NitinHi,
Try this:
Select *
from(
SELECT T0.[DocNum] as #,t0.cardcode as C, t0.docdate
FROM ORDR T0
WHERE T0.[DocStatus] = 'o' and T0.[DocDate] = CONVERT(VARCHAR(10), DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,getdate())-1,0)),10) OR T0.[DocDate] = CONVERT(VARCHAR(10), DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,getdate())-2,0)),10) or T0.[DocDate] = CONVERT(VARCHAR(10), DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,getdate())-3,0)),10) or T0.[DocDate] = CONVERT(VARCHAR(10), DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,getdate())-4,0)),10) or T0.[DocDate] = CONVERT(VARCHAR(10), DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,getdate())-5,0)),10) or T0.[DocDate] = CONVERT(VARCHAR(10), DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,getdate())-6,0)),10) or T0.[DocDate] = CONVERT(VARCHAR(10), DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,getdate())-7,0)),10)
group by t0.cardcode,docdate,T0.[DocNum]) S
pivot
(count(#) for c in([cvt01],[cvt02],[cvt03],[cvt04],[cvt05],[cvt06],[cvt07],[cvt08],[cvt12])) P
Note: Replace Cvt01,02...with your customer code.
Thanks & Regards,
Nagarajan -
Defining last day of previous month in ABAP
All,
I am a BW guy and hardly know ABAP. I have a requirement where I have to calculate last day of previous month and use it in the routines of the transformations.
I have decided to define the Last day of previous month in Start routine and then use the global variable in Transformations to calculate further.
The logic that i have used is outlined below.
Define G_DATE in global declaration for further use in Transformations.
In the Routine section,
Assign G_DATE to SY-DATUM
G_DATE + 6(2) = '01' (Replace last to field of date with '01' to establish first day of the current month)
G_DATE = G_DATAE - 1 (To get to last day of previous month)
My dilemma is to implement this in ABAP in Start routine of transformations. Please include the exact ABAP code that would be needed in Declarations and Routine section.
Thanks in advance.Hi..,
Go with the function module: LAST_DAY_OF_MONTHS
So, Just determine the last month from the sy-datum and then use above function module and pick the last date of the month.
Thanks,
Naveen Inuganti. -
How to Include previous Month/Year in Transformation
Hi,
From Source System (DB Table;DB Connect)
Location_ID,EMP_ID,AMOUNT
There is no date field avaliable in the source system.
The Data load to BW will me Monthly frequency...I,e:Data will be loaded once in a Months on 1st of every month.
My requirment is to Include a date field in BW transformations which input previous month/year data for every record
How can i do that and wether do i need to write a start or field routine in transformations
Code please
ThanksHi Pal,
You could use the following code to achieve this:
DATA: v_calmonth(6) TYPE c,
v_month(2) TYPE c,
v_year(4) TYPE c.
v_month = sy-datum+4(2).
v_year = sy-datum+0(4).
IF v_month = 1.
v_year = v_year - 1.
ENDIF.
IF v_month = 1.
v_month = 12.
ELSE.
v_month = v_month - 1.
ENDIF.
CONCATENATE v_year v_month INTO result.
Hope this helps.
Thanks and Regards
Subray Hegde -
Is it possible to post the Excise invoice previous month date.
Dear All,
We want to post a excise invoice with previous month date. Is that possible?
We have created a billing document (VF01) last month (October) and not created Excise Invoice (J1IIN).
Now our finance people requirement is to create the excise invoice with last month date.
Kindly let me know whether it is possible.
Regards,
MullairajaYes quite possible provided your FI period is still open. Once you execute J1IIN and clicked the tab "Billing", you can see a field Posting Date where you maintain the billing document date itself if FI period is open.
But from excise point of view, this is wrong due to the fact that excise returns should be submitted on or before 3rd of every month in which case, the excise team would have submitted the returns for October.
thanks
G. Lakshmipathi -
How to get previous month data from current month values
Hi Experts,
I have made one universe from BW Query in which Fiscal year period is entered in interval.
I have made a universe from that and want to develop webI reports on top of that.
In my webI reports, i have used one cross tab. In Rows section i have added Company Code and in Column section i have used Fiscal Year/Period and in Value section i have added Sales Value. I want this value of previous month.
Requirement:
Ex.
Feb'09 Mar'09 and so on...
Comp_code1 Sales of Jan'09 Sales of Feb'0f and so on....
I am getting this.
Ex.
Feb'09 Mar'09 and so on...
Comp_code1 Sales of Feb'09 Sales of Mar'09 and so on....
I hope i have clear my requirements.
Please help as soon as possible.
Thanks in Advance,
RishitHi Rishit,
Follow the below steps to get the desired result.
Step1: Convert your fiscal year period from char to a date in your database or in your designer however its feasible.
to_date('substr('009.2009',2)','mm.yyyy')
you will get the result 01 sep 2009
Step2: Convert this format to 01/09/2009 by using date functions.
Step3: Create a Detail associated to the 'date' field (typically your fiscal period).
Step4: Create a cross tab Like : Rows section should have Company Code and in Column section should have 'date'(created detail) and in Value section should be Sales Value.
you should get the following result.
01/02/2009 01/03/2009 and so on...
Comp_code1 Sales of Feb'09 Sales of Mar'09 and so on....
Step5: Use the following formula in your Column (date) formula bar.
=(<date>-1)-DayNumberOfMonth(<date>-1)+1
You will get the following result:
01/01/2009 01/02/2009 and so on...
Comp_code1 Sales of Feb'09 Sales of Mar'09 and so on....
Format the cell according to your reruirement.
Let me know if you will get any break in the above steps.
Regards,
Swati. -
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,
RamyaFrom 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. -
Variable last date of previous month/last date of current month
Hello Experts,
I am facing an issue while designing a query.
Requirement is like this.
Report will be run on monthly basis.so on execution of report, it should prompt for month/year.
now on report there are two columns for which I have to get data on date basis(last date of previous month and Last date of current month).
Can anyone tell me is there any standard variable for this? what is it?
or how to achieve this?
Regards,
NiravHi,
See if this post in this forum can help you.
Re: Last date of a month
Regards
Shalabh Jain -
Display previous month value in report
Hi,
I have a requirement to display the previous month amounts on monthly basis. here is the example.
In the Cube I have data like this:
<b>Customer Month Amount</b>
C1 Jan 2004 $500
C1 Feb 2004 $600
C1 March 2004 $1000
I want to display in Report with another key figure to show the difference between current month and previous month. Report should look like:
<b>Customer Month Amount <i>Prev_Month_Amount <u>Diff</u>.</i></b>
C1 Jan 2004 $500 0 $500
C1 Feb 2004 $600 $500 $100
C1 Mar 2004 $1000 $600 $400
I have tried using restricted key figures.but it is showing the same amount in prev. moth amount colunm till feb 2004. anyone had similar req. please advise me.
Thanks in advance,
RamHi,
I can only think about a 2 structure approach with cell calculations.
This will result in a static report with 12 rows for each customer. Then you would need to use the new feature of zero supression, to hide those month where no data exists.
Heike -
Show data of last day of previous month against any day of current month
Hi,
I have fact table which contains data at date level (we have data for oct-2009 to april-2010). Our requirement is to show data of last day of previous month against any day of current month in obiee 11g. I am facing problem in Feb 2010 its picking data of 28-Jan-2010 instead of 31-jan-2010 and for April its picking data of 30-mar-2010 instead of 31-mar -2010.
Any suggestion ???You're asking to filter your data set to only include rows between:
1) last day of the previous month
2) any day of the current month
This can be achieved with prompting in OBIEE Answers.
last day of previous month = TIMESTAMPADD( SQL_TSI_DAY , -(1), TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( CURRENT_DATE) * -(1) + 1, CURRENT_DATE)) . The problem is you need to make query work within Oracle's Answer syntax.
In the prompt, select the operator type for your date dimension as 'between' and default to 'SQL Results'.
For the 'last day of previous month' , use the query:
SELECT
case when 1=0 then Time."Fiscal Date" else TIMESTAMPADD( SQL_TSI_DAY , -(1), TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( CURRENT_DATE) * -(1) + 1, CURRENT_DATE))
end
FROM ENTER_YOUR_PRESENTATION_FACT_FOLDER_HERE
For the current date, use the query:
SELECT
case when 1=0 then Time."Fiscal Date" else CURRENT_DATE
end
FROM ENTER_YOUR_PRESENTATION_FACT_FOLDER_HERE
Another option is to create a last_date_pervious_month variable in the RPD and have that as the default value in your prompt. -
Same date of previous month / Leap year
In my requirment , I am passing a date, I want a function module which will return me the same date of last month. I have found a function HR_PSD_DATES_ADD_MONTHS , but it is not giving output if I pass date as 31st March 2000 , as previous month is February and its a leap yr.
If you know function module which could help me , pls help me.Hello,
Try this way :
REPORT ZTEST_NP .
parameters: p_dt type d.
data:
lst_dt type d,
l_dt type d,
days type i,
prv_dt type d.
l_dt0(4) = p_dt0(4).
l_dt4(2) = p_dt4(2) - 1.
if l_dt+4(2) le '00'.
l_dt+4(2) = '12'.
endif.
l_dt6(2) = p_dt6(2).
CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
EXPORTING
DAY_IN = l_dt
IMPORTING
LAST_DAY_OF_MONTH = lst_dt
EXCEPTIONS
DAY_IN_NO_DATE = 1
OTHERS = 2
if lst_dt ge l_dt.
prv_dt = l_dt.
else.
prv_dt = lst_dt.
endif.
write: prv_dt.
regards,
Naimesh -
Need to show Previous months data in report
Hi All,
I have a crystal report 2011 which shows monthly Cash data. It has 3 other columns like Previous 3 months cash data, previous 6 months cash data, Previous 12 months cash data in report.
My report also has two parameters- start date and end date. If I give Start date as 1/1/2012 and end date as 12/31/2013 (two years date range) then correct data comes in all columns and for 2013 year, correct data is coming for Previous 12 months column. But if I give only one month date range like start date as 1/1/2013 and end date as 01/31/2013, then it is not showing correct data for these 3 columns - Previous 3 months cash data, previous 6 months cash data, Previous 12 months cash data. Ideally as per requirement, it should calculate previous months data regardless of parameter values and put data in respective columns.
Any help/suggestion? Any trick which can help me to show correct data in all columns no matter what date range or months I am taking in parameters.
Is it mandatory to have previous 12 Months data in report to calculate column-Previous 12 months Cash data?
Thanks,
RemiHi Remi,
You can try like this:
I have given a some suggestions i.e You just take one parameter only because u can imagine 3 columns previous data display correctly i.e From Date
Month parameter is also a alternate option.
For Ex: Column1: From Date - 90 Days/3 Months - we get the three months previous data correctly etc.
Finally, create a stored procedure that returns the required columns and does all the calculations on the database side.
Follow abhilash suggestion as well.
Useful threads: Crystal Report Parameter Issue
Pull Last 6 months of data
Month to date data for Previous month
How to find current month, previous month Net Sales by means of formula?
Thanks,
DJ -
Calculating receipts from previous month based on the sales of current mont
Hi Gurus,
I have a requirement where i need to display sales for a quarter and need to display receipts from the previous quarter. For example consider that i am displaying sales from week1-Aug to Week4-October, I need to display receipts ( R_Net_RCPTS) from Week1-july to Week4-September. In that way If i select Wk1-Aug for sales it should display Wk1-july receipts. i need to do this in Webi by creating appropriate variables.
I have got prompts on year and Fiscal Week
I have given year as 2011 and The "08: Fiscal Week From:" as "Wk1-Aug" to "08: Fiscal Week To:" as "Wk4-Oct"
I HAVE GONE THROUGH ALMOST ALL RELATED THREADS, BUT COULDN'T FIND ANY SOLUTION. ITS REALLY URGENT. PLEASE HELP ME AND I WILL FOR SURE GIFT POINTS.HI
Your explanation is not clear whether u want to display current quarter data or you would like to see only previous month data ?
Which dimension you are taking for week ? how data would be like ?
Edited by: K.sunil on Nov 21, 2011 9:14 AM -
How to download Standard Price of the Previous Months
Hi,
I have a request to download the standard prices of the previous month.
Below is the Example:
Material A having the current standard price of $ 100 in Jan,2011 and $ 90 in Dec,2010.
I can see the standard price of $90 under Accounting View 1 against "Period 12.2010" Tab.
I would like to know how can I download the previous month standard prices for the whole list of Materials using Tables or any standard Report.
PanduHi Pandu,
You can meet your requirement through SAP standard report. Find more details:
Use t-code: S_P99_41000111 - Analyze/Compare Material Cost Estimates.
Enter the below details in selction screen:
Plant,
Material................ To ................
Costing Variant,
Costing Date, Valid From (enter the range of dates. e.g. 01.10.2010 to 01.01.2011)
Costing Status = FR (Released Without Errors).
Execute the above selction.
Check in your output layout/change the layout to get Costing date (Key), Costing Status. Material, Plant, etc.
You will be able to view/download the current month & previous month standard prices.
Thanks & Regards,
ADI -
Regarding the first day of the previous month
hi experts,
suppose the date is '010406' what i want that is der any function module so that i can get the first date of the previous month i.e '010306' plz let me know......or sud i add logic for that if yes plz help me........better to use own logic for your requirement....
suppose you have date field
data : date1 like sy-datum,
mon(2) type n,
year(4),
prev like sy-datum.
date1 = '20070720'.
mon = date1+4(2).
year = date1+0(4).
if mon ne '01'.
mon = mon - 1.
concatenate year mon '01' into prev.
else.
mon = '12'.
year = year - 1.
concatenate year mon '01' into prev.
endif.
write : / prev.
if the date is like your format i.e. 010406 then
data : date1(6) value '010406',
mon(2) type n,
year(4),
prev like sy-datum.
date1 = '20070720'.
mon = date1+2(2).
year = date1+4(2).
if mon ne '01'.
mon = mon - 1.
concatenate year mon '01' into prev.
else.
mon = '12'.
year = year - 1.
concatenate year mon '01' into prev.
endif.
write : / prev.
regards
shiba dutta
Maybe you are looking for
-
IPhone 5s won't sync to iTunes
My iPhone 5s won't connect to my iTunes. I was able to get it to connect to my computer so I can pull up all of the pictures, but for some reason, it doesn't show up on my iTunes when I pull it up. I'm not sure what's going on. I haven't changed anyt
-
How can I get to email photos at higher resolution? My "iPhoto" or "Mail" automatically reduces photos to about 40 KB . My photos, taken with a common Panasonic Lumix DMC-TZ20 include flora which I send to a publisher. I am fairly new to my MacBook
-
How to send URL (of length 500 Characters) in SAP Mail??
Hi Everybody, I need to send the URL in SAP mail using FM SO_NEW_DOCUMENT_ATT_SEND_API1. The URL is of length 500 characters. Is there anyway I can send this URL in mail, even as attachment will do. The Mail is accepting 255 characters in one line.
-
Windows XP, Java and long filenames when running application from a server
Hi, I've been struggling with this for a while, can't understand why Windows XP seems to give me 8.3-filenames with ~ (tilde) instead of the full file- and path-names. I've added a key in the registry, when a user right-clicks on a txt-file they get
-
Oracle Database 10g JDBC Samples on OTN
Review the OTN's new Oracle Database 10g JDBC Samples that illustrate new features introduced with Oracle10g JDBC Driver. The features illustrated are Connection Cache, Named Parameter Support, IEEE Datatypes, Thin Driver support for PLSQL Index by T