Parameter to table
hi,
i have a z program where in the selection screen i want to change the parameter to select-options, say company code.
this is ok but the problem i face is i need to call a function module where this particular parameter is defined as import parameter.
if i change from parameter to select-options, may i know if i need to change the parameter to tables in function modules? if i continue use import parameter can?
thanks
HI,
Just check the importing parameter of the FM.
If it is a structure or a variable field then you need to pass it as a parameter.
Can you tell me the name of the FM and the field.
Similar Messages
-
How to pass parameter for table name in form6i.
Hi ,
I am facing the problem to pass parameter for table name in form6i.
If any solution please infirm me earliest to my mail id.
([email protected])
example:
begin
select ename into :ename
from :tab_name
where empno =7788;
end;
It gives error as bad bind variable 'tab_name'
*** where :ename and :tab_name are form fields
Thanking you,
Balasahebobject name not taken as table --> what do u mean by
this?
Please be more clear..
Regards
PriyaI have two block. First block I am displaying all the table using user_objects table. Another block I want display, user which table selected, corresponding table all the records. -
Transaction/program to change AVAILABLEFLAG parameter from table UJ0_PARAM_APP
Hi Experts,
Do you know if is there a transaction/program to change BPC environment status (for example, a transaction/program that changes AVAILABLEFLAG parameter from table UJ0_PARAM_APP to "0" or "1").
Regards,
DaniloHi Danilo,
i'm trying to use the same method as you in BPC 7.5.
Did the method worked for you to set offline and online the application?
Could you please tell me how you used it?
Thanks.
Amine -
How to execute a procedure if out parameter is table type
Hi,
I need to execute a procedure, output parameter of the procedure is table type.
Oracle version I am using is 9.2.0.8 . I am using SQL*Plus
Procedure declaration
PROCEDURE current_open_cycle (p_ban IN repl_cust2.billing_account.ban%TYPE,
v_bill_seq_rec OUT bill_seq_table) ;
Table type declaration
TYPE bill_seq_table IS
TABLE OF bill_seq_rectype INDEX BY BINARY_INTEGER ;
TYPE bill_seq_rectype IS RECORD (v_cycle_run_year repl_cust2.bill.cycle_run_year%TYPE,
v_cycle_run_month repl_cust2.bill.cycle_run_month%TYPE,
v_cycle_code repl_cust2.bill.cycle_code%TYPE,
v_open_cycle BOOLEAN, -- An open cycle
v_billed_cycle BOOLEAN, --
v_invoice_number VARCHAR2(13),
v_start_date DATE,
v_end_date DATE,
v_root_ban repl_cust2.bill.root_ban%TYPE) ;
I tried executing using this script, but it failed. When I execute this oracle lost connection to data base.
declare
r_bill_seq_rec ss_invoice_utilities.bill_seq_table;
begin
ss_invoice_utilities.current_open_cycle(934018003,r_bill_seq_rec);
end;
Please help me how I should write declare block to execute this procedure and also print output of the procedure.
Regards
RaghuI don't see anything wrong with the anonymous block, assuming ss_invoice_utilities is the correct package name. Perhaps a simplified test case would show up what's not working there.
As for printing the contents of an associative array, you'll have to write some code to loop through it and construct a string per row to output via dbms_output, assuming the text will fit within dbms_output's size restrictions in 9i. dbms_output is a debugging tool though - is that the requirement?
btw "pls_integer" is less to type than "binary_integer" ;)
Edited by: William Robertson on Apr 16, 2009 8:35 AM -
HOW to pass page parameter into table function in HTMLDB
I created this object and table function in database.
create or replace TYPE date_flow_type
AS OBJECT (
time date,
max_time number,
avg_total NUMBER,
sum_total NUMBER,
max_total NUMBER,
change_rate number
create or replace TYPE date_flow_table_type AS TABLE OF date_flow_type;
create or replace function ret_date(p_date date default sysdate) return date_flow_table_type is
v_tbl1 date_flow_table_type :=date_flow_table_type();
begin
v_tbl1.extend;
v_tbl1(v_tbl1.last):=date_flow_type (p_date,1,1,1,1,1);
return v_tbl1;
end;
and it is correct in htmldb when using in these ways
SELECT TIME da,
max_time max_time,
sum_total total,
max_total max_total,
change_rate
FROM TABLE ( ret_icp_date_flow ) a;
SELECT TIME da,
max_time max_time,
sum_total total,
max_total max_total,
change_rate
FROM TABLE ( ret_icp_date_flow( sysdate-1 )) a;
but return error
ORA-00904: "RET_ICP_DATE_FLOW": 无效的标识符
when pasing page parameter into the table function
SELECT TIME da,
max_time max_time,
sum_total total,
max_total max_total,
change_rate
FROM TABLE ( ret_icp_date_flow( to_date(:p1_date,'yyyy-mm-dd') )) a
and this sql is correct while running in sqlplus .Hi!
Thanks for your reply!
I have tried this solution but it doesn't work!
When I do getInitParameter in the init function, the servlet take the default values...
Maybe I have wrote something wrong?
Excuse me for my english,
Thanks -
Cast a Input Parameter of Table Type?
Hi,
Can a stored procedure input parameter of type
TYPE T_INV_ID IS TABLE OF INV.INV_ID%TYPE INDEX BY PLS_INTEGER;
PROCEDURE P_LIST_INV(CP_INV_ID IN T_INV_ID , C_REF OUT T_CURSOR)
be used as with the Table Function?
i.e. Select * from TABLE(CP_INV_ID)
Thanks,
VictorYes you can. You will have to use execute immediate (or dbms_sql, depending on your database version).
You will have to attach the table name into the rest of the sql string (you can't use bind variables for the table name). The owner of the procedure must have the appropriate rights on the given table, or the procedure must use invoker rights (authid current_user)
execute immediate: http://download-uk.oracle.com/docs/cd/A87860_01/doc/appdev.817/a77069/10_dynam.htm
dbms_sql: http://download-uk.oracle.com/docs/cd/A87860_01/doc/appdev.817/a76936/dbms_sql.htm#998100
invoker rights: http://download-uk.oracle.com/docs/cd/A87860_01/doc/appdev.817/a77069/07_subs.htm#12848
greetings
Freek D
HI all,
I want write a common stored procedure which will perform some specified tasks on specified table. The table name is passing as a input parameter of a stored procedure. Can we use the table name as a input parameter of a stored procedure?
Please reply
BR -
"Changing" parameter and "Tables" parameter defintions in function module
If one defines "Changing" or "tables" parameters, they are treated as reference parameters.
It becomes obvious for "tables" parameters where one does not have option to check box for "Pass by Value". But for "Changing" parameters, they provide the checkbox for "Pass by Value". Even when you select this option, the function module seems to handle the parameter as a reference parameter (whatever changes you make to it in the function module are retained when you return back to a calling program).
My question is why then SAP has provided the checkbox of "Pass by Value" for "Changing" parameter?
Thanks.
Jitendra MehtaHi Chaiphon:
Thanks for explanation but I know the theory of "Pass by reference" versus "Pass by Value".
Let me rephrase my question.
When I use the importing parameter (say as a table with a dictionary table type) with reference (not "passing by value"), and if I modify the value of the parameter, the calling program (which calls function module) receives the changed value after the call.
When I use the importing parameter with "Pass by Value" box checked, the modifications made to the table inside the function module is not retained after the code leaves function module and returns to the calling program.
My question is why not the same behaviour with the "Changing parameter" in function module definition?
And if Changing parameters are always reference parameters, then why SAP has provided the "Pass by Value" check box? -
How to turn a stored procedure with a parameter into table function?
Could someone please let me know how to turn the SP below into table-value function? I want to be able to run this function by using SELECT statements with the parameter. Thanks
CREATE
PROCEDURE
[dbo].[Transformation](@year
varchar(4))
AS
BEGIN
Declare@Q1
Varchar(100)=
'['+@year+'Q1'+']'
Declare@Q2
Varchar(100)=
'['+@year+'Q2'+']'
Declare@Q3
Varchar(100)=
'['+@year+'Q3'+']'
Declare@Q4
Varchar(100)=
'['+@year+'Q4'+']'
Declare@StrQuery
Varchar(1000)
Set@StrQuery
= 'Select Date, Job, [Cost Elements],Units,
'+@Q1+'+'+'+'+@Q2+'+'+'+'+@Q3+'+'+'+'+@Q4+'
as [Amounts], ''Update'' as [Description] From Export with (nolock)'
--Print @StrQuery
Exec(@StrQuery)
ENDYou cannot use dynamic SQL in user-defined functions.
Work around (not an ideal solution, it has problems): OPENQUERY.
Blog: http://www.sqlusa.com/bestpractices2005/selectfromsproc/
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
Dynamic parameter against table TVTWT
I currently have the table TVTWT linked in order to get the name description for the distribution channel.
For example, distribution channel 00 has two rows, one german and one english.
In my dynamic parameter for distribution channel, when I try to show the name description of the distribution channel in the drop down, I get only the german name description instead of the english description. When I look at the connection for the datasource, the language is set to EN. Is there anyway I can get around this issue?
thanks for any assistance.
RichardPlease re-post if this is still an issue to the Data Connectivity - Crystal Reports Forum or purchase a case and have a dedicated support engineer work with you directly
-
Set Application Parameter for Table
Hi all,
Can anyone explain me how to set application parameters for a web dynpro application. Is is embedded in an iView in Portal.
I want to set the parameter WDTABLENAVIGATION to SCROLLBAR. I cant find it under Application properties.
ThanksFlorian,
Please see [this document|http://help.sap.com/saphelp_nw04s/helpdata/en/7b/fb57412df8091de10000000a155106/frameset.htm] and [this thread|Re: Scrolling in tables using Mouse scroll button;. I'm not sure whether WDTABLENAVIGATION application parameter is available in Web Dynpro Java but it is available in Web Dynpro ABAP for sure.
Hope this helps.
Vishwas. -
Show parameter optimizer --- table or view does not exist
one of our programmer needs to have the ability to execute "show parameter optimizer". when he does he receives "table or view does not exist". when i run said command as system i do not receive said error. is the only way around this to grant him specific rights within the database? if so, what is the lowest level of rights i can grant him to allow a proper execution? can i grant rights to only said command? -a
It's a SQL*PLUS command and can't be used in PL/SQL block. You may use something like
select * from v$parameter where name like 'optimizer%' -
Calling a Function returing(Out parameter) Nested Table Rows in Java
Hi,
I am trying to call a Function which returns Nested Table rows (as Out Parameter) in Java .
When I am trying to use
pstmt.registerOutParameter(3, OracleTypes.OTHER);
to capture the Out parameter in Java code , I get the follwoing error :
java.sql.SQLException: Invalid column type
I have even tried using OracleTypes.JAVA_OBJECT ,but I get the same error.
If I use OracleTypes.JAVA_STRUCT I get
java.sql.SQLException: Parameter Type Conflict: sqlType=2008
error.
Please help .
Am I doing the right thing ?
Thanks in advance.
NinadNinad,
Search this forum's archives for STRUCT and ARRAY and peruse the "Collections" examples on this Web page:
http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/jdbc20/jdbc20.html
Good Luck,
Avi. -
Function module(first name and last name as a parameter with table)
hi,
i just want to know how i match input value in function module with the self created ztable first name and last name as a parameter in function module(import).
regards
Ankurthanks for your help actually i am concatename first_name last_name into full_name
import parameter
FIRST_NAME like ZANKUR-FNAME first name
LAST_NAME like ZANKUR-LNAME last name
export parameter
full_name like zankur full name
excaption
error if name not matched
source code
concatename first_name last_name into full_name -
Stored Procedure with in out parameter of table of records type
Hi
I am tring to create a strore procedure inside a package like this:
procedure name_p(root in table.column%type, tab in out table_of_records_type);
I get the error:
PLS-00306: Wrong number or types of arguments in call to 'name_p'
I am working with oracle 8.1.7.
I dont really understand why this is happening.
Can anyone suggest anything.
Thnx
EdAn example :
TEST@db102 SQL> select ename, job from emp
2 where empno = 7902;
ENAME JOB
FORD ANALYST
TEST@db102 SQL> create or replace procedure show_emp (
2 v_empno in number,
3 v_ename out varchar2,
4 v_job out varchar2 )
5 is
6 begin
7 select ename, job into v_ename, v_job
8 from emp
9 where empno = v_empno;
10 end;
TEST@db102 SQL> /
Procedure created.
TEST@db102 SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[ora102 work db102]$ IN=7902
[ora102 work db102]$ set `sqlplus -s test/test@db102 << !
var out1 varchar2(30);
var out2 varchar2(30);
set pages 0
set feed off
exec show_emp($IN,:out1,:out2);
print
exit
`[ora102 work db102]$ echo $1 $2
FORD ANALYST
[ora102 work db102]$ -
Pass table name as parameter in prepared Statement
Can I pass table name as parameter in prepared Statement
for example
select * from ? where name =?
when i use setString method for passing parameters this method append single colon before and after of this parameter but table name should be send with out colon as SQL Spec.
I have another way to make sql query in programing but i have a case where i have limitation of that thing so please tell me is it possible with prepared Statment SetXXx methods or not ?
Thanks
Haroon Idrees.haroonob wrote:
I know ? is use for data only my question is this way to pass table name as parameterI assume you mean "how can I do it?" As I have already answered "is this the way?" with no.
Well, I would say (ugly as it is) String concatenation, or stored procedures.
Maybe you are looking for
-
Issue with Service Request email Notification
Hi All, Whenever we change the status of SR an email should be triggered. But it is not happening. Is there any setups we have to look for. When ever an event is raised there is no notification sent. Please let me know your comments at the earliest a
-
I have a valuable database which I started making about 10 years ago. Now that my new machine has Pages rather than AppleWorks, nothing will open the old DB. I'd rather not turn it into a spreadsheet if possible as the DB formatting is the reason it
-
ALTER TABLE table1 ADD CONSTRAINT constraint1 PRIMARY KEY(O, M_NAME) ALTER TABLE table2 ADD CONSTRAINT constraint2 PRIMARY KEY(ID, O, M_NAME) ALTER TABLE table2 ADD CONSTRAINT constraint3 PRIMARY KEY(ID, O, M_NAME, M_T) ALTER TABLE table2 ADD (CONSTR
-
How to create a loopback adapter
How to create a loopback adapter
-
Issues downloading Itunes 11.3 with Windows
I have a Windows computer and I have the 5th generation Ipod. My computer will not let me download Itunes 11.1 which is the only one compatible with this ipod! Any suggestions?