Read from Page Approval List Table in a PL/SQL procedure

Need help, I am new to OA Framework.
We have a requirement to validate the added requisition Approvers against some criteria.
The Approvers are added using Add approvers on the Requisition Creation page.
The source code shows: ApproverListRn.ApprListTable as the name of the table list which holds the approver names.
1) Is there a way to read the data from ApproverListRn.ApprListTable in a PL/SQL procedure?
2) How and when does this list of approvers get added to the po_approvallist_headers table? which package is used?
Please any help is greatly appreciated.
Thanks

1) Is there a way to read the data from ApproverListRn.ApprListTable in a PL/SQL procedure?
Using OAF, you can read the value from the table and through OracleCallableStatement you can call a pl/sql procedure passing the read value.2) How and when does this list of approvers get added to the po_approvallist_headers table? which package is used?
This is page and code specific. You will have to debug and find out.--Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Removing vendor from HMRC approved list (UK Specific)

    Hi ,
    Is it any recent  notes avialble for removing vendor from HMRC approved list to control outbout delivery . This is UK specific or EU specific . or any standard control are their for this .
    Thanks
    RB

    Hi,
    If you know the target field where you want to remove quote then you can write routine in the transformation .
    You can use field level routine to achive this.
    Hope this will help you..
    Thanks,
    Jitendra

  • How can i return object from oracle in my java code using pl/sql procedure?

    How can i return object from oracle in my java code using pl/sql procedure?
    And How can i returned varios rows fron a pl/sql store procedure
    please send me a example....
    Thank you
    null

    yes, i do
    But i can't run this examples...
    my problem is that i want recive a object from a PL/SQL
    //procedure callObject(miObj out MyObject)
    in my java code
    public static EmployeeObj callObject(Connection lv_con,
    String pv_idEmp)
    EmployeeObj ret = new EmployeeObj();
    try
    CallableStatement cstmt =
    lv_con.prepareCall("{call admin.callObject(?)}");
    cstmt.registerOutParameter(1, OracleTypes.STRUCT); // line ocurr wrong
    //registerOutParameter(int parameterIndex, int sqlType,String sql_name)
    cstmt.execute();
    ret = (EmployeeObj) cstmt.getObject(1);
    }//try
    catch (SQLException ex)
    System.out.println("error SQL");
    System.out.println ("\n*** SQLException caught ***\n");
    while (ex != null)
    System.out.println ("SQLState: " + ex.getSQLState ());
    System.out.println ("Message: " + ex.getMessage ());
    System.out.println ("Vendor: " + ex.getErrorCode ());
    ex = ex.getNextException ();
    System.out.println ("");
    catch (java.lang.Exception ex)
    System.out.println("error Lenguaje");
    return ret;
    Do you have any idea?

  • Passing table data to pl sql procedure oaf

    Hi All,
    I have a requirement where i have to pass table data to plsql procedure.
    In the first page i select the REQUISITION and click on RETURN button and it will take me to the next page.
    and in the Next page i will click on APPLY button.
    When i click on APPLY, it will call the procedure and will give input to the procedure whatever has been selected when i have selected requisition.
    Please help. Please tell me the approach how to get this task done. A sample code will work.
    Hope the requirement is clear.
    Thanks in Advance.

    Hi Chinmay,
    Refer below code for Your Requirement.
    //Code For Quering Data
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    Connection conn = pageContext.getApplicationModule(webBean).getOADBTransaction().getJdbcConnection();
    String Query = "SELECT organization_id FROM hr_operating_units WHERE organization_id = fnd_global.org_id";
    PreparedStatement stmt = conn.prepareStatement(Query);
    resultset=stmt.executeQuery();
    while (resultset.next())
    orgId = (String)resultset.getString("ORGANIZATION_ID").toString();
    conn.commit();
    catch(Exception e)
    e.printStackTrace();
    //Code for Pass Resulted column to Procedure Input for delete Particular Record
    Execute parameterized PL SQL procedure from OAF page
    Let us try to call PL/SQL package from OAF page. We will try to remove selected line from Database.
    Package Spec
    CREATE OR REPLACE PACKAGE APPS.genpack_pkg
    AS
    PROCEDURE roll_delete_proc (orgId IN VARCHAR2);
    END genpack_pkg;
    Package Body
    CREATE OR REPLACE PACKAGE BODY APPS.genpack_pkg
    AS
    PROCEDURE roll_delete_proc (orgId IN VARCHAR2)
    AS
    BEGIN
    DELETE FROM pklist_roll_details_temp
    WHERE roll_line_id = orgId;
    COMMIT;
    END roll_delete_proc;
    END genpack_pkg;
    //in Controller PFR
    import java.sql.CallableStatement;
    if (pageContext.getParameter("ActionsButton") != null)
    String val = pageContext.getParameter("ActionsChoice");
    if ("DELLN".equals(val))
    CallableStatement cstmt = null;
    for (OAViewRowImpl row = (OAViewRowImpl)tempvo.first(); row != null; row = (OAViewRowImpl)tempvo.next()) {
    if ((row.getAttribute("Selectflag") == null) ||
    (!row.getAttribute("Selectflag").toString().equals("Y"))) continue;
    try {
    int rollid = Integer.parseInt((String)row.getAttribute("orgId"));
    Connection conn = am.getOADBTransaction().getJdbcConnection();
    if (rollid == 1)
    temphm.put(row.getAttribute("orgId").toString(), row.getAttribute("PoNumber").orgId());
    tempvo.removeCurrentRow();
    else
    try
    StringBuilder sb = new StringBuilder();
    sb.append(rollid);
    String strI = sb.toString();
    System.out.println("Inside else in delete");
    cstmt = conn.prepareCall("{call GENPACK_PKG.tpc_roll_delete_proc(?)}");
    cstmt.setString(1, strI);
    System.out.println("Oracle Callable Statment Execution Init for Delete");
    cstmt.execute();
    catch (SQLException e) {
    throw new OAException(e.toString(), (byte)0);
    }tempvo.removeCurrentRow();
    catch (OAException e) {
    throw new OAException("No row selected", (byte)3);
    Thanks,
    Dilip

  • List of values to PL/SQL procedure

    I want to execute a query of the form
    UPDATE myTable
    SET myField = someValue
    WHERE myTablePK IN (1, 3, 5, 7, 9)
    Through HTML, I have a form field that is a comma-delimited list of values. I want to be able to pass this to a stored proc. What I'm not understanding is how to pass a list of values.
    In other words, the form should be:
    UPDATE myTable
    SET myField = someValue
    WHERE myTablePK IN (someList)
    What data type should "someList" be? How do I pass it? The number of values in the list is variable and cannot be determined at design-time.

    Here is an example how to pass a list of values as an input to a stored procedure using dynamiv SQL:
    TAPAS>create or replace procedure create_my_view( dept_list IN VARCHAR2)
    2 authid CURRENT_USER
    3 AS
    4 sql_stmt VARCHAR2(1000);
    5 begin
    6 sql_stmt := 'create or replace view my_view as select deptno from emp where deptno in ('| | dept_list| |')';
    7 execute immediate sql_stmt;
    8 exception
    9 when others then
    10 dbms_output.put_line(SQLERRM);
    11 end;
    12 /
    Procedure created.
    TAPAS>exec create_my_view('10,20');
    PL/SQL procedure successfully completed.
    TAPAS>select * from my_view;
    DEPTNO
    10
    10
    10
    10
    10
    20
    20
    20
    20
    20
    20
    20
    20
    20
    14 rows selected.

  • Unhandled SOAP Exception When Reading from an External List created from SQL Server

    This is absolutely doing my head it.  Doesn't matter what I do, which approach I take or how its done, I gt the same crappy error from Sharepoint Designer 2010.
    Pulling Data from SQL Server 2008 using An external List.  All I want to do is read the data and display in on the Sharepoint Site..  Nothing fancy, just read.
    Created a Limit filter to limit 100 records per time, removed any primary keys, get no warnings or Errors upon creating the External List or View.  
    But when I add it to the view or data source in page designer, I get the unhandled exception error we all know and love :-(...  
    Anybody shed any light on this before I make a dell 2900 Server sized hole in my window?
    Sharepoint Foundation 2010
    Sharepoint Designer 2010
    SQL Server 2008
    Ta

    Hi,
    If want to change the WCF client (BCS in this case) timeout, you need to change the registry on the SharePoint server.
    The keys are located under:
    HKEY_CURRENT_USER\Software\Policies\Microsoft\office\15.0\Common\Business Data.
    Moreinformation:
    http://blogs.technet.com/b/meamcs/archive/2010/12/23/configuring-wcf-connection-timeout-for-bcs.aspx
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Read from file to Internal Table With Extra Record

    Hi,
    I'm trying to read file from application server into internal table. Then loop thru the internal table and display.
    My text file only have 2 rows of records. However, when display the internal table, it show the 2 records plus an extra line with 0. May I know where did I do wrong?
    PARAMETERS: p_infile  LIKE rlgrap-filename OBLIGATORY DEFAULT  '/usr/sap/'..
    DATA: ld_file LIKE rlgrap-filename.
    *Internal tabe to store upload data
    TYPES: BEGIN OF t_record,
        name1 like pa0002-VORNA,
        name2 like pa0002-name2,
        age   type i,
        END OF t_record.
    DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
          wa_record TYPE t_record.
    *Text version of data table
    TYPES: begin of t_uploadtxt,
      name1(10) type c,
      name2(15) type c,
      age(5)  type c,
    end of t_uploadtxt.
    DATA: wa_uploadtxt TYPE t_uploadtxt,
          wa_upload TYPE t_uploadtxt.
    *String value to data in initially.
    DATA: wa_string(255) type c.
    START-OF-SELECTION.
    ld_file = p_infile.
    OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    ELSE.
      DO.
        CLEAR: wa_string, wa_uploadtxt.
        READ DATASET ld_file INTO wa_string.
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          SPLIT wa_string AT SPACE INTO wa_uploadtxt-name1 wa_uploadtxt-name2 wa_uploadtxt-age.
          MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
          APPEND wa_upload to it_record.
        ENDIF.
      ENDDO.
      CLOSE DATASET ld_file.
    ENDIF.
    END-OF-SELECTION.
    loop at it_record INTO wa_record.
      write / wa_record-name1.
      write / wa_record-name2.
      write / wa_record-age.
    Endloop.

    Hi,
    Am attaching the file I used. There's no empty line after the second record.
    After execute, it is showing:
    Joe     Adams     20
         0
    John     Smith     40
         0
    May I know why there's 0, where did i do wrong?
    Thank you.

  • Shopping Cart approver list table

    Hi Experts,
    When we change the approver in the Shopping cart which table/structure will have the details of new(Changed) approver.
    I want to pass the new approver details into the BADI *BBP_WFL_APPROVAL* .
    Thanks in advance for your quick response.
    Regards,
    Murali

    Hi Prabhu,
    Currently the logic in the BADI follows the standard flow meaning From the requestorid determines the next approvers details.
    Nowhere the changed Approver name is appearing the BADI. Now we want to break the standard flow and pass the changed approver details in the BADI for fetching the next approvers.
    Please let me know how we can achieve this.
    Regards,
    Murali

  • Read from a file list

    Hi everyone,
    This is the first question in this forum. I'm writing a program that capture and save several signals in different files. The files are named automatically. Now, I want make a front panel that lists all the saved files and when the user selects a specific file, the data on that file will be displayed. Can anyone give me some hints to do that.
    Thanks
    Mike

    see if the attached vi helps you
    Attachments:
    select file.vi ‏21 KB

  • How to read a spread sheet ( .xls ) file using a pl/sql procedure or func

    Hello All,
    Is it possible to read a spread sheet using Oracle pl.sql .
    I know their is a util package that is read a file but how to read a spread sheet ... ?
    thanks
    kumar

    hi kumar,
    Here is an example of how i read an excel file
    DECLARE
    l_start_file_name varchar2(50) := 'invoice_excel_c';
    l_end_file_name varchar2(50)   := '.csv';
    l_file_name varchar2(100);
    l_sql varchar(32767);
    refresh_cdc varchar2(5) := '00304';
    begin
    l_file_name := l_start_file_name||REFRESH_CDC||l_end_file_name;
    l_sql :=
    'create table exter_invoice_excel               '||
    '(                                              '||
    'Product_name                varchar2(255),     '||
    'Net_Sales                   Number,            '||
    'Net_Adjustments             Number,            '||
    'Cancels_Count               Number,            '||
    'Cancels_Amount              Number,            '||
    'Cashes_Count                Number,            '||
    'Cashes_Amount               Number,            '||
    'Claims_Count                Number,            '||
    'Claims_Amount               Number,            '||
    'Returns_Count               Number,            '||
    'Returns_Amount              Number,            '||
    'Free_Prize_Count            Number,            '||
    'Free_Prize_Amount           Number,            '||
    'Free_Promo_Count            Number,            '||
    'Free_Promo_Amount           Number,            '||
    'Promo_Credit_Count          Number,            '||
    'Promo_Credit_Amount         Number,            '||
    'Return_Commission           Number,            '||
    'Net_Discounts               Number,            '||
    'Total_Fees                  Number,            '||
    'Sales_Commission            Number,            '||
    'Cash_Commission             Number,            '||
    'Tkt_Charge                  Number,            '||
    'Subscription_Commission     Number,            '||
    'Interim_Sweeps              Number,            '||
    'Net_Due                     Number,            '||
    'Retailer_id                 Number,            '||
    'Retailer_Name               varchar2(255)      '||
    ')                                              '||
                  'ORGANIZATION EXTERNAL (                 '||
                  ' TYPE oracle_loader                     '||
                   ' DEFAULT DIRECTORY GTECHFILES          '||
                   ' ACCESS PARAMETERS (                   '||
                   '   RECORDS DELIMITED BY NEWLINE        '||
                   '      CHARACTERSET WE8MSWIN1252        '||
                   '   BADFILE ''invoice_excel.bad''       '||
                   '   DISCARDFILE ''invoice_excel.dis''   '||
                   '   LOGFILE ''invoice_excel.log''       '||
                   '   FIELDS TERMINATED BY '','' RTRIM      '||
                   '  MISSING FIELD VALUES ARE NULL        '||
                   '   )                                   '||
                   '   LOCATION ('''||l_file_name||''')    '||
                   ' )                                     '||
                   'PARALLEL                               '||
                   'REJECT LIMIT UNLIMITED ';
            execute immediate l_sql;
          l_sql:=  'INSERT INTO INVOICE_EXCEL_TEMP                '||
                      ' ( Product_name               ,            '||
                      '  Net_Sales                   ,            '||
                      '  Net_Adjustments             ,            '||
                      '  Cancels_Count               ,            '||
                      '  Cancels_Amount              ,            '||
                      '  Cashes_Count                ,            '||
                      '  Cashes_Amount               ,            '||
                      '  Claims_Count                ,            '||
                      '  Claims_Amount               ,            '||
                      '  Returns_Count               ,            '||
                      '  Returns_Amount              ,            '||
                      '  Free_Prize_Count            ,            '||
                      '  Free_Prize_Amount           ,            '||
                      '  Free_Promo_Count            ,            '||
                      '  Free_Promo_Amount           ,            '||
                      '  Promo_Credit_Count          ,            '||
                      '  Promo_Credit_Amount         ,            '||
                      '  Return_Commission           ,            '||
                      '  Net_Discounts               ,            '||
                      '  Total_Fees                  ,            '||
                      '  Sales_Commission            ,            '||
                      '  Cash_Commission             ,            '||
                      '  Tkt_Charge                  ,            '||
                      '  Subscription_Commission     ,            '||
                      '  Interim_Sweeps              ,            '||
                      '  Net_Due                     ,            '||
                      '  Retailer_id                 ,            '||
                      '  Retailer_Name               ,            '||
                      '  SOURCE                      ,            '||
                      '  INSERTED_DATE               ,            '||
                      '  CDC                         ,            '||
                      '  UPLOADED                                 '||
                      ')                                          '||
    '              select                                         '||
                      '  ltrim(rtrim(product_name)) ,             '||
                      '  Net_Sales                   ,            '||
                      '  Net_Adjustments             ,            '||
                      '  Cancels_Count               ,            '||
                      '  Cancels_Amount              ,            '||
                      '  Cashes_Count                ,            '||
                      '  Cashes_Amount               ,            '||
                      '  Claims_Count                ,            '||
                      '  Claims_Amount               ,            '||
                      '  Returns_Count               ,            '||
                      '  Returns_Amount              ,            '||
                      '  Free_Prize_Count            ,            '||
                      '  Free_Prize_Amount           ,            '||
                      '  Free_Promo_Count            ,            '||
                      '  Free_Promo_Amount           ,            '||
                      '  Promo_Credit_Count          ,            '||
                      '  Promo_Credit_Amount         ,            '||
                      '  Return_Commission           ,            '||
                      '  Net_Discounts               ,            '||
                      '  Total_Fees                  ,            '||
                      '  Sales_Commission            ,            '||
                      '  Cash_Commission             ,            '||
                      '  Tkt_Charge                  ,            '||
                      '  Subscription_Commission     ,            '||
                      '  Interim_Sweeps              ,            '||
                      '  Net_Due                     ,            '||
                      '  Retailer_id                 ,            '||
                      '  Retailer_Name               ,            '||               
                      ' '''||l_file_name                           ||''', '||
                      '   sysdate                    ,            '||
                      ' '''||    REFRESH_CDC                       ||''', '||
                      '''N'''                                      || 
                      'FROM                                       '||
                      'exter_invoice_excel                        '||
                      'WHERE retailer_id is not null and ltrim(rtrim(product_name)) in (''Loto'',''Inst Tk'')';
            execute immediate l_sql;   
            l_sql :='drop table exter_invoice_excel';
            execute immediate l_sql;
    exception
    when others then
    rollback;
    l_sql :='drop table exter_invoice_excel';
    execute immediate l_sql;
    debug_message('INVOICE_EXCEL_UPLOAD/'||REFRESH_CDC,'Unexpected Error '||sqlerrm);
    END;
    --truncate table invoice_excel_tempjust go through the code, it would help u for sure
    cheers

  • Creating a table within a PL/SQL procedure

    I recieve the following error:
    PLS-00103: Encountered the symbol "CREATE" when expecting one of the following:
    begin case declare exit for goto if loop mod null pragma
    The create statement is within the executable part of an if statement. Are we allowed to have CREATE statements within if statements?

    "Are we allowed to have CREATE statements within if statements? "
    Its nothing to do with IF, it applies throughout pl/sql to any DDL (data definition language).
    When the procedure is compiled, oracle checks that all of your DML (data definition language) complies with your database structure. If you mess about with the structure within the procedure, this confuses the whole issue. You can do it with native dynamic sql as suggested by Ino, but will need to use execute immediate wherever you attempt to use your new table, otherwise it will not compile.

  • Client-side Memory leak while executing PL/SQL and reading from a view

    Iam noticing memory leaks in OCCI while performing the following:
    Sample function()
    1. Obtain a connection
    2. Create a statement to execute a PL/SQL procedure
    3 Execute the statement created in step #2
    4. Terminate the statement created in step #2
    5. Create a statement to read from a view which was populated
    by executing stored procedure in step #3
    6. Execute the statement created in step #5
    7. Terminate the statement created in step #5
    8. Release the connection
    The PL/SQL populates a view with fixed 65,000 records for every execution. PL/SQL opens a cursor, loads 65000 records and populates the target view and closes the cursor at the end. If i invoke the above function it results in memory leak of 4M for every call. I tried several variants such as:
    1. Disabling statement caching
    2. Using setSQL instead of newly creating second SQL statement
    3. Obtaining two separate connections for these two activities (PL/SQL exec and View read)
    4. Breaking the sample function into two, one for each of these activities (PL/SQL exec and View read).
    All the combinations results in the same behaviour of 4M memory leak.
    Iam using Oracle 10g Client/Server 10.2.0.1.0.
    Is there any known limitations in this area?

    Yes. Iam closing the result set and terminating the statement.
    My program contains layers of inhouse wrapper classes, which will take some time for
    me to present it in pure OCCI calls, to be posted here for your understanding.
    After some more debugging, i found that if the connection level statement caching is set to
    0, the memory leak is much lower than before.
    Thanks.
    Message was edited by:
    user498920

  • Need to create an edit Page from a Multiselect List

    I make one or more selections of values from a Multiselect List; I need to branch to another page in which I display all of the selected List items and two other columns (per item) that can be edited; i.e., this second page will look like one or more rows consisting of (1) List item, (2) value1 from a Table, (3) value2 from a Table. I need to be able to change value1 and/or value2 for any or all of the rows and have those changes reflected in the Database. (The List item is display only).
    My question is: which construction wizard can I use for this second page? I can collect my List items in a PL/SQL Table, but how can I display them and their related columns so the column values are editable?

    Thanks for the reply. I understand how to create Collections with the values I need to display and modify; however, I'm unsure which construction Wizard to employ to launch the Page ("Form based upon a Procedure", etc.)
    I looked in the Tutorials for a "collection demo" and found these potential candidates: "Build an Issue Tracking System", "Create a Simple Survey Application", and "Serving Application Express Reports". Is it one of these? If not, please tell me where I can find the "collection demo". Thanks.

  • SSMS is not listing table and views objects though the objects are listed when I execute TSql string "SELECT * FROM sys.Tables"

    I have a db, call it xyz.mdb
    It suddenly is that SSMS is not listing the table objects nor the Views.  SELECT * FROM sys.Tables and SELECT * FROM sys.Views work very fine.  But when I click on the tables node, on Objects Explorer, Only the Systems Tables and File Tables folders
    show. 
    Other DBs on same SQL instance do not show same problem.  They are all working very fine.
    I have backed up and restored this db on other computers and the behaviour is the same.  Incidentally right-clicking the db and clicking Properties throws up this error message.
    -------------------------------------------------------------------------Error!
    Cannot show requested dialog.
    Property Size is not available for Database '[Pliny E DB - NOA 2014]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights.  (Microsoft.SqlServer.Smo)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.3000.0+((SQL11_PCU_Main).121019-1325+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.PropertyCannotBeRetrievedExceptionText&EvtID=Size&LinkId=20476
    --------------------------------------------------------------------------------End>
    When I try to Refrresh the Tables node on Object Explorer, I get this other:
    ------------------------------Error!
    SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0x9090d9b7; actual: 0x909001b4). It occurred during a read of page (1:1173) in database ID 21 at offset 0x0000000092a000 in file 'c:\Databases\Clients\NOA\Pliny E DB -
    NOA 2014.mdf'.  Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check
    (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online. (Microsoft SQL Server, Error: 824)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=824&LinkId=20476
    ------------------------------End>
    The Help link of course is not valid any more.
    Many thanks
    Vie
    @Abuja
    Vie

    Your database is corrupted and you need to run.
    DBCC CHECKDB
    You already have a backup so do it...
    This link will provide you with more information:
    http://msdn.microsoft.com/en-us/library/ms176064.aspx

  • Export Tables from Pages to Numbers with AppleScript?

    I've hit a stumbling block while trying to use AppleScript to remove a table from pages and paste it into Numbers.
    I've found no way to directly identify the table in the document to copy for pasting into Numbers and I've been unable to remove the other information from the document to isolate the table for a select all command.
    The easiest thing I can think of is a AppleScript to remove the first set of characters before the table or to explicitly extract tables only from the document.
    I've tried all manners of AppleScripts and I can't seem to get it to work. None of the AppleScript text selection commands work to remove the information other than the table.

    Try selecting the whole of the contents of the document and then running:
    tell app "Pages"
    selection
    end tell
    This will return a list of the selected objects, amongst which you should see something like: table 1 of body text of document id 15373020 of application "Pages"
    With that data you should be able to select just that item:
    select table 1 of body text of document id 15373020 of application "Pages"
    Obviously that's just an example. If you were scripting this, you would most likely work through the list filtering only those objects you want to work with - the tables in this case.

Maybe you are looking for