Find date diffrence
I need it urgent plz help me
join date : 01-jan-2010
let today : 01-feb-2011
Ans is: *1 year 1 month* like this
You can find example using INTERVAL datatype, here
http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements001.htm#BABBICGH
In your case, probably something like
SELECT EXTRACT (YEAR FROM (let_date - join_date) YEAR TO MONTH) || ' years '
|| EXTRACT (MONTH FROM (let_date - join_date) YEAR TO MONTH) || ' months '
|| EXTRACT (DAY FROM (let_date - join_date) DAY TO SECOND) || ' days'
FROM your_table;Regards
Peter
Similar Messages
-
hi,
i have to get the date diffrence between todays date and the date stored in backend i have used the backend as access
but i m finding to retreive from backend and find the diffrecenc plz sm one help i have to complete my project actully the last year project and i m stuck up the main stuff ,........to calculate the fine according to the date difrece
Thanks in advancedimport java.util.Date;
import java.util.GregorianCalendar;
public class Mainzakas {
public static void main(String[] a) throws Exception {
Date d1 = new GregorianCalendar(2000,11,31,23,59).getTime();
Date today = new Date();
long diff = today.getTime() - d1.getTime();
System.out.println("The 21st century (up to " + today +
") is " + (diff / (1000*60*60*24)) + " days old.");
i m being using(refering) these code in these code tht d1 i have to get from database but tht is like giving me error tht ..inconvertable type ............plz do a favour use ur own eg tht u are retrieving date u haved saved in database and
then getting diffrence .....plzzzzzzzzzzzzzzzzzzzz
output i want is 2 month 3 days or 63 days will aslo do........ -
Can not find data in virtual cube
Experts,
I can not find data in virtual cube with services function module (copying Z_RS_BCT_FIGL_DATA_GET_VC10 from RS_BCT_FIGL_DATA_GET_VC10).The standard cube is maintained with data.
Can anybody tell me what could be the reasons the data is coming through Virtua cube.
Thanks,
AKHi,
i_basic_infoprov is the name of the provider where the data is selected from. This must be a basic provider that contains data. What I meant was, create a copy of fm RS_BCT_FIGL_DATA_GET_VC,1 maybe as Z_BCT_FIGL_DATA_GET_VC1, and enter the name of this fm in the properties of your virtual cube. For that fm it might also be a good idea to enter a default value for i_infoprov. And this should be the name of your virtual cube.
regards
Siggi -
Hi All,
we have installed standard cubes and ODS from Business content. Now we want to load standard ODS but we are unable to identify standard data source.
0CPR_C03 - Infocube.
We have already checked in BI Content and help.sap.com but it doesnot display any data source name.
Kindly give input to find data source.
Regards,
SathvikHi,
Now you got some clue, i.e. some datasource names supports the cube.So in that you need to analyze what feilds you want to and in which datasource you have all that feilds in that way you need to use the DS. For any other information you need to check in sap help sites, here I'm giving some tables in BW, so it will help you.
RSISOSMAP Mapping Between InfoSources and DataSources (=OLTP Sources)
RSOSFIELDMAP Mapping Between DataSource Fields and InfoObjects
RSTS Transfer Structure in SAP BW
ROOSGEN Generated Objects for a DataSource
ROOSOURCE Header Table for SAP BW DataSources (SAP Source System/BW System)
RODELTAM BW Delta Procedure (SAP Source System)
RSOLTPSOURCE Replication Table for DataSources in BW
Thanks
Reddy -
Unable to find data in RSA3 for particular fields2lis_04_p_arbpl datasource
I am working with datasource 2lis_04_p_arbpl to construct Yield Report. I have a field GAMNG(Target Quantity) in the table AFKO, so I added it to the communication structure and activated it. I also want the field IGMNG(confirmed quantity) which is available in the table AFKO but not appearing in the pool tables of ARBPL datasource, so I have done datasource enhancement and obtained the field in the datasource. When I am checking for the data in RSA3, unable to find data(zero values) for both the fields.
Edited by: bhagav on Jan 5, 2012 1:20 PMHi ,
Please make sure that you are doing the extractor check in Update mode 'Full' .If the setup tables are filled then this should pick the data for the 2 newly added fields .
check and update accordingly later .
Thanks
Kamal Mehta -
Unable to find data source null [Caused by: jdbc/Apps1DataSource not found]
Hi,
I am using OA Adapter which listens to an EBiz HRMS event, and I am encountering the following error in $Home\j2ee\oc4j_soa\log\oc4j_soa_default_group_1\oc4j\log.xml while registering the ESB service.
Error details:
<MSG_TEXT>Failed to process control event for Service "DefaultSystem.SyncWorkerPartyEbizOAAdapter" due to an error while adding the Service! Reason : oracle.tip.esb.server.common.exceptions.BusinessEventFatalException: An unhandled exception has been thrown in the ESB system. The exception reported is: "ORABPEL-12517
AdapterFrameworkImpl::endpointActivation - Endpoint Activation Error.
The Resource Adapter Oracle Applications Resource Adapter was unable to activate the endpoint oracle.tip.adapter.apps.AppsWFBesQueueDequeueActivationSpec:{MessageSelectorRule=tab.user_data.event_name = 'oracle.apps.per.api.person.update_person', QueueName=WF_BPEL_Q, Consumer=ORA_6krj2dpn70s36c1g6h1k8dhi8h, DatabaseSchema=APPS, AppsEventSchema=ANY_SCHEMA} due to the following reason: javax.resource.ResourceException: Unable to find data source null Caused by: jdbc/Apps1DataSource not found
Please correct the reported issue and redeploy the BPEL process.
at oracle.tip.adapter.fw.jca.AdapterFrameworkImpl.endpointActivation(AdapterFrameworkImpl.java:566)
at oracle.tip.esb.server.service.impl.inadapter.ESBActivationAgent.activateInboundJcaEndpoint(ESBActivationAgent.java:390)
at oracle.tip.esb.server.service.impl.inadapter.ESBActivationAgent.performEndpointActivation(ESBActivationAgent.java:306)
at oracle.tip.esb.server.service.impl.inadapter.ESBActivationAgent.activateEndpoint(ESBActivationAgent.java:236)
at oracle.tip.esb.server.service.impl.inadapter.ESBActivationAgent.activateEndpoint(ESBActivationAgent.java:209)
at oracle.tip.esb.server.service.impl.inadapter.InboundAdapterService.activateEndpoint(InboundAdapterService.java:177)
at oracle.tip.esb.server.service.impl.inadapter.InboundAdapterService.activateService(InboundAdapterService.java:119)
at oracle.tip.esb.server.service.EsbServiceFactory.activateEsbService(EsbServiceFactory.java:222)
at oracle.tip.esb.server.service.EsbServiceFactory.addEsbService(EsbServiceFactory.java:240)
at oracle.tip.esb.server.common.RuntimeESBSystem.addService(RuntimeESBSystem.java:211)
at oracle.tip.esb.common.system.ServiceEventsHandler.handleCreateService(ServiceEventsHandler.java:72)
at oracle.tip.esb.common.system.MetadataChangeListener.handleServiceEvent(MetadataChangeListener.java:136)
at oracle.tip.esb.common.system.MetadataChangeListener.onMetadataChange(MetadataChangeListener.java:85)
at oracle.tip.esb.common.control.ControlMessageHandler.handleMessage(ControlMessageHandler.java:115)
at oracle.tip.esb.server.dispatch.agent.ESBWork.process(ESBWork.java:162)
at oracle.tip.esb.server.dispatch.agent.ESBWork.run(ESBWork.java:120)
at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.resource.ResourceException: Unable to find data source null
at oracle.tip.adapter.apps.AppsManagedConnectionFactory.getDataSourceConnection(AppsManagedConnectionFactory.java:411)
at oracle.tip.adapter.apps.AppsManagedConnectionFactory.getConnection(AppsManagedConnectionFactory.java:288)
at oracle.tip.adapter.apps.AppsManagedConnection.getConnection(AppsManagedConnection.java:85)
at oracle.tip.adapter.apps.AppsConnection.getJdbcConnection(AppsConnection.java:70)
at oracle_tip_adapter_apps_AppsConnection_Proxy.getJdbcConnection()
at oracle.tip.adapter.aq.database.MessageReader.establishDBconnection(MessageReader.java:358)
at oracle.tip.adapter.aq.database.MessageReader.<init>(MessageReader.java:265)
at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.init(AQActivationSpecDequeuer.java:142)
at oracle.tip.adapter.aq.AQEndpoint.<init>(AQEndpoint.java:99)
at oracle.tip.adapter.aq.AQResourceAdapter.endpointActivation(AQResourceAdapter.java:73)
at oracle.tip.adapter.apps.AppsResourceAdapter.endpointActivation(AppsResourceAdapter.java:147)
at oracle.tip.adapter.fw.jca.AdapterFrameworkImpl.endpointActivation(AdapterFrameworkImpl.java:541)
... 20 more
Caused by: javax.naming.NameNotFoundException: jdbc/Apps1DataSource not found
at com.evermind.server.rmi.RMIServerContext.lookup(RMIServerContext.java:207)
at com.evermind.server.ApplicationContext.unprivileged_lookup(ApplicationContext.java:257)
at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:197)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at oracle.tip.adapter.apps.AppsManagedConnectionFactory.getDataSourceConnection(AppsManagedConnectionFactory.java:408)
... 31 more
</MSG_TEXT>
I have added the connection properties in $Home\j2ee\oc4j_soa\application-deployments\defaul\oc4j-ra.xml as follows:
<connector-factory location="eis/Apps/apps1" connector-name="Oracle Applications Adapter">
<config-property name="xADataSourceName" value="jdbc/AIADataSource"/>
<config-property name="dataSourceName" value=""/>
<connection-pooling use="none">
</connection-pooling>
<security-config use="none">
</security-config>
</connector-factory>
Please correct me if the connection properties are wrong.
I tried AppsEventSchema with 'NO-SCHEMA' and 'ANY-SCHEMA' also.
If I use File Adapter I was able to register the ESB and instances were created successfully.
My versions:
JDEV: 10.1.3.3.0
SOA: 10.1.3.3.0
I have done a lot of research on this but in vain. Is there any patch for rectifying this error?
Help me on this issue pl.
Regards
RKYou need to check your datasource name jdbc/AIADataSource
Check out your data-sources.xml to make sure you didn't mistype it. -
In which table in CRM can i find data in business activity details?
Hi
In which table in CRM can i find data entered in business activity details in opportunity transaction.
Please advice .
Thanks,
Vaishnavifound the table name CRMD_Activity_H
-
In 4.1 BO Client Tools not able to find data source for BVM
Hi All,
In 4.1 BO Client Tools not able to find data source for BVM
Its creating issue .
So if any body have any solution please let me know.
Regards,
Abhishekjava.lang.NoSuchMethodError: org.w3c.dom.Node.getTextContent()Ljava/lang/String;
at customertree.XmlLoader.readData(XmlLoader.java:127)
at customertree.XmlLoader.<init>(XmlLoader.java:69)
at customertree.CustomerTreeFinal.jbInit(CustomerTreeFinal.java:240)
at customertree.CustomerTreeFinal.init(CustomerTreeFinal.java:858)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source
at java.lang.Thread.run(Unknown Source)and then inside the code... this is where i get my first error
clients.setRowId(list2.item(i).getTextContent()); -
Function Module to find date by passign the Planning Calendar
Hi All,
Can you tell me is there any function Module to find date by passign the Planning Calendar?
The requirement is i have a planning calender assigned to the Material in the MRP2 view.
Example: Material XXXXXX is assigned a Planning Calendar Z01.
Z01 is defined such that Delivery is on Monday only. This calendar says that the material is received from the Vendor only on Mondays.
So whenever i punch a Sales Order for Material XXXXXX, a PR is automatically geenrated when saving the sales order and the calculation of Delivery dates is also happening at this level.
Basing on this PR a PO is raised to a Vendor for procuring the Material XXXXXX, now my problem is for example the PO is raised today (30.04.2008), but the Materail XXXXXX is available only on next monday in my plant (05.05.2008) basing on my Planning Calendar assigned in the Materail Master, so i have to inform this dealy to my customer at the time of punching the sales order.
So is there any function Module to find date by passign the Planning Calendar?
Thanks for your valuable inputs.
Regards,
SudarshanHi Jorge,
Thanks for your reply.
I am unable to open the Function module which you have mentioned below.
I am working on 4.6 c version of SAP.
Any ways i have found one function module which is useful to my requirement as stated below:
DATE_GET_PERIOD
Thanks and Regards,
Sudarshan -
Hello.....
I'm not able to log into Windows Server 2008 r2 server thorugh Remote Desktop connection, receiving below error message.
This issue is with only three servers in the environment
"Remote Desktop cannot verify the identity of the computer because there is a time or date diffrence between your computer and remote computer......"
The date/time is correct on the server when i checked in the console session of the server
Can see below messages in event logs
Event ID 1014:
"Name resolution for the name XYZdomain.com timed out after none of the configured DNS servers responded."
Event ID 1053:
The processing of Group Policy failed. Windows could not resolve the user name. This could be caused by one of more of the following:
a) Name Resolution failure on the current domain controller.
b) Active Directory Replication Latency (an account created on another domain controller has not replicated to the current domain controller).
Any thoughts ....Hi,
Have you tried to connect these three servers with IP address instead of computer name or DNS name?
Check Remote Desktop Connection settings: Option-->Advanced-->Connect from anywhere-->Settings-->Connection Settings-->Select “Do not user an RD Gateway server”
For more information please refer to following MS articles:
Remote Desktop cannot verify the identity of the remote computer because there is a time or date difference between your computer and the remote computer
http://social.technet.microsoft.com/Forums/en-US/w7itpronetworking/thread/c1f64836-5606-49b0-82eb-56be7f696520
Cannot connect via Remote Desktop
http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2general/thread/5087e897-8313-468c-ad37-ef18b87d4dd6
Lawrence
TechNet Community Support -
System Not coming in Find Data
Hi,
I added a new JDBC system in portal in Visual Composer folder, created alias, done usermapping and my connection tests are successful.
But when i tried to access it from VC, its not coming up in Find data tab.
I am getting the following message in status area
<b>0001> Welcome to Visual Composer
0002> com/sap/portal/connectivity/destinations/IPortalSystemLandscapeRetriever</b>
Any ideas?
Regards,
SoorajHi,
There is a message box saying no BI systems are configured with the portal when i try BI integration wizard.
Regards,
Sooraj -
Find data same kind in Oracle dBase SQL
Hello all
I'm working on a project were i need to find data that are cross referencing in between them (Redundant data).
I explain:
I have this SQL that i use all the time to extract trailer per carrier ID:
SELECT NULL,
NULL,
TRC.TL_RESOURCE_ID,
TRC.CARRIER_ID,
TRC.PERIOD,
TRC.MAX_LOADS,
TRC.CONTRACT_MAX_TEAMS,
TRC.CURRENT_MAX_TEAMS,
TRC.PERCENT_COMMIT,
L.NAME,
R.NAME AS REGION_NAME,
RD.KEY_NUM,
RD.LOW_KEY_VALUE,
RD.HIGH_KEY_VALUE,
R1.NAME AS REGION_NAME_1,
RD1.KEY_NUM,
RD1.LOW_KEY_VALUE,
RD1.HIGH_KEY_VALUE,
NULL,
NULL,
TRT.TRLR_TYPE_ID,
to_char(TRT.EFFECTIVE, 'yyyymmdd'),
TRT.CONTRACT_NUM_VEHICLES,
TRT.CURRENT_NUM_VEHICLES
FROM TL_RESOURCE_CARRIER TRC,
TL_RESOURCE_TRLR TRT,
LANE L,
REGION R,
REGION R1,
REGION_DETAIL RD,
REGION_DETAIL RD1
WHERE TRC.TL_RESOURCE_ID = TRT.TL_RESOURCE_ID
AND R.ID = RD.REGION_ID
AND R1.ID = RD1.REGION_ID
AND TRC.LANE_ID = TRT.LANE_ID
AND TRC.CARRIER_ID = TRT.CARRIER_ID
AND L.ID = TRC.LANE_ID
AND L.ID = TRT.LANE_ID
AND L.FROM_REGION_ID = RD.REGION_ID
AND L.TO_REGION_ID = RD1.REGION_ID
AND TRC.CARRIER_ID = 'UPS';What we see in these fields bellow are Location ID or Postal Code or States value from an origin to a destination:
RD.LOW_KEY_VALUE, (Origin)
RD1.LOW_KEY_VALUE, (Destination)
Ex:
H7S 2B9 (Postal code)
QC (State) etc...
In these 2 fields bellow, i have keys that link to a specific type of data:
RD.KEY_NUM,
RD1.KEY_NUM,
Ex:
4 (State)
8 (Postal code) etc...
In TRC.CARRIER_ID field, i will have the Carrier ID ex: UPS
Now here comes my problem:
I have to link this to the location table to validate for example the postal code is in what state for example.
4 IN (RD.KEY_NUM) AND (EXISTS (SELECT STATE FROM LOCATION WHERE STATE IN (RD.LOW_KEY_VALUE))
8 IN (RD.KEY_NUM) AND (EXISTS (SELECT ZIP FROM LOCATION WHERE ZIP IN (RD.LOW_KEY_VALUE, ))If i have UPS carrier ID set from origin postal 7 : H7S 2B9 to Destination postal 7 : G0L 2K0
and also UPS carrier set from origin postal 7 : H7S 2B9 to Destination State : QC
Since we have the same carrier, and the same origin postal 7 and that the destination postal 7 equal the destination state from the second record, i need to see that i have these 2 lanes that are overlapping.
I'm trying to extract all duplicated data like this.
I know this is kind of a big thing but it can be done in multiple set of you want.
I just need to start from the beginning.
Can you please help me?
Thanks again
Edited by: 974487 on Dec 2, 2012 2:22 PMHello all
sorry for the big delay.
I was working on the SQL;
I have now this error:
ORA-01427: single-row subquery returns more than one row
On this part of the code:
( select distinct carrier_id, low_key_value, (select state from location would you know what it is?
Thanks again
Full code
with S1 -- with constuction enables to use selected data twice
AS
SELECT NULL,
NULL,
TRC.TL_RESOURCE_ID,
TRC.CARRIER_ID,
TRC.PERIOD,
TRC.MAX_LOADS,
TRC.CONTRACT_MAX_TEAMS,
TRC.CURRENT_MAX_TEAMS,
TRC.PERCENT_COMMIT,
L.NAME,
R.NAME AS REGION_NAME,
RD.KEY_NUM,
RD.LOW_KEY_VALUE,
RD.HIGH_KEY_VALUE,
R1.NAME AS REGION_NAME_1,
RD1.KEY_NUM,
RD1.LOW_KEY_VALUE as LOW_KEY_VALUE_1, -- as added
RD1.HIGH_KEY_VALUE as HIGH_KEY_VALUE_1, -- as added
NULL,
NULL,
TRT.TRLR_TYPE_ID,
to_char(TRT.EFFECTIVE, 'yyyymmdd'),
TRT.CONTRACT_NUM_VEHICLES,
TRT.CURRENT_NUM_VEHICLES
FROM TL_RESOURCE_CARRIER TRC,
TL_RESOURCE_TRLR TRT,
LANE L,
REGION R,
REGION R1,
REGION_DETAIL RD,
REGION_DETAIL RD1
WHERE TRC.TL_RESOURCE_ID = TRT.TL_RESOURCE_ID
AND R.ID = RD.REGION_ID
AND R1.ID = RD1.REGION_ID
AND TRC.LANE_ID = TRT.LANE_ID
AND TRC.CARRIER_ID = TRT.CARRIER_ID
AND L.ID = TRC.LANE_ID
AND L.ID = TRT.LANE_ID
AND L.FROM_REGION_ID = RD.REGION_ID
AND L.TO_REGION_ID = RD1.REGION_ID
select s2.*
from
select carrier_id, low_key_value, low_key_1_state
from
( select distinct carrier_id, low_key_value, (select state from location
where zip = s1.LOW_KEY_VALUE_1
or city = s1.LOW_KEY_VALUE_1
or state = s1.LOW_KEY_VALUE_1
and rownum = 1 -- because there are more rows with same city or same state
) low_key_1_state, low_key_value_1
from s1
group by carrier_id, low_key_value, low_key_1_state
having count(*) > 1 -- select duplicates
) s2 -
hi
i m new to idoc.i m trying to create the segment.in that i have 5 fields but i m not getting how to find data element for those fields.In y requirement they have just given fields like
Idoc field XT01 message Description
FUNLOC_OWNER C069_StockOwnerFunloc STOCK OWNER FUNLOC
M, 1 Format Value
M N6 fixed value '000000'
so how to find the data element of this field..plz help me...
thnxHi,
Go to se11 -> give any datatype name > Press F4> serach for dataelements --> popup will come 'Press Information system and give datatype and length. --> you can find your dataelement.
Regards
Bhupal Reddy -
System Alias is not coming in dropdown of System under Find Data Services
I am having role in VC.
In Visual Composer studio. I Clicked on Find Data option at right pane of the window to get
Find Data Services window.
In this window, I am not able to see the system alias from the dropdown list of the System field.
Appreciate your help.Hi
Inside Visual Composer , Goto Tools >Options> Compiler .
Remove the Checkbox for Mask Unsupported Features.
Click Ok.
Now try the Find Data
It worked for me.
Regards
Rajendra -
How to find data base tables for a particular trancation code
Dear All,
Is there any T.code for finding data base tables used in a particular transaction code(Eg.: MM01).
Regards,
SatyapalliHello Satya
There is a very useful function module available for your requirement:
<b>RS_PROGRAM_TABLES</b>
Call this function module using:
OBJECT_TYPE = 'TRAN' " transaction
OBJECT_NAME = 'VA01'
" PROGRAM -> not required
MONITOR_ACTIVATE = 'X'
The function module will list you all DB tables touched by the transaction and shows whether they are read or updated (unfortunately, on ECC 5.0 this seems to be no longer the case. All tables are displayed as READ).
Regards
Uwe
Maybe you are looking for
-
Error in Report Runtime, if I click the filter icon in Free Charecteristics
Hi Experts, I am getting error message "System error in program CL_RSR_WWW_RENDERER and form GET_FILTER_VALUES_CH" if I click the filter icon which is in free char area of the report. If I run the same in RSRT, I am getting ABAP error "- Break-point"
-
Vendor Consignment stock or vendor managed stock
Dear All, My client wants to manage vendor consignment stock. Vendor will be given a area and vendor will keep the stock in his area. Based on the plan he will supply the stock. the GR for rawmaterials will be made on the consumption report given by
-
My computer crashes everytime I attempt to sync my iphone 5.
Uninstalled, Reinstalled, restored, deleted registry, updated itunes, etc. Can't figure out for the life of me how to fix this. I'm running a Windows Vista comp, itunes 11. Saw on another forum to download RevoUninstaller to uninstall everything appl
-
I have been able to open files from this camera before but still checked for latest Camera Raw download. Still won't open files from this camera. Opens files from my 60D just fine. I downloaded the latest and it has worked before. What the heck is go
-
How can i refresh a jtree using DefaultMutableTreeNode?
I already create a jtree using DefaultMutableTreeNode, and i also could implement to it the addMouseListener to do a action when the user press every node......Also i used the following instruction to remove all nodes: root_tree.removeAllChildren();