Data type of a parameter
Hi
In my procedure i declared the data type of "Value Date" Input parameter as Date where as in CR it is showing data type as "Date Time". Can any one please specify how to change to Date.
Thanks in advance.
Thanks,
Sruthi
While prompting for input parameter in description it is showing message as
Please enter Date time in format"yyy-mm-dd hh:mm:ss" . To change the content selected "format field" option. But is there any way to change input parameter data type.
Please suggest how to change.
Thanks ,
Sruthi
Similar Messages
-
Package with table data type as out parameter.
Hi there, I managed to compile the package without error but when I am trying to test this package and
I am keep facing this error message.
Am I using correctly for the table data type as out parameter. I have no idea what is wrong with the package to fix.
Pls. help and advise me. Thanks.
Error starting at line 1 in command:
DECLARE
p_stmodel VARCHAR2(40):=null;
p_item_number VARCHAR(40):='9BX158-300';
p_item_id NUMBER:=0;
l_attribute_out test_common_api.l_item_attr_tab:=test_common_api.l_item_attr_tab();
BEGIN
test_common_api.test_attribute(p_stmodel,p_item_number,p_item_id,l_attribute_out);
END;
Error report:
ORA-06550: line 8, column 18:
PLS-00302: component 'TEST_ATTRIBUTE' must be declared
ORA-06550: line 8, column 2:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
---------Package.
CREATE OR REPLACE PACKAGE test_common_api
AS
TYPE item_attr_rec IS RECORD (CONFIGURATION VARCHAR2(20),
PRODUCTTYPE VARCHAR2(30),
INTERNALPRODUCTNAME VARCHAR2(20),
NUMBEROFHEADS VARCHAR2(2),
NUMBEROFDISCS VARCHAR2(2),
GENERATION VARCHAR2(10),
FACTORYAPPLICATION VARCHAR2(150),
PRODUCTFAMILY VARCHAR2(60),
FORMFACTOR VARCHAR2(10),
FORMATTEDCAPACITY NUMBER,
FORMATTEDCAPACITY_UOM VARCHAR2(20),
INTERFACE VARCHAR2(30),
SPINDLESPEEDRPM NUMBER,
PRODUCTCACHE VARCHAR2(10),
WARRANTYMONTHS VARCHAR2(2),
PHYSICAL_SECTOR_SIZE NUMBER,
MODELHEIGHT VARCHAR2(10),
ENCRYPTION_TYPE VARCHAR2(40));
TYPE l_item_attr_tab IS TABLE OF item_attr_rec;
END test_common_api;
show errors
create or replace package body test_common_api
AS
PROCEDURE test_attribute (p_stmodel IN VARCHAR2,
p_item_number IN VARCHAR2,
p_item_id IN NUMBER,
l_item_attr_list OUT l_item_attr_tab)
IS
l_stmodel st.stmodelnumber%TYPE;
l_market_segment VARCHAR2(10) ;
l_sub_market_segment VARCHAR2(10) ;
l_app_segment VARCHAR2(10);
l_market_name VARCHAR2(40) ;
l_ccitem seaeng_ccitemnumber.ccitemnumber%TYPE;
l_query_item VARCHAR2(1000);
l_query_model VARCHAR2(1000);
l_where VARCHAR2(1000);
l_bind_var1 VARCHAR2(40);
l_bind_var2 VARCHAR2(40);
l_sql NUMBER:=0;
l_config VARCHAR2(40):=null;
BEGIN
IF p_stmodel is not null THEN
l_where :='WHERE sc.ccmodel = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber
AND sc.pricingdescriptor=''MODEL''
AND sc.ccdashnumber =''000''
AND sp.detailedproductname=''GENERIC''
AND st.stmodelnumber= :1';
IF p_item_number is null AND p_item_id is null THEN
l_config :='null';
ELSE
l_config :='sc.configuration';
END IF;
l_bind_var1 :=p_stmodel;
l_sql :=1;
ELSE
IF p_item_id is null and p_item_number is not null THEN
l_where := 'WHERE sc.ccmodel = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber = :1';
l_bind_var1 :=p_item_number;
l_sql:=2;
ELSIF p_item_id is NOT null and p_item_number is null THEN
l_where := 'WHERE sc.ccmodel= sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber in ( select msi.segment1
from mtl_system_items msi
where msi.inventory_item_id = :1)';
l_bind_var1 := p_item_id;
l_sql:=2;
ELSIF p_item_id is not null and p_item_number is not null THEN
l_where :='WHERE sc.ccmodel = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber in (select msi.segment1
from mtl_system_items msi
where msi.inventory_item_id = :1
AND msi.segment1=:2)';
l_sql:=3;
l_bind_var1 := p_item_id ;
l_bind_var2 :=p_item_number;
END IF;
END IF;
l_query_item :='SELECT sc.configuration,st.producttype, sp.internalproductname, sp.numberofheads , sp.numberofdiscs,
sp.generation,sp.factoryapplication, st.productfamily,st.formfactor , st.formattedcapacity , st.formattedcapacity_uom,
st.interface,st.spindlespeedrpm,st.productcache,st.warrantymonths, st.physical_sector_size, st.modelheight, st.encryption_type
FROM pm sp , st st, seaeng_ccitemnumber sc ';
l_query_model :='SELECT '|| l_config|| ' , st.producttype, null,null , null, null, sp.factoryapplication, null,st.formfactor, st.formattedcapacity,
st.formattedcapacity_uom,st.interface , st.spindlespeedrpm, st.productcache, st.warrantymonths,st.physical_sector_size, st.modelheight,
st.encryption_type
FROM pm sp , st st, seaeng_ccitemnumber sc ';
IF l_sql = 1 THEN
EXECUTE IMMEDIATE l_query_model ||l_where
BULK COLLECT INTO l_item_attr_list
USING l_bind_var1 ;
dbms_output.put_line(l_query_model||l_where);
ELSIF
l_sql =2 THEN
EXECUTE IMMEDIATE l_query_item || l_where
BULK COLLECT INTO l_item_attr_list
using l_bind_var1;
dbms_output.put_line(l_query_item||l_where);
ELSE
EXECUTE IMMEDIATE l_query_item ||l_where
BULK COLLECT INTO l_item_attr_list
USING l_bind_var1, l_bind_var2 ;
dbms_output.put_line(l_query_item||l_where);
END IF;
END test_attribute;
END test_common_api;
show errorsI think you forget to declare "PROCEDURE test_attribute" procedure in your package definition. like:
CREATE OR REPLACE PACKAGE test_common_api
AS
TYPE item_attr_rec IS RECORD (CONFIGURATION VARCHAR2(20),
PRODUCTTYPE VARCHAR2(30),
INTERNALPRODUCTNAME VARCHAR2(20),
NUMBEROFHEADS VARCHAR2(2),
NUMBEROFDISCS VARCHAR2(2),
GENERATION VARCHAR2(10),
FACTORYAPPLICATION VARCHAR2(150),
PRODUCTFAMILY VARCHAR2(60),
FORMFACTOR VARCHAR2(10),
FORMATTEDCAPACITY NUMBER,
FORMATTEDCAPACITY_UOM VARCHAR2(20),
INTERFACE VARCHAR2(30),
SPINDLESPEEDRPM NUMBER,
PRODUCTCACHE VARCHAR2(10),
WARRANTYMONTHS VARCHAR2(2),
PHYSICAL_SECTOR_SIZE NUMBER,
MODELHEIGHT VARCHAR2(10),
ENCRYPTION_TYPE VARCHAR2(40));
PROCEDURE test_attribute (p_stmodel IN VARCHAR2,
p_item_number IN VARCHAR2,
p_item_id IN NUMBER,
l_item_attr_list OUT l_item_attr_tab);
TYPE l_item_attr_tab IS TABLE OF item_attr_rec;
END test_common_api;
show errors
create or replace package body test_common_api
AS
PROCEDURE test_attribute (p_stmodel IN VARCHAR2,
p_item_number IN VARCHAR2,
p_item_id IN NUMBER,
l_item_attr_list OUT l_item_attr_tab)
IS
l_stmodel st.stmodelnumber%TYPE;
l_market_segment VARCHAR2(10) ;
l_sub_market_segment VARCHAR2(10) ;
l_app_segment VARCHAR2(10);
l_market_name VARCHAR2(40) ;
l_ccitem seaeng_ccitemnumber.ccitemnumber%TYPE;
l_query_item VARCHAR2(1000);
l_query_model VARCHAR2(1000);
l_where VARCHAR2(1000);
l_bind_var1 VARCHAR2(40);
l_bind_var2 VARCHAR2(40);
l_sql NUMBER:=0;
l_config VARCHAR2(40):=null;
BEGIN
IF p_stmodel is not null THEN
l_where :='WHERE sc.ccmodel = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber
AND sc.pricingdescriptor=''MODEL''
AND sc.ccdashnumber =''000''
AND sp.detailedproductname=''GENERIC''
AND st.stmodelnumber= :1';
IF p_item_number is null AND p_item_id is null THEN
l_config :='null';
ELSE
l_config :='sc.configuration';
END IF;
l_bind_var1 :=p_stmodel;
l_sql :=1;
ELSE
IF p_item_id is null and p_item_number is not null THEN
l_where := 'WHERE sc.ccmodel = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber = :1';
l_bind_var1 :=p_item_number;
l_sql:=2;
ELSIF p_item_id is NOT null and p_item_number is null THEN
l_where := 'WHERE sc.ccmodel= sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber in ( select msi.segment1
from mtl_system_items msi
where msi.inventory_item_id = :1)';
l_bind_var1 := p_item_id;
l_sql:=2;
ELSIF p_item_id is not null and p_item_number is not null THEN
l_where :='WHERE sc.ccmodel = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber in (select msi.segment1
from mtl_system_items msi
where msi.inventory_item_id = :1
AND msi.segment1=:2)';
l_sql:=3;
l_bind_var1 := p_item_id ;
l_bind_var2 :=p_item_number;
END IF;
END IF;
l_query_item :='SELECT sc.configuration,st.producttype, sp.internalproductname, sp.numberofheads , sp.numberofdiscs,
sp.generation,sp.factoryapplication, st.productfamily,st.formfactor , st.formattedcapacity , st.formattedcapacity_uom,
st.interface,st.spindlespeedrpm,st.productcache,st.warrantymonths, st.physical_sector_size, st.modelheight, st.encryption_type
FROM pm sp , st st, seaeng_ccitemnumber sc ';
l_query_model :='SELECT '|| l_config|| ' , st.producttype, null,null , null, null, sp.factoryapplication, null,st.formfactor, st.formattedcapacity,
st.formattedcapacity_uom,st.interface , st.spindlespeedrpm, st.productcache, st.warrantymonths,st.physical_sector_size, st.modelheight,
st.encryption_type
FROM pm sp , st st, seaeng_ccitemnumber sc ';
IF l_sql = 1 THEN
EXECUTE IMMEDIATE l_query_model ||l_where
BULK COLLECT INTO l_item_attr_list
USING l_bind_var1 ;
dbms_output.put_line(l_query_model||l_where);
ELSIF
l_sql =2 THEN
EXECUTE IMMEDIATE l_query_item || l_where
BULK COLLECT INTO l_item_attr_list
using l_bind_var1;
dbms_output.put_line(l_query_item||l_where);
ELSE
EXECUTE IMMEDIATE l_query_item ||l_where
BULK COLLECT INTO l_item_attr_list
USING l_bind_var1, l_bind_var2 ;
dbms_output.put_line(l_query_item||l_where);
END IF;
END test_attribute;
END test_common_api;
show errors -
How to change data type of input parameter
Hi
In my procedure i declared the data type of "Value Date" Input parameter as Date where as in CR it is showing data type as "Date Time". Can any one please specify how to change to Date.
While prompting for input parameter in description it is showing message as
Please enter Date time in format"yyy-mm-dd hh:mm:ss" . To change the content selected "format field" option. But is there any way to change input parameter data type.
Please suggest how to change.
Thanks SruthiHi Sruthi,
all you need to do on this is open the report go to the parameters, select the parameter that you wish to change and click "Edit". This will allow you to change thefield to a date rather than a date time.
Regards,
Noel -
How to call user define data type as data type for concurrent parameter
Hi All,
i find some difficulty while creating the concurrent program.
i.e.
i have one of the parameter of table type i.e. user define data type at PLSql program
now i need to register same PLSQL program into oracle applications as concurrent program
but while i am creating Parameters for concurrent program
How could i define that user define data type at database level in oracle applications using 'Value set' ?
any one save me from this Problem
thanks and Regards,
sai krishna@cavaya.Don't think this can be done..
One way I can think of is to wrap your PL/SQL program under another procedure/package that can accept "normal" parameter,and use/register this wrapper instead of your original pl/sql program.
HTH -
Unable to send structure data type as import parameter in RFC
I have one RFC to web service scenario.My sending RFC is as follows:
FUNCTION ZIXI_001_EMP_DET.
""Local Interface:
*" IMPORTING
*" VALUE(EMP_DET) TYPE ZIXI_EMP
*" VALUE(OFFER_DT) TYPE ZXI_OFFER_DATA
ENDFUNCTION.
Here ZIXI_EMP is a structure with following details:
EMP_ID INT4 INT4 10 0 Natural Number
NAME STRING128 CHAR 128 0 128 Lowercase and Uppercase Letters
SAL INT4 INT4 10 0 Natural Number
and ZXI_OFFER_DATA is another structure with following details:
REQ_ID STRING128 CHAR 128 0 128 Lowercase and Uppercase Letters
PRICE STRING128 CHAR 128 0 128 Lowercase and Uppercase Letters
QTY STRING128 CHAR 128 0 128 Lowercase and Uppercase Letters
After configuring everything in IR and ID, I called the RFC from R3 system with following data:
EMP_DET:
EMP_ID 15
NAME XYZ
SAL 5.000
OFFER_DT:
REQ_ID A235
PRICE 50
QTY 3
but when I am checking in sxmb_moni, payload only containing first field of each structure. i.e.,
<?xml version="1.0" encoding="UTF-8" ?>
- <rfc:ZIXI_001_EMP_DET xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
- <EMP_DET>
<EMP_ID>15</EMP_ID>
<NAME />
<SAL>0</SAL>
</EMP_DET>
- <OFFER_DT>
<REQ_ID>A235</REQ_ID>
<PRICE />
<QTY />
</OFFER_DT>
</rfc:ZIXI_001_EMP_DET>
Why this is happening I don't know. is there any constraint with SAP XI 3.0 that we can not pass values using structure?...
Or any configuration needs to be done?
Please help....Guess I got it... U should define the structure as Tables parameter and not as Import Parameter...
should be like
FUNCTION ZIXI_001_EMP_DET.
""Local Interface:
*" TABLES
*" EMP_DET STRUCTURE ZIXI_EMP
*" OFFER_DT STRUCTURE ZXI_OFFER_DATA
ENDFUNCTION.
~SaNv...
Edited by: Santhosh Kumar V on Mar 18, 2010 6:35 PM -
Dynamic Data Type declaration from Parameter value
Hi,
I have a silly question..
Is it possible to dynamically declare a variable based on the contents of a parameter...like:
Tables: RSDUPD.
Parameter: p_Daty like RSDUPD-DATU
Data: l_last_day like (p_Daty)
Thanksok....thanks for the answer but its time to make the question harder.
I have the following code:
DATA: it_query_results TYPE REF TO data.
PARAMETER: prxy_cls(30).
CREATE DATA it_query_results TYPE STANDARD TABLE OF (prxy_cls).
ASSIGN it_query_results->* TO <l_it_query_result>.
....I do all sorts of processing with <l_it_query_result>.....then
CALL METHOD o_query_result->execute_asynchronous
EXPORTING
output = <l_it_query_result>.
only problem is method execute_asynchronous doesnt expect a type ref and only expects table type ZBWCOPA9030V00_QUERY_RESULT1...which is what I am entering in the parameter prxy_cls..
need help badly..
thanks -
Can I modify the data type of a dynamic parameter?
I am using CR2008 against an Oracle 11 db and have a report with dynamic parameters.
One of the report sources is a custom view that selects all of the possible 'pay ending dates' where one of the fields from this view is used as the source for the dynamic parameter.
The view performs a TRUNC on the date field in an effort to eliminate the TIME component.
The problem is that the parameter definintion defaults to DATE/TIME (vs. just DATE). I'm wondering if there is any way to modify the data type of the parameter to be DATE only.
I've searched several forumns but have not found anything.
One solution I can think of is to have the custom view format the date field as a VARCHAR (sans the time component) which I assume would force the dynamic parameter data type to string, and then have the report perform a todate function on the value when applying the criteria.
Anyone else have an idea? Just seems like CR should allow the developer to specify the data type- especially b/w Date and Date/Time, rather than make an assumption.
Thank you in advance-
emaheremaher,
Here's what you can do:
Leave the existing date column as it is in the view...
Just add another column to the view that casts the the date as a VarChar data type and formats the date as you would like it to be.
So now you'll have 2 date columns in the view... 1 that's still a date and another that a character string.
Now for your parameter, use the date version as the parameter value and the text version as the parameter description.
Be sure to set the "Prompt with description only" is set to true.
This way the user sees the LoV in the desired format but there's not need to wrangle it back into a date for data selection.
HTH,
Jason -
Switch datetime type parameter to date type
Hello expert,
I created crystal report by oracle procedure directly , but a date parameter for this procedure is mapped to datatime type parameter in crystal report, its format is dd/mm/yyyy hh:mm:ss. instead of this datatime format, I need date format as "dd/mm/yyyy", but I found I can't change data type for this procedure parameter in crystal report. I know I can't choose data type for procedure parameter if I use procedure in command. but over here, I have to use this procedure directly instead of using command as data connection for this report. Can I change this procedure parameter for datetime type to date type in the crystal report. Apprecaite very much.You can get crystal to treat the datetime field as a date field by addressing it as
date({datetime})
when ever you refer to it. You may even be able to address your parameter as
date({?datetimeparameter})
Debi -
Problem with pl/sql table data type
hai friends,
i have one procedure it has some in parameters and one out parameter which fetches values to front end.
But the out parameter will be pl/sql table data type.
if it is ref cursor
then i declared as
var x refcursor;
exec procedure_name(1,:x);
it is ok.
but for pl/sql table data type is out parameter then what i will do in the prompt .
give me syntax and clarify my doubt.
advanced thanks...
madhavaThe SQL*Plus VARIABLE statement does not support user-defined types, hence it cannot support nested tables. It can support cursors because they can be weakly typed (so we can use the one SQL*Plus VAR to hold any shape of resultset). Nested tables are strongly typed; SQL*Plus is a relatively stupid interface and cannot be expected to understand UDT.
So, it you want to use nested tables as output you'll need to code a wrapping procedure that can understand your nested table type and handle it accordingly.
Sorry.
Cheers, APC -
Data Type to use for Fiscal Year Period selection screen parameter
I need to accept user input in the format
YYYY.PP
where YYYY is the Fiscal year and PP is the Period.
Is there a data type ( element / domain ) for such a field ?date element you can use SPMON
or
parameter : p_spmon like MCS0-SPMON.
regards
shiba dutta -
Optional Prompt for Date type parameter in Crystal Report.
Hi Every One,
I have a date type parameter in crystal report.When I am convert it to optional prompt it is showing following message.
But the Type field is gray out when I was selecting list of values Dynamic.
Please suggest.
Thanks and Regards
DEVHi,
Please check SAP note:
1710595 - CR_Defining "Optional Prompt" as True for SAP Crystal
Reports Does Not Work
Thanks & Regards,
Nagarajan -
How could Ecatt support a FM which has export parameter data type as any
Hi,
I have created a FM which has export parameter data type as 'Type ref to data'.
The actual paremeter value for this export parameter is a dynamically generated internal table, which does not have a abap dictionary data type.
Could I use the 'FUN' ecatt command to test this FM? How could I get this reference export parameter?
Thanks a lot in advance!Hi,
Wouldn't it be enough if you define parameter in test data container as reference to table type with structure of type c(1000) (or more/less characters depending on how much data you need to pass)?
I'm not 100% sure if filling this table with data will work (this is reference after all) but if this is an issue than create 2 parameters: 1 of table type and second of reference type. Then inside your script before FUN use ABAP...ENDABAP to assign your table parameter to reference parameter and use second one as input for FUN command.
I think that either first or second solution should work.
Best regards
Marcin Cholewczuk -
Hi,
We are using for all Oracle number columns the Oracle parameter type OracleType.Number.
Now we have seen that we can also use the type OracleTyp.Int32.
Is it better or faster to use this type for columns
which can use this type.
Have anybody experience with using Oracle data types ??
Kind Regards
MartinIt really depends on what kind of data you're inserting or updating. If you've data that can be accomodated in an integer, you should use OracleDbType.Int32 over OracleDbType.Decimal. You get much better performance by using Byte, Int16, Int32, Single, Double over Decimal but these types can not hold the same precision and scale as Decimal type can.
-
One parameter - multiple data types?
I posted a question similar to this in my attempts to use a lexical parameter to make my ORDER BY clause dynamic, but here's a more basic version of my question.
Is there a way to order by a column from the SELECT list, and make that column capable of having more than one different data type?
I'm trying to make my ORDER BY dynamic, but the data element the user chooses to order by may be a character, a number, or a date; however, I'm trying to use a parameter to do this, and Reports requires that a paremeter be designated as only one data type.
Anyone ever found a way to make their ORDER BY dynamic enough to accommodate for the possibility of ordering by just one column that may not always have a value of the same data type?I think i have a solution for you at last.
Do...
Delare 2 user parameters.
MYPARAMETER1;
MYPARAMETER2;
In myparameter1. add values of your order by clause.
like.
COMMENT_DATE ASC
COMMENT_DATE DESC
AMOUNT ASC
AMOUNT DESC
etc
Let your myparameter2 empty & also do not diplay that on your parameter form.
Now open After Parameter Form Trigger under Report Triggers.
Code it as.
:MYPARAMETER2 := ' ORDER BY ' || ' ' || :MYPARAMETER1 ;
RETURN TRUE;
Then in your query in the end type
&myparameter2;
Hope this will work for u brice...
Capri... -
DB Storage parameter (Active Records): data type
Hi i wish to declare DB Storage parameter (Active Records) data type as as DODS but iam unable to navigate to that options. can some one help me out.
Hi........
Check this :
http://help.sap.com/saphelp_nw04s/helpdata/en/a7/214538821ae027e10000009b38f8cf/frameset.htm
Re: Regarding Maintain DB Storage Parameters
Hope this helps......
Regards,
Debjani.........
Maybe you are looking for
-
Palm Desk Top 6.2, a step backwards?
I use the Palm desktop considerably for my work schedule. I just got a new laptop which came with Vista. I downloaded the latest Palm desktop (6.2.2) and while the program works I am very disappointed that some of the features of the old version are
-
How do I get my money back from a failed app?
I purchased Maptech navigation and it does not work. How do I get my money back?
-
Capturing input video from a DV camera
I found that my old Sony HC90 DV camera makes a good video to Digital converter so I can make DVDs of my old family VHS tapes made over 15 years ago on a video only camera. I set it up using firewire so that the VCR video is visible on the camera vie
-
How do i get quick office doc to adobe reader
Docs from quick office to adobe reader?
-
Problems using Dreamweaver CS5 on Maverick Operating System
I have updated the operating system from Lyon to Maverick and I am having problems using Dreamweaver CS5, I open the program and it closes automatically. I had no problems using Dreamweaver on Lyon operating system. Is there a patch or a solution to