hi all
i am a new member to this forum.i am tryin to call a package from an anonymous pl/sql block(say a wrapper).the package is like(IS SPECIFIC TO OUR APPLICATION). -
-
create or replace package E1QSFR05 as
-
-
procedure E1QSFPOP(
-
P_UlcIfc in out SRYULCIFC_1
-
, P_Hdr in out nocopy E1Y_SF_HDR_1
-
, P_Dtls in out nocopy E1C_SF_DTLS_1
-
);
-
-
function F_Revision return char;
-
-
end E1QSFR05;
-
/
-
-
-
create or replace package body E1QSFR05 as
-
-
LOG_DECLARE_ID(G_LogId,'E1QSFR05')
-
-
G_UB number;
-
G_SP number;
-
G_SU number;
-
-
procedure E1QSFPOP(
-
P_UlcIfc in out SRYULCIFC_1
-
,P_Hdr in out nocopy E1Y_SF_HDR_1
-
,P_Dtls in out nocopy E1C_SF_DTLS_1
-
) is
-
-
detrec1 E1Y_SF_DTLS_1;
-
anly_type_1 varchar2(1);
-
-
-
select_string varchar2(1000);
-
where_string varchar2(100);
-
cond_string varchar2(100);
-
sql_string varchar2(4000);
-
-
type curs_type is ref cursor;
-
curs1 curs_type;
-
-
begin
-
P_Dtls := E1C_SF_DTLS_1();
-
-
--select_string:='select C.E1_POS_ID "POS_NO", decode(row_number() over (partition by C.BEZ_LANG,A.E1_GRP_NO order by C.BEZ_LANG),1,C.BEZ_LANG,NULL)||','||B.E1_QUES_NO "Group/Question" from E1_GRP_MSTR A, E1_GRP_QUES_MSTR B, E11POS_MSTR C,E1_SF_HDR';
-
select_string:='select C.E1_POS_ID "POS_NO",A.E1_GRP_NO,B.E1_QUES_NO,C.BEZ_LANG from E1_GRP_MSTR A, E1_GRP_QUES_MSTR B, E11POS_MSTR C,E1_SF_HDR';
-
where_string:= 'where E1_ANLY_TYPE =:a';
-
cond_string:='and A.E1_GRP_NO=B.E1_GRP_NO';
-
-
begin
-
if(P_Hdr.E1_ANLY_TYPE = '1') then
-
anly_type_1:='1';
-
sql_string := select_string||' '||where_string||' '||cond_string;
-
-
elsif(P_Hdr.E1_ANLY_TYPE = '2') then
-
anly_type_1:='2';
-
sql_string := select_string||' '||where_string||' '||cond_string;
-
end if;
-
-
open curs1 for sql_string using anly_type_1;
-
loop
-
detrec1:= E1Y_SF_DTLS_1.F_GetNewRecord();
-
fetch curs1 into detrec1.E1_POS_ID,detrec1.E1_GRP_NO,detrec1.E1_QUES_NO,
-
detrec1.BEZ_LANG;
-
-
exit when curs1%notfound;
-
P_Dtls.EXTEND;
-
P_Dtls(P_Dtls.LAST):= detrec1;
-
end loop;
-
close curs1;
-
end;
-
-
exception
-
when others then
-
RAISE_EXCEPTION
-
-
end E1QSFPOP;
-
-
procedure InitPackage is
-
begin
-
G_UB := SRQETIF0.F_UB;
-
G_SP := SRQETIF0.F_SP;
-
G_SU := SRQETIF0.F_SU;
-
end;
-
-
function F_Revision return char is
-
begin
-
return('$Revision: 0.0 $');
-
end F_Revision;
-
-
begin
-
InitPackage;
-
end E1QSFR05;
-
-
-
-
i WANT TO CALL THE PACKAGED PROCEDURE NOW.I USED THIS TO CALL.. I AM NOT GETTING THE REQUIRED O/P.
-
-
set serveroutput on size 100000
-
-
Declare
-
-
P_UlcIfc SRYULCIFC_1;
-
P_Dtls E1C_SF_DTLS_1;
-
P_Hdr E1Y_SF_HDR_1;
-
detrec E1Y_SF_HDR_1;
-
detrec1 E1Y_SF_DTLS_1;
-
Begin
-
-
P_Dtls := E1C_SF_DTLS_1();
-
detrec1 := E1Y_SF_DTLS_1.F_GetNewRecord();
-
detrec := E1Y_SF_HDR_1.F_GetNewRecord();
-
-
detrec.E1_ANLY_TYPE:=1;
-
-
detrec1.E1_POS_ID:= '101';
-
detrec1.E1_GRP_NO:= '5';
-
detrec1.E1_QUES_NO:='1';
-
detrec1.BEZ_LANG:='Hi';
-
-
P_Dtls.EXTEND;
-
P_Dtls(P_Dtls.LAST):= detrec1;
-
DBMS_OUTPUT.PUT_LINE('Procedure Call'||P_Dtls.LAST);
-
-
P_Dtls := E1C_SF_DTLS_1();
-
-
detrec1 := E1Y_SF_DTLS_1.F_GetNewRecord();
-
detrec := E1Y_SF_HDR_1.F_GetNewRecord();
-
-
detrec.E1_ANLY_TYPE:=1;
-
-
detrec1.E1_POS_ID:= '102';
-
detrec1.E1_GRP_NO:= '4';
-
detrec1.E1_QUES_NO:='2';
-
detrec1.BEZ_LANG:='Bye';
-
-
P_Dtls.EXTEND;
-
P_Dtls(P_Dtls.LAST):= detrec1;
-
DBMS_OUTPUT.PUT_LINE('Procedure Call'||P_Dtls.LAST);
-
-
P_Dtls := E1C_SF_DTLS_1();
-
-
-
e1qsfr05.E1QSFPOP(P_UlcIfc,detrec,P_Dtls);
-
end;
-
O/P:
-
-
Procedure Call : 1
-
Procedure Call: 1
-
-
pleas help me with this..
3 2163
Could you please provide more explanation about your procedure and the output that you are expecting?
Could you please provide more explanation about your procedure and the output that you are expecting?
sure amit..
actually i m trying to populate the fields in the front end..
just fr testing purpose..when i call the package from a pl/sql block as u see..i gt an o/p like
procedure call :1..
bt i require the o/p to be: 101 5 1 hi..(something like this).. for THE BELOW DECLARATION..am i clear? pleas any suggestions detrec1.E1_POS_ ID:= '101';
detrec1.E1_GRP_ NO:= '5';
detrec1.E1_QUES _NO:='1';
detrec1.BEZ_LAN G:='Hi';
sure amit..
actually i m trying to populate the fields in the front end..
just fr testing purpose..when i call the package from a pl/sql block as u see..i gt an o/p like
procedure call :1..
bt i require the o/p to be: 101 5 1 hi..(something like this).. for THE BELOW DECLARATION..am i clear? pleas any suggestions detrec1.E1_POS_ ID:= '101';
detrec1.E1_GRP_ NO:= '5';
detrec1.E1_QUES _NO:='1';
detrec1.BEZ_LAN G:='Hi';
Since you are printing array's LAST position using array.LAST, it is printing as 1. If you need to print other values then include them in DBMS_OUTPUT as well.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Marc Shapiro |
last post by:
I am relatively new to python (I have used it on and off for a few small
projects over the last few years) so I imagine that what I am trying to do
has already been done, but practical experience, even if it is reinventing
the wheel, is still useful, so...
I am trying to write a module to handle drop down menus using curses (on
linux). ...
|
by: Robert Scheer |
last post by:
Hi.
I wrote some stored procedures used by a web application. As I am
fairly new to Oracle, I am missing some concepts when creating these
procedures, as a result, the application is suffering from poor
performance everytime I call these procedures. I would like your help
in order to identify potential mistakes when coding these procedures...
|
by: Abhilash |
last post by:
I referenced a COM dll in ASP.NET and using the following statement to
instantiate the library:
Dim Package As New PkgUtil.Package
In my development PC it is possible to instantiate the library and also to
call different methods exposed by the DLL.
The same application deployed on the client's web server fails to
instantiate the DLL....
|
by: John Friedland |
last post by:
My problem: I need to call (from C code) an arbitrary C library
function, but I don't know until runtime what the function name is,
how many parameters are required, and what the parameters are. I can
use dlopen/whatever to convert the function name into a pointer to
that function, but actually calling it, with the right number of
parameters,...
|
by: =?Utf-8?B?VmlyYWogUmFv?= |
last post by:
Hi,
I am calling DTS package using C# in my current application on dev server.
The DTS package tranfers file from Excel to SQL Server table.
When i migrated the package from dev server to production server, i had
forgotten to change the server name in DTS package.
Is there any way i can pass the connection string to DTS package through...
| |
by: Samuel |
last post by:
Hi,
Given the following directory structure:
---------
|-- Obj.py
|-- __init__.py
|-- foo
| |-- FooTest.py
| `-- __init__.py
|
by: cnsabar |
last post by:
Hi All,
Is there any way to call user defined perl package from other system.
For Example.
In my perl script, I am defining a package/modules using
use myPackage;
|
by: Martin Rubey |
last post by:
Dear all,
I'm trying to call from common lisp functions written for Sage
(www.sagemath.org), which in turn is written in python. To do so, I tried
http://common-lisp.net/project/python-on-lisp/. It was quite easy to get it to
run and do some simple things with python.
However, I was unable to get sage to run within it.
If I start my...
|
by: pinky22 |
last post by:
I am calling SSIS package from a .Net windows UI. Both SSIS & .Net app are created in 2008. The SSIS package is stored in file system. When I ran .Net app I got error-
The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |