Problem in retreiving data for the given user parameter year!!!
hi all,
I am working in oracle report 6i. I want to display the data for the date given in the parameter field(MM/YYYY).
For ex. Input is 07/2007 means i want to display the data from 04/2006 to 07/2007.Please guide me
to get this desire output......
Here is my query.....
select gl_code,financial_month,financial_year,division_code
from gtemp
where financial_year between to_number(to_char(:P_Date,'YYYY')) - 1 and to_number(to_char(:P_Date,'YYYY'))
and financial_month >= '04'
and financial_month < = to_char(:P_Date,'MM')
and division_code = 11
order by financial_month, financial_year
regards,
jame
Message was edited by:
Jame
Works fine if u gave values instead of variables.... But if we gave 02 in place of 11 like below.Query will get
confused to take which years 02 because in both 2005 and 2006 we have 02(Feb)thats y.......
how to overcome this prob.......I think, my entire query is wrong to get this desire output....Please guide me how
to solve......
select gl_code,financial_month,financial_year,division_code
from gtemp
where financial_year between 2005 and 2006
and financial_month >= '04'
and financial_month < = '02'
and division_code = 11
order by financial_month, financial_year
Similar Messages
-
Problem in uploading data for the Tcode CA02
Hi,
I am trying to upload the data for the Tcode ca02 and i am facing a problem i.e. the uploading for the for the 18th inspection characterstic is not able to being uploaded. I had checked the code of it and the logic is there.
It was previously uploading the data for it,but iit is not doing now. I had cheked the program of the screen also the fields are also present..would u plz send code.so i can check
-
Deactivating the password for the given user
Hi All,
I have used the FM SUSR_ZBV_USER_SEND for deactivating the user passwords . passed bapi method PWDINIT
the report which has been developed will deactivate the password for a given user in particluar sub system.
suppose if i am executing the report in ABC system and deactivated the password of a given user for XYZ system its working fine. However if i am trying the deactivate the password of a user in ABC system . its not getting deactivated.
please let me know what has to be done in order to deactivate the password if i am using the same systems.
Thanks & Regards.
Preeth.Jeremy,
The default password for the Portal user in the same password as ias_admin. This would be defined at install time through the Oracle Universal Installer. However, if you're asking about identifying the Portal schema password in the database, you can login to the Directory Manager(assuming you're using Windows)and login as
cn=orcladmin
password: (ias_admin password)
Click on (entry management)=>(cn=OracleContext)=>(cn=Products)=>(cn=IAS)=>cn=Infrastructure Databases => ReferenceName=sid:host=>ResourceName=Portal. Click on the entry and look at the orclpasswordattribute.
Incidentally, you can also find the orasso password by checking the ResourceName=orasso.
Note:198800.1 on metalink would be a good resource to follow.
Thanks,
Sudi Narasimhan
Oracle9iAS Portal Partner Management
What is the default password for the Portal User in 9i AS Release 2? I'm assuming this is the equivalent user to the Portal30 user in 3.0.9?
Thanks. -
Monday's Date of the given week and year
Hi gurus,
I have the data for week ( eg.52 ) and year ( eg. 08 ) and I need to get the date of the Monday of that week (21-DEC-2008...i.e 52th week of 2008 Year.)
Pls let me knw the sql statement solution for this ..
THanks,
shashi..Hi, Shashi,
There's a bug in what I posted before.
Do this instead:
TRUNC ( TO_DATE ( '01-Jul-' || :year_txt
, 'DD-Mon-YYYY'
, 'IY'
) + (7 * (:week_val - 1))The only change is in TO_DATE.
Here's the problem.
TO_DATE won't work with ISO years; it only takes calendar years.
When you don't specify a day and month in TO_DATE (like I originally did) it defaults to the first day of the current month. So TO_DATE ('2011', 'YYYY') returns October 1, 2011 when the current month is October, and it returns January 1, 2011 when the current month is January.
January 1, 2011, however, is in ISO year 2010. (ISO 2011 begins on the Monday closest to January 1, which is January 3, 2011). My original solution, therefore, would return dates from ISO year 2010 when anyone asked for year 2011 and they happend to be running the program during January.
Specifying a full date makes the expression behave the same regardless of when it is run. -
Find the difference between two dates for the specific month and year
Hi,
I have two dates, start date is 30/12/2012 and end date is 04/01/2013. Using datediff I found the difference of days between two dates. But I find the no of days in January 2013. ie output is 4 instead of 6. I input month and year to find the no of days
for that date. In this case I input Jan 2013. How can I sql this ?I don't understand how most of the answers provided here not analytically solving the problem with many cases possible.
First let me understand you:
You have 2 dates range and you want to calculate day range for specific month and year between the original date range.
declare @for_month int = 1 --January
declare @for_year int = 2013
declare @StartDate date = '2012-12-20'
declare @EndDate date = '2013-01-04'
SELECT
CASE
WHEN (DATEPART(MONTH, @StartDate) = @for_month and DATEPART(MONTH, @EndDate) = @for_month) and ((DATEPART(YEAR, @StartDate) = @for_year or DATEPART(YEAR, @EndDate) = @for_year)) THEN
DATEDIFF(DAY, @StartDate,@EndDate)
WHEN (@StartDate < cast(CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) and (@EndDate between (cast(CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) and (cast(DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) + 1, 0)) as date))) THEN
DATEDIFF(DAY, DATEADD(MONTH, DATEDIFF(MONTH, -1, @EndDate)-1, 0),@EndDate)
WHEN (@EndDate > cast(DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) + 1, 0)) as date)) and (@StartDate between (cast(CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) and (cast(DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) + 1, 0)) as date))) THEN
DATEDIFF(DAY, @StartDate,DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, @StartDate) + 1, 0))) + 1
WHEN ((DATEDIFF(DAY, @StartDate, cast(DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) + 1, 0)) as date)) >= 0) and (DATEDIFF(DAY, cast(CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date), @EndDate) >= 0)) THEN
DATEDIFF(DAY, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as datetime), DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as datetime)) + 1, 0))) + 1
ELSE
0
END as [DD]
I don't know how you calculate day range between 01/01/2013 and 04/01/2013
is 4, it is actually is 3 but if that is the case, you can add 1 from the condition. -
How to get correct opening blance data for the quarterly report in BOFC?
Hi all,
I have a problem with getting the opening balance for the quarterly report.
i would like to keep the beggining balance data for the end of previouse year. (eg: now is 2010, then keep the begginig balance at Dec.2009 for each quarterly reporrt through the year in 2009).
however, for example in the second quarter, if i choose the beggining balance of Dec.2009 in the Consolidation definition, there is a problem that consolidation FS does not include the manual journal entry that ive entered at the first quarter such as goodwill.
Do I need to make manual journal entry at all the quarterly reporting period if I want to set the beggining balance for the previouse year end?
Could somebody please tell me how to remediate to this issue?
Or how do you manage with the opening balance in BOFC?
Thanks & Regards,
HitomiHi Michael,
HRMS appliocation
database 10.2.0.4
windows XP
ebs 11.5.10.2
One of our user using disooverer 4i desktop and administration edition on old windows 2000 machine and connecting to schema.
We are decommision old windows 2000 machine.
I have installed disooverer 4i desktop and administration edition on new windows XP VM box and trying to connect to same schema which was used with old
desktop and asking me to create EUL. What is theat I should be doing to use new one same as old one?
Old box is still there.
Thanks. -
Who to get Actual Shipment Date for the Sales Order
Dear All,
How to Get Actual Shipment Date for the given sales order.
REgards
sudheerHai,
If you want the actual shipment date of an order call the function module RV_ORDER_FLOW_INFORMATION and pass the order number as vbeln in the structure COMWA.select the values from the return table which corresponds to 'J' type which are delivery and get thedate.
THis will give the actual delivery date (if created).
Oher way is to look for vbeln in table LIPS using VGBEL = order number as the selection criteria.
Cheers,
Sandeep -
TO GET WEEKS for a given MONTH AND YEAR
Is there any FM to get the no of weeks for a given month, say 01 2005.
Can i get the week numbers say 1 2 3 4 5 for the given month and year.
Please let me know.
Happy Holidays.
Regards,
Manohar EHi Manohar,
Use FM DATE_GET_WEEK twice; first time pass first day of the month and again pass the last day of the month as a parameter. So u will be having week number(yyyyxx) for the first week of the month and week number for the last week of the month. From these two, in between week numbers u can easily fetch. I hope this will help u out.
Regards,
Kavya Shah -
How to approach in getting the dates for the user given periods
Hi All,
I have areuirement where the calendar would be like as 466 for a period
for eg. period 1(Jan) has 4 weeks
period 2(Feb) has 6 weeks
period 3(Mar) has 6 weeks
again period 4(Apr) has 4 weeks
period 5(May) has 6 weeks
period 6(June) has 6 weeks
How to get the dates (from date and end date) for the periods.
Anybody's help will be appreciated
Regards
SaugataI have areuirement where the calendar would be like as 466 for a periodWhat does that mean? Is 466 the format of the data?
The end date depends on the start date. This query might be helpful for you
SQL> WITH data AS(
2 SELECT 1 period, 4 duration FROM dual UNION ALL
3 SELECT 2, 6 FROM dual UNION ALL
4 SELECT 3, 6 FROM dual UNION ALL
5 SELECT 4, 4 FROM dual UNION ALL
6 SELECT 5, 6 FROM dual UNION ALL
7 SELECT 6, 6 FROM dual)
8 SELECT
9 period,
10 duration,
11 SYSDATE + SUM(duration) OVER (ORDER BY period RANGE UNBOUNDED PRECEDING) * 7 AS end_date
12 FROM data
13 ;
PERIOD DURATION END_DATE
1 4 16-NOV-07
2 6 28-DEC-07
3 6 08-FEB-08
4 4 07-MAR-08
5 6 18-APR-08
6 6 30-MAY-08
6 rows selected.
SQL> -
[HELP] Error: "JDBC theme based FOI support is disabled for the given data"
Hi all,
I have already set up MapViewer version 10.1.3.3 on BISE1 10g OC4J server. I am current using JDK 1.6. I create a mvdemo/mvdemo user for demo data.
The MapViewer demo is running fine with some demo without CHART. But give this error with some maps that have CHART like: "Dynamic theme, BI data and Pie chart style", "Dynamic theme and dynamic Bar chart style". The error is:
----------ERROR------------
Cannot process the FOI response from MapViewer server. Server message is: <?xml version=\"1.0\" encoding=\"UTF-8\" ?> <oms_error> MAPVIEWER-06009: Error processing an FOI request.\nRoot cause:FOIServlet:MAPVIEWER-06016: JDBC theme based FOI support is disabled for the given data source. [mvdemo]</oms_error>.
----------END ERROR------
I searched many threads on this forum, some point me to have this allow_jdbc_theme_based_foi="true" in mapViewerConfig.xml and restart MapViewer.
<map_data_source name="mvdemo"
jdbc_host="localhost"
jdbc_sid="bise1db"
jdbc_port="1521"
jdbc_user="mvdemo"
jdbc_password="mvdemo"
jdbc_mode="thin"
number_of_mappers="3"
allow_jdbc_theme_based_foi="true"
/>
Error Images: [http://i264.photobucket.com/albums/ii176/necrombi/misc/jdbcerror.png|http://i264.photobucket.com/albums/ii176/necrombi/misc/jdbcerror.png]
I have this configuration, but no luck. Could anyone show me how to resolve this problem?
Rgds,
Dung NguyenOop, i managed to have this prob resolved!
My prob may come from this I use both scott and mvdemo schema for keeping demo data (import demo data).
Steps i made to resolve my prob are:
1) Undeploy MapViewer from Application Server Control (http://localhost:9704/em in my case)
2) Drop user mvdemo
3) Download mapviewer kit from Oracle Fusion Middleware MapViewer & Map Builder Version 11.1.1.2
4) Deploy MapViewer again
5) Recreate mvdemo and import demo data
6) Run mcsdefinition.sql, mvdemo.sql with mvdemo user (granted dba already)
7) Edit mapViewerConfig.xml
<map_data_source name="mvdemo"
jdbc_host="dungnguyen-pc"
jdbc_sid="bise1db"
jdbc_port="1521"
jdbc_user="mvdemo"
jdbc_password="!mvdemo"
jdbc_mode="thin"
number_of_mappers="3"
allow_jdbc_theme_based_foi="true"
/>
Save & Restart MapViewer
And now, all demos run fine. Hope this helpful for who meet prob like my case. -
In Bdc I have huge volume of data to upload for the given transaction
Hi gurus,
In Bdc I have huge volume of data to upload for the given transaction, here am using session method, it takes lots of exection time to complete the whole transaction, Is there any other method to process the huge volume with minimum time,
reward awaiting
with regards
ThambeSelection of BDC Method depends on the type of the requirement you have. But you can decide which one will suite requirement basing the difference between the two methods. The following are the differences between Session & Call Transaction.
Session method.
1) synchronous processing.
2) can tranfer large amount of data.
3) processing is slower.
4) error log is created
5) data is not updated until session is processed.
Call transaction.
1) asynchronous processing
2) can transfer small amount of data
3) processing is faster.
4) errors need to be handled explicitly
5) data is updated automatically
Batch Data Communication (BDC) is the oldest batch interfacing technique that SAP provided since the early versions of R/3. BDC is not a typical integration tool, in the sense that, it can be only be used for uploading data into R/3 and so it is
not bi-directional.
BDC works on the principle of simulating user input for transactional screen, via an ABAP program.
Typically the input comes in the form of a flat file. The ABAP program reads this file and formats the input data screen by screen into an internal table (BDCDATA). The transaction is then started using this internal table as the input and executed in the background.
In Call Transaction, the transactions are triggered at the time of processing itself and so the ABAP program must do the error handling. It can also be used for real-time interfaces and custom error handling & logging features. Whereas in
Batch Input Sessions, the ABAP program creates a session with all the transactional data, and this session can be viewed, scheduled and processed (using Transaction SM35) at a later time. The latter technique has a built-in error processing mechanism too.
Batch Input (BI) programs still use the classical BDC approach but doesnt require an ABAP program to be written to format the BDCDATA. The user has to format the data using predefined structures and store it in a flat file. The BI program then reads this and invokes the transaction mentioned in the header record of the file.
Direct Input (DI) programs work exactly similar to BI programs. But the only difference is, instead of processing screens they validate fields and directly load the data into tables using standard function modules. For this reason, DI programs are much faster (RMDATIND - Material Master DI program works at least 5 times faster) than the BDC counterpart and so ideally suited for loading large volume data. DI programs are not available for all application areas.
synchronous & Asynchronous updating:
http://www.icesoft.com/developer_guides/icefaces/htmlguide/devguide/keyConcepts4.html
synchronous & Asynchronous processings
Asynchronous refers to processes that do not depend on each other's outcome, and can therefore occur on different threads simultaneously. The opposite is synchronous. Synchronous processes wait for one to complete before the next begins. For those Group Policy settings for which both types of processes are available as options, you choose between the faster asynchronous or the safer, more predictable synchronous processing.
By default, the processing of Group Policy is synchronous. Computer policy is completed before the CTRLALTDEL dialog box is presented, and user policy is completed before the shell is active and available for the user to interact with it.
Note
You can change this default behavior by using a policy setting for each so that processing is asynchronous. This is not recommended unless there are compelling performance reasons. To provide the most reliable operation, leave the processing as synchronous. -
How to use the date format for the given req.?
I have a requirement which should fetch the datas given by user. The user parameter is the date. The date will fetch the amount of the customer code for that particular month based on the date upto given by the user of that financial year.
If the user parameter is given as 200703(YYYYMM) it should fetch the datas of the financial year from 200604(YYYYMM) to 200703(YYYYMM). The logic is the user parameter year should fetch the datas of previous year till the user given date and the month should be also do the same. Please do the needfull oracle experts.
Regards,
MarkAs i am new to oracle i need help from you experts, The year and the month as seperate columns both as different data type as number and varchar2. There is no date column in the table.
Table GTemp:
DIVISION_CODE NUMBER(2)
GL_CODE NUMBER(6)
FINANCIAL_YEAR NUMBER(4)
FINANCIAL_MONTH VARCHAR2(2)
Query that i have used:
SELECT ALL GTEMP.FINANCIAL_YEAR, GTEMP.FINANCIAL_MONTH, GTEMP.GL_CODE
FROM GTEMP
WHERE financial_year between 2007 - 1 and 2007
and financial_month in ('4',' 12')
and division_code = 11
order by financial_month
I know this will not fetch from the date the user parameter enters however is there any other options. Please help me out morgan... -
Hi,
I have migrated my Sharepoint from 2010 to 2013.I am able to get the data at the first time of refresh when I click on refresh for the second time I am getting the empty the sheet.
below find the flow of refresh
First Refresh
On Click of refresh open the workbook with excel services and return the session id.
Using that session I am invoking RefrehAsync method of excel services
After refresh completed I am setting the calculation of workbook as automatic(to calculate the formulas) using the same session id
After setting the calculation as Automatic I am setting the calculation type as full(recalculate) using the same session id.
Now I am able to see the data
Second Refresh
After clicking on refresh instead of opening the workbook I am using the session id(already opened workbook) and setting the calculation type as manual
I am following the same process from refresh(RefreshAsync) as I have followed in first refresh.
This time my formulas are not getting calculated because of that I am not able to see the data.
Could you please let me know that am I missing anything here?
Is this know issue in Sharepoint2013 excel services as same code is working fine with Sharepoint2010.
If I close the workbook(session id null) and opens(new session id) for all the refreshes it is working and I am able to see the data.
Thanks,
Meenakshi Nagpal
N.MeenakshiI am able to see the data for the second refresh if I change the data source.If I use the same data source which is used in the first refresh I am not getting the data.Excel services will contact the cubes and calculate the formulas in my workbook.
Could you please let me know what could be the problem at second refresh while contacting the same data source with same session id?
Please help me asap.
Thanks,
Meenakshi Nagpal
N.Meenakshi -
How to get the date of Friday for the given week
HI,
I have a requirement to get the date of Friday for the given week.
Eg: I have an input of 200722 (Yearweek), From this I need to get the Date of the friday for this week 22 of Year 2007.
Plz let me know how to get this..
Thanks in advance..
Sridhar.Hi,
Thanks for your reply...
I have implemented your logic but not getting exact output as required.
Suppose, If i give the input as 200720, I am getting an output as 18 (friday of week 20 of year 2007), but i need to get an output of 18.05.2007
Plz let me know how to do thdi.
Thanks in advance.. -
Is there any object in labview that contains a list of data for the user to select (selection one at a time) or add a new data?
List and table controls -> listbox..is that what you are thinking of?
The listbox presents the user with a list of options, and you can set it to only accept one selection at a time...Adding new data to the list can not be done directly by the user but if you make e.g. a text control and a button you can programatically insert new objects described in the text box when the button is pressed...(see example).
If you need more than one column you have the multicolumn listbox. If you want the users to write new entries directly yu can use a table and read selected cells using it's selection start property to read what cell has been selected.
MTO
Attachments:
Listbox_example.vi 34 KB
Maybe you are looking for
-
Production Order for a material without BOM and Routing
Is it possible to create a production order for a given material without routing and BOM, I know we can create a production order for a material without a BOM (with a default routing) just wanted to check with the above criteria Thanks in Advance!!
-
I would like to have my MacPro laptop display and 2 external monitors (three displays). Question, how can I have more than one application displayed at a time? IE: I would like email on one monitor, Finder on my laptop, and iTunes on the other. Possi
-
I updated Bridge yesterday. CS6 5.2.0.4. Mac OS 10.9.5 Now all previews (DNG files) in Bridge appear sideways and only small thumbnail size. Also Camera Raw has been disabled. I have tried purging cache for the folders as well as purging entire cache
-
Computer can't be authorized/deauthorized
Help, I get an alert says: There was an error storing your authorization information on this computer. The required file was not found or has a permissions error. Correct this permissions problem and try again, or deauthorize this computer if the per
-
Example of 'searching in content/form'
Does anyone have an example of the functionality 'search'. I want to add this functionality to one of my forms, but I do not know how to realize that. So if anyone has done this before, would he/she share the knowledge with me !! greetings Nico Punte