How to extract many procedures data into one procedure.

Hi all,
I have about 16 procedures which extracts a csv files every time we run
Exec package.procedure1;
Exec package.procedure2;
Exec package.procedure3;
I wish to stop doing this tedious operation(-_-)
How to put all these procedures in an EXTRACT_ALL procedure.
I tried something like this.But I think i am getting it all wrong.
PROCEDURE extract_all_states
     IS
      outfile     UTL_FILE.file_type;
         curr_curs1   varchar2(4000);
         curr_curs2   varchar2(4000);
     BEGIN
     extract_Penang (curr_curs1);
                extract_Selangor (curr_curs2);
     UTL_FILE.fclose (outfile);
   EXCEPTION
      WHEN UTL_FILE.invalid_mode
      THEN
         UTL_FILE.fclose (outfile);
         gv_error_message := 'Invalid Mode Parameter' || '  -  ' || (SQLERRM);
         RAISE gv_exp_generate_error;
      WHEN UTL_FILE.invalid_path
      THEN
         UTL_FILE.fclose (outfile);
         gv_error_message := 'Invalid File Location' || '  -  ' ||(SQLERRM);
         RAISE gv_exp_generate_error;
      WHEN UTL_FILE.invalid_filehandle
      THEN
         UTL_FILE.fclose (outfile);
         gv_error_message := 'Invalid Filehandle' || '  -  ' ||(SQLERRM);
         RAISE gv_exp_generate_error;
      WHEN UTL_FILE.invalid_operation
      THEN
         UTL_FILE.fclose (outfile);
         gv_error_message := 'Invalid Operation' || '  -  ' || (SQLERRM);
         RAISE gv_exp_generate_error;
      WHEN UTL_FILE.read_error
      THEN
         UTL_FILE.fclose (outfile);
         gv_error_message := 'Read Error' || '  -  ' || (SQLERRM);
         RAISE gv_exp_generate_error;
      WHEN UTL_FILE.internal_error
      THEN
         UTL_FILE.fclose (outfile);
         gv_error_message := 'Internal Error' || '  -  ' || (SQLERRM);
         RAISE gv_exp_generate_error;
      WHEN UTL_FILE.charsetmismatch
      THEN
         UTL_FILE.fclose (outfile);
         gv_error_message :=
               'Opened With FOPEN_NCHAR But Later I/O Inconsistent'
            || '  -  '
            || SQLERRM;
         RAISE gv_exp_generate_error;
      WHEN UTL_FILE.file_open
      THEN
         UTL_FILE.fclose (outfile);
         gv_error_message := 'File Already Opened' || '  -  ' ||(SQLERRM);
         RAISE gv_exp_generate_error;
      WHEN UTL_FILE.invalid_maxlinesize
      THEN
         UTL_FILE.fclose (outfile);
         gv_error_message := 'Line Size Exceeds 32K' || '  -  ' ||(SQLERRM);
         RAISE gv_exp_generate_error;
      WHEN UTL_FILE.invalid_filename
      THEN
         UTL_FILE.fclose (outfile);
         gv_error_message := 'Invalid File Name' || '  -  ' ||(SQLERRM);
         RAISE gv_exp_generate_error;
      WHEN UTL_FILE.access_denied
      THEN
         UTL_FILE.fclose (outfile);
         gv_error_message := 'File Access Denied By' || '  -  ' ||(SQLERRM);
         RAISE gv_exp_generate_error;
      WHEN UTL_FILE.invalid_offset
      THEN
         UTL_FILE.fclose (outfile);
         gv_error_message := 'FSEEK Param Less Than 0' || '  -  ' || (SQLERRM);
         RAISE gv_exp_generate_error;
      WHEN OTHERS
      THEN
         UTL_FILE.fclose (outfile);
         gv_error_message := 'Unknown UTL_FILE Error' || '  -  ' || (SQLERRM);
         RAISE gv_exp_generate_error;     
     END extract_all_states; 
   END states_pkg;Error(321,3): PLS-00306: wrong number or types of arguments in call to 'EXTRACT_PENANG'
Error(321,3): PLS-00306: wrong number or types of arguments in call to 'EXTRACT_SELANGOR'
null

