Converting PL/SQL with OE S Fields for 11i

We recently moved to 11i and I am having trouble converting a PL/SQL report. This is part of an exception report (below) that we have and I am not exactly sure how to convert it in 11i to do what it did in 11.0.3. Particularily I am not sure about how to convert the "S" fields, if someone could provide some guidance that would be great. I have marked the lines I am not sure of with DON'T KNOW. Thanks, Joe.
SELECT
soh.order_number
, sol.s2_date --Pick Release Release Date  DON'T KNOW
, usr.user_name
, sol.line_number
FROM oe.so_headers_all soh --WILL BE ONT.OE_ORDER_HEADERS_ALL
, oe.so_lines_all sol --WILL BE ONT.OE_ORDER_LINES_ALL
, apps.fnd_user usr
WHERE 1=1
AND soh.header_id = sol.header_id
AND soh.created_by = usr.user_id
AND (sol.s2 = 4 -- line is pick released DON'T KNOW
AND sol.s4 = 18 -- ship confirm Eligible DON'T KNOW
AND soh.s6 != 10 --not closed WILL BE AND SOH FLOW_STATUS_CODE != 'CLOSED'
) -- line is pick released, ship confirm confirmed, not closed
AND soh.order_type_id != 1000
AND SOL.S2_DATE < sysdate-5 --Pick Release Release Date  DON'T KNOW                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

You can use DML error logging approach or FORALL SAVE EXCEPTIONS.
Since you didn't mention the version I assume you are using 11g.
Below is the sample code for DML error logging mechanism
SQL> select * from v$version;
BANNER                                                                         
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production   
PL/SQL Release 11.2.0.3.0 - Production                                         
CORE 11.2.0.3.0 Production                                                     
TNS for Linux: Version 11.2.0.3.0 - Production                                 
NLSRTL Version 11.2.0.3.0 - Production                                        
SQL> DROP TABLE tableA;
Table dropped.
SQL> DROP TABLE Err$_tableA;
Table dropped.
SQL>
SQL> CREATE TABLE tableA
  2  (
  3     col1   NUMBER PRIMARY KEY,
  4     col2   NUMBER,
  5     col3   VARCHAR2 (10)
  6  );
Table created.
SQL>
SQL> -- Create error log table
SQL>
SQL> BEGIN
  2     DBMS_ERRLOG.create_error_log (dml_table_name => 'TABLEA');
  3  END;
  4  /
PL/SQL procedure successfully completed.
SQL>
SQL> BEGIN
  2     FOR i IN (SELECT 1 AS col1 FROM DUAL
  3               UNION ALL
  4               SELECT 1 FROM DUAL)
  5     LOOP
  6        INSERT INTO tableA (col1)
  7             VALUES (i.col1)
  8                LOG ERRORS INTO Err$_tableA REJECT LIMIT UNLIMITED;
  9     END LOOP;
10 
11     COMMIT;
12  END;
13  /
PL/SQL procedure successfully completed.
SQL> column column_name format a30
SQL> set linesize 300
SQL> select * from tableA;
SQL> select * from err$_tablea;
Thanks,
GPU

Similar Messages

  • GL listing with populated Plant field for Sales accounts

    Hi all,
    In GL listing (T-code-FBL3n) for Sales account-GL there is provision to see the line items detail of Sales Account  with Plant as field, but I am seeing the GL line items without Plant field populated, How this field can be automatically populated as this acounting line item automatically gets created as soon as we save Billing document(VF01) and posted to proper GL.
    Kindly help me to populate the Plant field.
    Thanks in advance....
    Raju

    Dear Raju,
    In FBL3N Report there is Change Layout Icon (Ctrl+F8) in Report Toolbar there you have to select Hidden Field Plant and add to report and press copy you will get Plant Column in your report.
    thx
    Ganpat Sundhesa

  • DMZ Apache with OAS WebCache configuration for 11i

    Hi,
    We have the following configuration in place (using note DMZ Configuration with Oracle E-Business Suite 11i [ID 287176.1])
    1. Browser (https) --> Internet --> |firewall| --> DMZ Apache reverse proxy server (https) --> |firewall| --> External 11i webtier (http) --> Internal 11i apptier --> Database
    Now, we want to change it, so that the following configuration can work.
    2. Browser (https) --> Internet --> |firewall| --> DMZ Apache reverse proxy server (https) --> |firewall| --> OAS WebCache (https) --> Internal 11i apptier --> Database
    no cluster, no load balancer, no RAC in this configuration.
    The user access are the same in #1 and #2: External users access 11i via "partners.external.com", while internal users use "employees.internal.com". Apache server in DMZ is the Entry Point.
    Note "Installing and Configuring Web Cache 10.1.2 and Oracle E-Business Suite 11i [ID 306653.1]" is to set up WebCache as Entry Point for 11i. If we use it, external users are not able to access 11i system with "partners.external.com".
    Question:
    can #2 configuration be set up and work? which Oracle doucuments to follow?
    Thanks in advance,

    Hi,
    with following steps in 306653.1, profiles s_webentryhost and s_login_page are set with WebCache servername.
    The access for internal users is working with URL https://webcachesername.internal.com/oa_servlets/AppsLogin
    but external users cannot log in: at logon page, after typing username/password,
    the logon page is refreshed back to the same logon page. If typing a wrong password, "Login failed" error shows as expected.
    Thanks,

  • Seeing the detailed sql  with db table names for an analysis in OBIEE 11g?

    Hello All,
    I am trying to see the detailed sql for an analysis to see which tables my analysis is hitting back in the database. Currently all i see is the subject area name with bunch of s_0, S_1,S_2.... but i want to see the actual table names which the Analysis is pulling the data from, I am new to OBIEE. Any help or advise with the steps in order to accomplish my goal is greatly appreciated.
    Thanks,
    Ravi.
    Edited by: user1146711 on Aug 23, 2011 3:24 PM
    Edited by: user1146711 on Aug 23, 2011 3:30 PM

    Hi ravi,
    You can check in the presentation services by going to Administration/manage session/view log for the specific report that you are running.
    You can even check the SQL in log file NqQuery.log in your installation folder C:OracleBI\server\log\NqQuery.log
    Check this Courtesy by gerard http://gerardnico.com/wiki/dat/obiee/manage_session_log
    hope answered.
    Cheers,
    KK

  • Strange behavior with hidden text field for drill down

    Hi All,
    I am pretty sure I know the cause, just not sure how to work around...
    I am trying to create a drill down report just like in the App Dev guide, and I have done everything the same as the example (2 times, once to follow the guide, and now on my app). The only difference is that I am using a text field rather than a numeric field as the link. This shouldn't be a problem (I wouldn't think) except that the text I NEED to use has '<==' in the middle. So when I check my session state var's, this is what I see:
    CHPAG0SC_MAILCDN_000000047_ CHPAG0SC_MAILCDN_000000047_ <==20060525101642
    When what I should see is:
    CHPAG0SC_MAILCDN_000000047_ <==20060525101642
    So I think that I am gettting duplication because of the characters, but again I don't know how to solve it.
    Any thoughts would be appreciated.
    Corey

    Hi Scott,
    I am trying to create a drill down report similar to the one in the app developers guide. I have a query on pg 1 that includes the required text field as the link. When I click the link, I get an error on pg 2 - which is trying to use the value from pg 1. I did check and saw that even though I set this value in session state (I thought that was what happened when I assigned the 'name' and 'value' in the column link), it is passed in the url, which is where I figured it was breaking. As stated, I need to use this text value as it is the only unique key for the data (currently - this is a data validation step (not an ApEx validation), where users are handling issues with data uploaded from a csv).
    My current process is as follows:
    1. User uploads 2 csv's
    2. Proc moves (from wwv_flow_files) and parses csv back into records and inserts into temp (all varchar2) table(s).
    3. User is displayed 3 'reports' - for each type of validation required - from the stage/temp table
    4. User would click on the 'Edit' link (like the drill down sample) to see more details about the record.
    5. Once the user is done with these reports, they would click another button to 'process' the data (move it into base tables)
    Because the text field is always unique, I figured I wouldn't create a sequence for this like I have for the 'base' (destination) tables.
    I didn't know that I was using a 'get' rather than a 'post', but of course it is a link, not a button - so I should ahve known better.
    Is there a way to do this without adding a sequence generated id for each, or is that just the quickest way?
    Thanks again,
    Corey

  • Convert cross tab with 2 summarized fields to a chart

    Greetings,
    I have a simple cross tab containing a date row and 2 summarized fields. It looks like this (see Figure 1)
    When I convert (insert) my cross tab into a stacked bar chart, I only get one of the summarized fields to show up on the chart. It looks like this (Figure 2)
    Is there a way for me convert this cross tab into a stacked chart so that both of my summary fields appear?
    Many Thanks!

    OK... Thank you.
    I was using the cross tab  in hopes of controlling graph labels for months (Customize Group Name field) . What I was doing was converting dates to month verbiage (Sep, Oct, Nov, etc) so that the month verbiage would appear on my graphs instead of the numbers while still maintaining proper calendar order . (thanks for showing me this technique by the way as it works great). Too bad it does not work when there is more than one summary field (thanks for explaining its limitations... I had not told you that I was adding a second summary field).
    Given that I have 1 row ( Date_discharge) that I need to display as months (verbiage) in calendar order
    and
    Given that there are 2 summary fields: Vaccine Indicator (a sum) and Birth_date_Baby (a count) ...
    (I am contrasting # of vaccine's given against total babies per month in a monthly stacked bar chart)
    Is there a way to display 2 summary fields on a stacked bar graph grouped by month (where the month is listed in alpha format, (Sep, Oct, Nov, etc.) but still sorted by its calendar value? My initial attempts to do this in a graph (without a cross-tab) would display the month verbiage just fine, but it would order my months alphabetically.
    Thanks again for your suggestions!

  • Event.value = Math.round (a.value * 5.00) / 100; Replace this with an input field for user to change

    I have a taxe calcul script in a field with a annulation check box like this:
    if (this.getField("CheckBoxHST").value=="Off") {
    // no tax
    event.value = 0;
    } else {
    // calculate the amount of tax to be paid
    var a = this.getField("pricehorstx");
    event.value = Math.round (a.value * 5.00) / 100;
    I like to able the user to change the percentage —>  (a.value * 5.00) with a simple text field — Say they enter 6% or any other percentage in there and the calcul become (a.value * 6.00) / 100;
    Not to sure how to acheive that....

    Work perfectly thanks...
    I feel so bad, everything work perfect, almost   — 
    — I just want when I check off (checkbox) the tax calculation to put whatever is in the tax percentage input box to zero and I can’t

  • Convert to SQL Query

    Hi
    On a report there is a function "Convert to SQL Query", I have tryed the function and get the SQL statment for the report, is it the only thing to get in "text" instead of the more "graphic" way to show it?
    Best Regrads
    Jesper Vels

    Jesper,
    is it the only thing to get in "text" This is correct.The "Convert to SQL Query" link is available for report that are built using the Wizard. Selecting this will give you the underlying SQL Query that you can edit/modify if required.
    more "graphic" way to show itWhat do you mean by this? Please elaborate?
    -Amitabh

  • How do I restore my address field for url's

    I recently started using a new server (TELMEX). As a result when using Safari the bar with the address field for url's is no longer there.

    Are you able to do the following:
    Safari Menu:
    View > Customize Toolbar... > drag "Address and Search" into the Toolbar area.

  • How to convert the table with separate fields for every period

    Hi there,
    I have the table in R/3 called COSP. The table contains the separate fields for values of separate reporting periods, let's say Amount01, Amount02 etc. I need to extract this data to BW and load it into ODS, which contains the data like common key figure for amount and info object Fiscal Period. How to extract and tansform the data to be able to load it there?
    I mean, how to change the row like:
    100 100 200 200....
    for rows like:
    001 100
    002 100
    003 200
    004 200
    I hope you'll help,
    Kooyot

    Hi,
    you need to implement a bit of coding for that.
    With the 'do varying' statement abap provides a loop over those fields. Within this loop you can build up a new internal table with one entry for each period and amount.
    kind regards
    Siggi
    PS: I am not very familiar with CO, but I guess there will be a standard extractor for that.

  • How to convert a sql statement with variable

    hello , please how can i convert the below with cast
    I need to be able to generate an explain plan, I believe I have to use cast.
    SELECT TO_NUMBER (OIL.UNIQUE_ID) REBALANCE_ORDER_ID,
    OIL.ORDER_QTY,
    OIL.ORDER_TYPE,
    OIL.ORDER_SIDE,
    OIL.POSITION_TYPE,
    OIL.AVAILABLE_QTY AVAILABLE_QUANTITY,
    OIL.ORDER_AMT GROSS_AMOUNT,
    OIL.NET_AMOUNT NET_AMOUNT,
    OIL.FEE_AMT FEE_AMOUNT,
    OIL.ACCRUED_INTEREST_AMT ACCRUED_INTEREST
    FROM TABLE (:B6) OIL

    >
    I need to be able to generate an explain plan, I believe I have to use cast.
    SELECT TO_NUMBER (OIL.UNIQUE_ID) REBALANCE_ORDER_ID,
    OIL.ORDER_QTY,
    OIL.ORDER_TYPE,
    OIL.ORDER_SIDE,
    OIL.POSITION_TYPE,
    OIL.AVAILABLE_QTY AVAILABLE_QUANTITY,
    OIL.ORDER_AMT GROSS_AMOUNT,
    OIL.NET_AMOUNT NET_AMOUNT,
    OIL.FEE_AMT FEE_AMOUNT,
    OIL.ACCRUED_INTEREST_AMT ACCRUED_INTEREST
    FROM TABLE (:B6) OIL
    >
    You are correct - cast the bind as the proper type. I have a SQL type named emp_table_type so this works
    explain plan for select * from table(cast (:e1 as emp_table_type))The types involved are
    CREATE OR REPLACE TYPE SCOTT.emp_scalar_type as object
      (EMPNO NUMBER(4) ,
       ENAME VARCHAR2(10),
       JOB VARCHAR2(9),
       MGR NUMBER(4),
       HIREDATE DATE,
       SAL NUMBER(7, 2),
       COMM NUMBER(7, 2),
       DEPTNO NUMBER(2)
    CREATE OR REPLACE TYPE SCOTT.emp_table_type as table of emp_scalar_type
    /

  • Check for spaces embedded with in a field

    Hi,
    I need to check for spaces in a field. The field is char(8). I need to check for spaces in between.
    Example:
    ' 1 2'
    '1 2'
    ' 12'
    Leading spaces and spaces between the chars. the spaces can be more than 1.
    Is this possible in just SQL?

    Hi !
    I have done "something" what shows you at which postion is space in string
    ( but i'm not very satisfied with this .. code :)
    SQL>
    SQL> with data as ( select ' 1 2' str from dual union all
      2                 select '1 2' str from dual union all
      3                 select ' 12' str from dual  )
      4  select distinct str,instr(str,' ',1,level) pos from
      5    (select str , max(level) i from data
      6      group by str
      7    connect by level <= length(str) - length(replace(str,' ','')) )
      8  connect by level <= i order by 1,2
      9  /
    STR         POS
    1 2          1
    1 2          3
    12           1
    1 2           2
    SQL> T

  • SQL query to list the "Administrative category" field for all applications

    yesterday i started a thread to list the "Optional reference" field for all cm applications in a SSRS report. I've got the query with the help of Torsten.
    https://social.technet.microsoft.com/Forums/en-US/00419e6e-e3c2-4b80-b6af-2a24ced1032d/sql-query-to-list-the-optional-reference-field-of-all-packages-in-cm-2012?forum=configmanagersdk
    But again today, i'm looking for a way to get "Administrative category" field in a SSRS report. Could someone point me to the right direction ?
    Kindly mark as answer/Vote as helpful if a reply from anybody helped you in this forum. Delphin

    Hi,
    You could monitor the SMSProv.log when you check the category of an application. It shows that SQL query the SCCM provider used is related to function fn_ListCategoryInstances.
    Best Regards,
    Joyce

  • Sql with groups, aggregates and fields of that aggregates

    lets say I have a table Students and want to group the students by major, and then for each group display the maximum age, and them for that maximum age display the name of that student
    I know how to do the grouping and max aggregate, I know how to do the max aggregate and the name of the max aggregate, but I'm having trouble doing all 3 together. Any help would be appreciated. Thanks.

    ok, well I was using an hypotethical example. What I'm really dealing with are many fields with from many tables and 2 groups with 2 nested aggregates. The original query from Crystal Reports doesnt use aggregates, its all done within report. I'm converting it to SSRS which doesnt support nested aggregates so I'm trying to do one of the aggregates in the query and then the other aggregate within the report.
    table students:
    name
    age
    major
    so the original query would look like:
    select name, age, major
    from student
    I'm trying to do something like:
    select max(age), name from max(age), major
    from student
    group by major
    Edited by: nwill on Feb 19, 2009 3:22 PM

  • Issue with creation of a specific field for a java program.

    Hey everyone,
    This is homework which is end of chapter "challenges" to practice what we've learnt.
    The chapter covers inheritance (super class and all things related)
    I'm having quite an annoying issue with the very beginning of the instructions, where it tells me to make the following fields:
    - Employee name
    - Employee number in the format XXX-L , where each X is a digit within the range 0-9 and the L is a letter within the range A-M.
    - Hire date
    This is what I wrote for code so far
    private String name;
    //private WTF
    private String date;I really have no idea what to do for the second field, how to even constrain integers and letters in the same field with a rule for number range and letter range, and that for each character independently, for what I understand.
    Any advice with this? It's blocking me from continuing -_-, because I can't make accessors and mutators and constructors, etc, if i'm still unsure of how the fields unfold.
    Thanks in advance.

    You can create a HireDate class.
    public class HireDate{
       private final int day;
       private final String month;
       private final int year;
       public HireDate(int day, String month, int year){
          this.day = day;
          this.month = month;
          this.year = year;
    }In the HireDate Constructor you could put if statements to ensure that only correct information is present. The fields are final because the hire date will not change. Override the toString() method so that when you print it out it will be in the correct format. Create some getter methods to get the private fields.
    Then in your other class just do this
    HireDate hired = new HireDate(10, July, 1991);Now you have an object that stores all 3 fields for you. You can use the object as you like and when it prints it will be in the format you want.
    Or you could just make hireDate a String variable. That is what I always did and I never lost marks for it. The reason I suggest this way is because you mentioned rules and constraints.

Maybe you are looking for

  • Order type dependent parameters for process order

    Hello friends, In Order type dependent parameters for process order (T.C COR4), there is subscreen for Process data documentation.Inside it we have three options :a) Batch Record Required                                                               

  • Modifying Spotlight in Yosemite

    Hello. Does anyone know how Apple feel about people modifying Spotlight? Thanks in advance.

  • PO released dates by releases ?

    Dear MM gurus, Request pl let me know is there any Standard Report to see the PO Releases along with dates & release levels with sap user id. (PO releases history) Pl help thanx in advance regards Srihari

  • Adobe CFC Generator  not showing up Coldfusion beta 2

    Im running the new coldfusion beta 2 connecting to a remote server. For some reason when i right click on the a table in the RDS Dataview Im not getting the "Adobe CFC Generator" option. Any one else having the same problem?

  • Mac not registering hostname on Windows DHCP server

    I work for a company who is heavy Windows, but we have a few Macs for our graphics department.  The problem is that a few of the Macs, though not all, don't register a host name with the Windows DHCP server.  I've compared the network and share setti