Need help on a trigger

I am using Oracle 9i. I tried to take a lot of the other fields out of this trigger so that the real problem could be seen. I am trying to create a trigger that cleans up a string field, then verifies the new character with a field in another table. Once they are equal it will grab that ID number and place it in required field. Below is what I have so far for the trigger.
Table 1
SP_id INTEGER
TT_id INTEGER
LEGACY VARCHAR2
Table 2
SID NUMBER (10)
UID VARCHAR2
DESCRIPTION VARCHAR2
Table 3
T_id INTEGER
NAME VARCHAR2
CREATE OR REPLACE TRIGGER ABC
AFTER INSERT OR UPDATE
ON 2
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
BEGIN
IF (INSERTING)
THEN
INSERT INTO 1
(SP_id,
TT_id,
LEGACY)
VALUES (XXX_seq.NEXTVAL,
substr(:New.description, 1, instr(translate(:New.description, '1234567890', '**********'),'*')-2) ,
SUBSTR (:NEW.uid, 1, 30));
END IF;
END ABC;
I need to take the parsed character field [substr(:New.description, 1, instr(translate(:New.description, '1234567890', '**********'),'*')-2) ,]
then verify its value with table 3's NAME field. Once the correct name is found I need to grab the table3.T_id and place it in the TT_id in table 1. Should this all be done in a trigger or should I try to create a function that is then called out in the trigger? Any help, advice, or examples would be appreciated.

Below I've done it using two different approaches:
1) using triggers
2) using an api
I prefer using an api for mainly for performance reasons, but it's your call
SQL> create table t1
  2  ( sp_id integer
  3  , tt_id integer
  4  , legacy varchar2(100)
  5  )
  6  /
Tabel is aangemaakt.
SQL> create table t2
  2  ( sid number (10)
  3  , u_id varchar2 (100)
  4  , description varchar2(100)
  5  )
  6  /
Tabel is aangemaakt.
SQL> create table t3
  2  ( t_id integer
  3  , name varchar2(100)
  4  )
  5  /
Tabel is aangemaakt.
SQL> create sequence xxx_seq start with 1 increment by 1
  2  /
Reeks is aangemaakt.
SQL> create or replace trigger abc
  2  after insert on t2
  3  for each row
  4  declare
  5    l_t3_id t3.t_id%type;
  6  begin
  7    begin
  8      select t3.t_id
  9        into l_t3_id
10        from t3
11       where t3.name = substr(:new.description, 1, instr(translate(:new.description, '1234567890', '**********'),'*')-2)
12      ;
13    exception
14    when no_data_found
15    then
16      null;
17    when too_many_rows
18    then
19      null;
20    end
21    ;
22    insert into t1
23    ( sp_id
24    , tt_id
25    , legacy
26    )
27    values
28    ( xxx_seq.nextval
29    , l_t3_id
30    , substr (:new.u_id, 1, 30)
31    );
32  end abc;
33  /
Trigger is aangemaakt.
SQL> insert into t3 values (1, 'abc')
  2  /
1 rij is aangemaakt.
SQL> insert into t3 values (2, 'xyz')
  2  /
1 rij is aangemaakt.
SQL> commit
  2  /
Commit is voltooid.
SQL> insert into t2 values (11, '12', 'abc 12345')
  2  /
1 rij is aangemaakt.
SQL> insert into t2 values (13, '14', 'pqr 65432')
  2  /
1 rij is aangemaakt.
SQL> insert into t2 values (15, '16', 'xyza9875123')
  2  /
1 rij is aangemaakt.
SQL> select * from t2
  2  /
       SID U_ID                           DESCRIPTION
        11 12                             abc 12345
        13 14                             pqr 65432
        15 16                             xyza9875123
3 rijen zijn geselecteerd.
SQL> select * from t1
  2  /
     SP_ID      TT_ID LEGACY
         1          1 12
         2            14
         3          2 16
3 rijen zijn geselecteerd.This is the end of the trigger approach.
From here on it's the api approach:
SQL> rollback
  2  /
Rollback is voltooid.
SQL> drop trigger abc
  2  /
Trigger is verwijderd.
SQL> create package t2_dml
  2  as
  3    procedure create_t2_and_t1
  4    ( p_sid         t2.sid%type
  5    , p_u_id        t2.u_id%type
  6    , p_description t2.description%type
  7    );
  8  end t2_dml;
  9  /
Package is aangemaakt.
SQL> create package body t2_dml
  2  as
  3    procedure create_t2_and_t1
  4    ( p_sid         t2.sid%type
  5    , p_u_id        t2.u_id%type
  6    , p_description t2.description%type
  7    )
  8    is
  9      l_t3_id t3.t_id%type;
10    begin
11      insert into t2
12      ( sid
13      , u_id
14      , description
15      )
16      values
17      ( p_sid
18      , p_u_id
19      , p_description
20      );
21      begin
22        select t3.t_id
23          into l_t3_id
24          from t3
25         where t3.name = substr(p_description, 1, instr(translate(p_description, '1234567890', '**********'),'*')-2)
26        ;
27      exception
28      when no_data_found
29      then
30        null;
31      when too_many_rows
32      then
33        null;
34      end
35      ;
36      insert into t1
37      ( sp_id
38      , tt_id
39      , legacy
40      )
41      values
42      ( xxx_seq.nextval
43      , l_t3_id
44      , substr (p_u_id, 1, 30)
45      );
46    end create_t2_and_t1
47    ;
48  end t2_dml;
49  /
Package-body is aangemaakt.
SQL> exec t2_dml.create_t2_and_t1(11,'12','abc 12345')
PL/SQL-procedure is geslaagd.
SQL> exec t2_dml.create_t2_and_t1(13,'14','pqr 65432')
PL/SQL-procedure is geslaagd.
SQL> exec t2_dml.create_t2_and_t1(15,'16','xyza9875123')
PL/SQL-procedure is geslaagd.
SQL> select * from t2
  2  /
       SID U_ID                           DESCRIPTION
        11 12                             abc 12345
        13 14                             pqr 65432
        15 16                             xyza9875123
3 rijen zijn geselecteerd.
SQL> select * from t1
  2  /
     SP_ID      TT_ID LEGACY
         4          1 12
         5            14
         6          2 16
3 rijen zijn geselecteerd.I hope this helps.
Regards,
Rob.

