Creation of Varinat with date range form date to to date
Hi,
i want to create a variant with requirement :
form date:01/04/2010(this date is fixed) and To date will be system date.
this varinat will be scheduled in background , so that at the time of scheduled TO date will be system date.
i have chose selection variabe T: Table Variable from TVARVC , but unable to Set To date as system date.
please suggest ,
regards,
Manoranjna
Hi
You may use Dynamic date selection and choose the option as Starting date of the current month..
Another option is custom selection criteria where start date can be fixed and 'To date' can be made as current date.. this option is least priority.
Thanks
JK
Similar Messages
-
EasyDMS - search by date range for characteristics of type date
Hi Folks,
I have a characteristic of type date in the additional data of a DMS document. If I enter the date (for example validity date) as 08/31/2009 and search using cv04n and give a date range for the characteristic (i.e. 01/01/2009 - 12/31/2009), the search result will bring up the document.
However, I cannot do this from the EasyDMS find function. I need to specify an exact date. This is not very helpful for user who need to find documents with a validity date between 01/01/2009 - 12/31/2009 for example. Is there a way users can search for date range in EasyDMS find function?
Thanks,
LashanTo search a date range with EasyDMS Client you have to set the registry key
\HKEY_CURRENT_USER\Software\SAP\EasyDms\Generel\DateSearchPick to Value 0
Then you can use the input field like in SAP-Gui. (01.01.2009-31.01.2009)
If you set the value to 1 or the key is not defined you can only search for one specified date.
If you don't find this key on your PC create it as dword.
Maybe you must restart you PC for takeing effect.
Hope this will help you.
Regards Wolfgang -
Given various date ranges, count the occurrences of dates in PL/SQL
i have a table of employees that have a start date and end date on a project. Some employees end date is null because they are still working on the project. So I want to find for each day in JAN, how many people on working on the project.
So I generate the dates JAN 1 - 31 with this:
Declare
days DATE := To_Date('01-JAN-11','dd-mon-yy');
BEGIN
FOR days IN 1..31
LOOP
Dbms_Output.Put_Line(TO_CHAR(days ,'dd-Mon-yy'));
days := days + 1;
END LOOP;
END; For employee X (ID 123), his start date is 1st and end date is 4th. So I use this query to list the dates he worked on (Jan1 jan2 jan3 jan4):
DECLARE
da Number;
days Date;
sta emp.start%Type;
BEGIN
Select end-start+1
Into da
From emp
where emp_id = 123;
Select start
Into sta
From emp
Where emp_id = 123;
days := To_Date(sta,'dd-mon-yy');
FOR i IN 1..da
LOOP
Dbms_Output.Put_Line(TO_CHAR(days ,'dd-Mon-yy'));
days := days + 1;
END LOOP;
END;Now the problem I am having is trying to do a for loop to check the work days from each employee in the table. I guess I need to iterate over the employee IDs. The above code, I entered the empoyee ID myself to find his work days, but I am trying to loop over all the employees to find and count the days. Any help on this part?
Ultimately I am trying to get this:
Day Count
Jan 1 5
Jan 2 3
Jan 3 1
Jan 31 5select project_id,
dt,
nvl(count(emp_id),0)
from employee_projects,
(select date '2010-12-31' + level dt from dual connect by date '2010-12-31' + level <= date '2011-01-31')
where dt between start_date(+) and nvl(end_date(+),sysdate)
group by project_id,
dt
/SY.
Edited by: Solomon Yakobson on Jan 18, 2011 5:01 PM -
Date Range: Select which Qtr a date falls into
Hi All
I am looking for some code that takes a date passed into a variable and calculates which Quarter it is in.
My client uses Quarters:
Feb - Apr (Q1)
May - Jul (Q2)
Aug - Oct (Q3)
Nov - Jan (Q4)
So, if I pass a date of 21-Mar-2007 into the Variable, the code takes the date, calculates that the date is in Q1 and then returns the date of 200702 (the YEAR/ MONTH of the First Month in the Quarter) into the BW report.
I have searched the forums and can't find anything that would work, so you help is much appreciated.
DGHi Ajay
Thanks very much for your response.
I'm having a few difficulties getting the code to work in our environment, so was hoping you could help me tune it.
Input is Current Month
Output is First Month of Current Quarter
So, using this code, how can I pass the input date into the code?
(I'm sorry if this is obvious, I'm really new to SAP Development, so the answer may be and most probably is really obvious) -
*Credit Control Data reome form sale order header data*
Hi
have any option for remove credit data from sale order header (VBAK-KKBER)?
Thanks
L.CHi Lalith,
Its not possible to delete KKBER Data from Sales Order.
because it carries out from customer master XD01 and FD32
if you want remove, if the sales order is open status delete the same and delete it from customer master and again raise the sales order and check the same,
Thanks and Best Regards,
Muralidharan S -
Regarding date ranges in search criteria in oracle forms
I am using employee number,name, person type, and date ranges as search criteria in custom form.
when I enter employee number, hit the find button, I am getting the exact info in the result block.
Result block contains
employee name,personid,emp numb,org,start_date.
Similarly when I enter employee number,dept, I am getting correct values.
My question here is, when I enter date range. Iam unable to filter data.
When i enter START_DATE between nvl(:BLOCKNAME.START_DATE,'01-JAN-1901') and nvl(:BLOCKNAME.END_DATE,'31-DEC-4712') at where clause in the result block. I got data for the date range also.
if I give condition in the where clause, results are taking so much time when i search with employee name,number,dept,person type.
If i query with date, persormance is good.
Do u any know,how to prevent START_DATE between nvl(:BLOCKNAME.START_DATE,'01-JAN-1901') and nvl(:BLOCKNAME.END_DATE,'31-DEC-4712') when we search with employee name,number,dept,person type.Initailly Ididnt given any code in the where clause of the result block. I got data in the result block when i search with employee name,number,person type,dept etc except date range.
If i give date range, irrespective of the date, getting all the data.
after that i added code to the where clause of the result block. Now i am getting data for everything.
like, when i query with employee name,number,even date range also.
My question here, performance.
when I query with date range, data is coming in expected time in the result block.
when i query with dept, taking much time since date range logic exist in the where clause of the result block.
I need to restrict the where clause only to the data ranges. Where clause should not necessary for employee number,name,person type dept search criteria
Tahnks for your reply -
Check a number range with date range.
i have table test which is having column
Start Range
End Range
Start Date
End date
how can i check start range and end range does not exists b/w existing record also with date range of this record.
end date can be blank also.990690 wrote:
i have table test which is having column
Start Range
End Range
Start Date
End date
how can i check start range and end range does not exists b/w existing record also with date range of this record.
end date can be blank also.Your question makes absolutely no sense whatsoever. We could make guesses, but then we may be wrong in our guesses.
Please provide sufficient details for people to be able to help you. Read the FAQ: {message:id=9360002} -
Ical searches with specific date range
We post the people who are to work at specific events in the notes field of ical. Is there a way to search for these peoples names on the web via ical.php within a specific date range? No matter what date I have set to look at on the calendar the search grabs everything in the past. I only want future events that this person is associated with. Thanks for helping if you can. Jake
Hi,
You want to run the report on specific date without 0CALDAY?. Without 0CALDAY you can't restrict the report for specific day. So you must insert 0CALDAY in report and then use Offsets or implement code in CMOD.
Thanks
Reddy -
Skip Weekends when Inserting Date Ranges
I am working on an application where I am populating a
database with a date range based on a start date and an end date.
The user enters the start and end dates, submits the form, and then
I want to populate the database with all of the dates in the range,
including the start date and the end date. This piece is working
fine. The problem I'm having is, I cannot figure out a way to skip
weekends and populate ONLY weekdays. Can anybody help???The functions DayofWeek or DayOfWeekAsString will identify
the weekends for you. -
Hi Experts,
I have created a linked server to connect to mysql DB . The query is executing fine currently filter is based on the on going month.
The query actually fetches the records from 2 tables User and time sheet to find how many hours the users have .
Now we check the Hours for a period of 10th of the current month and 10th of the upcoming month .
So for now date range will be between 2014/10/05 and 2014/10/06. This logic i have implemented in the query .
Based on the query a report is generated which is sent out every Wednesday .Now suppose its 5th of June 2014 .
The query will fail because the date range is derived based upon
where cast(t.created_on as Date) > Concat(year(now()),"-",month(now()),"-","10")
AND cast(t.created_on as Date) <=Concat(year(now()),"-",month(now())+1,"-","10")
Please provide with a date filter like the report runs anytime the data is not affected. Like if the report is run in the
first week of a new month date range should be previous month Date 10 and current month Date 10 and if the report is run after 10th of the current month then the date range should be between 10th of current month and 10 of upcoming month . Kindly
help
Select * From
OPENQUERY
(Mysql,
'Select
Sum(t.hours),
Concat(u.firstname," ",
u.lastname) as Name
From mysql.time_entries t
Inner Join
users u
on u.id = t.user_id
where cast(t.created_on as Date) >
Concat(year(now()),"-",month(now()),"-","10")
AND
cast(t.created_on as Date) <=Concat(year(now()),"-",month(now())+1,"-","10")
Group By u.firstname,u.lastname
Union all
Select Sum(0) as hours,
Concat(firstname," ",
lastname) as Name
from users
where id not in(
Select
t.user_id
From mysql.time_entries t
Inner Join
users u
on u.id = t.user_id
where cast(t.created_on as Date) >
Concat(year(now()),"-",month(now()),"-","10")
AND
cast(t.created_on as Date) <=Concat(year(now()),"-",month(now())+1,"-","10"))
And firstname not in( "xyz")
GRoup by firstName,lastname'
goI recommend use CLOSED-OPEN dates rather than OPEN-CLOSED dates...
Hopefully this helps with your logic:
DECLARE @ReportDate TABLE
[ReportDate] DATE,
[mDay] AS DAY([ReportDate]),
[Beg] AS DATEADD(month, CASE WHEN DAY([ReportDate]) < 10 THEN -1 ELSE 0 END, [ReportDate]),
[End] AS DATEADD(month, CASE WHEN DAY([ReportDate]) < 10 THEN 0 ELSE 1 END, [ReportDate]),
[ReportBeg] AS DATEADD(month, CASE WHEN DAY([ReportDate]) < 10 THEN -1 ELSE 0 END, DATEADD(day, 10 - DAY([ReportDate]), [ReportDate])),
[ReportEnd] AS DATEADD(month, CASE WHEN DAY([ReportDate]) < 10 THEN 0 ELSE 1 END, DATEADD(day, 10 - DAY([ReportDate]) + 1, [ReportDate]))
INSERT INTO @ReportDate(ReportDate)
VALUES
('7-May-2014'),
('10-May-2014'),
('15-May-2014');
SELECT
CASE WHEN SYSDATETIME() >= [ReportBeg] AND SYSDATETIME() < [ReportEnd] THEN 1 ELSE 0 END
FROM @ReportDate; -
Using analytical function to calculate concurrency between date range
Folks,
I'm trying to use analytical functions to come up with a query that gives me the
concurrency of jobs executing between a date range.
For example:
JOB100 - started at 9AM - stopped at 11AM
JOB200 - started at 10AM - stopped at 3PM
JOB300 - started at 12PM - stopped at 2PM
The query would tell me that JOB1 ran with a concurrency of 2 because JOB1 and JOB2
were running started and finished within the same time. JOB2 ran with the concurrency
of 3 because all jobs ran within its start and stop time. The output would look like this.
JOB START STOP CONCURRENCY
=== ==== ==== =========
100 9AM 11AM 2
200 10AM 3PM 3
300 12PM 2PM 2
I've been looking at this post, and this one if very similar...
Analytic functions using window date range
Here is the sample data..
CREATE TABLE TEST_JOB
( jobid NUMBER,
created_time DATE,
start_time DATE,
stop_time DATE
insert into TEST_JOB values (100, sysdate -1, to_date('05/04/08 09:00:00','MM/DD/YY hh24:mi:ss'), to_date('05/04/08 11:00:00','MM/DD/YY hh24:mi:ss'));
insert into TEST_JOB values (200, sysdate -1, to_date('05/04/08 10:00:00','MM/DD/YY hh24:mi:ss'), to_date('05/04/08 13:00:00','MM/DD/YY hh24:mi:ss'));
insert into TEST_JOB values (300, sysdate -1, to_date('05/04/08 12:00:00','MM/DD/YY hh24:mi:ss'), to_date('05/04/08 14:00:00','MM/DD/YY hh24:mi:ss'));
select * from test_job;
JOBID|CREATED_TIME |START_TIME |STOP_TIME
----------|--------------|--------------|--------------
100|05/04/08 09:28|05/04/08 09:00|05/04/08 11:00
200|05/04/08 09:28|05/04/08 10:00|05/04/08 13:00
300|05/04/08 09:28|05/04/08 12:00|05/04/08 14:00
Any help with this query would be greatly appreciated.
thanks.
-peterafter some checking the model rule wasn't working exactly as expected.
I believe it's working right now. I'm posting a self-contained example for completeness sake.I use 2 functions to convert back and forth between epoch unix timestamps, so
I'll post them here as well.
Like I said I think this works okay, but any feedback is always appreciated.
-peter
CREATE OR REPLACE FUNCTION date_to_epoch(p_dateval IN DATE)
RETURN NUMBER
AS
BEGIN
return (p_dateval - to_date('01/01/1970','MM/DD/YYYY')) * (24 * 3600);
END;
CREATE OR REPLACE FUNCTION epoch_to_date (p_epochval IN NUMBER DEFAULT 0)
RETURN DATE
AS
BEGIN
return to_date('01/01/1970','MM/DD/YYYY') + (( p_epochval) / (24 * 3600));
END;
DROP TABLE TEST_MODEL3 purge;
CREATE TABLE TEST_MODEL3
( jobid NUMBER,
start_time NUMBER,
end_time NUMBER);
insert into TEST_MODEL3
VALUES (300,date_to_epoch(to_date('05/07/2008 10:00','MM/DD/YYYY hh24:mi')),
date_to_epoch(to_date('05/07/2008 19:00','MM/DD/YYYY hh24:mi')));
insert into TEST_MODEL3
VALUES (200,date_to_epoch(to_date('05/07/2008 09:00','MM/DD/YYYY hh24:mi')),
date_to_epoch(to_date('05/07/2008 12:00','MM/DD/YYYY hh24:mi')));
insert into TEST_MODEL3
VALUES (400,date_to_epoch(to_date('05/07/2008 10:00','MM/DD/YYYY hh24:mi')),
date_to_epoch(to_date('05/07/2008 14:00','MM/DD/YYYY hh24:mi')));
insert into TEST_MODEL3
VALUES (500,date_to_epoch(to_date('05/07/2008 11:00','MM/DD/YYYY hh24:mi')),
date_to_epoch(to_date('05/07/2008 16:00','MM/DD/YYYY hh24:mi')));
insert into TEST_MODEL3
VALUES (600,date_to_epoch(to_date('05/07/2008 15:00','MM/DD/YYYY hh24:mi')),
date_to_epoch(to_date('05/07/2008 22:00','MM/DD/YYYY hh24:mi')));
insert into TEST_MODEL3
VALUES (100,date_to_epoch(to_date('05/07/2008 09:00','MM/DD/YYYY hh24:mi')),
date_to_epoch(to_date('05/07/2008 23:00','MM/DD/YYYY hh24:mi')));
commit;
SELECT jobid,
epoch_to_date(start_time)start_time,
epoch_to_date(end_time)end_time,
n concurrency
FROM TEST_MODEL3
MODEL
DIMENSION BY (start_time,end_time)
MEASURES (jobid,0 n)
(n[any,any]=
count(*)[start_time<= cv(start_time),end_time>=cv(start_time)]+
count(*)[start_time > cv(start_time) and start_time <= cv(end_time), end_time >= cv(start_time)]
ORDER BY start_time;
The results look like this:
JOBID|START_TIME|END_TIME |CONCURRENCY
----------|---------------|--------------|-------------------
100|05/07/08 09:00|05/07/08 23:00| 6
200|05/07/08 09:00|05/07/08 12:00| 5
300|05/07/08 10:00|05/07/08 19:00| 6
400|05/07/08 10:00|05/07/08 14:00| 5
500|05/07/08 11:00|05/07/08 16:00| 6
600|05/07/08 15:00|05/07/08 22:00| 4 -
Hi Experts,
I have a complex requirement for a date range functionality.
Here is the detailed explanation:
I have field TransactionDate field coming from an Oracle View.
I have 2 parameters to be created on the same field and either of them can be selected but not both and both can be blank even.
1. Transaction date on or before
2. Transaction Date Range
We may have values for only one prompt at any given point.
If the user enters value for Transaction date on or before, then report should display data less than or equal to the date entered.
If the user enters values for the Transaction Date Range, report should display date between the user entered dates.
If none is entered report should display data for all dates.
Now, when the Transaction Date Range has same values in Start of Range and End of Range, we need to display the record for maximum(Transaction Date) under a particular account, irrespective of the dates specified, i.e if the user enters current date in Start of Range and End of Range and there will be no records for this date. In this scenario, report should display the maximum(Transaction Date) for that account.
I've tried all of I could, but ending up with a blank report.
Any suggestions will be of great help. Thanks in advance.
NareshHI Naresh,
Have you tried this,
add 'maximum' infront of this '...... {DBVW.DT} <= CurrentDate' condition
if(({@FrmBalDt}(NotEqualto)" " and {@ToBalDt}(NotEqualto)" ") and ({@FrmBalDt} = {@ToBalDt})
and MAXIMUM({DBVW.DT} )<= CurrentDate)
then maximum({@BalDate})
else {@BalDate}
if it is not working, Check where the condition is failing..
or else try this also
(not HasValue({?Client Id}) OR {DBVW.CLID} = {?Client Id}) and
(not HasValue({?Base Currency Code}) OR {DBVW.BCCYCOD} = {?Base Currency Code}) and
(not HasValue({?Account Type}) OR {DBVW.ACDES} = {?Account Type}) and
(not HasValue({?Legal Entity Name}) OR {DBVW.CUST} = {?Legal Entity Name}) and
(not HasValue({?Account Currency}) OR {DBVW.CCY} = {?Account Currency}) and
(not HasValue({?Account Number}) OR {DBVW.ACNO} in {?Account Number}) and
(not HasValue({?Account Group}) OR {DBVW.ACGRP} = {?Account Group}) and
(not HasValue({?Show Latest Statement on or before}) OR {DBVW.DT} <= {?Show Latest Statement on or before}) and
(if {?Activity Only} = "True" then ({DBVW.CT_CR} <>0 or {DBVW.CT_DB}0)
ELSE if {?Activity Only} = "False" then ({DBVW.CT_CR} >=0 or {DBVW.CT_DB}>=0)) and
(if {?Business Days Only} = "True" then (not(datepart("w",{DBVW.DT}) in 7,1) and
(not HasValue({?Balance Date Range}) OR {@BalDate} = {?Balance Date Range}))
else if {?Business Days Only} = "False" then ((not HasValue({?Balance Date Range})
Up to this copy paste of your formula
OR {@BalDate} = (if maximum({?Balance Date Range})>maximum({DBVW.DT} ) then maximum(date({DBVW.DT} )) else {?Balance Date Range}))))
i think this may work, without your second formula
regards,
Salah
Edited by: salahudheen muhammed on Sep 11, 2009 4:56 PM
Edited by: salahudheen muhammed on Sep 11, 2009 5:02 PM -
Hi All,
I have requirement to write code for date range.
Characterstic = Run-Out Date, it was created reference to 0Date.
Requirement is data should load depends on Run-Out Date 7 days old and 14 days future.
Logic is -7 days old >= Run_out date <= 14 days future.
please let me know how I need to proceed with ABAP code for this requirement.
Thanks.
Please do not ask for ABAP code here. Its not a training forum
Edited by: Pravender on Aug 18, 2011 1:46 AM>
Sree vignesh wrote:
> Hi,
> In the select option we have a field month range as
> SELECT-OPTION : FROM 01.2007 TO 01.2009 " Let say Ur Selection option is SO_MONTH
> but now i need to add the DMBTR field considering the month range in the SELECT OPTION i.e., only FROM 01.2007 TO 01.2009 i mean without 2006 data.
>
> LOOP AT LT_DATA WHERE month in SO_MONTH. " Here add a Where condition
> ls_output-matnr = lt_data-belnr.
> ls_output-werks = lt_data-bukrs.
> ls_output-lgort = lt_data-dmbtr.
>
> COLLECT ls_output INTO lt_output .
>
> ENDLOOP.
>
> please help with code .
>
> thanks in advance.
Regards,
Suneel G -
Hi guys,
I have date range as parameter like 01/JAN/2009 TO 16/JAN/2009 now i want to loop through this date range and want to get date like
01/JAN/2009,02/JAN/2009.....16/JAN/2009.how can i achive this ?
Thanks
RonHi,
What do you mean by loop through?
SQL> with dates as (select to_date('01/JAN/2009', 'dd/mm/yyyy') start_date
,to_date('16/JAN/2009', 'dd/mm/yyyy') end_date from dual)
select start_date + level - 1 from dates connect by level <= end_date - start_date + 1
START_DATE
01/01/2009
02/01/2009
03/01/2009
04/01/2009
05/01/2009
06/01/2009
07/01/2009
08/01/2009
09/01/2009
10/01/2009
11/01/2009
12/01/2009
13/01/2009
14/01/2009
15/01/2009
16/01/2009
16 rows selected.Regards
Peter -
Customer exit variable for date range for the last day
Hi,
If user enters date ranges in variable
suppose user enters 9/1/2010 to 9/15/2010 and we have to calculate currency conversion based on last day i..e 9/15/2010 . 08
2)User input is date range 08/01/2010 to 08/30/2010
I need from the customer exit 08/30/2010 (on last day) to calculate currency conversion.
Can anyone help me with ABAP code to achieve this customer exit?And please tell me how to proceed step by step
Sridharcreate a variable to enter date range (ZDATE1)
create a key date variable(ZDATE2) with processing type customer exit, should not be ready for input.
In the exit ZXRSRU01 write below code.
DATA: l_s_range TYPE rsr_s_rangesid,
loc_var_range LIKE rrrangeexit.
WHEN 'ZDATE2'.
IF i_step = 2.
read table i_t_var_range INTO loc_var_range
with key vnam = 'ZDATE1'.
CLEAR l_s_range.
l_s_range-low = loc_var_range-high.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
ENDIF.
Maybe you are looking for
-
Unable to watch my rented movie on apple TV but it says ive rented it already
Hi can someone help me please ? I have purchased a Rental in itunes 2days ago, this rental is on my PC and ready to watch, however I would like to watch it on my Apple TV. To be clear, I have not started watching the movie on any other machine. Since
-
Cache.cluster.multicast.ip and Installing Oracle Identity Analytics
After following the configuration steps outlined below, and deploying the war to Glassfish, I get an error starting RBACX that I think must be related to the cache.cluster.multicast.ip property settings below (error log follows the configuration step
-
T440s - "Incorrect AC adapter is attached" error message
Hi I have suddenly started getting an error message saying: "Incorrect AC adapter is attached. The AC adapter may not provide enough power to your Lenovo computer. Please reconnect proper AC adapter. To buy additional AC adapter, click here" I am usi
-
How can I make my application visible on the net?
Hi Everyone, Here is a silly question. I created a nice application on my notebook pc where I installed HTML DB. It is running Windows XP. The server is the HTTP server that came with the companion disk. Can you tell me what I need to do to make the
-
Correct FB project settings for AIR3.2 mobile dev using stage3d?
I would love to use Flare3D on a mobile app. Im struggling to get FB to get set up for this. I have overlayed AIR3.2 and added a flash player 11.2 debugger exe in the players folder as well as playerglobal.swcs for 11.2RC. When I go to make a new act