How to include PL/SQL routines in a script

I have some procedures in PL/SQL scripts (as libraries) and I need to use it in some other scripts.
So I want to "include" the first ones in the seconds.
Anything works ...
PS : I use TOAD to update my database.
Thanks for your help

I have some procedures in PL/SQL scripts (as libraries)I'm not clear what you mean by "libraries". Oracle Developer has a concept of Libraries (.PLL files that can be shared by Forms etc) - but since you say you use TOAD, I suspect that is not what you mean.
I want to "include" the first ones in the seconds.Procedures, packages, types etc can be used without you having to list them in an "include" section.
Do you really mean a "script", i.e. an OS file containing arbitrary uncontrolled commands to be evaluated dynamically at runtime, or do you mean stored PL/SQL code?

Similar Messages

  • How to  include a report  into the  SAP-SCRIPT

    plz tell me 
    How to  include a report  into the  SAP-SCRIPT
    ASAP

    creat a z report like this....................
    REPORT  zmmgl_picklist1.
    TABLES : likp,ltap,ltak.
    data : lv_NUM1 type c .
    data : lv_NUM type c.
    *&      Form  get_data1
          text
         -->IN_DATA    text
         -->OUT_DATA   text
    FORM get_data1 TABLES in_data STRUCTURE  itcsy
                         out_data STRUCTURE itcsy.
    READ TABLE in_data WITH KEY name = 'LTAP-VBELN'.
    lv_NUM = lv_NUM1 + 1.
    out_data-name = 'lv_NUM'.
      out_data-value = lv_NUM .
    APPEND out_data.
    endform.
    *&      Form  get_data
          This form is to read  details from  LIKP    *
         -->IN_DATA    text
         -->OUT_DATA   text
    FORM get_data TABLES in_data STRUCTURE  itcsy
                         out_data STRUCTURE itcsy.
      READ TABLE in_data WITH KEY name = 'LTAK-VBELN'.
      Select single bldat from likp into likp-bldat where lgnum = ltap-lgnum.
      out_data-name = 'LIKP-BLDAT'.
      out_data-value = likp-bldat.
      APPEND out_data.
       READ TABLE in_data WITH KEY name = 'LTAK-VBELN'.
      Select single vstel from likp into likp-vstel where lgnum = ltak-lgnum .
      out_data-name = 'LIKP-VSTEL'.
      out_data-value = likp-vstel.
      APPEND out_data.
    READ TABLE in_data WITH KEY name = 'LTAK-VBELN'.
      Select single kunnr from likp into likp-kunnr where lgnum = ltap-lgnum.
      out_data-name = 'LIKP-KUNNR'.
      out_data-value = likp-kunnr.
      APPEND out_data.
    ENDFORM.                    "get_data.
    after this go to the script editor......
    /: perform get_data in program zmmgl_picklist1.
    /: using &ltap-vbeln&                 (Reference field.this field          should be there in both program and script.....)
    /:changing &likp-bldat&         
    /:changing &likp-vstel&
    /:changing &likp-kunnr&
    \[removed by moderator\]
    Regards
    Anbu
    Edited by: Jan Stallkamp on Jun 10, 2008 2:26 PM

  • ANT how to include NetBeans Jar  files in my script of ANT ??

    ANT how to include NetBeans Jar files in my script of ANT ??

    I mean the library say swing layout ...
    which is SwingLayOuts1.0.jar ...
    in side this there is folder org.jDesktop....
    I want this folder in my jar file ...
    also ....
    My question ... i know the path of the jar file of NetBeans .... i can copy that ...dirctly ... but if m using Netbeans editor ... can i give NetBeans class to my jar command for ANT...........

  • How to include 3 sql statements in a single procedure

    I have 3 SQL statements to create 3 tables:
    Table1:To get all the data from an ORIGIN table that have an expiration_dates between 02/01/2006 and 04/30/2006. This has all the customer data (customer_id, company, etc…)
    Table 2:Secondly I am getting all the customer_ids for February into another table called table2
    Table 3: Thirdly I am joining table 1 and table 2 on customer_id to get all the entries for the February customers those expire in February, March and April.
    Now I want to include all these in a procedure. Can I put all these together in 1 procedure so that I can run all these at once and have the results?
    Please throw some light on this.
    Thanks,
    Ac

    I hope this code will help you a little bit
    [email protected]> create table orgin(customer_id int, company varchar2(20), expiration_date date)
    2 /
    Table created.
    Elapsed: 00:00:01.06
    [email protected]> create table table2 (customer_id int, expiration_date date)
    2 /
    Table created.
    Elapsed: 00:00:00.01
    [email protected]> create table customers_table(customer_id int, cust_date date)
    2 /
    Table created.
    Elapsed: 00:00:00.01
    [email protected]> create table table3(customer_id int)
    2 /
    Table created.
    Elapsed: 00:00:00.01
    [email protected]> create table table1(customer_id int, company varchar2(20), expiration_date date)
    2 /
    Table created.
    create or replace procedure customers is
    begin
    -- table1
    insert into table1 select customer_id, company, expiration_date
    from orgin
    where expiration_date between to_date('01-02-2006','dd-mm-yyyy')
    and to_date('30-04-2006','dd-mm-yyyy');
    -- table2
    insert into table2 select customer_id, cust_date from customers_table
    where cust_date between to_date('01-02-2006','dd-mm-yyyy')
    and to_date('28-02-2006','dd-mm-yyyy');
    -- table3
    insert into table3 select a.customer_id from table1 a, table2 b
    where a.customer_id = b.customer_id;
    end;
    Best Regards
    Krystian Zieja / mob

  • How to include PL/SQL libraries in a form

    Hello,
    Can anybody help me with this. I have written several PL/SQL procedures and functions that I have collected in a pll file. I want to use this procedures/functions in several forms that I shall convert from forms 4.5 to latest version of forms.
    I have created a library with my procedures/functions and then I call on of this procedures from a forms trigger. forms will complain that the procedure is not declared.
    When I created my PL/SQL library do I have to create a package and a body just like a database procedure? Why can't forms find my procedure?
    All procedures that are stored in the database will be found!

    The pll (or plx) file has to be in a directory indicated by the FORMSxx_PATH variable. Normally you put the pll/plx files in the same directory as your fmx files.

  • How to include html generated by a cgi-script ?

    Here's the problem:
    I need to include an html-header dynamically generated by a cgi-script: "web_nav.cgi" into my jsp-page.
    According to some documentation the <jsp:include page=... tag can only be used to include servlet, jsp or html files, and according to other sources it doesn't matter what technology the target uses, as long as it delivers html....
    I get a "..include failed, only jsp or html files can be included" error messsage so maybe the first theory is correct.
    But the problem remains: If not with the <jsp:include tag , How do I do it??
    Fast help would be really appreciated.
    Thnx a bunch.
    /Henrik

    Hi Henrik,
    1. the <jsp:include page="local_url" flush="true"/>
    works for local url which is context-relative only
    (within the same server and same context -application-)
    2. So where is your web_nav.cgi ? is it local or remote
    (on another server)
    3. You can do it, look into the jsp book or documentation
    for either jsp:include action and jsp:include directive for your need.
    --Paul

  • How to Call pl/sql procedure from shell script

    Hi,
    I've one procedure which takes the xml file name as input from one of the remote location. Every day users keep one file in that location.
    For eg:
    ACS_RPO00020110316_20110316220956.xml
    ACS_RPO00020110319_20110319220956.xml
    I need to read the latest file in this case. In this case second one is the latest file.
    Can some body please help me how to write script to pass parameter to that procedure that via shell program and execute that.
    Thanks in advance.
    Regards
    Nagendra

    hi
    I executed the below mentioned steps, but I did not get any result:
    I am pasting all the steps which I did
    -bash-3.2$ ls -lrt
    total 316
    -rw-r--r-- 1 oratest dba 4884 Mar 16 03:56 XXGEBIZ_EPO160320110356.xml
    -rw-r--r-- 1 oratest dba 4884 Mar 16 03:57 XXGEBIZ_EPO160320110357.xml
    -rw-r--r-- 1 oratest dba 4884 Mar 16 17:52 GEBIZ_ACS_RPO00020110316_20110316175216.xml
    -rw-r--r-- 1 oratest dba 38 Mar 16 18:18 GEBIZ_ACS_RPO00020110316_20110316181858.NODATA
    -rw-r--r-- 1 oratest dba 63 Mar 16 22:09 GEBIZ_ACS_RPO00020110316_20110316220956.xml
    -rw-r--r-- 1 oratest dba 9716 Mar 16 22:14 GEBIZ_ACS_RPO00020110316_20110316221429.xml
    -rw-r--r-- 1 oratest dba 12988 Mar 17 01:42 GEBIZ_POC_RPO000EPO20110317_20110317014247.xml
    -rw-r--r-- 1 oratest dba 13103 Mar 17 01:53 GEBIZ_POC_RPO000EPO20110317_20110317015356.xml
    -rw-r--r-- 1 oratest dba 38 Mar 17 01:57 GEBIZ_POC_RPO00020110317_20110317015712.NODATA
    -rw-r--r-- 1 oratest dba 38 Mar 17 18:44 GEBIZ_ACS_RPO00020110317_20110317184423.NODATA
    -rw-r--r-- 1 oratest dba 12326 Mar 17 18:46 GEBIZ_ACS_RPO00020110317_20110317184603.xml
    -rw-r--r-- 1 oratest dba 67578 Mar 18 01:32 GEBIZ_POF_RPO000EPO20110318_20110318013232.xml
    -rw-r--r-- 1 oratest dba 14484 Mar 18 20:27 GEBIZ_POF_RPO000EPO20110318_20110318202754.xml
    -rw-r--r-- 1 oratest dba 47653 Mar 19 01:29 GEBIZ_PYS_RPO00020110319_20110319012953.xml
    -rw-r--r-- 1 oratest dba 937 Mar 21 09:34 GEBIZ_SUPP.xml
    -rw-r--r-- 1 oratest dba 947 Mar 21 09:35 GEBIZ_SUPP1.xml
    -rwxrwxrwx 1 oratest dba 121 Mar 21 17:43 test
    -bash-3.2$
    -bash-3.2$ cat > test
    ls -lrt | tail -1
    filelist = $(ls GEBIZ_SUPP*.xml)
    for file in $filelist ; do
    echo "inside loop"
    file = $file
    echo "file name " $file
    done
    XGBZ_SUPP_MAST_XMLTAG_PROC $file
    -bash-3.2$ chmod 777 test
    -bash-3.2$ ./test
    -bash: ./test: Text file busy
    -bash-3.2$
    Initially I listed down all the files, in a sample file I've written the steps. But nothing is executed.
    One thing I want to ask here XGBZ_SUPP_MAST_XMLTAG_PROC is my procedure. I think I need to invoke sqlplus in the so as to execute my pl/sql script.
    Gurus, please let me know how to write them.
    Regards
    Nagendra

  • How to include a Header in the Open Script

    Hi
    I have a header called "X-Forwarded For", and i want it to be used in the script, i have tried the following statements to do so:
    1) http.headers(http.header("X-Forwarded-For", "12.1.1.1",Header.HeaderAction.Modify));
    2) http.headers(http.header("X-Forwarded-For", "12.1.1.1",Header.HeaderAction.Add));
    But none of the ways worked for me. Can you please help me out to deal with this problem?
    Thanks & Regards
    - Fahim

    Perhaps I was not clear in my previous reply. You must send the header with the first navigation, and then it will be sent with all future navigations. Your cannot call http.headers() directly unless you save the return of the headers, and then pass the returned headers to the first navigation. After that first navigation, you will not need to send the new header in any subsequent navigations assuming the proper HeaderAction.
    http.get(1, "http://testserver2",
      http.querystring(http.param("QueryString1", "QueryValue1")),
      http.headers(http.header("X-Forwarded-For", "12.1.1.1", Header.HeaderAction.SetIfNotSet)),
      false, "ASCII", "ASCII");The 12.x OpenScript users guide explains the http.get and http.post in full detail in sections "6.6.2 Adding HTTP Get Navigation", and "6.6.3 Adding HTTP Post Navigation", which includes setting http.headers()

  • Looping through SQL statements in shell script

    Hello members,
    I'm working on the Solaris environment and the DB i'm using is Oracle 10g. Skeleton of what I'm attempting;
    Write a ksh script to perform the following. I have no idea how to include my sql query within a shell script and loop through the statements. Have therefore given a jist of what I'm attempting, below.
    1. Copy file to be processed (one file at a time, from a list of 10 files in the folder ).
    for i in *
               do
               cp $i /home/temp[/CODE]2 . Create a snapshot(n) table : Initialize n = 1 -- -- To create my snapshot table and inserts records in SQL
    create table test insert account_no, balance from records_all;3. Checking if the table has been created successfully:
    select count(*) from snapshot1 -- query out the number of records in the table -- always fixed, say at 400000
    if( select count(*) from snapshot(n) = 400000 )
    echo " table creation successful.. proceed to the next step "
    else
    echo " problem creating table, exiting the script .. "  4. If table creation is successful,
    echo " select max(value) from results_all " -- printing the max value to console
    5. Process my files using the following jobs:
    ./runscript.ksh - READ -i $m ( m - initial value 001 )
    ./runscript.ksh - WRITE -i $m ( m - initial value 001 -- same as READ process_id )
    -- increment m by 1
    6. Wait for success log
    tail -f log($m)* | -egrep "^SUCCESS"7. looping to step1 to :
    Copy file 2 to temp folder;
    create snapshot(n+1) table
    Exit when all the files have been copied for processing.
    done -- End of Step 1
    Pointers on getting me moving will be very valuable.
    thanks,
    Kris

    Hi,
    Are you inserting the data from file or from some table.
    If it is from file, I suggest sql loader would be better, I suppose.
    If it is from table, then something like this
    for i in *
               do
    sqlplus username/password@db_name<<EOF
                create table test select * account_no, balance from records_all;
    EOF
    exit
    doneAnurag

  • Call report from pl-sql routine

    I just got started on the report-tool, so, this might be a very basic question, but, would appreciate your
    response.
    I have a pl-sql routine registered as a concurrent program. How do I make call to report-builder from this routine.
    Thxs,

    Hello Chirag,
    If you want to invoke and run a report from your PL/SQL code in the database, you can do so by installing and using the SRW package supplied with Reports. This package allows you to run parametrized report jobs on a specified Reports Server from your PL/SQL program and track the job status. Please take a look at the documentation for this package in the Publishing Reports manual on OTN at: http://download-west.oracle.com/docs/html/A92102_01/toc.htm.
    On the other hand, if you just need to invoke the Reports Builder program from your PL/SQL routine, you would need to use the default builtin for calling external applications from PL/SQL.
    Thanks,
    The Oracle Reports Team.

  • How to schedule a sql query on Windows

    Hi Experts;
    I got a sql query that I need to put on schedule, (on windows) in order it runs everyday at specific time.
    I got the query, but I want to know the next:
    How to invoke SQLPlus from this query? Explain how to include the user/password@SID
    Do I need to create this query in a .bat file?
    Also I want to know, how to send the results to an email?
    Thanks for your help.
    Regards
    Al

    I would suggest to put your sql query to a separate file and spool the result to a concrete file:
    query.sql:
    spool query.lst
    select * from emp;
    spool off;create a bat file query.bat:
    sqlplus <connection> @query.sql
    ...work with content of query.lst, send mail etcThen schedule your bat file with Windows scheduler
    The above could be simplified with JavaScript or VBScript
    Thanks.

  • How to configure Oracle Sql Developer for 9i

    Hi,
    We are using oracle 9i for existing application, and i am trying to connect oracle 9i through SQL developer 1.5.1, i got an error message "Unsupported Oracle Database Version".
    Appreciate if any body guide me in this.
    regards
    Husal.

    After removing dictionary statistics with dbms_stats.delete_schema_stats(ownname => 'SYS') I noticed the initial SQL Developer object list query became very slow.
    Removal of dictionary statistics increased the predicted Oracle optimizer (CBO) costs. Previous SYS statistics were collected perhaps without realising the consequences.
    You may wish to try dbms_stats.gather_schema_stats(ownname => 'SYS', method_opt => 'FOR ALL COLUMNS SIZE AUTO', sample_size => dbms_stats.auto_sample_size).
    Recent Oracle 10G versions include a gather_dictionary_stats routine.
    Suggest you try this on a development DB first.

  • How to include 0STOCK_VAL in a Query based on APO DataSource?

    Hi All,
    I have a requirement to include *0STOCK_VAL" from Inventory to the APO InfoCube. But the problem with this is, this particular KeyFigure is not present in the APO hence it cannot be included in the APO DataSource i.e. we cannot get this from the Source System.
    I checked the Production system, 0STOCK_VAL InfoObject is avaiable in one of the InfoCube but it is not present in any DSO's. Since it is not present in any of the DSO's we cannot write a Routine to read it from any of the table.
    I even thought of including the InfoCube where 0STOCK_VAL is present into a MultiProvider along with the APO InfoCube. I can define the joining condition based on Plant and Material. But if I drill down any other characteristics which are not common in both the  InfoCube then we will have a blank line in the Query which is not recommended.
    But this KeyFigure is very much needed in the Query.
    My question is how to include this in the APO InfoCube or How to get this in the Query with values??
    Can anybody please help me on this.
    Thanks in advance.
    Prasapbi

    hi Matt,
      In your example like a transaction was paid for with a payment type of PTAM, then you need all the transaction details. I suppose that all the required transaction details along with payment type PTAM will be loaded into an infoprovider and you run a report on top of this infoprovider. Then for that report you need to have a selection screen variable for Payment Type and if the user enters the payment type PTAM, then he can get all the other transaction details from the infoprovider.
    Let me know if i don't understand the requirement correctly.
    Hope it helps....

  • How to Include the URL of a page in Notification Email ?

    Hi ALL,
    I need your help to implement the below requirement.
    I have implemented Email notification in our application.so when ever the user creates any form/modify the form ,mail will be triggered to them.Now the users want to include the link in the email.
    When they click the link in email ,it should be navigated to the newly created form page in Apex.
    How to include the link of the page in the Email process?
    Thanks,
    Ramya.

    Hi Tuceef,
    Thanks for the response.
    I have created another hidden item P8_URL1 IN page 8 and
    I have created an on submit process in page processing section.
    the pl/sql code is
    Begin
    htp.p('<script type = "text/javascript">');
    function setLocation(href)
               // set the location path specified in the textbox.
               htp.p('location.href = document.getElementById(href).value;');
              htp.p('P8_URL1:= location.href');
    htp.p('</script>');
    end;But the code fetching the plain URL only,it's navigating to the empty form page when i click on the URL.
    Please correct the code if am wrong anywhere!
    Thanks & Regards,
    Ramya.

  • How to delete a Form Routine in Table Maintenance?

    Hello,
    Very Good Morning!
    How to delete a Form Routine in Table Maintenance?
    I had created a Form Routine at Environment>Modifcation>Events.
    I want to delete a Form Routine that I had created. Can any one please explain me the way I can delete it.
    Any suggestions are appreciated!
    Thanks & Regards
    Kittu

    Hello Rudra,
    Very Good morning!
    I am in Environment>Modification>Events.
    Here is had created a form routine ie...
    01   From_entry    Editor Icon
    In Editor Icon we will write the code.
    This will create a Include in the Function group.
    I had already comented that Include from the Function group. I can even delete it. But, I want to delete the Form Routine that I had created....
    01   From_entry    Editor Icon
    Can any one hepl me please...
    Thanks & Regards,
    Kittu

Maybe you are looking for