Trigger for multile fields in same table.

--thanks in advance,
--I need help to write a trigger .
-- this is what i wanted
CREATE OR REPLACE TRIGGER Chk_Uniq_Qtr -- trigger name
Before insert or Update on Pro_well_Calender -- tbl name
for each row
Declare
N_Qtr1 varchar2(2);
N_Qtr2 varchar2(2);
N_Qtr3 varchar2(2);
N_Qtr4 varchar2(2);
Begin
N_Qtr1 := upper(Pro_well_Calender.Quarter1); -- column name
N_Qtr2 := upper(Pro_well_Calender.Quarter2);
N_Qtr3 := upper(Pro_well_Calender.Quarter3);
N_Qtr4 := upper(Pro_well_Calender.Quarter4);
-- But the only valid values for Quarter1 is 'April','May','June');
-- But the only valid values for Quarter2 is 'july','Auguest','September');
-- But the only valid values for Quarter1 is 'October','November','December');
-- But the only valid values for Quarter1 is 'January','February',March');
-- I need to check
IF N_Qtr1 is not in ('April','May','June') then
raise_error('Enter a month for Quarter 1'); end if;
IF N_Qtr2 is not in ('july','Auguest','September') then
raise_error('Enter a month for Quarter 2'); end if;
IF N_Qtr3 is not in ('October','November','December') then
raise_error('Enter a month for Quarter 3'); end if;
IF N_Qtr4 is not in ('January','February',March') then
raise_error('Enter a month for Quarter 4');end if;
end trigger.
--I did what ever i can but none worked.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Hi,
It looks like you're on the right track.
If the local varibales
N_Qtr1 varchar2(2);
N_Qtr2 varchar2(2);
N_Qtr3 varchar2(2);
N_Qtr4 varchar2(2);
Begin
N_Qtr1 := upper(Pro_well_Calender.Quarter1); -- column name
N_Qtr2 := upper(Pro_well_Calender.Quarter2);
N_Qtr3 := upper(Pro_well_Calender.Quarter3);
N_Qtr4 := upper(Pro_well_Calender.Quarter4);are only 2 characters long, they will never be equal to 'April', 'May' or 'June'.
Also, if they are the values retruned by UPPER, they will never contain lower-case letters like 'p', 'r', 'i' or 'l'.
You probably meant to say :NEW instead of pro_well_calendar in the code above.
To raise an user-defined or pre-defined (built-in) error, use RAISE.
Instead of defining an error, you can use RAISE_APPLICATION_ERROR, like this
RAISE_APPLICATION_ERROR (-20012, 'Invalid quarter');Don't write so much code at once. Take baby steps.
For example, code, test, and debug the code for the quarter1 column first.
When that is working perfectly, you can copy it to handle the other 3 columns.

Similar Messages

  • "Additional Text" set for messageTextInput fields in Classic Table

    i have set "Additional Text" for messageTextInput fields in Classic Table and am expecting that to display when the mouse is hovering on that field. however, that is not happening...
    what am i doing wrong ? and what can i do to achieve that (NOTE - i cannot do either short or Long Tip because that looks wierd when data is displayed in a table (multiple rows))
    thank you.
    UPDATE - could anyone tell me where/when/how does the "Additional Text" data get displayed when the page is rendered ? there is hardly any info on this in the devguide and forum. If "Addtional Text" is not the right way to provide additional information on a field what else can be used (note these fields are in a classic table so i cannot use short/long tip)......
    Edited by: user11972136 on Feb 4, 2013 10:33 AM

    Hi,
    I tried this case and its working for me.
    Could you tell us what version of Jdev and OAF you are using? There might be some issue with that version.
    Regards,
    Sandeep M.

  • Drop down for a field in a table

    hi friends,
       need a help from u, how to maintain the drop down for a field in a table..
    advance thanks..

    Hi,
    You can use the function module F4IF_INT_TABLE_VALUE_REQUEST
    TABLES: T005T.
    DATA: BEGIN OF t_t005 OCCURS 0,
            land1 TYPE t005-land1,
          END OF t_t005.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(6) v_text FOR FIELD P_LAND1.
    PARAMETERS: p_land1  TYPE t005-land1.
    SELECTION-SCREEN COMMENT 13(35) v_text1.
    SELECTION-SCREEN END OF LINE.
    INITIALIZATION.
      v_text = 'Country'.
      v_text1 = ' '.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_land1.
      REFRESH: t_t005.
      SELECT land1
             INTO TABLE t_t005
             FROM t005.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
    *            DDIC_STRUCTURE   = 'T005'
                PVALKEY          = ' '
                retfield         = 'LAND1'
                dynpprog         = sy-repid
                DYNPNR           = sy-dynnr
                dynprofield      = 'P_LAND1'
                callback_program = sy-repid
                value_org        = 'S'
           TABLES
                value_tab        = t_t005
           EXCEPTIONS
                parameter_error  = 1
                no_values_found  = 2
                OTHERS           = 3.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Thanks
    Naren

  • Drop down in the selection for the field from the table

    Hi.
    i want to put the drop down for the field from the table fo which i dont know the number of entries for the field zregion1 of the table zbwcntry.
    please tell me how to use the function module and what could be the line of codes.
    the drop down is for the select option on the slection screen of the classical report.
    please help .

    HI,
    Check below code..it may help you.
    REPORT Zbunu .
    TYPES :BEGIN OF STR ,
           MATNR TYPE MATNR ,
           END OF STR .
    DATA : ITAB TYPE TABLE OF STR WITH HEADER LINE,
           VAR TYPE MARA-MATNR .
    PARAMETERS : S_MATNR TYPE MATNR ,
                  P_MATNR TYPE MATNR.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_MATNR .
    SELECT MATNR FROM MARA INTO
    CORRESPONDING FIELDS OF TABLE ITAB UP TO 1000 ROWS.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = ' '
        retfield               = 'MATNR'
      PVALKEY                = ' '
       DYNPPROG               = SY-CPROG
       DYNPNR                 = SY-DYNNR
       DYNPROFIELD            = 'S_MATNR'
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
       VALUE_ORG              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = 'X'
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      tables
        value_tab              = ITAB
      FIELD_TAB              =
      RETURN_TAB             =
      DYNPFLD_MAPPING        =
    EXCEPTIONS
       PARAMETER_ERROR        = 1
       NO_VALUES_FOUND        = 2
       OTHERS                 = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards
    Ansumesh

  • Trigger to Update in the same table.

    Hi,
    I would like to create a trigger that when we insert into table ALL_CAPACITY_SNS_CELL1 it updates column Action on teh same table,if teher is an update, it will update the same table , column ACTION.
    This is what I have attempted but seems to be technically wrong.
    <pre>
    create table ALL_CAPACITY_SNS_CELL1
    ( A varchar2,
    action char(2),
    date_executed date);
    create or replace
    TRIGGER ALL_CAPACITY_HISTORY_TRACKING
    AFTER INSERT OR DELETE OR UPDATE ON ALL_CAPACITY_SNS_CELL1 FOR EACH ROW
    DECLARE
    v_operation VARCHAR2(10) := NULL;
    BEGIN
    IF INSERTING THEN
    v_operation := 'I';
    ELSIF UPDATING THEN
    v_operation := 'U';
    ELSE
    v_operation := 'D';
    END IF;
    IF INSERTING
    UPDATE ALL_CAPACITY_SNS_CELL1
    SET ACTION =v_operation,
    DATE_EXECUTED =sysdate ;
    ELSIF UPDATING THEN
    UPDATE ALL_CAPACITY_SNS_CELL1
    SET ACTION =v_operation,
    DATE_EXECUTED =sysdate ;
    END IF;
    END;
    </pre>

    CrackerJack wrote:
    But above query made all ACTION nul...so we shoudl after insert or update trigger right?Obviously it is not working. You modified my code the way it does not make sense.
    IF INSERTING
    THEN
    :NEW.ACTION := 'I';
    IF UPDATING
    THEN
    :NEW.ACTION := 'U';
    ELSE
    :NEW.ACTION := 'X';
    END IF;The code above checks if trigger fired on INSERT (IF INSERTING). In THEN branch of that IF you check if trigger fired on UPDATE. It makes no sense. Now, if you would use my trigger:
    SQL> create table ALL_CAPACITY_SNS_CELL1
      2  ( A varchar2(1),
      3  action char(2),
      4  date_executed date);
    Table created.
    SQL> create or replace
      2    TRIGGER ALL_CAPACITY_HISTORY_TRACKING
      3      BEFORE INSERT
      4         OR UPDATE
      5      ON ALL_CAPACITY_SNS_CELL1
      6      FOR EACH ROW
      7      BEGIN
      8          IF INSERTING
      9            THEN
    10              :NEW.ACTION := 'I';
    11            ELSE
    12              :NEW.ACTION := 'U';
    13          END IF;
    14          :NEW.DATE_EXECUTED := sysdate ;
    15  END;
    16  /
    Trigger created.
    SQL> insert into ALL_CAPACITY_SNS_CELL1(a) values('A')
      2  /
    1 row created.
    SQL> insert into ALL_CAPACITY_SNS_CELL1(a) values('B')
      2  /
    1 row created.
    SQL> alter session set nls_date_format='mm/dd/yyyy hh24:mi:ss'
      2  /
    Session altered.
    SQL> select * from ALL_CAPACITY_SNS_CELL1
      2  /
    A AC DATE_EXECUTED
    A I  05/13/2009 08:56:02
    B I  05/13/2009 08:56:09
    SQL> update ALL_CAPACITY_SNS_CELL1
      2  set a = 'X'
      3  where a = 'B'
      4  /
    1 row updated.
    SQL> select * from ALL_CAPACITY_SNS_CELL1
      2  /
    A AC DATE_EXECUTED
    A I  05/13/2009 08:56:02
    X U  05/13/2009 08:57:05
    SQL> update ALL_CAPACITY_SNS_CELL1
      2  set a = 'Y'
      3  /
    2 rows updated.
    SQL> select * from ALL_CAPACITY_SNS_CELL1
      2  /
    A AC DATE_EXECUTED
    Y U  05/13/2009 08:57:21
    Y U  05/13/2009 08:57:21
    SQL> insert into ALL_CAPACITY_SNS_CELL1(a) values('C')
      2  /
    1 row created.
    SQL> select * from ALL_CAPACITY_SNS_CELL1
      2  /
    A AC DATE_EXECUTED
    Y U  05/13/2009 08:57:21
    Y U  05/13/2009 08:57:21
    C I  05/13/2009 08:57:53
    SQL> SY.

  • Writing trigger for DML tracking on three table

    Hello,
    I need help on how can i write a trigger for updating backup table on DML changes on source table.
    I have source table named APP_SOURCE and backup table name APP_BACKUP with same data and structure.
    On any DML on source table APP_SOURCE it corresponding backup table APP_BACKUP should also be updated with same number of record changes on any DML
    (insert/update/delete) to maintain data consistency on both tables
    For cross refernce all changed DML records on source table APP_SOURCE should be tracked and stored within third table APP_SOURCEDMLTRACK storing old value and new value data before and after dml changes on source table APP_SOURCE
    source table create script:
    CREATE TABLE APP_SOURCE
    RCN_ID VARCHAR2(23 BYTE),
    CRD_NUM VARCHAR2(23 BYTE),
    TRN_TYP VARCHAR2(10 BYTE),
    TRN_DTE DATE,
    REF_NUM VARCHAR2(23 BYTE),
    TRN_CRR VARCHAR2(3 BYTE),
    TRN_AMT NUMBER(24,6),
    BLL_CRR VARCHAR2(3 BYTE),
    BLL_AMT NUMBER(16,2),
    BSN_DTE DATE,
    BRN_S VARCHAR2(10 BYTE),
    ACC_NUM_S VARCHAR2(24 BYTE),
    BRN_D VARCHAR2(10 BYTE),
    ACC_NUM_D VARCHAR2(24 BYTE),
    SRL_NUM VARCHAR2(12 BYTE),
    DVI_TYP VARCHAR2(8 BYTE),
    ORG_MSG_TYP VARCHAR2(6 BYTE),
    ACQ_CDE VARCHAR2(15 BYTE),
    ACQ_BIN VARCHAR2(11 BYTE),
    REV VARCHAR2(1 BYTE),
    DBCR_FLG VARCHAR2(1 BYTE),
    ATM_FEE NUMBER(16,2),
    ATM_ID VARCHAR2(16 BYTE),
    INT_FEE NUMBER(16,2),
    TRM_ID VARCHAR2(10 BYTE),
    MCN_CDE VARCHAR2(40 BYTE),
    MCN_INF VARCHAR2(40 BYTE),
    PNT_RCN_ID NUMBER(12),
    FGN_KEY VARCHAR2(23 BYTE),
    ERR_CDE VARCHAR2(200 BYTE),
    JNK VARCHAR2(50 BYTE),
    CRD_USED VARCHAR2(10 BYTE),
    RES_CDE VARCHAR2(3 BYTE),
    REA_CDE VARCHAR2(4 BYTE),
    PRC_CDE VARCHAR2(10 BYTE),
    MCC VARCHAR2(4 BYTE),
    APP_CDE VARCHAR2(8 BYTE),
    ISS_INS_ID VARCHAR2(11 BYTE),
    ACQ_INS_ID VARCHAR2(11 BYTE),
    ACQ_NET_CDE VARCHAR2(20 BYTE),
    ISS_NET_CDE VARCHAR2(20 BYTE),
    INST_ID VARCHAR2(60 BYTE),
    FIID1 VARCHAR2(20 BYTE),
    FIID2 VARCHAR2(20 BYTE),
    SWT_FLE VARCHAR2(50 BYTE),
    VIS_FLE VARCHAR2(50 BYTE),
    VIS_FLE_MCHDTE DATE,
    VIS_FLE_EODDTE DATE,
    VIS_FLE_RCNTYP NUMBER(2),
    VIS_FLE_ACNTID VARCHAR2(35 BYTE),
    MAS_FLE VARCHAR2(50 BYTE),
    MAS_FLE_MCHDTE DATE,
    MAS_FLE_EODDTE DATE,
    MAS_FLE_RCNTYP NUMBER(2),
    MAS_FLE_ACNTID VARCHAR2(35 BYTE),
    TIE1_FLE VARCHAR2(50 BYTE),
    TIE1_FLE_SRC VARCHAR2(50 BYTE),
    TIE1_FLE_MCHDTE DATE,
    TIE1_FLE_EODDTE DATE,
    TIE1_FLE_RCNTYP NUMBER(2),
    TIE1_FLE_ACNTID VARCHAR2(35 BYTE),
    TIE2_FLE VARCHAR2(50 BYTE),
    TIE2_FLE_SRC VARCHAR2(50 BYTE),
    TIE2_FLE_MCHDTE DATE,
    TIE2_FLE_EODDTE DATE,
    TIE2_FLE_RCNTYP NUMBER(2),
    TIE2_FLE_ACNTID VARCHAR2(35 BYTE),
    TIE3_FLE VARCHAR2(50 BYTE),
    TIE3_FLE_SRC VARCHAR2(50 BYTE),
    TIE3_FLE_MCHDTE DATE,
    TIE3_FLE_EODDTE DATE,
    TIE3_FLE_RCNTYP NUMBER(2),
    TIE3_FLE_ACNTID VARCHAR2(35 BYTE),
    TIE4_FLE VARCHAR2(50 BYTE),
    TIE4_FLE_SRC VARCHAR2(50 BYTE),
    TIE4_FLE_MCHDTE DATE,
    TIE4_FLE_EODDTE DATE,
    TIE4_FLE_RCNTYP NUMBER(2),
    TIE4_FLE_ACNTID VARCHAR2(35 BYTE),
    TIE5_FLE VARCHAR2(50 BYTE),
    TIE5_FLE_SRC VARCHAR2(50 BYTE),
    TIE5_FLE_MCHDTE DATE,
    TIE5_FLE_EODDTE DATE,
    TIE5_FLE_RCNTYP NUMBER(2),
    TIE5_FLE_ACNTID VARCHAR2(35 BYTE),
    TIE6_FLE VARCHAR2(50 BYTE),
    TIE6_FLE_SRC VARCHAR2(50 BYTE),
    TIE6_FLE_MCHDTE DATE,
    TIE6_FLE_EODDTE DATE,
    TIE6_FLE_RCNTYP NUMBER(2),
    TIE6_FLE_ACNTID VARCHAR2(35 BYTE),
    EJ_FLE VARCHAR2(50 BYTE),
    EJ_FLE_MCHDTE DATE,
    EJ_FLE_EODDTE DATE,
    EJ_FLE_RCNTYP NUMBER(2),
    EJ_FLE_ACNTID VARCHAR2(35 BYTE),
    BTH_FLE VARCHAR2(50 BYTE),
    BTH_FLE_MCHDTE DATE,
    BTH_FLE_EODDTE DATE,
    BTH_FLE_RCNTYP NUMBER(2),
    BTH_FLE_ACNTID VARCHAR2(35 BYTE),
    BRN_ISS_FLE VARCHAR2(50 BYTE),
    BRN_ISS_FLE_MCHDTE DATE,
    BRN_ISS_FLE_EODDTE DATE,
    BRN_ISS_FLE_RCNTYP NUMBER(2),
    BRN_ISS_FLE_ACNTID VARCHAR2(35 BYTE),
    BRN_ACQ_FLE VARCHAR2(50 BYTE),
    BRN_ACQ_FLE_MCHDTE DATE,
    BRN_ACQ_FLE_EODDTE DATE,
    BRN_ACQ_FLE_RCNTYP NUMBER(2),
    BRN_ACQ_FLE_ACNTID VARCHAR2(35 BYTE),
    TRNACC_ID VARCHAR2(21 BYTE),
    PRT_TRNACC_ID VARCHAR2(35 BYTE),
    PROCESS_ID VARCHAR2(20 BYTE),
    SWT_VCH1_NUM VARCHAR2(100 BYTE),
    SWT_VCH2_NUM VARCHAR2(100 BYTE),
    SWT_VCH3_NUM VARCHAR2(100 BYTE),
    SWT_VCH4_NUM VARCHAR2(100 BYTE),
    SWT_VCH5_NUM VARCHAR2(100 BYTE),
    SWT_VCH1A_NUM VARCHAR2(100 BYTE),
    SWT_VCH2A_NUM VARCHAR2(100 BYTE),
    SWT_VCH3A_NUM VARCHAR2(100 BYTE),
    SWT_VCH4A_NUM VARCHAR2(100 BYTE),
    SWT_VCH5A_NUM VARCHAR2(100 BYTE),
    SWT_VCH1B_NUM VARCHAR2(100 BYTE),
    SWT_VCH2B_NUM VARCHAR2(100 BYTE),
    SWT_VCH3B_NUM VARCHAR2(100 BYTE),
    SWT_VCH4B_NUM VARCHAR2(100 BYTE),
    SWT_VCH5B_NUM VARCHAR2(100 BYTE),
    SWT_VCH1C_NUM VARCHAR2(100 BYTE),
    SWT_VCH2C_NUM VARCHAR2(100 BYTE),
    SWT_VCH3C_NUM VARCHAR2(100 BYTE),
    SWT_VCH4C_NUM VARCHAR2(100 BYTE),
    SWT_VCH5C_NUM VARCHAR2(100 BYTE),
    SWT_VCH1D_NUM VARCHAR2(100 BYTE),
    SWT_VCH2D_NUM VARCHAR2(100 BYTE),
    SWT_VCH3D_NUM VARCHAR2(100 BYTE),
    SWT_VCH4D_NUM VARCHAR2(100 BYTE),
    SWT_VCH5D_NUM VARCHAR2(100 BYTE),
    SWT_VCH1E_NUM VARCHAR2(100 BYTE),
    SWT_VCH2E_NUM VARCHAR2(100 BYTE),
    SWT_VCH3E_NUM VARCHAR2(100 BYTE),
    SWT_VCH4E_NUM VARCHAR2(100 BYTE),
    SWT_VCH5E_NUM VARCHAR2(100 BYTE),
    SWT_VCH1F_NUM VARCHAR2(100 BYTE),
    SWT_VCH2F_NUM VARCHAR2(100 BYTE),
    SWT_VCH3F_NUM VARCHAR2(100 BYTE),
    SWT_VCH4F_NUM VARCHAR2(100 BYTE),
    SWT_VCH5F_NUM VARCHAR2(100 BYTE),
    SWT_VCH1G_NUM VARCHAR2(100 BYTE),
    SWT_VCH2G_NUM VARCHAR2(100 BYTE),
    SWT_VCH3G_NUM VARCHAR2(100 BYTE),
    SWT_VCH4G_NUM VARCHAR2(100 BYTE),
    SWT_VCH5G_NUM VARCHAR2(100 BYTE),
    SWT_VCH1H_NUM VARCHAR2(100 BYTE),
    SWT_VCH2H_NUM VARCHAR2(100 BYTE),
    SWT_VCH3H_NUM VARCHAR2(100 BYTE),
    SWT_VCH4H_NUM VARCHAR2(100 BYTE),
    SWT_VCH5H_NUM VARCHAR2(100 BYTE),
    SWT_VCH1I_NUM VARCHAR2(100 BYTE),
    SWT_VCH2I_NUM VARCHAR2(100 BYTE),
    SWT_VCH3I_NUM VARCHAR2(100 BYTE),
    SWT_VCH4I_NUM VARCHAR2(100 BYTE),
    SWT_VCH5I_NUM VARCHAR2(100 BYTE),
    VIS_VCH_NUM VARCHAR2(100 BYTE),
    MAS_VCH_NUM VARCHAR2(100 BYTE),
    TIE1_VCH_NUM VARCHAR2(100 BYTE),
    TIE2_VCH_NUM VARCHAR2(100 BYTE),
    TIE3_VCH_NUM VARCHAR2(100 BYTE),
    TIE4_VCH_NUM VARCHAR2(100 BYTE),
    TIE5_VCH_NUM VARCHAR2(100 BYTE),
    TIE6_VCH_NUM VARCHAR2(100 BYTE),
    EJ_VCH_NUM VARCHAR2(100 BYTE),
    BTH_VCH_NUM VARCHAR2(100 BYTE),
    BRN_ISS_VCH_NUM VARCHAR2(100 BYTE),
    BRN_ACQ_VCH_NUM VARCHAR2(100 BYTE),
    PAR_DTE DATE,
    EOD_DTE1 DATE,
    EOD_DTE2 DATE,
    FILLER1 VARCHAR2(4000 BYTE),
    FILLER2 VARCHAR2(4000 BYTE),
    FILLER3 VARCHAR2(4000 BYTE),
    BRM_LINKID1 VARCHAR2(20 BYTE),
    BRM_LINKID2 VARCHAR2(20 BYTE),
    BRN_ACQ_FLE_ORG VARCHAR2(50 BYTE),
    CRM_TRACK_FLAG VARCHAR2(20 BYTE),
    DIFF_AMT NUMBER(16,2),
    IS_RCN NUMBER(1),
    MCH_DTE DATE,
    MIGRATION_FLAG VARCHAR2(50 BYTE),
    NET_CDE VARCHAR2(20 BYTE),
    TRACK_FLAG VARCHAR2(100 BYTE),
    TRN_MM VARCHAR2(2 BYTE),
    TRN_YY VARCHAR2(4 BYTE),
    MOVE_FLAG VARCHAR2(15 BYTE),
    PURGE_FLAG NUMBER(2),
    REV_FLAG NUMBER(1),
    TEMPVCH_LOCK_DTE DATE
    Please provide me any refernce on web or document which i can implement or code on how to code the required trgger.
    Regards,
    Ganesh

    Perhaps you should consider using Materialized View Replication.
    http://docs.oracle.com/cd/E11882_01/server.112/e10706/repoverview.htm#autoId9
    Instead of writing triggers, you put a materialized view log on your source table. Then you can turn your backup table into a materialized view that is based on the source table. When you perform a fast refresh of the backup table MV, it will read the MV log on the source table. Refreshes should take almost no time at all to process.
    If the data must be absolutely up-to-date at all times, you can use refresh on commit so that the MV is always in synch with the table. Normally I recommend against using refresh on commit, and instead recommend a short refresh interval.
    You can use triggers as you suggest, but it seems simpler to use something like MVs to create a shadow table.

  • More than one check table for a field in custom table

    I created a custom table , with some fields in that , and for a field i given a check table , in that same field i want another check table because for  some data i need to refer another table . whether it is possible.....

    Hi,
    If you need to perform the checks while using a maintenance view, you can do this with modification events. e.g. just implement a form that triggers your custom checks in a "before save" event... (SE55->Environment->Event)
    Kr,
    Manu.

  • F4 help for a field in item table in a view cluster

    Hi All,
    I have a view cluster with two tables. I should provide F4 help for field in item table based on the selected row of the header table.
    F4 should have only values fetched based on the header table entry.
    How can i achieve this. Please suggest.
    Regards,
    Kusuma K.

    Hi amar_war,
    use screen painter to edit the screen layout where the field VKBUR is on. Double click the field to get the details screen. Here you can attach a search help to the field.
    H_TVBUR has no more parameters, it will display a list of al sales offices with description text
    H_TVBVK will also show the sales group, if VKGRP is a screen field, it will restrict the result list automatically on matching VKGRP.
    H_TVKBZ has also VKORG VTWEG SPART - it will take those values from screen if filled.
    If you are not satisfied with the results, you can easily create your own search help using own selection method and own search help exits if required.
    Try standard search help for standard field first.
    You can create a copy of VKBUR as ZVKBUR and attach search help there, you can create your own screen structure and attach the search help there - 50 ways to get your search help...
    Regards,
    Clemens

  • Searching for the fields of a table(very very urgent)

    Hi all,
    i am in graet trouble now.i am searching for the fields like
    1)country of origin where the finished good is created.
    2) customer sales order number
    3)customer sales order line number
    i am writing a report for delivery order.in this report i have to refer customer PO & customer SO .
      i mean, my company has a customer ( seagate) & seagate has a customer (let maxtor).initially maxtor will give a PO to seagate then seagate will raise a SO againest maxtor.
       Then seagate will send PO number(of maxtor), PO line number,SO number(seagate), SO line number(seagate) to our company.
       Then i have to write a report for sales order & delivery order.in these reports i have to refer seagate PO number & seagate SO number for reference.
    i got PO number as vbkd-bstkd but not getting any field for reference Sales order.plz advice me on this. it is very very urgent.
    ur idea is highly appreaciated.
    Thank u very much.
    Regards
    pabitra

    check out tables VBAK(sales order header), VBAP(sales items)

  • Search Help for a Field of a Table Control

    I have designed a screen using 'Table Control' with fields like Date, BoxNo,Quantity etc. Kindly tell me how to go about providing a search help for the field 'BoxNo' of this table control so that the user is not required to scroll down the entire table/list for selecting a particular box no.
    Thanx in advance,
    Alok.

    When you go to screen painer, in screen painter attributes window, there is an atribute called search help, fill it.
    Another way is, after PAI put:
    PROCESS ON VALUE-REQUEST.
      FIELD box_no MODULE f1_help_box_no.
    And gives logic in that module using FM F4IF_INT_TABLE_VALUE_REQUEST.
    Regards.

  • How  to implement PCCD001 exit for new field in AENR table

    Dear experts,
    I am implementing PCCD0001 exit for a new field in AENR table secnario below.
    Tcode CC31/CC32/CC33 required additional field which stores value in AENR table. in AENR in implemented include(CI_AENR) and added new field. After i implemnted PCCD0001 screen exit for CC31/CC32/CC33.
    in that two function exit are there, one for passing data to  screen EXIT_SAPMC29C_001
    another for getting data from screen EXIT_SAPMC29C_002.
    which table or structure i use to place field in screen exit to pass data to EXIT_SAPMC29C_002, in this function i don't have import parameter.
    Adv. thanks,
    Venkey

    Hi sekhar,
    Your Requirement can be implemented by OVS(Object Value selector) This is the custom search help .So that you can define on what basis the value has to be fetched.
    Look at the below link
    http://wiki.sdn.sap.com/wiki/display/WDABAP/ABAPWDObjectValueSelector(OVS)
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/606288d6-04c6-2c10-b5ae-a240304c88ea?quicklink=index&overridelayout=true
    You need to use the component WDR_OVS.
    It has 3 phases
    In phase 1
         You will fetch the value from input field to F4 help dialog box.
    In phase 2
         You will generate the search results , in this phase look for the input value given in field 2 and accordingly generate search result for the field 3.
    In phase 3
         The selected value will be returned to the original screen.
    Regards
    Karthiheyan M

  • F4 for custom field in database table

    Hello,
    I created a Z-table with a Z-domain attached to a field.
    The domain has only 2 values (Yes and No).
    In the selection-screen of the table, I have an F4 for that field, however, I also want an F4 in the table itself (to know that Y = yes and N = no)
    How can you do this?
    Thanks

    Hi,
    at the Domain side assign the value range yes and no in the fixed values..
    so when ever you use the f4 help refer the data element..
    automatically when ever you press F4 it show the Fixed values in domain..
    Regards,Prabhu

  • Value Help for a field from custom table in BSP

    Please let me know, the procedure to create value help for a field from a custom table in BSP using HTMLB.
    Thanks

    hi prodigy,
    check this code using drop down list.
    <b>layout for first page</b> 
    <htmlb:dropdownListBox id                = "ddlist"
                                  table             = "<%=t_mara%>"
                                  nameOfKeyColumn   = "matnr"
                                  nameOfValueColumn = "matnr"></htmlb:dropdownListBox>
    <b>event Oninitialization event of first page</b>
    SELECT MATNR UP TO 10 ROWS
      INTO TABLE T_MARA
      FROM MARA.
    <b> event Oninputprocessing event</b>
    **Load the manager class
    CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
    DATA: V_EVENT TYPE REF TO CL_HTMLB_EVENT.
    DATA: DATA TYPE REF TO OBJECT.
    DATA: V_DATA TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX.
    CALL METHOD CL_HTMLB_MANAGER=>GET_EVENT
      EXPORTING
        REQUEST               = RUNTIME->SERVER->REQUEST
      RECEIVING
        EVENT                 = V_EVENT
    IF V_EVENT->NAME = 'button' AND
       V_EVENT->EVENT_TYPE = 'click'.
    DATA ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST =
                                          RUNTIME->SERVER->REQUEST
                                          NAME     = 'inputField'
                                          ID       = 'matnr'
        V_DATA ?= DATA.
    IF V_DATA IS NOT INITIAL.
         V_MATNR = V_DATA->SELECTION.
    ENDIF.
    NAVIGATION->SET_PARAMETER( NAME = 'v_matnr' VALUE = V_MATNR ).
    NAVIGATION->GOTO_PAGE( 'detail.htm' ).
    ENDIF.
    <b>in the onInitialization event for detail page</b>SELECT MATNR
           ERSDA
           ERNAM
           LAEDA
           AENAM
           VPSTA
           PSTAT
           LVORM
           MTART
      FROM MARA
      INTO TABLE T_MARA
    WHERE MATNR = V_MATNR.

  • Adding a Button for a field in a table

    Hi there,
    I don't know if it is possible, but I can't find any information of this. How can I make a field in a table searchable? That means I want to include a button besides this field in the table, so that user can click on the button to search for, eg to search for Material Number, using this button.
    Anyone can help?

    No that is wrong. What I want to do is as follows:
    In a table, there is a button in the field where user can click on to activate the OVS. When they click this button, OVS will open up a screen with the search citerias and the results in the table in the OVS (This is auto generated window and I can't modify directly onto the window).
    What is happening now is when I click on the button to activate the OVS, what came out is just the fields.. the labels are all gone.
    I tried to create Simple Type but it seems I do not know the correct way to use it so that the fields for OVS can be displayed with the labels. I tried many ways but the labels just don't show up.
    You proposed that I do a Simple Type Binding but the problem is the window is automated, I can do binding onto the generated window.
    What else can I try? I read all the tutorials and wiki, it seems that all the labels are generated so beautifully and automatically.. but mine is empty..!!
    From what I analysed, in the OVS windows, the number of citeria fields generated are based on the number of fields input for the model and the number of result column is based on the number of fields in the model output. But there is just no Label.
    PS: My data is bound to the backend using Adaptive Webservices, therefore I am using the model to search for the data.
    Any help or advise is greatly appreciated!
    Edited by: Jackson Yap on Feb 25, 2009 10:28 AM

  • How to show asterisk for required fields in a table row?

    Hi Folks,
    For showing the asterisk (*) for required fields in a form, I used to give required="true" for the component and surround the component with a af:panelLabelAndMessage for which I set showRequired="true". How to do this for a component in a table row. For a component in a table, there is no label per se. The required=true flag in the component shows proper error message saying that it is required but there is no (*) for that component.
    Thanks
    Vishal

    Table does not have any required attribute.But column has showRequired property .You can used this.If column has input text then also you put required true on this component.And set your required messages there .
    It will resolve your problem
    Thanks
    Prateek

Maybe you are looking for

  • System image restore new hard drive

    Hard drive failed. Brought new one and are trying to do a system image restore. Boot using Win 7 repair disk. Start image recovery. Runs for a min or two and give me the following error. Windows back up failed to extend or mount the file system on th

  • AUTOMATIC CREATION OF REWORK ORDER

    Hi Could any solve my problem? Basically i am working in pipe manufacturing unit where we follow discrete manufacturing. I have some pipes that been rejected from certain operation and sent for reworking.Now, i want that "A rework order should be cre

  • Windows Storage Server 2008 R2 Essentials connecting with Launchpad on Mac OS 10.9.2

    Note: Note to moderators, I accidentally submitted this to Windows Small Business Server Forums. If someone could move this thread to the appropriate directory would be much appreciated. Hello we have a client which has a Mac OSX 10.9.2 and we are tr

  • Consolidation of items in accounting document

    Hi All I have this scenario in MySAP ERP 2005 version SD Billing doc has two line items Item 1{Material=A,Plant=2000,P-centre=21000,Amount=$3,Qty=1,Tax=$0.42} Item 2{Material=A,Plant=2000,P-centre=21000,Amount=$4,Qty=1,Tax=$0.56} Revenue was posted t

  • Context variable in report configuration

    Hello, I try to create a context variable for a select-option  as indicated in the documentation of the customizing. I go in img structure Service Consumption Layer Reporting Administration    then Report settings    then Manage context variables I d