Using todays date as default for this function in the package
Dear all;
please find attached the following sample data and syntax
create table tbl_one
id varchar2(200),
place varchar2(300),
create_date date
insert into tbl_one
(id, place, create_date)
values
('D', 'MN', to_date('3/3/2011', 'MM/DD/YYYY'));
insert into tbl_one
(id, place, create_date)
values
('X', 'DC', to_date('3/4/2011', 'MM/DD/YYYY'));
insert into tbl_one
(id, place, create_date)
values
('A', 'NY', to_date('3/31/2011', 'MM/DD/YYYY'));package from PL/SQL developer
body ----------
create or replace package P_test is
-- Public type declarations
type cur is ref cursor;
function test_fn
from_period in varchar2,
to_period in varchar2
) return cur;
end P_test;
spec ----------------------
create or replace package body P_test is
function test_fn
from_period in varchar2,
to_period in varchar2
) return cur as
my_cur cur;
Begin
open my_cur for
select p.id,
p.place
from tbl_one p
where trunc(p.create_date) >= to_date(from_period, 'MM-DD-YYYY')
and trunc(p.create_date) <= to_date(to_period, 'MM-DD-YYYY');
return my_cur;
end test_fn;
end P_test;now I was just wondering how do I get the to_period to have a default value of todays date
user13328581 wrote:
I tried that already but it doesnt work unfortunately it shows no display...the only other way i can think of is use several if statement to check and then do a select into....however i just feel there is a better way to do it.
Edited by: user13328581 on Mar 31, 2011 1:09 PMDefine it doesn't work.
SQL> CREATE PROCEDURE dt_test (p_start_dt IN VARCHAR2,
2 p_end_dt IN VARCHAR2 DEFAULT TO_CHAR(sysdate, 'MM-DD-YYYY')) AS
3 BEGIN
4 DBMS_OUTPUT.Put_Line ('Start is: '||p_start_dt);
5 DBMS_OUTPUT.Put_Line ('End is: '||p_end_dt);
6 END;
7 /
Procedure created.
SQL> exec dt_test('01-01-2011', '02-28-2011');
Start is: 01-01-2011
End is: 02-28-2011
PL/SQL procedure successfully completed.
SQL> exec dt_test('01-01-2011');
Start is: 01-01-2011
End is: 03-31-2011Or are you always passing two parameters with the end date possibly null like this:
SQL> exec dt_test('01-01-2011', null);
Start is: 01-01-2011
End is:
PL/SQL procedure successfully completed.If that is you case then you can do something like:
SQL> CREATE OR REPLACE PROCEDURE dt_test (p_start_dt IN VARCHAR2,
2 p_end_dt IN VARCHAR2) AS
3 BEGIN
4 DBMS_OUTPUT.Put_Line ('Start is: '||p_start_dt);
5 DBMS_OUTPUT.Put_Line ('End is: '||COALESCE(p_end_dt, sysdate));
6 END;
7 /
Procedure created.
SQL> exec dt_test('01-01-2011', null)
Start is: 01-01-2011
End is: 31-MAR-2011
PL/SQL procedure successfully completed.So your predicate would become more like:
trunc(p.create_date) <= COALESCE(to_date(to_period, 'MM-DD-YYYY'), TRUNC(sysdate);John
Similar Messages
-
EDMS: 'Missing authorization for this functionality' when searching user
Hi,
I've activated ALC authorization for DMS. In EDMS, when trying to add an user to a DIR with search function an error occurres as below.
'Missing authorization for this functionality'
BTW, the user has contains SAP_ALL profile. It can't be any authorization reasons.
Regards,
YemiHi,
authorization checks will not happen if the search help from sap-gui.I
think the problem is releted to missing implementation of "check
function module" from your side. If the search help is linked to a
"master data table" (type A) a check function must be implemented to
check the permission of the user.
This function module is read from table BAPIF4T. Please
check the following link: http://help.sa
p.com/saphelp_nw04/helpdata/en/a5/3eca044ac011d189
4e0000e829fbbd/content.htm
http://wiki.sdn.sap.com/wiki/display/PLM/Object+Link+search+in+EasyDMS
Regards,
Hari -
Hi Friends
I am having performance issue for this function-module(HR_TIM_REPORT_ABSENCE_DATA) and one my client got over 8 thousend employees . This function-module taking forever to read the data. is there any other function-module to read the absences data IT2001 .
I did use like this .if i take out this F.M 'HR_TIM_REPORT_ABSENCE_DATA_INI' its not working other Function-module.please Suggest me .
call function 'HR_TIM_REPORT_ABSENCE_DATA_INI'
exporting "Publishing to global memory
option_string = option_s "string of sel org fields
trig_string = trig_s "string of req data
alemp_flag = sw_alemp "all employee req
infot_flag = space "split per IT neccessary
sel_modus = sw_apa
importing
org_num = fdpos_lines "number of sel org fields
tables
fieldtab = fdtab "all org fields
field_sel = fieldnametab_m. "sel org fields
To Read all infotypes from Absences type.
RP_READ_ALL_TIME_ITY PN-BEGDA PN-ENDDA.
central function unit to provide internal tables: abse orgs empl
call function 'HR_TIM_REPORT_ABSENCE_DATA'
exporting
pernr = pernr-pernr
begda = pn-begda
endda = pn-endda
IMPORTING
SUBRC = SUBRC_RTA
tables
absences = absences_01
org_fields = orgs
emp_fields = empl
REFTAB =
APLTAB =
awart_sel_p = awart_s[]
awart_sel_a = awart_s[]
abstp_sel = abstp_s[]
i0000 = p0000
i0001 = p0001
i0002 = p0002
i0007 = p0007
i2001 = p2001
i2002 = p2002
i2003 = p2003.
Thanks & Regards
Reddyguessing will not help you much, check with SE30 to get a better insight
SE30
The ABAP Runtime Trace (SE30) - Quick and Easy
what is the total time, what are the Top 10 in the hitlist.
Siegfried -
Invoice date always use todays date
Hello!
Is there a user exit we can use to always set invoice date = today? In VF01 or VF04 is it also possible to set system to always use todays date?
RegardsHi,
This Data Requirement routine works fine with order to billing also. Check in VTFA for the relevant item category which Data VBRK/VBRP routine is assigned. If you have assigned any customer developed routine other than the standard one, try to incorporate the validation of Billing Date = System Date as like Standard Routine 11 = Billing = Today's Date. This is the simplest way we had achieved for order related billing.
Hope this helps.
Thanks
Krishna. -
my technical
envirement:
1_ Oracle
Entreprise Manager version 9.2.0.1.0
2_ Forms [32
Bit] Version 9.0.2.9.0 (Production)
3_ Oracle
JInitiator: Version 1.3.1.9
4_ WebUtil
Version 1.0.2(Beta)
5_ window xp
service pack 2 build 2600.
6_Internet
Explorer 8 Version 8.0.6001.18702
I m developping
a form txt.fmb
The obejective
of this form is to open metars.txt file loctated in “c:\metars.txt”,
through which read climate data for exapmle (temperature =25, humudity = 60) to
finaly insert them into metars table in my data base.
For recall
while i m developing this form this step is well achieved:
i open the
WEBUTIL.olb, in a window so different tabs is displayed and then i drag
the webutil-object group into my forms object group-node. until I have the
following items under the object group-node in my form test.fmb
webutil_error
-- as alert style: stop
WEBUTIL_HIDDEN_WINDOW
WEBUTIL_CANVAS
WEBUTIL
-- as a block
at run time I
have the following message error which is come out form the function CLIENT_TEXT_IO.FOPEN(file_name,
'W') and written through a trigger fired
on “ when new form instance”.
wcu-015: your form must contain the following bean for this function to be
available : oracle.forms.webutil.file.filefunctions;
also i would like to inform that at run time,
java console didn't show me any of errors loading java files, which mean
that all configuration required, to getting webutil work with oracle 9i form builder, are well executed.
Oracle
JInitiator: Version 1.3.1.9
Using JRE
version 1.3.1.22-internal Java HotSpot(TM) Client VM
User home directory = C:\Documents and
Settings\wwProxy Configuration: no proxyJAR cache enabled
Location: C:\Documents and Settings\ww\Oracle Jar Cache
Loading:
http://wissam-773df302:8888/forms90/jars/webutil.jar
from JAR cacheLoading
http://wissam-773df302:8888/forms90/jars/jacob.jar from
JAR cacheLoading
http://wissam-773df302:8888/forms90/jars/demo90.jar from
JAR cacheLoading
http://wissam-773df302:8888/forms90/jars/FormsGraph.jar
from JAR cacheLoading
http://wissam-773df302:8888/forms90/jars/icons.jar
from JAR cacheLoading
http://wissam-773df302:8888/forms90/jars/frmwebutil.jar
from JAR cacheLoading
http://wissam-773df302:8888/forms90/java/f90all_jinit.jar
from JAR cacheRegister
WebUtil -
Loading Webutil Version 1.0.2 BetaproxyHost=nullproxyPort=0connectMode=HTTP,
native.Forms Applet version is : 90290
Finally still i m facing the same problem about the
error message mentioned earlier; I appreciate any support and I will be very
thankful for helping me to find a suitable solution!!1.) Please don't double post:Urgent message : oracle9i form builder read txt file error
2.) As for your original post: don't post urgent questions over here. If they are really urgent call oracle support. See How To Ask Questions The Smart Way
and after all:
wcu-015: your form must contain the following bean for this function to be
available : oracle.forms.webutil.file.filefunctions;
are you certain, 100% positive, and absolutely sure you have a bean item with above implementation class in your form? I'd double check that...
JInit and IE8? I am not 100% sure, but I am almost certain that this combination didn't work at all. And please don't tell us you used that stupid hack where you replace the jvm.dll of JInit with one of a current JPI installation.
The Oracle Versions you have in place are rather ancient as well, you really should think about upgrading your database and your forms installation. As you already are on webforms moving to the current version of forms shouldn't require much changes in your forms.
cheers -
Unable to connect to the Data Access service for this management server
Hate to raise a sleeping horse but was hoping someone might have some insight into why SCOM Report Server install is failing. I am using a domain account for SCOM 2012 R2 services in a distributive environment
with 2 management servers and 2 SQL servers…one for Ops db and one for DW db.
Install was failing on selecting the management server. Research led me to
Kevin Holman's site. I followed his doc and SPN are set per your config and can telnet to MGMT1 on 5723…firewall is off on all servers. I am a domain admin and scom.mgmt account (MSOMSdkSvc) is a local admin on the MGMT servers.
>setspn -l domain\scom.mgmt
Registered ServicePrincipalNames for CN=scom.mgmt,OU=Service Accounts,DC= domain,DC=net:
MSOMSdkSvc/SCOM-MGMT1
MSOMSdkSvc/SCOM-MGMT1.domain.net
MSOMSdkSvc/SCOM-MGMT2
MSOMSdkSvc/SCOM-MGMT2.domain.net
>setspn -l domain\scom-mgmt1
Registered ServicePrincipalNames for CN=SCOM-MGMT1,OU=SCOM,OU=INTERNAL,DC=domain,DC=net:
MSOMHSvc/SCOM-MGMT1.domain.net
TERMSRV/SCOM-MGMT1.domain.net
WSMAN/SCOM-MGMT1.domain.net
RestrictedKrbHost/SCOM-MGMT1.domain.net
HOST/SCOM-MGMT1.domain.net
MSOMHSvc/SCOM-MGMT1
TERMSRV/SCOM-MGMT1
WSMAN/SCOM-MGMT1
RestrictedKrbHost/SCOM-MGMT1
HOST/SCOM-MGMT1
>setspn -l domain\scom-mgmt2
Registered ServicePrincipalNames for CN=SCOM-MGMT2,OU=SCOM,OU=INTERNAL,DC=domain,DC=net:
MSOMHSvc/ SCOM-MGMT2.domain.net
MSOMHSvc/ SCOM-MGMT2
WSMAN/SCOM-MGMT2.domain.net
WSMAN/SCOM-MGMT2
TERMSRV/SCOM-MGMT2.domain.net
TERMSRV/SCOM-MGMT2
RestrictedKrbHost/SCOM-MGMT2
HOST/CHH-SCOM-MGMT2
RestrictedKrbHost/CHH-SCOM-MGMT2.osi-asp.net
HOST/CHH-SCOM-MGMT2.osi-asp.net
>setspn -l domain\scom-ssrs
Registered ServicePrincipalNames for CN=SCOM-SSRS,OU=SCOM SQL,OU=SCOM,OU=CHH-INTERNAL,DC=domain,DC=net:
WSMAN/SCOM-SSRS
WSMAN/SCOM-SSRS.domain.net
MSSQLSvc/SCOM-SSRS.domain.net
MSSQLSvc/SCOM-SSRS.domain.net:1433
TERMSRV/SCOM-SSRS.domain.net
TERMSRV/SCOM-SSRS
RestrictedKrbHost/SCOM-SSRS
HOST/SCOM-SSRS
RestrictedKrbHost/SCOM-SSRS.domain.net
HOST/SCOM-SSRS.domain.net
When I point to the MGMT server, I keep getting “Unable to connect to the Data Access service for this management server. Ensure the Data Access service is running and that the service, the management group, and setup are
all the same version”.
OpsMgrSetupWizard.log states…
Info:
:Could not connect to Management Server: scom-mgmt1.domain.net with exception: Threw Exception.Type: System.ArgumentException, Exception Error Code: 0x80070057, Exception.Message: Version string portion was too short or
too long.
Info:
:StackTrace: at System.Version.TryParseVersion(String version, VersionResult& result) at System.Version..ctor(String version) at Microsoft.EnterpriseManagement.OperationsManager.Setup.Common.SetupHelpers.IsManagementServerCurrentVersion(String
managementServer) at Microsoft.EnterpriseManagement.OperationsManager.Setup.Common.SetupHelpers.CanConnectToManagementGroup(String managementServer)
When I searched on "Exception.Message: Version string portion was too short or too long" it led me to .Net strings in the reg. i deleted all refs to older versions (3.x) but still no good.
BobWell, I’m back to trying to get SCOM Report Server up and running. This time I decided to try the command line silent install and rely on logs to debug. But it still fails.
This is the script: SETUP /install /InstallPath:D:\Program Files\Microsoft System Center 2012 R2\Operations Manager /components:OMReporting /ManagementServer:<server>.<domain> /SRSInstance:<instance> /DataReaderUser:<domain>\<account>
/DataReaderPassword:******** /SendODRReports:0 /UseMicrosoftUpdate:0 /AcceptEndUserLicenseAgreement:1
When I run the script, I get a pop-up: “System CenterOperations Manager Setup has stopped working with the following:
Problem signature:
Problem Event Name:
CLR20r3
Problem Signature 01:
setupchainerui.exe
Problem Signature 02:
7.0.5000.0
Problem Signature 03:
522a5b85
Problem Signature 04:
mscorlib
Problem Signature 05:
4.0.0.0
Problem Signature 06:
53b4fc1e
Problem Signature 07:
e4d
Problem Signature 08:
5a
Problem Signature 09:
System.FormatException
OS Version:
6.1.7601.2.1.0.274.10
Locale ID:
1033
Additional Information 1:
4911
Additional Information 2:
49111a576c61a461b7f2900e4224563c
Additional Information 3:
a1e6
Additional Information 4:
a1e62e9c159c1d7601a31ccff83dbf94
App Event Log:
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1026</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2015-01-29T19:02:39.000000000Z" />
<EventRecordID>4999</EventRecordID>
<Channel>Application</Channel>
<Computer>SERVER NAME</Computer>
<Security />
</System>
- <EventData>
<Data>Application: SetupChainerUI.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception.
Exception Info: System.FormatException Stack: at Microsoft.SystemCenter.Essentials.SetupFramework.Program.Main()</Data>
</EventData>
</Event>
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2015-01-29T19:02:41.000000000Z" />
<EventRecordID>5000</EventRecordID>
<Channel>Application</Channel>
<Computer>SERVER NAME</Computer>
<Security />
</System>
- <EventData>
<Data>SetupChainerUI.exe</Data>
<Data>7.1.10226.0</Data>
<Data>522a5b85</Data>
<Data>KERNELBASE.dll</Data>
<Data>6.1.7601.18409</Data>
<Data>5315a05a</Data>
<Data>e0434352</Data>
<Data>000000000000940d</Data>
<Data>a64</Data>
<Data>01d03bf626a03a7a</Data>
<Data>C:\Users\USER NAME\AppData\Local\SCOM\Setup\SetupChainerUI.exe</Data>
<Data>C:\Windows\system32\KERNELBASE.dll</Data>
<Data>65be21be-a7e9-11e4-a4d7-005056966e1b</Data>
</EventData>
</Event>
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Windows Error Reporting" />
<EventID Qualifiers="0">1001</EventID>
<Level>4</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2015-01-29T19:03:27.000000000Z" />
<EventRecordID>5001</EventRecordID>
<Channel>Application</Channel>
<Computer>SERVER NAME</Computer>
<Security />
</System>
- <EventData>
<Data />
<Data>0</Data>
<Data>CLR20r3</Data>
<Data>Not available</Data>
<Data>0</Data>
<Data>setupchainerui.exe</Data>
<Data>7.0.5000.0</Data>
<Data>522a5b85</Data>
<Data>mscorlib</Data>
<Data>4.0.0.0</Data>
<Data>53b4fc1e</Data>
<Data>e4d</Data>
<Data>5a</Data>
<Data>System.FormatException</Data>
<Data />
<Data />
<Data>C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_setupchainerui.e_9724aaa8eec4ffba07c27fea369e612e949d75_5b269652</Data>
<Data />
<Data>0</Data>
<Data>65be21be-a7e9-11e4-a4d7-005056966e1b</Data>
<Data>0</Data>
</EventData>
</Event>
OpsMgrSetupWizard.log
[13:48:16]:
Error: :Uncaught Exception: Threw Exception.Type: System.FormatException, Exception Error Code: 0x80131537, Exception.Message: Input string was not in a correct format.
[13:48:16]:
Error: :StackTrace:
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at Microsoft.SystemCenter.Essentials.SetupFramework.PropertyBagDictionary.GetProperty[T](String property)
at Microsoft.EnterpriseManagement.OperationsManager.Setup.Common.SetupHelpers.ValidateBureaucraticSwitches()
at Microsoft.EnterpriseManagement.OperationsManager.Setup.Common.RationalizeCommandLineArguments.ValidateSilentInstallCommandLineOptions()
at Microsoft.EnterpriseManagement.OperationsManager.Setup.Common.RationalizeCommandLineArguments.Rationalize()
at Microsoft.EnterpriseManagement.OperationsManager.Setup.Common.SetupHelpers.RationalizeGeneralInstall()
at Microsoft.SystemCenter.Essentials.SetupFramework.Program.RationalizeInstall()
at Microsoft.SystemCenter.Essentials.SetupFramework.Program.Main()
Any ideas? I feel like I’m just going in circles…Bob -
Are there any advantages to using a Data Value Reference for LabVIEW Classes?
Hi
I recently came across an example where the developer had used a data value reference for the class cluster in LabVIEW.
What are the advantages of doing this?
Doesn't the use of LV objects already avoid the creation of multiple copies of data thereby reducting memory usage?
Thanks
ADLabVIEW's OOP is implemented as a By Value. This means, as Tst stated, branches in wires could mean copies in the object. The DVR is a way to make it By Reference.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
Hi All,
i created one enchancement to ME21n screen,
i added one screen at header
When i running the the transaction ME41 it shows the following error.
This function not defined
Message no. 06006
Diagnosis
There is no entry for this function in Table 168F (system table). An error involving the screen control has probably occurred.
Procedure
Contact your system administrator.
Am i need to add this functionalty to any sap table.
plz guide me on this.Hi Krishna
Have you added any buttons in the custom screen if yes then you will have to maintain configuration data for Function code processing.
Please search on SCN for the same
Nabheet -
My iPod touch was stolen and recovered. I can use my Apple id for this site but the theif changed the Apple id needed to update apps etc and I do not know how to delete his acct. Any help with this will be greatly appreciate
If the thief enabled activation lock on the device, then there is nothing that can be done. Only the password for the Apple ID that it is locked with can disable activation lock.
-
I can't set up my email on my ipod touch. It keeps saying I have to use a valid email address for this account. Help!
Hi Annie,
Make sure when you are setting up your e-mail account that you enter in your entire e-mail address. If you have a Yahoo (includes any e-mail account associated with Yahoo), G-mail, or Aol after entering in your password it should automatically set up. Any other e-mail address you will have to manually set the account up. -
I found information on how to transfer my itunes library to a new computer. I am going to use an external hard drive for this to transfer my itunes folder to the new computer.
I will then download and install a new version of itunes on my new computer.
My question is this. When I do this, will itunes have all my album artwork for all my library? My library has a lot of my own music and I have spent quite a bit of time copying album artwork that itunes did not add. I am really hoping I don't have to do this again!
Thanks for your help!If you follow the directions in this Link...
Copy iTunes to an External Drive
http://support.apple.com/kb/HT1751
Everything should be carried across... -
How can I set up a standard account to auto disconnect from the wireless network upon logging out (Using Mavericks)? There used to be a setting for this in previous versions of OSX but I can't find it in the new version.
How can I set up a standard account to auto disconnect from the wireless network upon logging out (Using Mavericks)? There used to be a setting for this in previous versions of OSX but I can't find it in the new version.
-
I re installed my Final Cut express software, now when I go to use my "halo" and "arrow" application I get a message that says the file format is too new for this version of the application. Anybody have suggestions?
After install, did you go to Apple menu > Software Update to update your FCE to the latest version?
MtD -
I cannot install ODX Yosemite over OSX Mavericks as my Mac Book Pro (early 2011) advises that the disc "Mackintosh HD" is used for Time Machine back ups. This is not the case however as I use a separate external HD for this purpose, help please ?!
ThanksCheck this link out...
OS X: Cannot install on a volume used by Time Machine for backups
I was apart of this thread and it helped the OP...
Re: System installer thinks my main drive is my time Machine backup and won't install.
KOT -
Does anybody else use "Nonbreaking Space (Fixed Width)" for this?
Does anyone else do this?
Does anybody else use "Nonbreaking Space (Fixed Width)" for this?
I add special "white spaces" of an unchanging width:
Is there an easier way to "automate" this? The way I do it is horrible ... horribly badI don't think you can automate exactly that, but you might be able to get spacing you like better in general if you reduce the word spacing range and increase the letter spacing range in your justification settings.
Maybe you are looking for
-
My iPhone used to trust my Macbook Pro and sync, but now it doesn't and there's no option to "Trust this computer"
-
I am doing a file--> XI --> IDOC R/3 4.6 scenario. R/3 is there in SLD as business system with role as app system and the correspong logical system is maintained in SALE. Do we still need to create an RFC destination for R/3 client in XI system. In t
-
Hi, I got a requirement for an inbound idoc Idoc type : DELFOR02 message type : DELINS User exit functional module : IDOC_INPUT_DELINS My actual reqirement is....... The DELFOR02 Idoc sent from the subsystem to SAP will have to be split into multiple
-
Problem with Purchase Contract Item Price - 2lis_02_itm
Hello ! I used 2lis_02_itm extractor in order to extract the Purchase contracts (transaction me33k in R/3) with Item Prices. The problem is that the extractor takes the price from ekpo table but the Contract item prices exist in konp table and its ve
-
Hi, How to convert the data picked from table into different language in form. for ex: name, street, land , region