Why is it that your "tedious" manual operation shows no parameters to the procedures while your extract_all procedure has parameters?
You need to call each of the individual procedures in exactly the same way as you do when you execute them individually at the command line. In your extract_all procedure, you are clearly not doing so, hence the "wrong number or types of arguments in call to"
John

Similar Messages

  • How to merge many XML files into one?

    Hi: I got a small project to combine many XML files into one and convert the combined XML file in Excel using AppleScript. My XML files look like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <Metadataobject>
        <from>[email protected]</from>
        <jobname>B3_IM09MBDUF</jobname>
        <pages>2</pages>
        <priority>3</priority>
        <timezone>CEST</timezone>
        <year>2013</year>
        <month>7</month>
        <day>15</day>
        <hour>11</hour>
    </Metadataobject>
    and like this...
    <?xml version="1.0" encoding="UTF-8"?>
    <Metadataobject>
        <from>[email protected]</from>
        <jobname>P1_FR1330G006007_Kate_van der Vaart</jobname>
        <pages>2</pages>
        <priority>1</priority>
        <timezone>CEST</timezone>
        <year>2013</year>
        <month>7</month>
        <day>12</day>
        <hour>16</hour>
    </Metadataobject>
    I get many XML files like this. And I want them to be combined and shown like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <Metadataobject>
        <job id="1">
        <from>[email protected]</from>
        <jobname>B3_IM09MBDUF</jobname>
        <pages>2</pages>
        <priority>3</priority>
        <timezone>CEST</timezone>
        <year>2013</year>
        <month>7</month>
        <day>15</day>
        <hour>11</hour>
        </job>
        <job id="1">
        <from>[email protected]</from>
        <jobname>P1_FR1330G006007_Kate_van der Vaart</jobname>
        <pages>2</pages>
        <priority>1</priority>
        <timezone>CEST</timezone>
        <year>2013</year>
        <month>7</month>
        <day>12</day>
        <hour>16</hour>
        </job>
    </Metadataobject>
    And finally the combined XML file converts in Excel sheet with column headings "Job ID", "From", "Job Name" and so on...
    Or there is another best way to get the same result...
    Thanks

    That is just an intermediary state to get to the excel version. Actually I get many small XML files (as shown above) from client and I want them all combined in an excel sheet with common column headings... like this...
    from
    jobname
      pages
    priority
    timezone
    year
    month
    day
    hour
    id
    [email protected]
    B3_IM09MBDUF
       2
    3
    CEST
    2013
    7
    15
    11
    1
    [email protected]
    B3_IM09MBDUF
       2
    3
    CEST
    2013
    7
    15
    11
    2
    Thanks for your response.

  • How to use many format data into a template?

    How to design a template but it can interface from many format data? 

    This is the one from 2010 but should still work.
    http://www.bfcnetworks.com/blogs/alexpearce/pull-sharepoint-2010-document-properties-into-word-quick-parts/
     You basically create a new document in the library (must have the columns you want into the word document), then you use the Quick
    Parts to insert the data where needed. Then you save this document as your template. Then anytime someone creates a document in the library when you open the document it will read from the columns of the item.
    I used a workflow and had the users actually update a SharePoint list, then that in turn creates a new document in the document library and populate the columns from the list form. Then You can send that document link to folks to download / print or whatever.
    Is that what you are talking about?

  • How to extract Hierarchical Master data into flatfile

    Hello Experts,
    I have a requirement to extract Master data (Texts, Attr, Hierarchies)  of all Info Objects pertaining to a given Infocube ( say BoxA)
    I am aware that I can manually dump the data / use infospoke to get data into flatfile without hassle in case of texts/attributes.
    (1)But I doubt it for hierchical data. In case of hierarchical data I have to create an ABAP code to extract master data.
    Below is the link I got when I am searching SDN.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb?quicklink=index&overridelayout=true
    But I didnt understand it the mechanism behind the extraction.
    Can anyone please give me a detailed explanation on how to do it or some other reference documents.
    Note: I am going to use that master data and import that again into different box ( say BoxB) and there is no connection between two systems (BoxA and BoxB).
    Thanks.
    Edited by: saptrain on Mar 18, 2010 12:24 AM
    Edited by: saptrain on Mar 18, 2010 12:32 AM
    Edited by: saptrain on Mar 18, 2010 4:18 AM

    Hi,
    You can use the Program Z_SAP_HIERARCHY_DOWNLOAD to download as flat file. Upload this flat file into another system.
    Regards
    Arnab

  • How to extract HR master data into MS outlook2007

    Hi Gurus,
    We want to populate the SAP HR master data(eg: user's  job title, Reporting to, Working hours, EMP ID, etc..)into MicroSoft outlook contact list.( or AD) So, other users can easily find out about the mailed user  or Team Lead..
    Is there any connector available to get the data into MS outlook.
    OR please guide me for any alternatives.
    Environment: ECC 6.0 Windows 2003 server, MS SQL 2005,  MS outlook 2007
    Thanks in advance
    Regards
    Balaji

    Hi,
    I would rather try to update the Exchange Server / Active Directory (behind Outlook) through LDAP connector.
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/48/75c2b2bc27055ee10000000a42189b/frameset.htm
    Best regards,
    Guillaume

  • How to extract the historical data from R/3

    hi
    I am extracting data from R/3 through LO Extraction. client asked me to enhance the data source by adding field. i have enhanced the field and wrote exit to populate the data for that field.
    how to extract the historical data into BI for the enhanced field. already delta load is running in BI.
    regards

    Hi Satish,
    As per SAP Standard also the best way is to delete whole data from the cube and then load the data from set up tables as you have enhanced the data source.
    After data source enhancement it is supported to load normally because you don't get any historical data for that field.
    Best way is to take down time from the users, normally we do in weekends/non-business hours.
    Then fill the set-up tables; if the data is of huge volume you can adopt parallel mechanism like:
    1. Load set-up tables by yearly basis as a background job.
    2. Load set-up tables by yearly basis with posting periods from jan 1st to 31st dec of any year basis as a background job.
    This can make your self easier and faster for load of set-up tables. After filling up set-up tables. You can unlock all users as there is no worries of postings.
    Then after you can load all the data into BI first into PSA and then into Cube.
    Regards,
    Ravi Kanth.

  • How can we acess the data of one component into othr component in webdynpo?

    How can we acess the data of one component into other component in webdynpro....
    I need an Field input from one webdynpro component(comp1)  which is away from the line of process to the other component(comp2) we need that data........I mean i need the field info of comp1 where we doesn't navigate through the Comp1 in the portal & directly access the  component comp2.........kindly share your ideas.....and possible ways .........
    any doughts do post.....
    thanks in advance!

    Hi,
    Please post your query in forum Web Dynpro ABAP Forum, under Application server.
    You have to define the source component as in the used component in the target one to do that.
    after that you will be able to get data from that component.
    Regards,
    Vaibhav

  • How can we acess the data of one component into othr compnent in webdynpro?

    How can we acess the data of one component into other component in webdynpro....
    I need an Field input from one webdynpro component(comp1) which is away from the line of process to the other component(comp2) we need that data........I mean i need the field info of comp1 where we doesn't navigate through the Comp1 in the portal & directly access the component comp2.........kindly share your ideas.....and possible ways .........
    any doughts do post.....
    thanks in advance!

    Hi Reddy,
    You can do it in multiple ways. One way would be to try transfer the parameters through URL & the other would be to work with the concept of interface nodes. Please try go through these 2 threads ( [Thread 1|Call view of another WDA Component and pass the value to it; & [Thread 2|navigation from one program to another; )where I have explained about working with Interface node in detail. You can refer to this [thread |receving parameters between two standard webdynpro applications;to see as to how you can do the same via parameters in URL.  Hope it would help resolve your problem.
    Regards,
    Uday

  • How to load Matrix report data into basic table data using ODI

    Hi,
    How to load Matrix report data into basic table data using oracle Data Integrator ?
    Requirement Description:
    Following is the matrix report data:
    JOB                       DEPT10                DEPT20 
    ANALYST                                           6000
    CLERK                   1300                     1900 Need to convert it into below format:
    JOB                             Dept                        Salary
    ANALYST                  DEPT10     
    ANALYST                  DEPT20                     6000
    CLERK                       DEPT10                    1300
    CLERK                       DEPT20                    1900
        Thanks for your help in advance. Let me know if any further explanation is required.

    Your list seems to be a little restrictive, you can do a lot more with ODI procedures.
    If you create new procedure, and add a step. In the 'command on source' tab set you technology and schema as per your source database. Use the unpivot functionality as described in the link, please, rather than using 'SELECT *' use the appropriate column names and alias them for eg:
    SELECT job as job,
    deptsal as deptsal,
    saldesc as saledesc
    FROM pivoted_data
    UNPIVOT (
    deptsal --<-- unpivot_clause
    FOR saldesc --<-- unpivot_for_clause
    IN (d10_sal, d20_sal, d30_sal, d40_sal) --<-- unpivot_in_clause
    Then in your 'command on target' tab set the technology and schema to your target db, then put your INSERT statement for eg:
    INSERT INTO job_sales
    (job,
    deptsal,
    saledesc
    VALUES
    :job,
    :deptsal,
    :saledesc
    Therefore you are using bind variables from source to load data into target.
    Obviously if the source and target table are in the same database, then you can have it all in one statement in the 'command on target' as
    INSERT INTO job_sales
    (job,
    deptsal,
    saledesc
    SELECT job as job,
    deptsal as deptsal,
    saldesc as saledesc
    FROM pivoted_data
    UNPIVOT (
    deptsal --<-- unpivot_clause
    FOR saldesc --<-- unpivot_for_clause
    IN (d10_sal, d20_sal, d30_sal, d40_sal) --<-- unpivot_in_clause
    also set the log counter as 'Insert' on the tab where your INSERT statement is, so you know how many rows you insert into the table.
    Hope this helps.
    BUT remember that this feature only came out in Oracle 11g.

  • Have multiple accounts, how can I move all products into one account?

    have multiple accounts, how can I move all products into one account?

    Backup Software Recommendations
    Carbon Copy Cloner
    Data Backup
    Deja Vu
    SuperDuper!
    Synk Pro
    Tri-Backup
    Others may be found at VersionTracker or MacUpdate.
    Visit The XLab FAQs and read the FAQ on backup and restore.  Also read How to Back Up and Restore Your Files.
    Or you can simply use the Restore option of Disk Utility to clone the drive to the backup:
    Clone using Restore Option of Disk Utility
    Open Disk Utility from the Utilities folder.
    Select the destination volume from the left side list.
    Click on the Restore tab in the DU main window.
    Check the box labeled Erase destination.
    Select the destination volume from the left side list and drag it to the Destination entry field.
    Select the source volume from the left side list and drag it to the Source entry field.
    Double-check you got it right, then click on the Restore button.
    Destination means the external backup drive. Source means the internal startup drive.

  • How to download the Dynamic data into PPT format

    Hi Friends,
    I have one doubt on WDJ. How to download the Dynamic data into PPT format. For Example Some Dynamic data is available in to View in that One Download Link or button available. Click on Download link or button download that data into PPT Format
    Is it possible for WDJ. If possible please tell me.
    Or
    How to create Business Graphics in Web Dynpro Applications depening up on Excel Data and finally we can download the  Business Graphics  into powerpoint presentation.
    Thank you,
    Regards
    Vijay Kalluri
    Edited by: KalluriVijay on Mar 11, 2011 6:34 AM

    Hi Govindu,
    1. I have one doubt on WDJ. Click on either Submit Buttion or LinkToURL UI we can download the file that file having ppt formate(Text.PPT).
    I am using NWDS Version: 7.0.09 and Java Version: JDK 1.6
    2. is it possible to download the business Graphics in to the PPT by using Java DynPro
    Regards
    VijayK

  • How to save the form data into adobe db?

    Hi All,
    How to save the form data into adobe db?
    I have designed one xdp file.
    Through processFormSubmission(), I got the submitted form data as Document obj.
    Then I have called the workflow kickoff program.
    code:
    InvocationRequest request = myFactory.createInvocationRequest ("myprocessname", //Specify the long-lived process name
    "invoke", //Specify the operation name
    params, //Specify input values (HashMap obj)
    false); //Create an asynchronous request
    It successfulyy started the workflow, but the submitted form data is not saved anywhere.
    And also, How get the form data from tables?
    Please provide the solution for the above.
    Thanks in advance.
    Regards,
    Saravanan G

    You need to create a process variable of type IN if you want to be able to pass data to your process. Then the params parameter (HashMap) contains a list of all the IN variables with their content that you want to pass to your process. They key is the name of the variable and the value the content. That way you should get it in your process.
    Now LiveCycle will create a column in the database for every process variable, so the content will be saved in the database just by creating that process variable.
    Jasmin

  • How to download the script data into pdf file

    how to download the script data into pdf file
    i have one option to download the script data to pdf file --->rstxpdft4 program.
    i have one doubt how to use this proogram.or any function module to download the script data to pdf file.
    Thanks and regards,
    Sri.

    Hi      Sri Sai,
    I know one method to convert the sapscript to pdf file :
    first generate a Spool Request for the required Sapscript
    then goto transaction SP01 and copy the generated Spool Request number
    now execute the SAP report RSTXPDFT4
    here enter the copied Spool request number and the target directory into the parameters
    execute the report
    required pdf file will be generated into the target directory
    i hope it will help you out
    Please refer this simple program:
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    Reward points if found helpful....
    Cheers,
    Eshwar.

  • HT1473 When downloading a CD album, if it contains different artists, the album is split up into separate albums/icons. How do I get all songs into one album (just like the original CD)?

    When downloading a CD album, if it contains different artists, the album is split up into separate albums/icons. How do I get all songs into one album (just like the original CD)?

    Generally, in iTunes, all you need to do is fill in an appropriate Album Artist to keep things together. For older iPods each track from the same album should have the same artist, or be marked as a compilation where appropriate. For iOS devices you may need to go to Settings > Music > Group By Album Artist > On.
    For more details see my article on Grouping Tracks Into Albums, in particular the topic One album, too many covers.
    tt2

  • How to extract audit log data from every document library in site collection using powershell?

    Hi All,
    I have n number of document library in one site collection,
    My query is- How to extract audit log data from every document library in a site collection using powershell?
    Please give solution as soon as possible?

    Hi inguru,
    For SharePoint audit log data, These data combine together in site collection. So there is no easy way to extract audit log data for document library.
    As a workaround, you can export the site collection audit log data to a CSV file using PowerShell Command, then you can filter the document library audit log data in Excel.
    More information:
    SharePoint 2007 \ 2010 – PowerShell script to get SharePoint audit information:
    http://sharepointhivehints.wordpress.com/2014/04/30/sharepoint-2007-2010-powershell-script-to-get-sharepoint-audit-information/
    Best Regards
    Zhengyu Guo
    TechNet Community Support

Maybe you are looking for

  • 16:9 vs 4:3

    I recently Burned an iMovie 6 video that I made in 16:9 format in iDVD. But when I watched it on the TV there is an artifact of motion in the movie when it shows a scene using panning technique. It's very noticeable and spoils the whole movie. Does a

  • Internal error in the communication with the IGS (charts)

    Hello to all, I have a problem when visualizing the graphics of the reports in BW 3.5 (WAD)  the connection RFC IGS_RFC_DEST has never worked however me same the graphics are visualized, but now I am not able to make that the graphics appear in the W

  • Old late payments on still-open account

    hi, i'm new here, but a longtime lurker and i finally have a question i thought i'd post about. i have a open account for a studnet loan from grad school. there was dark stretch during the great recession where i stopped making payment, because i had

  • Comparison among different PDF libraries

    Hi, Can anyone tell me about the his or her experience with the various PDF libraries like PDFLib, Preptool and Adobe Librarty??I am seriously confused about choosing the best possible option but havnt been able to find any comparisons so far.. Mainl

  • OS X Lion.  video flicker/scramble

    OS X Lion. When dragging a file from Downloads folder to desktop I acquire a sudden video flicker/scramble on my display