Similar Messages

  • I need help with a trigger mutating a table

    I'll add the trigger I have written now at the bottom. Here is the problem that I have. We have employees and their families in an individual table.
    A family is indicated by matching client, branch, and emp_id. An employee is indicated by individual_num = 1. All other numbers indicate family members. A person is determined to be terminated by having a date other than '2299/12/31' (It's a varchar(10) and very very wrong. Don't ask...) in the termination date column.
    A family member can be terminated in the system independent of the rest of there family. However, if an employee is terminated then all active family members need the termination date set to the same date as the employee. If that termination date is then changed for the employee all family members with the same date need to have their dates updated.
    I understand why this causes table mutation but I need a work around. Any ideas? Please...
    CREATE OR REPLACE TRIGGER INDIV_EMP_TERM
    after update on INDIVIDUAL
    for each row
    begin
    if ( :new.INDIVIDUAL_NUM = 1 and :old.TERMINATION_DATE <> :new.TERMINATION_DATE ) then
    if ( :old.TERMINATION_DATE = '2299/12/31' ) then
         update INDIVIDUAL
              set TERMINATION_DATE = :new.TERMINATION_DATE
              where CLIENT = :new.CLIENT
              and BRANCH = :new.BRANCH
              and EMP_ID = :new.EMP_ID
              and INDIVIDUAL_NUM <> 1
              and TERMINATION_DATE = '2299/12/31';
         else
         update INDIVIDUAL
              set TERMINATION_DATE = :new.TERMINATION_DATE
              where CLIENT = :new.CLIENT
              and BRANCH = :new.BRANCH
              and EMP_ID = :new.EMP_ID
              and INDIVIDUAL_NUM <> 1
              and TERMINATION_DATE = :old.TERMINATION_DATE;
         end if;
    end if;
    end;

    Try your code like this below .It will help you to eliminate the mutating error
    create or replace PACKAGE test_update IS
    type row_type is table of rowid index by binary_integer;
    v_row row_type ;
    v_index binary_integer ;
    v_num integer := 0 ;
    flag integer := 1 ;
    END;
    create or replace trigger test_up
    before update
    on test123
    begin
    select USR_ID
    into test_update.v_num
    from test123 ;
    dbms_output.put_line ( 'before update '||test_update.v_num );
    test_update.v_index := 0;
    end ;
    create or replace trigger test_up_after
    after update
    on test123
    begin
    dbms_output.put_line ( test_update.v_index );
    test_update.flag := 0 ;
    for i in 1 .. test_update.v_index loop
    update test123
    set UPD_BY = nvl(test_update.v_num ,0),
    UPD_DATE = sysdate
    where rowid = test_update.v_row(i) ;
    end loop ;
    test_update.flag := 1 ;
    test_update.v_index := 0;
    end ;
    create or replace trigger test_1
    after update on test123
    for each row
    begin
    -- dbms_output.put_line ( 'after update test flag '||test_update.flag );
    if test_update.flag = 1 then
    test_update.v_index := test_update.v_index + 1 ;
    test_update.v_row(test_update.v_index) := :old.rowid ;
    end if ;
    end ;

  • Need help with creating trigger using instead of insert.

    Hi all,
    I am trying to create a trigger that can read the inserted Mail data from table1 and check if the Mail data matches the Mail data from table2. If the Mail data matches the Mail data from table2 it will get the EmpID from table2 and insert it into table1
    column EmpID. 
    Here are table2 columns:
    EmpID (int) Mail(varchar) Mail2(varchar)
    101 [email protected] [email protected]
    102 [email protected] [email protected]
    table1 columns 
    EmpID (int)(primary key) Mail(varchar) Mail2(varchar)
    If I insert [email protected] into table1 column Mail, I would like it to get the value for the EmpID from table2 before actually inserting the record into table1, by matching the Mail from table1 = Mail from table2.
    I am using ASP.Net to insert the records into Mail and Mail2.
    How can I achieve that?
    I appreciate any help.

    There should be two SQL statements in the stored procedure in order to accomplish the task?
    Ideally you need to include logic as a part of your insert procedure itself. You should have a standard insert stored procedure which should include this logic and should be used for all inserts.
    Also if EmpID field has to have a non NULL value always you may better off creating a foreign key constraint from Table1 to Table2 on EmpID column to enforce the Referential Integrity.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Need help with create trigger based on more then 1 table and join.

    Hello,
    Here i have 3 tables
    1. Employee
    PERSON_ID
    1
    1
    N
    NUMBER
    None
    ORG_ID
    2
    N
    NUMBER
    Frequency
    LOC_ID
    3
    N
    NUMBER
    Frequency
    JOB_ID
    4
    Y
    NUMBER
    Height Balanced
    FLSA_STATUS_ID
    5
    Y
    NUMBER
    Frequency
    FULL_NAME
    6
    N
    VARCHAR2 (250 Byte)
    Height Balanced
    FIRST_NAME
    7
    N
    VARCHAR2 (20 Byte)
    Height Balanced
    MIDDLE_NAME
    8
    Y
    VARCHAR2 (60 Byte)
    Height Balanced
    LAST_NAME
    9
    N
    VARCHAR2 (40 Byte)
    Height Balanced
    PREFERRED_NAME
    10
    Y
    VARCHAR2 (80 Byte)
    None
    EMAIL
    11
    Y
    VARCHAR2 (250 Byte)
    None
    MAILSTOP
    12
    Y
    VARCHAR2 (100 Byte)
    None
    HIRE_DATE
    13
    N
    DATE
    None
    2. ems_candidate
    EMS_CANDIDATE_ID
    1
    1
    N
    NUMBER
    None
    EMS_JOB_ID
    2
    Y
    NUMBER
    Frequency
    NAME
    3
    N
    VARCHAR2 (255 Byte)
    Frequency
    EMAIL
    4
    Y
    VARCHAR2 (255 Byte)
    None
    TELEPHONE
    5
    Y
    VARCHAR2 (25 Byte)
    None
    EMS_SOURCE_ID
    6
    Y
    NUMBER
    Frequency
    RECEIVED_DATE
    7
    Y
    DATE
    Frequency
    COMMENTS
    8
    Y
    VARCHAR2 (4000 Byte)
    None
    3. employee_resources
    EMP_RES_ID
    1
    1
    N
    NUMBER
    None
    PERSON_ID
    2
    Y
    NUMBER
    Height Balanced
    CANDIDATE_ID
    3
    Y
    NUMBER
    Frequency
    EMP_START_DATE
    4
    Y
    DATE
    None
    CUSTOM_RESOURCE_FLAG
    5
    Y
    NUMBER (1)
    None
    RESOURCE_GROUP_ID
    6
    N
    NUMBER
    Frequency
    RESOURCE_STATUS_ID
    7
    N
    NUMBER
    Frequency
    GROUP_LOC_ID
    8
    N
    NUMBER
    Height Balanced
    ASSIGNED_JIRA
    9
    Y
    VARCHAR2 (250 Byte)
    None
    REVOKED_JIRA
    10
    Y
    VARCHAR2 (250 Byte)
    None
    CREATED_DATE
    11
    Y
    DATE
    SYSDATE
    None
    UPDATED_DATE
    12
    Y
    DATE
    None
    Now i want to create trigger when new record get inserted in employee table wanted to update person_id in employee_resources table.
    So i want to match ems_candidate.name with employee.full_name , ems_candidate.ems_job_id with employee.ems_job_id. And if it matched then update person_id in employee_resources table else through an exception and insert record in temp table.
    If anybody has an idea can u please help me.
    Thanks,
    Gayatri.

    I created below trigger
    CREATE TRIGGER emp_resources_upd_person_id
    AFTER INSERT ON ems.employee
    FOR EACH ROW
    BEGIN
        UPDATE ems.employee_resources
           SET person_id = :new.person_id
         WHERE candidate_id = (SELECT ems_candidate_id  
                                 FROM ems.ems_candidate cand, ems.employee emp
                                WHERE TRIM(UPPER(emp.first_name)) = TRIM(UPPER(SUBSTR (cand.name, 1, INSTR (cand.name, ' ') - 1)))
                                  AND TRIM(UPPER(emp.last_name)) = TRIM(UPPER(SUBSTR (cand.name,INSTR (cand.name, ' ') + 1,DECODE (INSTR (SUBSTR (cand.name, INSTR (cand.name, ' ') + 1), ' '),0,LENGTH (cand.name),(INSTR (SUBSTR (cand.name, INSTR (cand.name, ' ') + 1), ' ') - 1)))))
                                  AND emp.person_id = :new.person_id);
    EXCEPTION
      WHEN OTHERS THEN
        INSERT INTO ems.update_person_id_exception(person_id,first_name,last_name,full_name) VALUES(:new.person_id,:new.first_name,:new.last_name,:new.full_name);
    END;
    Now when i am trying to insert row in ems.employee  table it gives me an error
    ORA-04091
    table string.string is mutating, trigger/function may not see it
    Cause: A trigger (or a user defined plsql function that is referenced in this statement) attempted to look at (or modify) a table that was in the middle of being modified by the statement which fired it.
    Action: Rewrite the trigger (or function) so it does not read that table.
    Can anybody please help me to come out from these error.
    Thanks,
    Gayatri.

  • Need help writing a TRIGGER !!!

    The trigger below:
    create or replace
    TRIGGER dtworepair_after_update_status
    AFTER UPDATE OF worepair_status
    ON dtworepair
    FOR EACH ROW
    WHEN (NEW.worepair_status = 'CLOSED')
    DECLARE
    --workorder_nbr_var   dtworepair.worepair_wonbr%TYPE;*
    id_count_var        NUMBER;
    status_count_var    NUMBER;
    BEGIN
    SELECT COUNT(worepair_wonbr) INTO id_count_var
    FROM dtworepair
    WHERE worepair_wonbr = :OLD.worepair_wonbr;
    SELECT COUNT(worepair_status) INTO status_count_var
    FROM dtworepair
    WHERE worepair_status = 'CLOSED' AND worepair_wonbr = :OLD.worepair_wonbr;
    IF UPDATING THEN
    IF id_count_var != status_count_var THEN
    update_wo_status_proc(:OLD.worepair_wonbr,'OPEN');
    ELSIF id_count_var = status_count_var THEN
    update_wo_status_proc(:OLD.worepair_wonbr,'CLOSED');
    END IF;
    END IF;
    END dtworepair_after_update_status;
    is suppose to fire when the DTWORepair table worepair_status column is updated to 'CLOSED'. And if all the records with the same worepair_wonbr now have a 'CLOSED' worepair_status then this trigger is suppose to call the procedure:
    create or replace
    PROCEDURE update_wo_status_proc
    repair_wonbr_param  IN dtworkorder.wo_nbr%TYPE,
    status_param        IN VARCHAR2
    AS
    BEGIN
    IF status_param = 'CLOSED' OR status_param = 'OPEN' THEN
    UPDATE dtworkorder
    SET wo_status = status_param, wo_enddate = SYSDATE
    WHERE wo_nbr = repair_wonbr_param;
    END IF;
    END update_wo_status_proc;
    But I keep getting the error below when I try:
    UPDATE dtworepair
    SET worepair_status = 'CLOSED'
    WHERE worepair_wonbr = 2 AND worepair_tasknbr = 4;
    Error starting at line 1 in command:
    UPDATE dtworepair
    SET worepair_status = 'CLOSED'
    WHERE worepair_wonbr = 2 AND worepair_tasknbr = 4
    Error report:
    SQL Error: ORA-04091: table DISTRAN.DTWOREPAIR is mutating, trigger/function may not see it
    ORA-06512: at "DISTRAN.DTWOREPAIR_AFTER_UPDATE_STATUS", line 6
    ORA-04088: error during execution of trigger 'DISTRAN.DTWOREPAIR_AFTER_UPDATE_STATUS'
    04091. 00000 - "table %s.%s is mutating, trigger/function may not see it"
    *Cause:    A trigger (or a user defined plsql function that is referenced in
    this statement) attempted to look at (or modify) a table that was
    in the middle of being modified by the statement which fired it.
    *Action:   Rewrite the trigger (or function) so it does not read that table.
    worepair_wonbr worepair_tasknbr worepair_id worepair_status worepair_labor
    1     1     15     CLOSED     0.5
    2     1     3     CLOSED     0.75
    2     2     4     CLOSED     2
    2     3     5     CLOSED     0.25
    2     4     6     OPEN     0.5
    For example, worepair_wonbr 2 in the above table has 1 record in the DTWorkorder table and 4 worepair_tasknbr in the above table. So long as 1 of the task,worepair_status, in the above table is OPEN, then the trigger will not fire. The Trigger should only fire when all 4 worepair_status in the above table for worepair_wonbr 2 are 'CLOSED'. This should in-turn run the procedure that will change the wo_status in DTWorkorder table to 'CLOSED' for wo_nbr 2.
    This is in a nutshell what I am trying to accomplish.
    Any ideas?

    Hi,
    'mutating trigger' error means that you are trying to use a trigger on a table to modify the contents of the same table -- Oracle doesn't allow that.
    The standard workaround for this problem is to use row-level triggers to fill an array with data of rows that need to be modified, and do the modification in the statement-level trigger.
    From 11g on, you can use compound triggers to do all in one trigger, see example in:
    http://www.oracle-base.com/articles/11g/TriggerEnhancements_11gR1.php
    Best regards,
    Nikolay

  • Trigger to blob column in Oracle - Need Help

    Hi,
    I need any help on Oracle Trigger
    I have two table
    - BIODATA_TABLE
    - ADM_GALERY_PICTURE
    All two table contain column SPIC_PICTURE2 that is blob column.
    If the picture column update in table BIODATA_TABLE, i want it to update also in ADM_GALERY_PICTURE,
    I have created the trigger to BIODATA_TABLE.
    When i try to update the picture, the picture on the ADM_GALERY_PICTURE does not updated.
    Below is my trigger, Please help me to correct it
    CREATE OR REPLACE TRIGGER TRANSFER_PICTURE_TRIGGER
    AFTER INSERT OR UPDATE
    ON BIODATA_TABLE
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE
    tmpVar NUMBER;
    BEGIN
    tmpVar := 0;
    IF UPDATING
    THEN
    UPDATE ADM_GALERY_PICTURE
    SET SPIC_PICTURE2 = :NEW.SPIC_PICTURE2
    WHERE ADM_GALERY_PICTURE.SPIC_BIODATA_ID = :NEW.SPIC_BIODATA_ID;
    END IF;
    EXCEPTION
    WHEN OTHERS
    THEN
    -- Consider logging the error and then re-raise
    RAISE;
    END TRANSFER_PICTURE_TRIGGER;
    thanks

    user450549 wrote:
    Hi,
    I need any help on Oracle Trigger
    I have two table
    - BIODATA_TABLE
    - ADM_GALERY_PICTURE
    All two table contain column SPIC_PICTURE2 that is blob column.
    If the picture column update in table BIODATA_TABLE, i want it to update also in ADM_GALERY_PICTURE,
    I have created the trigger to BIODATA_TABLE.
    When i try to update the picture, the picture on the ADM_GALERY_PICTURE does not updated.
    Below is my trigger, Please help me to correct it
    CREATE OR REPLACE TRIGGER TRANSFER_PICTURE_TRIGGER
    AFTER INSERT OR UPDATE
    ON BIODATA_TABLE
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE
    tmpVar NUMBER;
    BEGIN
    tmpVar := 0;
    IF UPDATING
    THEN
    UPDATE ADM_GALERY_PICTURE
    SET SPIC_PICTURE2 = :NEW.SPIC_PICTURE2
    WHERE ADM_GALERY_PICTURE.SPIC_BIODATA_ID = :NEW.SPIC_BIODATA_ID;
    END IF;
    EXCEPTION
    WHEN OTHERS
    THEN
    -- Consider logging the error and then re-raise
    RAISE;
    END TRANSFER_PICTURE_TRIGGER;
    thankswithout your tables & without your data we can't run or test your code.
    the picture on the ADM_GALERY_PICTURE does not updated.OK, I believe you, but what EXACTLY does occur?

  • Need help on trigger...

    i'm the beginner in Oracle, need help on below.
    can i use statement like "Select count..." in the before and after update trigger?
    i have the "mutating" error when i create the trigger...
    pls help

    correction - there is no error generated when compile the trigger but errors when the trigger is fired:
    /* perform updating on table student*/
    update student set company_id = 60 where student_id = 9998;
    /* error return by oracle sql plus*/
    at line 1:
    4091: table SCOTT.STUDENT is mutating, trigger/function may not see it
    6512: at "SCOTT.UST_UPDPASSPORTPROGRAM", line 7
    6512: at "SCOTT.UST_UPDPASSPORTPROGRAM", line 9
    4088: error during execution of trigger 'SCOTT.UST_UPDPASSPORTPROGRAM'
    /* trigger script*/
    create or replace trigger ust_updPassportProgram
    before update
    on student
    for each row
    declare
    v_total_Student number;
    Dummy number;
    /*CURSOR Dummy_cursor (CNo NUMBER) IS*/
    /*SELECT company_id FROM company WHERE company_id = CNo;*/
    CURSOR Dummy_cursor (CNo NUMBER) IS
    SELECT student_id FROM student WHERE student_id = 9998 and company_id = CNo;
    begin
    OPEN Dummy_cursor (:new.company_id);
    FETCH Dummy_cursor INTO Dummy;
    IF Dummy_cursor%FOUND THEN
    dbms_output.put_line('Dummy found');
    end if;
    if :new.passport_program = 'Y' then
    dbms_output.put_line('The current company_id: ' ||
    to_char(:new.company_id) || :new.passport_program);
    end if;
    end;
    /

  • Need help on which router to buy for my BB 8320

    Now i know 8320 is dated but at this point i am not planning to change anytime soon .
    So I have a router which is kinda old, it didnt really occur to me since it worked. When i got my bb 8320 i was in a hotel and i could connect through their wireless without any hassle. I could surf, use youtube, name it.
    When i got home i couldnt do anything, i spent countless nights trying to figure out waht was wrong then i realized its my router. If only BB said somethign it wont support old routers then i wouldve saved myself hours of self-loathing.
    Anyways I also have gone to my friends house, and i could connect to her linksys router without any hassle. i was the one who set her router up and we bought it this year. i didnt do anything special, configuration-wise or w/e.
    So NOW i am just going to buy a new router. I really need help!!!!
    I was wondering if this one is good:
    W311R Wireless-N Broadband Router
    W311R integrates the wireless AP, router, four-port switch and firewall in one, and increases over 4 times transmission range of ordinary 802.11g products. Compatible with IEEE802.11n (Draft 2.0) and IEEE802.11g/b standards, it can provide up to 150Mbps stable transmission rate. It is dedicated to SOHOs and students’ dormitory. In addition, URL and MAC address filtering can take it easy for parents and network administrator to manage network life, and QoS bandwidth control over specific computer’s downloading speed is supported as well. Moreover, UPnP and WMM support can smooth your MSN voice better, and the included Setup Wizard on CD-ROM will be easy and fast for non-savvy users to install the device and access to the Internet.
    Overview:
    * Includes router, wireless access point, four-port switch and firewall in one
    * Provides up to 150Mbps uploading and downloading speed
    * Supports two WPS (Wi-Fi Protected Setup) encryption methods: PBC and PIN
    * Compliant to IEEE802.11n, IEEE802.11g, IEEE802.11b, IEEE802.3 and IEEE802.3u standards
    * Supports far-distance transmission, 100 meters indoor, 400 meters outdoor (depends on the environments around)
    * Supports 64/128-bit WEP encryption, WPA and the latest WPA2 encryption security authentication
    * Supports RTS/CTS protocol and data partitioning function
    * Provides one 10/100Mbps Auto-Negotiation Ethernet WAN ports for WAN connection
    * Provides four 10/100Mbps Auto-Negotiation Ethernet LAN ports for LAN connections
    * Supports xDSL/Cable MODEM, static and dynamic IP in community networking
    * Supports remote/local Web management
    * Supports WMM to better smooth your voice and video
    * Supports SSID stealth mode and access control based over MAC address (up to 30 entries)
    * Supports Auto MDI/MDIX
    * Supports wireless Roaming technology and ensures high-efficient wireless connections
    * Supports auto negotiation/manual mode for 802.11b/802.11g/802.11n
    * Supports UPnP and DDNS
    * Supports Firefox 1.0, IE5.5 or above
    * Supports SNTP
    * Supports virtual server, DMZ host
    * Built-in firewall for hacker’s attack prevention
    * Supports DHCP server/client
    * Supports auto wireless channel selection
    * Supports the control over LAN access to Internet
    * Provides syslog to record the status of the router
    * Supports WDS wireless network extension
    * Supports QoS function
    Input Voltage Range
    AC 110~240V
    Output Voltage Range
    9V~1000mA
    Consumption
    20dbm
    Operating Temperature
    0? ~ 40?
    Storage Temperature
    -40? ~ 70?
    Operating Humidity
    10% ~ 90% RH non-condensing
    Storage Humidity
    5% ~ 90% RH non-condensing
    Antenna
    One Non-detachable external antenna (5dBi)
    Frequency Range
    2.4GHz-2.5GHz
    EVM
    -30dB
    Sensitivity
    54M:-74dBm@10% PER; 11M:-85dBm@8% PER; 6M:-88dBm@10% PER; 1M:-90dBm@8% PER
    Outdoor
    400m
    Indoor
    100m
    WLAN?LAN
    93Mbps
    WLAN?WLAN
    93Mbps
    Frequency Range
    2.4GHz
    Gain
    5dBi
    Nominal Impedance
    50
    Polarization
    Linear; Vertical
    Maximum Power
    1W
    * Vertical Beamwidth 360º

    Flip UltraHD.
    Shoots mp4 H264 format files. Fits in a shirt pocket and records 2 hrs worth of material to an internal card. Charges from your USB port as you download. If you are just trimming clips, you can use QT Pro without conversion. If you need to edit, convert to ProRes 720p30. Works like a dream.
    Just make sure you have it solidly placed when you pull the trigger as there is no image stabilization.
    Oh, and it is only $199 US.
    x

  • Need help to redesign legacy SQL Script

    Hello Experts,
    I have the below code which produces a CREATE TRIGGER statement. as of now this does for updating. I need to re-design this code to add for inserting and deleting as well. I just need help in the structuring wise. I can build the logic for inserting and updating inside. I want to know how i can continue to get for "inserting" and "deleting" as well.
    you will understand my question better if you go through main code, present output and required output format below.
    I know this is a bad design first of all. but the below code is a legacy one. so i cant change the entire structure of the code :-( all i can do is to continue designing it to add new changes. Hence sought help from you all.
    please help
    SQL CODE:
    WITH audit_tables
    AS
       (SELECT object_name,
               MIN (column_id) min_col,
               MAX (column_id) max_col
        FROM   user_objects o,
               user_tab_columns c
        WHERE  o.object_name = 'CHR_VAL_DESC_A_T'
        AND    o.object_name = c.table_name
        GROUP BY object_name
    SELECT txt
    FROM (
    SELECT ' CREATE OR REPLACE TRIGGER ' || REPLACE(object_name,'_A_T') || '_ADT_TRG' || CHR(13) ||
           '   AFTER INSERT ' || CHR(13) ||
           '   OR    UPDATE ' || CHR(13) ||
           '   OR    DELETE ' || CHR(13) ||
           '   ON ' || REPLACE(object_name,'_A_T','_T') || CHR(13) ||
           '   FOR EACH ROW ' || CHR(13) ||
           ' DECLARE ' || CHR(13) ||
           ' BEGIN ' || CHR(13) ||
           ' IF updating THEN ' || CHR(13) ||
           '   INSERT INTO ' || object_name || CHR(13) ||
           '   (' txt, object_name, 1 disp_order, 0 column_id
    FROM audit_tables
    UNION ALL
    SELECT txt, object_name, disp_order, column_id
    FROM (SELECT 
            CASE
              WHEN max_col = column_id THEN
                '    '||column_name
              ELSE
                '    '||column_name || ','
              END AS txt, object_name, 2 disp_order, column_id
          FROM  audit_tables t,
                user_tab_columns C
          WHERE c.table_name = t.object_name
          ORDER BY c.column_id ASC)
    UNION ALL
    SELECT '   )' || CHR(13) ||
           '   VALUES ' || CHR(13) ||
           '   (', object_name, 3 disp_order, 0
    FROM audit_tables t
    UNION ALL
    SELECT txt, object_name, disp_order, column_id
    FROM (SELECT
            CASE
              WHEN max_col = column_id THEN
                CASE
                  WHEN SUBSTR(column_name,1,2) = 'N_' THEN
                    '    :NEW.'||decode(substr(column_name,1,2),'N_',substr(column_name,3))||');'
                  WHEN SUBSTR(column_name,1,2) = 'O_' THEN
                    '    :OLD.'||decode(substr(column_name,1,2),'O_',substr(column_name,3))||');'
                  WHEN min_col = column_id THEN
                    '    1'
                  WHEN column_id = 2 THEN
                    '     ''I'''
                  WHEN column_id = 3 THEN
                    '    SYSDATE'
                  ELSE
                  '    :NEW.'||column_name||');'
                END
              ELSE
                CASE
                  WHEN SUBSTR(column_name,1,2) = 'N_' THEN
                    '    :NEW.'||decode(substr(column_name,1,2),'N_',substr(column_name,3))||','
                  WHEN SUBSTR(column_name,1,2) = 'O_' THEN
                    '    :OLD.'||decode(substr(column_name,1,2),'O_',substr(column_name,3))||','
                  WHEN min_col = column_id THEN
                    '    1'||','
                  WHEN column_id = 2 THEN
                    '    ''I'''||','
                  WHEN column_id = 3 THEN
                    '    SYSDATE' ||','
                  ELSE
                    '    :NEW.'||column_name||','
                   END
              END AS txt,object_name, 4 disp_order, column_id
          FROM audit_tables t,
               user_tab_columns c
          WHERE c.table_name = t.object_name
          ORDER BY c.column_id ASC)
    UNION ALL
    SELECT 'END '||REPLACE(object_name,'_A_T') || '_ADT_TRG;' || CHR(13),
           object_name, 5 disp_order, 0
    FROM    audit_tables)
    ORDER BY object_name, disp_order, column_id
    PRESENT OUTPUT:
    CREATE OR REPLACE TRIGGER CHR_VAL_DESC_ADT_TRG
       AFTER INSERT
       OR    UPDATE
       OR    DELETE
       ON CHR_VAL_DESC_T
       FOR EACH ROW
    DECLARE
    BEGIN
    IF updating THEN
       INSERT INTO CHR_VAL_DESC_A_T
        TXN_ID,                                  
        TXN_TYP,                                 
        ADT_DTTM,                                
        CHR_VAL_DESC_ID,                         
        CHR_VAL_ID,                              
        LANG_ID,                                 
        DESC_ID,                                 
        O_CHR_VAL_DESC,                          
        N_CHR_VAL_DESC,                          
        O_TRANS_STATE,                           
        N_TRANS_STATE,                           
        CRTD_BY,                                 
        CRTD_DTTM,                               
        O_UPD_BY,                                
        N_UPD_BY,                                
        O_UPD_DTTM,                              
        N_UPD_DTTM,                              
        O_LOCK_NUM,                              
        N_LOCK_NUM                               
       VALUES
        1,                                       
        'I',                                     
        SYSDATE,                                 
        :NEW.CHR_VAL_DESC_ID,                    
        :NEW.CHR_VAL_ID,                         
        :NEW.LANG_ID,                            
        :NEW.DESC_ID,                            
        :OLD.CHR_VAL_DESC,                       
        :NEW.CHR_VAL_DESC,                       
        :OLD.TRANS_STATE,                        
        :NEW.TRANS_STATE,                        
        :NEW.CRTD_BY,                            
        :NEW.CRTD_DTTM,                          
        :OLD.UPD_BY,                             
        :NEW.UPD_BY,                             
        :OLD.UPD_DTTM,                           
        :NEW.UPD_DTTM,                           
        :OLD.LOCK_NUM,                           
        :NEW.LOCK_NUM);                          
    END CHR_VAL_DESC_ADT_TRG;
    REQUIRED OUTPUT FORMAT:
    CREATE OR REPLACE TRIGGER TRIGGER_NAME
       AFTER INSERT
       OR    UPDATE
       OR    DELETE
       ON TABLE_NAME
       FOR EACH ROW
    DECLARE
    BEGIN
    IF updating THEN
       INSERT TABLE_NAME
        list of column names                               
       VALUES
    IF inserting THEN
       INSERT TABLE_NAME
        list of column names                               
       VALUES
    IF deleting THEN
       INSERT TABLE_NAME
        list of column names                               
       VALUES
    END TRIGGER_NAME;

    can anyone please help?
    i tried adding with inserting and updating also..but when i tried to add deleting part the final output not comes in proper structure.
    WITH audit_tables
    AS
       (SELECT object_name,
               MIN (column_id) min_col,
               MAX (column_id) max_col
        FROM   user_objects o,
               user_tab_columns c
        WHERE  o.object_name IN ('CHR_VAL_DESC_A_T', 'CHR_VAL_A_T')
        AND    o.object_name = c.table_name
        GROUP BY object_name
    SELECT txt
    FROM (
    SELECT ' CREATE OR REPLACE TRIGGER ' || REPLACE(object_name,'_A_T') || '_ADT_TRG' || CHR(13) ||
           '   AFTER INSERT ' || CHR(13) ||
           '   OR    UPDATE ' || CHR(13) ||
           '   OR    DELETE ' || CHR(13) ||
           '   ON ' || REPLACE(object_name,'_A_T','_T') || CHR(13) ||
           '   FOR EACH ROW ' || CHR(13) ||
           ' DECLARE ' || CHR(13) ||
           ' BEGIN ' || CHR(13) ||
           *' IF inserting THEN '* || CHR(13) ||
           '   INSERT INTO ' || object_name || CHR(13) ||
           '   (' txt, object_name, 1 disp_order, 0 column_id
    FROM audit_tables
    UNION ALL
    SELECT txt, object_name, disp_order, column_id
    FROM (SELECT 
            CASE
              WHEN max_col = column_id THEN
                '    '||column_name
              ELSE
                '    '||column_name || ','
              END AS txt, object_name, 2 disp_order, column_id
          FROM  audit_tables t,
                user_tab_columns C
          WHERE c.table_name = t.object_name
          ORDER BY c.column_id ASC)
    UNION ALL
    SELECT '   )' || CHR(13) ||
           '   VALUES ' || CHR(13) ||
           '   (', object_name, 3 disp_order, 0
    FROM audit_tables t
    UNION ALL
    SELECT txt, object_name, disp_order, column_id
    FROM (SELECT
            CASE
              WHEN max_col = column_id THEN
                CASE
                  WHEN SUBSTR(column_name,1,2) = 'N_' THEN
                    '    :NEW.'||decode(substr(column_name,1,2),'N_',substr(column_name,3))||');'
                  WHEN SUBSTR(column_name,1,2) = 'O_' THEN
                    '    NULL'||');'
                  WHEN min_col = column_id THEN
                    '    1'
                  WHEN column_id = 2 THEN
                    '     ''I'''
                  WHEN column_id = 3 THEN
                    '    SYSDATE'
                  ELSE
                  '    :NEW.'||column_name||');'
                END
              ELSE
                CASE
                  WHEN SUBSTR(column_name,1,2) = 'N_' THEN
                    '    :NEW.'||decode(substr(column_name,1,2),'N_',substr(column_name,3))||','
                  WHEN SUBSTR(column_name,1,2) = 'O_' THEN
                    '    NULL'||','
                  WHEN min_col = column_id THEN
                    '    1'||','
                  WHEN column_id = 2 THEN
                    '    ''I'''||','
                  WHEN column_id = 3 THEN
                    '    SYSDATE' ||','
                  ELSE
                    '    :NEW.'||column_name||','
                   END
              END AS txt,object_name, 4 disp_order, column_id
          FROM audit_tables t,
               user_tab_columns c
          WHERE c.table_name = t.object_name
          ORDER BY c.column_id ASC)
    UNION ALL
    SELECT txt, object_name, disp_order, column_id
    FROM(SELECT *' ELSIF updating THEN '* || CHR(13) ||
           '   INSERT INTO ' || object_name || CHR(13) ||
           '   (' txt, object_name, 5 disp_order, 0 column_id
    FROM audit_tables
    UNION ALL
    SELECT txt, object_name, disp_order, column_id
    FROM (SELECT 
            CASE
              WHEN max_col = column_id THEN
                '    '||column_name
              ELSE
                '    '||column_name || ','
              END AS txt, object_name, 6 disp_order, column_id
          FROM  audit_tables t,
                user_tab_columns C
          WHERE c.table_name = t.object_name
          ORDER BY c.column_id ASC)
    UNION ALL
    SELECT '   )' || CHR(13) ||
           '   VALUES ' || CHR(13) ||
           '   (', object_name, 7 disp_order, 0
    FROM audit_tables t
    UNION ALL
    SELECT txt, object_name, disp_order, column_id
    FROM (SELECT
            CASE
             WHEN max_col = column_id THEN
                CASE
                  WHEN SUBSTR(column_name,1,2) = 'N_' THEN
                    '    :NEW.'||decode(substr(column_name,1,2),'N_',substr(column_name,3))||');'
                  WHEN SUBSTR(column_name,1,2) = 'O_' THEN
                    '    :OLD.'||decode(substr(column_name,1,2),'O_',substr(column_name,3))||');'
                  WHEN min_col = column_id THEN
                    '    1'
                  WHEN column_id = 2 THEN
                    '     ''U'''
                  WHEN column_id = 3 THEN
                    '    SYSDATE'
                  ELSE
                  '    :NEW.'||column_name||');'
                END
              ELSE
                CASE
                  WHEN SUBSTR(column_name,1,2) = 'N_' THEN
                    '    :NEW.'||decode(substr(column_name,1,2),'N_',substr(column_name,3))||','
                  WHEN SUBSTR(column_name,1,2) = 'O_' THEN
                    '    :OLD.'||decode(substr(column_name,1,2),'O_',substr(column_name,3))||','
                  WHEN min_col = column_id THEN
                    '    1'||','
                  WHEN column_id = 2 THEN
                    '    ''U'''||','
                  WHEN column_id = 3 THEN
                    '    SYSDATE' ||','
                  ELSE
                    '    :NEW.'||column_name||','
                END
              END AS txt,object_name, 8 disp_order, column_id
          FROM audit_tables t,
               user_tab_columns c
          WHERE c.table_name = t.object_name
          ORDER BY c.column_id ASC)
    UNION ALL
    SELECT 'END IF;' || CHR(13) ||
           'END '||REPLACE(object_name,'_A_T') || '_ADT_TRG;' || CHR(13),
           object_name, 9 disp_order, 0
    FROM    audit_tables)
    ORDER BY object_name, disp_order, column_id)

  • Need Help with my Imessage

    i need help with my imessage i am using a Iphone 4 ios 6.1.3 but when i go to settings>message>send and reecieve. i only get the options Apple ID: and You can be reached by iMessage at: my current email and add another email. my question is how do i get it to where imessage uses my cell phone number instead of my Email i have looked all over the web and no luck......

    The hidden text should be sent for you automatically by the phone. From personal experience, this is automatic, but something has obviously tripped up somewhere on your phone.
    It appears from reading the documentation, I would first try signing out of your Apple ID by going to Settings > Messages > Send and Receive then press your Apple ID, and press Sign Out. Then sign back in. This should hopefully trigger a re-activation of your mobile number. Your mobile number should be assigned to your Apple ID on first sign-in so hopefully this signing in and out should trigger an automatic re-activation.
    Failing that, others have posted a reset of the phone, as does the support page I quoted. It appears this could be a last resort as a reset can be a bit of a pain (although if you Back your phone up via iTunes, you should be able to restore it to how it is currently). I would try the signing in and out method. Hopefully, fingers crossed, it should kick your phone back into action.

  • Need help on classical report

    hi friends i need help on classical reports,
    sold-party,
    material
    sales and distrubitutation channel ,division,
    incoming orders,order number,invoice ,credit,
    i need sub totals and final total of invoice and each customer should display in new page .

    Hi
    Use the Tables KNA1,VBAk,VBAP,VBRK and VBRP and design the report
    see the sample report using KNA1,VBAK and VBAP.
    REPORT ZTEJ_INTAB1 LINE-SIZE 103 LINE-COUNT 35(5) NO STANDARD PAGE
    HEADING.
    *TABLES DECLARATION
    TABLES : KNA1, VBAK, VBAP.
    *SELECT OPTIONS
    SELECT-OPTIONS: CUST_NO FOR KNA1-KUNNR.
    *INITIALIZATION
    INITIALIZATION.
    CUST_NO-LOW = '01'.
    CUST_NO-HIGH = '5000'.
    CUST_NO-SIGN = 'I'.
    CUST_NO-OPTION = 'BT'.
    APPEND CUST_NO.
    *SELECTION SCREEN VALIDATION
    AT SELECTION-SCREEN ON CUST_NO.
    LOOP AT SCREEN.
    IF CUST_NO-LOW < 1 OR CUST_NO-HIGH > 5000.
    MESSAGE E001(ZTJ1).
    ENDIF.
    ENDLOOP.
    *BASIC LIST SELECTION
    START-OF-SELECTION.
    SELECT KUNNR NAME1 ORT01 LAND1 INTO
    (KNA1-KUNNR, KNA1-NAME1,KNA1-ORT01,KNA1-LAND1)
    FROM KNA1
    WHERE KUNNR IN CUST_NO.
    WRITE:/1 SY-VLINE,
    KNA1-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
    16 SY-VLINE,
    KNA1-NAME1 UNDER 'NAME',
    61 SY-VLINE,
    KNA1-ORT01 UNDER 'CITY',
    86 SY-VLINE,
    KNA1-LAND1 UNDER 'COUNTRY',
    103 SY-VLINE.
    HIDE: KNA1-KUNNR.
    ENDSELECT.
    ULINE.
    *SECONDARY LIST ACCESS
    AT user-command.
    IF SY-UCOMM = 'IONE'.
    PERFORM SALES_ORD.
    ENDIF.
    IF SY-UCOMM = 'ITWO'.
    PERFORM ITEM_DET.
    ENDIF.
    *TOP OF PAGE
    TOP-OF-PAGE.
    FORMAT COLOR 1.
    WRITE : 'CUSTOMER DETAILS'.
    FORMAT COLOR 1 OFF.
    ULINE.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'CUSTOMER NO.',
    16 SY-VLINE,
    18 'NAME',
    61 SY-VLINE,
    63 'CITY',
    86 SY-VLINE,
    88 'COUNTRY',
    103 SY-VLINE.
    ULINE.
    FORMAT COLOR 3 OFF.
    *TOP OF PAGE FOR SECONDARY LISTS
    TOP-OF-PAGE DURING LINE-SELECTION.
    *TOP OF PAGE FOR 1ST SECONDARY LIST
    IF SY-UCOMM = 'IONE'.
    ULINE.
    FORMAT COLOR 1.
    WRITE : 'SALES ORDER DETAILS'.
    ULINE.
    FORMAT COLOR 1 OFF.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'CUSTOMER NO.',
    16 SY-VLINE,
    18 'SALES ORDER NO.',
    40 SY-VLINE,
    42 'DATE',
    60 SY-VLINE,
    62 'CREATOR',
    85 SY-VLINE,
    87 'DOC DATE',
    103 SY-VLINE.
    ULINE.
    ENDIF.
    FORMAT COLOR 3 OFF.
    *TOP OF PAGE FOR 2ND SECONDARY LIST
    IF SY-UCOMM = 'ITWO'.
    ULINE.
    FORMAT COLOR 1.
    WRITE : 'ITEM DETAILS'.
    ULINE.
    FORMAT COLOR 1 OFF.
    FORMAT COLOR 3.
    WRITE : 1 SY-VLINE,
    3 'SALES ORDER NO.',
    40 SY-VLINE,
    42 'SALES ITEM NO.',
    60 SY-VLINE,
    62 'ORDER QUANTITY',
    103 SY-VLINE.
    ULINE.
    ENDIF.
    FORMAT COLOR 3 OFF.
    *END OF PAGE
    END-OF-PAGE.
    ULINE.
    WRITE :'USER :',SY-UNAME,/,'DATE :', SY-DATUM, 85 'END OF PAGE:',
    SY-PAGNO.
    SKIP.
    *& Form SALES_ORD
    *& FIRST SECONDARY LIST FORM
    FORM SALES_ORD .
    SELECT KUNNR VBELN ERDAT ERNAM AUDAT INTO
    (VBAK-KUNNR, VBAK-VBELN, VBAK-ERDAT, VBAK-ERNAM, VBAK-AUDAT)
    FROM VBAK
    WHERE KUNNR = KNA1-KUNNR.
    WRITE:/1 SY-VLINE,
    VBAK-KUNNR UNDER 'CUSTOMER NO.' HOTSPOT ON,
    16 SY-VLINE,
    VBAK-VBELN UNDER 'SALES ORDER NO.' HOTSPOT ON,
    40 SY-VLINE,
    VBAK-ERDAT UNDER 'DATE',
    60 SY-VLINE,
    VBAK-ERNAM UNDER 'CREATOR',
    85 SY-VLINE,
    VBAK-AUDAT UNDER 'DOC DATE',
    103 SY-VLINE.
    HIDE : VBAK-VBELN.
    ENDSELECT.
    ULINE.
    ENDFORM. " SALES_ORD
    *& Form ITEM_DET
    *& SECOND SECONDARY LIST FORM
    FORM ITEM_DET .
    SELECT VBELN POSNR KWMENG INTO
    (VBAP-VBELN, VBAP-POSNR, VBAP-KWMENG)
    FROM VBAP
    WHERE VBELN = VBAK-VBELN.
    WRITE : /1 SY-VLINE,
    VBAP-VBELN UNDER 'SALES ORDER NO.',
    40 SY-VLINE,
    VBAP-POSNR UNDER 'SALES ITEM NO.',
    60 SY-VLINE,
    VBAP-KWMENG UNDER 'ORDER QUANTITY',
    103 SY-VLINE.
    ENDSELECT.
    ULINE.
    ENDFORM. " ITEM_DET
    REPORT demo_list_at_pf.
    START-OF-SELECTION.
    WRITE 'Basic List, Press PF5, PF6, PF7, or PF8'.
    AT pf5.
    PERFORM out.
    AT pf6.
    PERFORM out.
    AT pf7.
    PERFORM out.
    AT pf8.
    PERFORM out.
    FORM out.
    WRITE: 'Secondary List by PF-Key Selection',
    / 'SY-LSIND =', sy-lsind,
    / 'SY-UCOMM =', sy-ucomm.
    ENDFORM.
    After executing the program, the system displays the basic list. The user can press the function keys F5 , F6 , F7 , and F8 to create secondary lists. If, for example, the 14th key the user presses is F6 , the output on the displayed secondary list looks as follows:
    Secondary List by PF-Key Selection
    SY-LSIND = 14
    SY-UCOMM = PF06
    Example for AT USER-COMMAND.
    REPORT demo_list_at_user_command NO STANDARD PAGE HEADING.
    START-OF-SELECTION.
    WRITE: 'Basic List',
    / 'SY-LSIND:', sy-lsind.
    TOP-OF-PAGE.
    WRITE 'Top-of-Page'.
    ULINE.
    TOP-OF-PAGE DURING LINE-SELECTION.
    CASE sy-pfkey.
    WHEN 'TEST'.
    WRITE 'Self-defined GUI for Function Codes'.
    ULINE.
    ENDCASE.
    AT LINE-SELECTION.
    SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
    PERFORM out.
    sy-lsind = sy-lsind - 1.
    AT USER-COMMAND.
    CASE sy-ucomm.
    WHEN 'FC1'.
    PERFORM out.
    WRITE / 'Button FUN 1 was pressed'.
    WHEN 'FC2'.
    PERFORM out.
    WRITE / 'Button FUN 2 was pressed'.
    WHEN 'FC3'.
    PERFORM out.
    WRITE / 'Button FUN 3 was pressed'.
    WHEN 'FC4'.
    PERFORM out.
    WRITE / 'Button FUN 4 was pressed'.
    WHEN 'FC5'.
    PERFORM out.
    WRITE / 'Button FUN 5 was pressed'.
    ENDCASE.
    sy-lsind = sy-lsind - 1.
    FORM out.
    WRITE: 'Secondary List',
    / 'SY-LSIND:', sy-lsind,
    / 'SY-PFKEY:', sy-pfkey.
    ENDFORM.
    When you run the program, the system displays the following basic list with a the page header defined in the program:
    You can trigger the AT LINE-SELECTION event by double-clicking a line. The system sets the status TEST and deactivates the function code PICK. The status TEST contains function codes FC1 to FC5. These are assigned to pushbuttons in the application toolbar. The page header of the detail list depends on the status.
    Here, double-clicking a line no longer triggers an event. However, there is now an application toolbar containing five user-defined pushbuttons. You can use these to trigger the AT USER-COMMAND event. The CASE statement contains a different reaction for each pushbutton.
    For each interactive event, the system decreases the SY-LSIND system field by one, thus canceling out the automatic increase. All detail lists now have the same level as the basic list and thus overwrite it. While the detail list is being created, SY-LSIND still has the value 1.
    Reward points for useful Answers
    Regards
    Anji

  • Need Help in SQL script

    hi guys ,
    Got a small question ,  Table(test) has 4 columns ID, NAME, Definition, Notes with some data in it.And ID is identity column. Now I have to add a new column called UID.
    ID     NAME       Definition   Notes       
    1                      xxx
              xxxxx        xxxx
    2                      xxx
              xxxxx    xxxx
    3                      xxx
              xxxxx    xxxx
    4                      xxx            xxxxx    
       xxxx 
    5                      xxx            xxxxx    
        xxxx 
    6                      xxx            xxxxx  
        xxxx 
    7                      xxx
               xxxxx    xxxx
    8                      xxx
               xxxxx    xxxx
     need to add a new column in table (test) called UID. Note that this is NOT an identity column like ID. Need to Create  a TRIGGER that will copy value of ID to UID ONLY upon creation of new name. If the test table is copied/migrated to different
    DB or server, the UID should not be overridden with the new value of ID.
    AcronyM_ID     NAME       Definition   Notes       acronym_uid
    1                       xxx
                 xxxxx
       xxxx          NULL
    2                       xxx
                 xxxxx
       xxxx          NULL
    3                       xxx
                 xxxxx
       xxxx          NULL
    4                       xxx              xxxxx    xxxx          NULL
    5                       xxx               xxxxx   xxxx        
     NULL
    6                       xxx               xxxxx   xxxx      
       NULL
    7                       xxx
                  xxxxx
       xxxx         NULL
    8                       xxx
                  xxxxx
       xxxx        NULL
    9                       xxx
                  xxxxx
       xxxx         9
    10                      xxx           xxxxx         xxxxx       10
    thanks
    sidhu

    hello siddu_123,
    per your description, it does not look like you need  either a trigger or another column to store acroymn_ID. since acroymn_id is an identity column, it cannot be updated. 
    if the database was migrated to different server either by backup restore method and data import\export method, you can still preserve the identity property on the column and hence you will have the same values.
    Hope it Helps!!

  • Need help with ext. SWF and XML

    I'm trying to create an External SWF to load into my main
    site (photography).
    Home | Portfolio | Published Work | Bio | Contact
    The SWF I want to load externally is Portfolio because it has
    5 sections
    Those 5 sections are:
    -Editorial
    -Adventure
    -Fly Fishing
    -Multimedia
    -Weddings
    I'm looking to keep this dynamic as possible, but I'm one of
    those guys who doesn't write code from scratch, but knows AS well
    enough to modify a base or a generic template if ever given. It
    would be easier to use one subsection as an example, which could be
    applied to all others.
    e.g. "Fly Fishing" 1-Main container; 5-10 thumbnails (1
    dyanamic thumbnailcontainer)
    - I don't know XML (but can modify it). basically having an
    ID tag for each image, possibly dynamically generate a thumbnail
    too. Also have a spot for dynamic text to load in (captions with
    multiple text lines for images upon onRelease - maybe this could be
    it's own MC that loads on top of the main photo container)
    - on (release) on a thumbnail: there would be a little
    information icon that would appear. If you mouse over, it would
    overlay a layer over that specific ID photo, and the text appear.
    RollOut it would fade out the layer above that specific ID photo.
    - Transition: FadeOut/Blur/Exposure Blur, something
    interesting to that nature.
    - Thumbnails: is it just easier to create thumbnail images
    manually, and just create a separate container?
    - Image folders: I would imagine each section would have
    it's own watch folder. For example "Fly Fishing" would be a folder
    "/swfImg_flyFishing/", but perhaps having one XML file.
    - XML file details
    id
    location
    caption summary
    title
    As you can see, if I had one template to build off of, I
    could repeat it self for the others. I need help and if there is a
    flash component (free or purchase) that does at least 70% of what I
    need, please share information. thank you!Portfolio

    I know doing a pushback to the client requires Flex Data
    Services, but since I don't use FDS I can't tell you exactly how.
    But look in the documentation about "pushing" data to the client.
    Once you've figured out how to do that, you can trigger that push
    once you've finished editing the xml file. You may want to ask over
    in the FDS forum.

  • Need Help with a Flash Web Project

    Hello, everyone. I am trying to use Flash to make a two-step
    system. I want the flash document to, first, allow a person to
    upload multiple image files and then, second, for the flash
    document be able to create a slideshow with the uploaded images and
    fade in and out from each image until the slideshow is over. I want
    it to be where the flash document creates its own slideshow with
    the images that are uploaded in the first step that I mentioned. I
    want it to do it completely on its own so I need to know how to
    give it the proper AI so that it can do this task.
    So, are there any tips that anyone has on how to do this? Can
    anyone tell me exactly how to do this? I really need help with this
    for my new website project. Thanks in advance, everyone!

    The problem with the text not appearing at all has to do with you setting the alpha of the movieclip to 0%.  Not within the movieclip, but the movieclip itself.  The same for the xray graphic, except you have that as a graphic symbol rather than a movieclip.  To have that play while inhabiting one frame you'll need to change it to a movieclip symbol.
    To get the text to play after the blinds (just a minor critique, I'd speed up the blinds), you will want to add some code in the frame where you added the stop in the blinds animation.  You will also need to assign instance names for the text movieclips in the properties panel, as well as place a stop(); in their first frames (inside).
    Let's say you name them upperText and lowerText.  Then the code you'd add at the end of the blinds animation (in the stop frame) would be...
    _parent.upperText.play();
    _parent.lowerText.play();
    The "_parent" portion of that is used to target the timeline that is containing the item making the command, basically meaning it's the guy inside the blinds telling the guy outside the blinds to do something.
    You'll probably want to add stops to the ends of the text animations as well.
    If you want to have the first text trigger the second text, then you'd take that second line above and place it in the last frame of the first text animation instead of the blinds animation.
    Note, on occasion, undeterminably, that code above doesn't work for some odd reason... the animation plays to the next frame and stops... so if you run into that, just put a play(); in the second frame to help push it along.
    PS GotoandPlay would actually be gotoAndPlay, and for the code above you could substitute play(); with gotoAndPlay(2);

  • Need help with the session state value items.

    I need help with the session state value items.
    Trigger is created (on After delete, insert action) on table A.
    When insert in table B at least one row, then trigger update value to 'Y'
    in table A.
    When delete all rows from a table B,, then trigger update value to 'N'
    in table A.
    In detail report changes are visible, but the trigger replacement value is not set in session value.
    How can I implement this?

    You'll have to create a process which runs after your database update process that does a query and loads the result into your page item.
    For example
    SELECT YN_COLUMN
    FROM My_TABLE
    INTO My_Page_Item
    WHERE Key_value = My_Page_Item_Holding_Key_ValueThe DML process will only return key values after updating, such as an ID primary key updated by a sequence in a trigger.
    If the value is showing in a report, make sure the report refreshes on reload of the page.
    Edited by: Bob37 on Dec 6, 2011 10:36 AM

Maybe you are looking for