Complicated pivot example

I work in the transportation industry. We haul a lot of product in a given day from a variety of sources. My bosses would like a report that shows the origins in columns with row data containing the date and number of loads hauled based on the destination. We shift from origin to origin on a daily basis, so I will have some origins that only have a couple of days worth of loads and others that will show loads from several weeks in a row.
From everything I can see, I'm going to need to dynamically create a report that first finds all the origins that were hauled from in a given date range, then generates an aggregating report that shows loads on a given day.
Has anyone got an example of something like this they could point me to?
Here's a visual example of what I'm after:
DATE Origin1 Origin2 Origin3 Origin5 Origin8 ...
9/1/2009 10 2 - - -
9/2/2009 12 16 - - -
9/3/2009 - 15 - - 10
9/4/2009 - - 54 - 10
9/5/2009 - 10 - 15 12
...

Okay, I've come back to this issue and I had an idea that was starting to work until I ran into some problems with sheer size. From various documentation sources, it looks like the largest variable I can declare is a VARCHAR2(4000). I figured out a way to dynamically build the SQL statement I need in PL/SQL, but my estimates for the amount of space I need are coming up significantly short.
What I did was build a procedure that attempts to tell me how many columns I need, then loops through the columns and starts generating the SQL in pieces. At the end, my intention was to concatenate the SELECT, FROM, WHERE, and ORDER BY clauses together into one query, then execute the query and see my nice (but very wide and huge) report. I counted the characters I'm going to need, and if I handle up to 30 origins, my SELECT statement is going to be 500 characters by itself. Each of the FROM clauses tops 250 characters (x30 columns = >7500 characters). Then I need another 1000 characters for the WHERE clause and only 30 for the ORDER BY clause.
All in all, I'm estimating almost 10,000 characters for the entire statement. Can I use a CLOB for this? Do I need to write to file and call it as I would a script? Just looking for options.
Here's the start I've got so far:
CREATE OR REPLACE PROCEDURE PROC_BWSUM(f NUMBER, dtst DATE, dted DATE)
AS
  --Passed in parameters
  v_fact        NUMBER      := f;
  v_from_dt     DATE        := dtst;
  v_to_dt       DATE        := dted;
  --query construction variables
  qry_col_ct    INTEGER     := 0;
  qry_stn_ct    INTEGER     := 0;
  qry_stn_id    NUMBER;
  qry_stn_nm    VARCHAR2(27);
  qry_stn_key   NUMBER;
  qry_select    VARCHAR2(505);  -- will accommodate up to 30 stations
  qry_from      VARCHAR2(4000);
  qry_where     VARCHAR2(100);
  qry_orderby   VARCHAR2(100);
  cursor c_cols is select j.STATION_ID, s.SHORT_NM, COUNT(j.LOAD_JOB_ID)
        from LOAD_RATES r, STATIONS s, TC c, TC_LOAD_JOBS j
       where c.TC_ID = j.TC_ID and j.LOAD_RATE_ID = r.LOAD_RATE_ID
         and FN_STN_KEY(j.FACTORY_ID, j.STATION_ID) = s.KEY_ID
         and j.FACTORY_ID = v_fact and r.ACTIVE = 1
         and c.DATE_INDEX between to_date('09/01/2009','MM/DD/YYYY')
              and to_date('10/01/2009','MM/DD/YYYY')
       group by j.STATION_ID, s.SHORT_NM
       having COUNT(j.LOAD_JOB_ID) > 0
       order by j.STATION_ID;
  --value variables
  v_lds         NUMBER;
  v_tons        NUMBER;
begin
  htp.p('<table>');
  qry_select    := 'select base.DAY';
  qry_from      := ' from (select c.DATE_INDEX as DAY, COUNT(j.LOAD_JOB_ID) as LDS
           from TC c, TC_LOAD_JOBS j
          where c.TC_ID = j.TC_ID
            and c.DATE_INDEX between v_from_dt and v_to_dt
            and j.FACTORY_ID = v_fact
          group by c.DATE_INDEX) base';
  qry_where     := '';
  qry_orderby   := ' order by base.DAY;';
  htp.p('<tr>');
  select COUNT(r.LOAD_RATE_ID) into qry_col_ct
    from LOAD_RATES r where r.FACTORY_ID = v_fact and r.ACTIVE = 1;
  open c_cols;
    LOOP
    FETCH c_cols into qry_stn_id, qry_stn_nm, qry_stn_key;
    EXIT WHEN c_cols%NOTFOUND;
      qry_stn_ct    := qry_stn_ct + 1;
      htp.p('<th colspan=2>'||qry_stn_nm||' ('||qry_stn_id||')</th>');
      qry_select    := qry_select ||', a'||qry_stn_ct||'.LDS, a'||qry_stn_ct||'.TNS';
      IF qry_stn_ct = 1 THEN
        qry_where     := qry_where  ||'where base.DAY = a'||qry_stn_ct||'.DAY (+)';
      ELSE
        qry_where     := qry_where  ||'and base.DAY = a'||qry_stn_ct||'.DAY (+)';
      END IF;
    END LOOP;
  close c_cols;
  htp.p('</tr>');
  htp.p('<tr>');
      htp.p('<td colspan = '||qry_col_ct*2||'>'||qry_select||'</td>');
  htp.p('</tr>');
  htp.p('<tr>');
      htp.p('<td colspan = '||qry_col_ct*2||'>'||qry_from||'</td>');
  htp.p('</tr>');
  htp.p('<tr>');
      htp.p('<td colspan = '||qry_col_ct*2||'>'||qry_where||'</td>');
  htp.p('</tr>');
  htp.p('<tr>');
      htp.p('<td colspan = '||qry_col_ct*2||'>'||qry_orderby||'</td>');
  htp.p('</tr>');
  htp.p('</table>');
end;
/

Similar Messages

  • 11G SQL pivot example?

    Hello,
    Can anyone help me write a SQL pivot statement using 11G to do the following?:
    Table columns
    =========
    Deliverable
    Phase (For simplicity we'll make the total possible Phase values equal 1 to 13)
    Delv_IN_Phase_Y_N Char(3) values 'Yes' or 'No'
    I want to make a matrix with these 3 columns in the above table (in reality a complex view) :
    - Deliverable is first column.
    - Next 13 column headers display 1 to 13 (the posiible values contained in the 'Phase' column).
    - The matrix values under the 'Phase' Column headers are the Yes/No values held in the Delv_in_Phase column.
    Deliverable Phase 1 Phase 2 Phase 3 Phase 4 ......... Phase 13
    =========================================================
    Product Market Plan Yes No No Yes No
    Bid Plan No Yes No ...........................................
    Contract Summary ................................................................................
    Quality Plan .................................................................................
    Thanks for any help in advance.
    Carol

    Just a simple example based on what I could grasp from your table description.
    I assume you can't have more than 1 value (either 'yes' or 'no' for a given deliverable in each phase).
    Connected to Oracle Database 11g Enterprise Edition Release 11.1.0.6.0
    Connected as fsitja
    SQL> with t as (
      2  select 'Product Market Plan' deliverable, 1 phase, 'NO' Delv_IN_Phase_Y_N from dual union all
      3  select 'Product Market Plan' deliverable, 2 phase, 'YES' Delv_IN_Phase_Y_N from dual union all
      4  select 'Product Market Plan' deliverable, 3 phase, 'YES' Delv_IN_Phase_Y_N from dual union all
      5  select 'Bid Plan', 1, 'YES' from dual union all
      6  select 'Bid Plan', 2, 'NO' from dual union all
      7  select 'Bid Plan', 3, 'NO' from dual union all
      8  select 'Contract Summary', 1, 'NO' from dual union all
      9  select 'Contract Summary', 2, 'NO' from dual union all
    10  select 'Contract Summary', 3, 'YES' from dual union all
    11  select 'Quality Plan', 1, 'YES' from dual union all
    12  select 'Quality Plan', 2, 'YES' from dual union all
    13  select 'Quality Plan', 3, 'NO' from dual)
    14  -- END OF SAMPLE DATA
    15  SELECT *
    16    FROM t
    17   PIVOT(MAX(delv_in_phase_y_n) FOR phase IN (1 AS phase_1, 2 AS phase_2, 3 AS phase_3))
    18  /
    DELIVERABLE         PHASE_1 PHASE_2 PHASE_3
    Contract Summary    NO      NO      YES
    Bid Plan            YES     NO      NO
    Product Market Plan NO      YES     YES
    Quality Plan        YES     YES     NO
    SQL> You can play around and expand the pivot by adding the whole 13 values inside the "FOR phase IN (val1 as column1, etc)" just thought I'd keep it simple.
    => [Documentation Reference here|http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/statements_10002.htm#CHDCEJJE]
    Regards.

  • PIVOT example

    I need to some help to PIVOT my dataset, need to move the description column to individual columns, so I have 1 row for eaach id
    below is an example
    declare @Pivot table (
    S_dates datetime
    , id varchar(10)
    , code varchar(100)
    , description varchar(max))
    insert @Pivot select '2014-03-24 00:00:00.000','1580/7','07611819360532','Matrix 90° L-Plate, medium, 2+2 holes, reversible, thickness 0.8 mm, Pure Titanium, sterile'
    insert @Pivot select '2014-03-24 00:00:00.000','1580/7','07611819362369','Matrix Screw Ø 1.85 mm, self-drilling, length 4 mm, Titanium Alloy (TAN), sterile, pack of 4 units in Clip'
    insert @Pivot select '2014-03-24 00:00:00.000','1580/7','07611819362383','Matrix Screw Ø 1.85 mm, self-drilling, length 5 mm, Titanium Alloy (TAN), sterile, pack of 4 units in Clip'
    insert @Pivot select '2014-03-24 00:00:00.000','1580/7','07611819362437','Matrix Screw Ø 2.1 mm, self-tapping, length 4 mm, Titanium Alloy (TAN), sterile, pack of 1 unit in Clip'
    insert @Pivot select '2014-03-21 00:00:00.000','7551/4','07611819362406','Matrix Screw Ø 1.85 mm, self-drilling, length 6 mm, Titanium Alloy (TAN), sterile, pack of 4 units in Clip'
    insert @Pivot select '2014-03-21 00:00:00.000','7551/4','07611819362437','Matrix Screw Ø 2.1 mm, self-tapping, length 4 mm, Titanium Alloy (TAN), sterile, pack of 1 unit in Clip'
    insert @Pivot select '2014-03-21 00:00:00.000','7551/4','07611819377523','Matrix Drill Bit Ø 1.4 mm with Stop, length 44.5/8 mm, for J-Latch Coupling, sterile'
    insert @Pivot select '2014-03-21 00:00:00.000','4820/4','07611819360709','Matrix Anatomic L-Plate, short, 3+3 holes, reversible, thickness 0.8 mm, Pure Titanium, sterile'
    insert @Pivot select '2014-03-21 00:00:00.000','4820/4','07611819362222','Matrix Screw Ø 1.85 mm, self-tapping, length 6 mm, Titanium Alloy (TAN), sterile, pack of 4 units in Clip'
    insert @Pivot select '2014-03-21 00:00:00.000','4820/4','07611819377523','Matrix Drill Bit Ø 1.4 mm with Stop, length 44.5/8 mm, for J-Latch Coupling, sterile'
    insert @Pivot select '2014-03-21 00:00:00.000','3738/4','07611819360709','Matrix Anatomic L-Plate, short, 3+3 holes, reversible, thickness 0.8 mm, Pure Titanium, sterile'
    insert @Pivot select '2014-03-21 00:00:00.000','3738/4','07611819362222','Matrix Screw Ø 1.85 mm, self-tapping, length 6 mm, Titanium Alloy (TAN), sterile, pack of 4 units in Clip'
    insert @Pivot select '2014-03-21 00:00:00.000','3738/4','07611819362406','Matrix Screw Ø 1.85 mm, self-drilling, length 6 mm, Titanium Alloy (TAN), sterile, pack of 4 units in Clip'
    insert @Pivot select '2014-03-21 00:00:00.000','3738/4','07611819362437','Matrix Screw Ø 2.1 mm, self-tapping, length 4 mm, Titanium Alloy (TAN), sterile, pack of 1 unit in Clip'
    insert @Pivot select '2014-03-21 00:00:00.000','3738/4','07611819377523','Matrix Drill Bit Ø 1.4 mm with Stop, length 44.5/8 mm, for J-Latch Coupling, sterile'
    insert @Pivot select '2014-03-21 00:00:00.000','6578/1','07611819360709','Matrix Anatomic L-Plate, short, 3+3 holes, reversible, thickness 0.8 mm, Pure Titanium, sterile'
    insert @Pivot select '2014-03-21 00:00:00.000','6578/1','07611819362406','Matrix Screw Ø 1.85 mm, self-drilling, length 6 mm, Titanium Alloy (TAN), sterile, pack of 4 units in Clip'
    insert @Pivot select '2014-03-12 00:00:00.000','7666/1','07611819381100','Drill Bit Ø 1.5 mm with Stop, length 50/6 mm, 2-flute, for J-Latch Coupling, sterile'
    select * from @Pivot

    Hi,
    Please see the Query below hope it helps. Its dynamic with data. I have used Temp Tables instead of table variables. Hope its helps.
    Create
    table #Pivot (
          S_dates
    datetime
    , id varchar(10)
    , code varchar(100)
    , description
    varchar(max))
    insert #Pivot
    select '2014-03-24 00:00:00.000','1580/7','07611819360532','Matrix
    90° L-Plate, medium, 2+2 holes, reversible, thickness 0.8 mm, Pure Titanium, sterile'
    insert #Pivot
    select '2014-03-24 00:00:00.000','1580/7','07611819362369','Matrix
    Screw Ø 1.85 mm, self-drilling, length 4 mm, Titanium Alloy (TAN), sterile, pack of 4 units in Clip'
    insert #Pivot
    select '2014-03-24 00:00:00.000','1580/7','07611819362383','Matrix
    Screw Ø 1.85 mm, self-drilling, length 5 mm, Titanium Alloy (TAN), sterile, pack of 4 units in Clip'
    insert #Pivot
    select '2014-03-24 00:00:00.000','1580/7','07611819362437','Matrix
    Screw Ø 2.1 mm, self-tapping, length 4 mm, Titanium Alloy (TAN), sterile, pack of 1 unit in Clip'
    insert #Pivot
    select '2014-03-21 00:00:00.000','7551/4','07611819362406','Matrix
    Screw Ø 1.85 mm, self-drilling, length 6 mm, Titanium Alloy (TAN), sterile, pack of 4 units in Clip'
    insert #Pivot
    select '2014-03-21 00:00:00.000','7551/4','07611819362437','Matrix
    Screw Ø 2.1 mm, self-tapping, length 4 mm, Titanium Alloy (TAN), sterile, pack of 1 unit in Clip'
    insert #Pivot
    select '2014-03-21 00:00:00.000','7551/4','07611819377523','Matrix
    Drill Bit Ø 1.4 mm with Stop, length 44.5/8 mm, for J-Latch Coupling, sterile'
    insert #Pivot
    select '2014-03-21 00:00:00.000','4820/4','07611819360709','Matrix
    Anatomic L-Plate, short, 3+3 holes, reversible, thickness 0.8 mm, Pure Titanium, sterile'
    insert #Pivot
    select '2014-03-21 00:00:00.000','4820/4','07611819362222','Matrix
    Screw Ø 1.85 mm, self-tapping, length 6 mm, Titanium Alloy (TAN), sterile, pack of 4 units in Clip'
    insert #Pivot
    select '2014-03-21 00:00:00.000','4820/4','07611819377523','Matrix
    Drill Bit Ø 1.4 mm with Stop, length 44.5/8 mm, for J-Latch Coupling, sterile'
    insert #Pivot
    select '2014-03-21 00:00:00.000','3738/4','07611819360709','Matrix
    Anatomic L-Plate, short, 3+3 holes, reversible, thickness 0.8 mm, Pure Titanium, sterile'
    insert #Pivot
    select '2014-03-21 00:00:00.000','3738/4','07611819362222','Matrix
    Screw Ø 1.85 mm, self-tapping, length 6 mm, Titanium Alloy (TAN), sterile, pack of 4 units in Clip'
    insert #Pivot
    select '2014-03-21 00:00:00.000','3738/4','07611819362406','Matrix
    Screw Ø 1.85 mm, self-drilling, length 6 mm, Titanium Alloy (TAN), sterile, pack of 4 units in Clip'
    insert #Pivot
    select '2014-03-21 00:00:00.000','3738/4','07611819362437','Matrix
    Screw Ø 2.1 mm, self-tapping, length 4 mm, Titanium Alloy (TAN), sterile, pack of 1 unit in Clip'
    insert #Pivot
    select '2014-03-21 00:00:00.000','3738/4','07611819377523','Matrix
    Drill Bit Ø 1.4 mm with Stop, length 44.5/8 mm, for J-Latch Coupling, sterile'
    insert #Pivot
    select '2014-03-21 00:00:00.000','6578/1','07611819360709','Matrix
    Anatomic L-Plate, short, 3+3 holes, reversible, thickness 0.8 mm, Pure Titanium, sterile'
    insert #Pivot
    select '2014-03-21 00:00:00.000','6578/1','07611819362406','Matrix
    Screw Ø 1.85 mm, self-drilling, length 6 mm, Titanium Alloy (TAN), sterile, pack of 4 units in Clip'
    insert #Pivot
    select '2014-03-12 00:00:00.000','7666/1','07611819381100','Drill
    Bit Ø 1.5 mm with Stop, length 50/6 mm, 2-flute, for J-Latch Coupling, sterile'
    select
    * from #Pivot
    Declare @SQL 
    Varchar(max)
    ,  @Var  
    Varchar(max)
    SELECT
            @Var=coalesce(@Var+',','')+'['
    + code +']'
    FROM
    (Select
    DISTINCT code from #Pivot)
    as A
    Select @Var
    SET @SQL
    = ''
    SET @SQL
    = '
    SELECT id, S_dates,'
    +
    @Var
    +'
    FROM
    (SELECT *
        FROM #Pivot) AS SourceTable PIVOT
    MAX(description)
    FOR Code IN ('+ @Var
    + ')
    ) AS PivotTable;'
    Exec
    (@SQL)
    Regards, PS

  • PIVOT LOGIC NEEDED

    Hi All,
    I need to pass the condition as sysdate , sysdate -1 in 'for ' in pivot clause in oracle but am geting the error as 'ORA-56901: non-constant expression is not allowed for pivot|unpivot values' . I need to pass condition as sysdate only not any hard code vlaue. is it possible?
    create table pivot_eg ( due_dt date);
    insert into pivot_eg values ('16-mar-11');
    insert into pivot_eg values ('15-mar-11');
    insert into pivot_eg values ('14-mar-11');
    insert into pivot_eg values ('13-mar-11');
    insert into pivot_eg values ('12-mar-11');
    select * from pivot_eg
    pivot (count(due_dt) for due_dt in (sysdate as dt ,sysdate-1 as dt1))
    is it possible i can use sysdate in for or else i shud go for case kinda pivot example? Please help me

    Hi,
    Convert the pivot column into fixed values first, like this:
    WITH     got_days_ago     AS
         SELECT     TRUNC (SYSDATE) - TRUNC (due_dt)     AS days_ago
         FROM     pivot_eg
         WHERE     due_dt     >= TRUNC (SYSDATE) - 1
         AND     due_dt     <  TRUNC (SYSDATE) + 1
    SELECT     *
    FROM     got_days_agO
    PIVOT     (   COUNT (*)
         FOR days_ago IN     ( 0     AS dt
                   , 1     AS dt1
    ;The WHERE clause is for efficiency only. Filter out unwanted rows as early as possible.
    Sorry, I'm not at an Oracle 11 database now, so I can't test it.
    user2639048 wrote:
    ... create table pivot_eg ( due_dt date);
    insert into pivot_eg values ('16-mar-11'); ...Due_dt is a DATE. Trying to insert2 VARCHAR2 values into a DATE column is asking for trouble. Sometimes we get what we ask for,
    Insert DATEs into DATE columns, like this
    INSERT INTO pivot_eg (due_dt) VALUES  (TO_DATE ('16-mar-2011', 'DD-mon-YYYY')); or this:
    INSERT INTO pivot_eg (due_dt) VALUES  (DATE '2011-03-16');

  • Create multiple project files or one?

    I am working on a feature length film which has 48 sequences with subclips and rough cuts created in Prelude. Now I want to start bringing this footage into Premiere for editing, but I am wondering is there benefits or drawbacks to creating a Premiere project for each sequence then merging them all together in one master project file after finished working on each sequence?
    I'm trying to determine which way would be the easiest to keep things organized and not so overwhelming. Has anyone done this before?

    I never worked on a long project...but for a short test of cs3 , using dailies as source material, I came up with a process that worked pretty good for me.. and it might help you a little bit...dont know.
    it's kinda complicated.
    this example is one part of a scene...well, 2 scenes really, but I didn't have the dailies for all the material shot... so it's hard to explain... mostly I had all of the first part of the stuff you see here and then only part of the rooftop stuff...
    The rooftop stuff I made b&w with a overlay to pretend it was a cheap video cop camera..and used static to make cuts cause I saw crew, other cameras, etc... and had to cut.
    was basically 3 alexa on process trailer and 4 alexa on roof.
    This is what I did for scenes ( basically for the beginning of working on the overall material and then whittling it down to usable stuff )
    I dont use source monitor at all.. in out points.. I put everything in the primary timeline levels..and just cut out the slates and dumb stuff nobody would ever use...cut / delete .
    Then I start scrubbing through and pick out what I think will tell the story and move it UP from the original levels. That gives me a quick easy way to see what was " used" as opposed to what the original stuff ( bulk ) is.
    I don't rename the files or bins as I do that... I create a 'new' sequence and move all the raised stuff into THAT sequence ...and butt it together ...which is now becoming a rough cut...the new sequence ( not what you see here above which is the first bulk of what I got to work with ).  But I dont do that new sequence on a single vid layer cause I do my own fades and stuff on multiple layers and want that option... so I butt them together on several vid levels ( like 3 or whatever in this case )....
    I want the option of overlaying stuff and doing my own cross dissolves at my own 'pace' if need be....not the auto stuff and then the playing with corrections and extra frames etc ...
    As I scrub through the 1st roughcut I notice " Oh, I just cut from one person talking to another person talking, but the background was moving in one take, and not in the next "... which looks stupid.. so I have to go BACK to the original stuff and find a portion of a camera angle and take ...that gives me a moving background ....
    This starts to get really retarded...cause now you're making cuts you don't really WANT to make, but HAVE to make....
    Since I was using dailies and you're using prelude I guess there's a big difference. But I might use a part of one take and part of another take of the same scene and the same "coverage" if with multiple cameras ... so I don't think I would like splitting stuff up onto takes that are good or bad ...unless obviously the whole thing is bad from the get go... like someone fell down or their wig flew off their head or something...

  • No idea how to use Skype on e65

    I couldnt see any topic about settings for skype. I want to use Skype over wi-fi. Please tell me what settings i have to do.
    THX

    I was using K790i before that, i was bored with it so i decided to change with e65. But to be honest i'm not satisfied with that phone. Even you cannot compare e65 with k790i. E65 is only better on technical sheets. Ok it have better specs like 3G, UMTS, Wi-Fi.. but be sure these are the only better sides.
    If you used only Nokia till today you can't understand me but there are a lot of differences in using menus in bad way of course, camera quality, some details, for exaple while setting an picture as a background you can't stretch it to fit the screen in nokia, or k790i is making the list of people who you r sending message and next time you can select one of contacts from there and be sure this function is very practical, no need to compare their camera, there is a huge difference. E65 is taking photos like 4-5 year old model. The menu is extremely complicated for example i don't know why but for wi-fi there are settings in 3-4 different menu.
    And another big disadvantege for e65 is like allways, the stanby time.
    I can use e65 2days approx if fully charged. But the duration for k790i is 4-5days like its old model (k750i). Nokia must do smthng about it's battery technology or phones power consumption.
    Shortly i don't recommend e65.
    If you have enough money then buy n95 or wait for iphone(i'll do like that).
    Forgive me about my terrible English

  • Combine the Service Ticket View and the Survey

    Dear experts,
           I need to display the survey within the Service ticket View. Can you please guide me through the steps to achieve the same?
    Thanks,
    Kanthimathi

    Hi there,
    Am just copy and pasting this link.. Some one has explained this procedure in the forums.As I am not sure how to give you the link of the thread, am just copy and pasting it here.
    The Attachments assignment block is a re-use component. These re-use components can be integrated into all business transaction components, and as such also in the interaction record. You need to carefully check how the component GS_CM is integrated into component BT111H_OPPT.
    1. Define your own enhancement for the interaction record component ICCMP_BT_INR
    2. Definition of component usage for GS_CM in the runtime repository editor of the enhanced ICCMP_BT_INR component:
    Component Usage: CUGSCM (compare with the component usage in BT111H_OPPT)
    3. Enhance the component controller class CL_ICCMP_BT_BSPWDCOMPONE6_IMPL, method WD_USAGE_INITIALIZE
    This method binds the context node(s) of the re-use component to the corresponding context node(s) of the main component ICCMP_BT_INR
    Sometimes this is easy and binding can happen between 2 BTADMINH nodes for example. In case of the Attachment assignment block a custom controller is used, which makes it more complicated.
    Example for BT111H_OPPT
    Attachments
    WHEN 'CUGSCM' OR 'CUGSCM_DET'.
    CALL METHOD iv_usage->bind_context_node
    EXPORTING
    iv_controller_type = cl_bsp_wd_controller=>co_type_custom
    iv_name = 'BT111H_OPPT/CUGSCMCuCo'
    iv_target_node_name = 'CMBO'
    iv_node_2_bind = 'CMBUSOBJ'.
    IF gv_ppm_flag = abap_true.
    CALL METHOD iv_usage->bind_context_node
    EXPORTING
    iv_controller_type = cl_bsp_wd_controller=>co_type_custom
    iv_name = 'BT111H_OPPT/CUGSCMCuCo'
    iv_target_node_name = 'ATTRIBUTES'
    iv_node_2_bind = 'ATTRIBUTES'.
    ENDIF.
    4. Create custom controller in the enhanced ICCMP_BT_INR component, similar to BT111H_OPPT/CUGSCMCuCo.
    You can re-use the opportunity custom controller, and just copy the code above into the WD_USAGE_INITIALIZE method of the interaction record component.
    However, to have more clean code it would be better to define your own custom controller in the interaction record component.
    5. Enhance the interaction record viewset to display the newly linked re-use component.
    ICCMP_BT_INR/InrViewSet. You will probabily need to create a new viewarea and tablinks, and navigational links in the runtime repository.
    hope that helps,
    Sreekanth

  • Labview to excel:graph

    is it possible to draw a graph in excel for just some data of each row,if yes how

    i already know this toolkit, but to get a graph for some data of each row is a little complicated.
    for example :in excel i want to get the graph of param 2 and 4 and 5 of the 1st row in front of this row(and so on graph of param 2,4 and 5 of 2end row in front of it...)
    Attachments:
    Sample Report (Excel).vi ‏30 KB

  • Latest itunes version

    HELP PLEASE !!! I upgraded to the latest itunes version a couple of days ago and getting desperate doing the most simple things, like putting a playlist together . Everthing is so unnecessarly complicated  For example, before, when i needed a special type of music I put some key word in the search field and would inmediatly get all the songs which I had commented or contained this word... eg,." emotion",   "serene" etc.This was really helpful for finding music very quickly  !
    Now it only turns out the title containing this word !  This new version is NOT the usual user friendly mac style !
    Is there any way to go back to the older version ? Please give me good news !
    DJ CARMEN

    These are the updates. Nothing exciting (unless of course they directly affect you).
    http://docs.info.apple.com/article.html?artnum=303087
    http://docs.info.apple.com/article.html?artnum=303119
    There are also reports on the iTFW forum that it solves the issue of iTunes crashing or freezing when the iPod is connected, but I've not seen that confirmed as of yet.

  • [iPhone] Store Application Data

    I am need to store some application data locally on the iphone. The data, periodically, will get updated from a server (web service). The user will not be able to change the data. There is some Parent/Child relationship on the data but not very complicated (for example a Contact, has multiple addresses and multiple phone numbers). One of the requirements is to be able retrieve all addresses for a specific contact (using the example above).
    What is the recommended storage facility to store the data? Can I do this using a .plist and replace the whole file from the server? or is it better to use sqllite and do insert and update commands to update the data? Any other suggestion?
    Thanks

    NSDictionary is designed to read and write plists, so I think it's the natural choice unless you're talking about so much data that you'd begin to see a performance problem without an index. At that point you'd want to consider sqllite. I can't tell you where the cross over might be, but an index generally isn't worth the overhead until it takes more than 10,000 comparisons to find something.
    A NSDictionary solution is really easy to code, so try that first and see if you have any performance or memory problem. If you're no where close to 10,000 records, I think you'll be happy with it. If you're planning for a million records it might be another story.
    The problem with replacing the entire file from a server is that the plist format isn't very robust. Although the syntax is very simple, one error can make the entire file unreadable. Therefore you'd really need to trust the server. At the very least I would make a temp.plist and see if NSDictionary can read it before committing to it.

  • How to make third-octave analysis program?

    "I want to make a program which can do Third-Octave Analysis. But I haven't any DAQ device of NI company. I use a DAQ device of Nicolet company. That device can tranfer the acquired data as a file to a computer, and then I can use a software to transform the data into ASCII format. The DAQ device hasn't an anti-alias filter. How can I make the program with LabView? My version of LabView is 5.1."

    The task that you are inquiring about could become quite complicated. for
    example, if you are performing acoustical analysis then frequency and power
    become your primary points of interest. However if you are performing
    analysis of shock and vibration then additional processing will be required.
    I would recommend that we take this off of the news group and work direct.
    I can be reached @ [email protected]
    remove no_spam_ for real address
    Mike
    "stewart342" wrote in message
    news:[email protected]..
    > The DAQ device of nicolet is called 'vision'. What I mean is how can I
    > make a VI to get the analysis result from the data acquired. Because I
    > am not good at LabView and signal
    processing thoery, I hope you can
    > give me a brief example. Though the device provides a filter, the
    > cutoff frequency is not arbitrary. So another question is: If I don't
    > use an analog anti-alias filter, can I use a digital filter instead?
    > The raw data I've got is in ASCII format. The first column is the
    > time, and the following columns are the signals acquired from each
    > channel. Supposed the data haven't been filtered by the anti-alias
    > filter.

  • Determining material consumption for multiple VMI suppliers?

    Is anyone managing supplier VMI with multiple suppliers for materials?
    I'm looking for a way to determine how much daily consumption to send to a supplier in an EDI 852 message when more than one supplier is used to supply the material.  The MSEG table can be used to pull Goods Issues to production orders, but there's no way to determine how much of the consumption should be reported to each of the suppliers.
    If a quota arrangement is set up with percentages for each supplier, I suppose the consumption and the requirements that come out of function module 'MD_STOCK_REQUIREMENTS_LIST_API' could be used to determine a percentage of these quantities to send to the suppliers.  But quota arrangements get complicated, for example, giving the first 10,000 pounds to one supplier and then splitting the rest.  MRP handles all that for planned orders it creates.
    Thanks.

    try using PI_ORDCO for confieming the Orders.
    Set the Back flushing for all these materials, so that with Confirmation these GI will be posted.

  • Cannot boot on Tiger Install DVD

    Hi,
    I have a PowerPC G5 2x2Ghz and I'm trying to reinstall Tiger on one of the two hard drives.
    Here is my problem : no matter if I reboot from the Preferences or by pressing C or ALT, if I try to boot on the Install DVD, after the Apple shows up, a dark gray layer appears on my screen, saying that I need to restart my computer by holding down the power button for several seconds.
    On the top of that, I have some complicated line :
    Example :
    panic(cpu 0 caller 0xFFFF0003) : 0x300 - Data access
    Latest stack backtrace for cpu 0:
    Kernel version :
    Darwin Kernel Version 8.0.0 : Sat Mar 26 14:15:22 PST 2005; root:xnu-792.obj~1/RELEASE_PPC
    panic : We are hanging here.
    Any idea of what I can do about that? I really need to reinstall Tiger

    You are having a kernel panic. Have you recently made any hardware changes like adding RAM?
    Kernel panics are usually caused by a hardware problem – frequently RAM, a USB device or a Firewire device. What external devices do you have connected? When trying to troubleshoot problems, disconnect all external devices except your monitor, keyboard and mouse. Do you experience the same problems?
    To eliminate RAM being the problem, Look at this link: Testing RAM @ http://guides.macrumors.com/Testing_RAM Then download & use Memtest & Ramber.
    Do you have an Apple Hardware Test disc (the AHT is on the Install/Restore DVD that came with your Mac)? Running the Apple Hardware Test in Loop Mode is an excellent troubleshooting step for finding intermittent hardware problems. It is especially useful when troubleshooting intermittent kernel panics. If Loop Mode is supported by the version of the Apple Hardware Test you are using, you run the Extended Test in Loop Mode by pressing Control-L before starting the test. Looping On should appear in the right window. Then click the Extended Test button.The test will run continuously until a problem is found. If a problem is found, the test will cease to loop, indicating the problem it found. If the test fails, be sure to write down the exact message associated with the failure.In some cases, RAM problems did not show up until nearly 40 loops, so give it a good run.
    May be a solution on one of these links.
    http://docs.info.apple.com/article.html?artnum=106227 What's a "kernel panic"? (Mac OS X)
    http://www.macmaps.com/kernelpanic.html Mac OS X Kernel Panic FAQ
    http://www.index-site.com/kernelpanic.html Mac OS X Kernel Panic FAQ
    http://www.thexlab.com/faqs/kernelpanics.html Resolving Kernel Panics
    http://www.macfixit.com/article.php?story=20060911080447777 Avoiding and eliminating Kernel panics
    http://macosg.com/group/viewtopic.php?t=800 12-Step Program to Isolate Freezes and/or Kernel Panics
     Cheers, Tom

  • More complicated examples of using BRFPlus

    Hello!
    Where can I find more complicated examples of using BRFPlus functionality? I need in examples that use expression types like DB query, Step sequence, Search Tree or XSL transformation.

    Hi Alexander,
    With NW 7.0 EHP1 BRFplus can be used for rather simple examples. Development is not completed for all features.
    You may use Decision Table, Boolean, Range, Constant, Formula.
    FYI: There are some demo reports in a package call SFDTDEMO.
    However Ruleset and Rule and not really usable in NW 7.0 EHP1. Those features will be made available in NW 7.0 EHP2. For really complex examples you will need them. In NW 7.0 EHP2 there is no limitation anymore. I am comfortable that even complex cases can be supported well.
    BR,
    Carsten

  • Pivote Table  Example

    Hello,
    I am using Jdeveloper 11g
    Can any one provide me some example on using of Pivote table.
    Thanks

    Check out george.maggessy.com/2010/07/pivot-table.html?m=1
    or http://technology.amis.nl/blog/2593/adf-faces-11g-reloading-the-matrix-using-the-pivot-table-component
    Timo

Maybe you are looking for

  • Cellular/data usage while connected to Wi-Fi with iPhone 5

    I recently upgraded from an iPhone 4 to an iPhone 5 and when I view my usage details for data I am seeing small amounts of data use even while my phone is connected to Wi-Fi and charging. I did not see this with my iPhone 4. The usage is small and I'

  • How can I arrange a callback to the uk.  What number format do I put in the field?

    I would like someone to contact me but the format of my phone number (uk) must be wrong as I keep getting emails saying number not recognised.  Can you help me please.

  • Video in Photoshop CS6

    Sorry if this is the wrong place to ask but I have just started to try something using video in CS6. I have 82 sequential images and I am trying to string them together as a sort of stop motion film (think the intro to the Monkeys). I have done the f

  • Apple you are the only one who can help me right now! please!

    ok listen first of all im sorry for my poor english but please try to understand i was all happy with my iphone 4 suddnly in games the game center massage said "welcome Sharon1122" ***Sandbox*** (its was suppost to say welcome Sharon2018 but i didnt

  • How can I restore the data on my NOKIA 6131 phone ...

    something went wrong with my cell phone. when i checked, everyone told me that i will need to add new software, but all the data will be lost. how can i restore these data after updating the software on my cell. thxxxx