How to condition on column

Hi all,
I'm so new about HTML DB. Can you help me to put a condition on the column.
EX: I have a table name "Test" look like:
id error error_corrected
1 N Y
I want to put a condition on "error_corrected" column to accept users enter 'Y' or 'N' only. Otherwise will popup a message like "Please enter 'Y' or 'N' only"
Thank you for your help

Sorry, i did not provide enough detail. I have a table name like "Test" with 3 columns: "id", "error_flag", "error_corrected". On "Page Rendering" under "Region" i've created a report name "log_record" with type "SQL Query(updateable report) and code in "Region Source" like:
select htmldb_item.checkbox(1,rownum) "",
htmldb_item.hidden(2,id)|| id,
htmldb_item.hidden(3,error_flag)|| error_flag,
htmldb_item.text(4,error_corrected) as error_corrected
from Test;
On "Page Processing" under "Processes" i've picked pl/sql and the code in "Region Source" like:
for i in 1..htmldb_application.g_f01.count
loop
update Test
set error_corrected=htmldb_application.g_f04(htmldb_application.g_f01(i))
where
id=htmldb_application.g_f2(htmldb_application.g_f01(i));
end loop;
And I want users who fixed the errors in "Test" table, mark the checkbox and enter "Y" or "N" in "error_corrected" column only, then click "Update" button. Other than 'Y' and 'N' will popup a message like "Please enter 'Y' or 'N' only"
thank you

Similar Messages

  • How to refer a column value of a single row in conditional column display?

    Hello,
    does anybody have an idea, how i can refer a column value of a single row in conditional display of a column?
    So my idea is, that a report has a column, which value is only displayed, when another column value of this row has a specific value.
    I want to solve this problem with condition type: PL/SQL Function Body returning a boolean.
    But I do not know how to refer the column value of each single row!
    Thank you,
    Tim

    Here's a solution that, to me, seems easier to implement but, that's, of course, in the eye of the implementer.
    Rather than using APEX to generate a link column for you, actually create the link as part of your SQL.
    select '<a href="f?p=102:3:491847682940364::::P3_CONTACT_ID:' || CONTACT_ID || "><img src="/i/themes/theme_1/ed-item.gif" alt="Edit"></a>' CONTACT_LINK, ...
    etc.
    Test this out. You'll see that it works just like making a column a link using the column attributes.
    Next, we'll change the SQL to use a DECODE statement to either display the link or nothing depending on what your criteria is. For example, let's assume you only want a link for active contacts.
    select Decode( CONTACT_STATUS, 'A', '<a href="f?p=102:3:491847682940364::::P3_CONTACT_ID:' || CONTACT_ID || "><img src="/i/themes/theme_1/ed-item.gif" alt="Edit"></a>', NULL ) CONTACT_LINK, ...
    etc.
    This will not display the link in any rows in which the CONTACT_STATUS is not active, i.e. "A"
    -Joe

  • How to add two columns in criteria(OBIEE 11g)

    Hi,
    I am trying to add two columns in a criteria in obiee
    *"Fact - OLB Processed Invoices"."Invoice Amount - Functional Currency"__"Fact - OLB Processed Invoices"."AR Tax Amount - Invoice Currency"
    but the problem is :-
    The first column have 500000000 and the second column contains NULL values the actual table. I think this might be the problem when I am trying to add them it is giving no output.
    just a blank box.
    Can any one tell me how can we add columns in this condition.
    Thank to one and all.

    Try IFNULL(expr, value)
    for other column
    "Fact - OLB Processed Invoices"."Invoice Amount - Functional Currency"+IFNULL("Fact - OLB Processed Invoices"."AR Tax Amount - Invoice Currency",0)
    Edited by: Srini VEERAVALLI on Mar 20, 2013 10:02 AM

  • How to insert select columns from one internal table to another

    Hi,
    How to insert select columns from one internal table to another based on condition as we do from a standart table to internal table.
    regards,
    Sriram

    Hi,
    If your question is for copying data from 1 int table to other ;
    we can use
    APPEND LINES OF it_1 TO it_2.
    or if they have different columns then:
    loop at it_1 into wa_it1.
    move wa_it1-data to wa_it2-d1.
    apped wa_it2 to it_2.
    clear wa_it2.
    endloop.
    thnxz

  • Protect Condition Value Column in VA01

    I have a security problem on my sales orders: If somebody adds a line and enters the discount Z condition and some number on the value column, SAP updates the Order without going thru the regular checks of discount limit which it does on the amount column.
    What I want is to put an if to check if the Amount column its 0, to delete the number on the condition value column, I have tried with ' ' but the value turns to cero and it does not show an error.
    Here its the code:
    IF xkomv-kbetr = 0.
            MOVE '' TO xkomv-kwert .
            MODIFY xkomv INDEX sy-tabix.
        ENDIF.
    Regards,
    Carlos
    Edit: or if somebody knows how to make screen input = 0 (gray) for the Value Column that would be great.
    Edited by: Carlos Salazar on Jul 9, 2010 4:09 PM

    turns out 0 its correct as it will not get saved.

  • How to Conditionally Rende the Images in af:treeTable...

    Hi,
    I need to conditionally render the Images in af:treeTable.
    First let me explain my requirement clearly...
    I need to display Dept --> Emp in a tree View format... Some thing like
    Dallas
    --> Smith
    --> Scott
    --> Tiger
    New York
    --> XXXX
    --> YYYY
    --> ZZZZz
    Along with these i need to display Add and Delete Command links in second column.
    But Delete Operation should not available for Departments...
    So how to conditionally stop delete image from rendering for departments...
    Waiting for your response...
    Thanks in Advance...

    You don't need disabled though rendered property. Sorry.
    You'll find it in property inspector for image component. There you will enter the binding to the method that you should write in backing bean (method name must start with "get"). You can also use binding editor for entering correct binding string while working in property inspector.
    Method in backing bean, for example:
    public Boolean getRenderedImage(){  
    Object obj = FacesContext.getCurrentInstance().getApplication().
    createValueBinding("#{row.row.currentRow.dataProvider}").
    getValue(FacesContext.getCurrentInstance());
    /* next ushould cast this object to whatever it is and se if it should be rendered or not and return true or false. To see what is the cast object you could put break point after getting obj and see Class name.
    One thing. You should see what is the binding name for row elements in your table. By default it is "row" if you did drag&drop. If it is "row1" you should change the string above to: "#{row1.row.currentRow.dataProvider}".

  • Gray (only display) in base condition value column VF01

    We have Manual conditions for discount, the problem its that if in a new empty row you add the Condition Type (Cn Ty) and an amount in the condition value column, SAP will take it without doing any check (like in the Amount Column).
    So I require to gray out the condition value column (KOMV-KWERT) just like the column on the right (KOMV-KWERT_K) so no value can be entered this way for 2 discount conditions we use.
    I understand that some code in USEREXIT_FIELD_MODIFICATION  may do this, anyone has experience on this?
    Best Regards,
    Carlos

    I hope I understood your question properly.
    I assume you know how it works in the condition tab. When you enter condition type and enter the value. It will multiply the value with the number of material you entered in the sales order, and place the value in the condition value column.
    When you have manual condition discount condition it means you enter the value manually. If it is percentage basis it will calculate on the price (for instance PR00). If you do not want to enter it as manual the easy solution would be to uncheck the manual check box in the pricing procedure that you use V/08 and if you want to generate automatic values as you might know, create condition records for this condition type in VK11.
    For any particular you want to leave it as manual but to make it grayed out, as you already knew you can do it with user exit or another way with user exit would be, order can be blocked if there some changes done manually and later someone with proper authorization can approve the change and release it.

  • How to insert multiple column in JExcel

    Hello,
    I'm having a problem with JXL, when I want to insert multiple columns by the below loop, but it doesn't work. It just insert two columns instead of 7 columns.
    while (date.before(toDate)) {
         sheet.insertColumn(1);
         Label l = new Label(1,row++, "Day");
         sheet.addCell(l);
         sheet.addCell(new DateTime(1, row, date.getTime(), dateFormat));
    Anyone know how to insert multiple columns in JXL?
    Thanks!

    Check the while condition. May be it is iterating only two times

  • Reg:How to delete the column in table control also from database table.

    Hi Experts,
    Once again thank u all for giving the responses.
    one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
    With Regards,
    Saroja.P.

    Hi,
    If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
    "This portion of code inside the LOOP...ENDLOOP.
    IF sy-ucomm eq 'F_DELETE'.
       gt_itab2-check = mark.  " Store the MARK field status into your internal table's correspoding field 'check'
      MODIFY gt_itab INDEX tabcontrol-current_line.
    ENDIF.
    iF sy-ucomm eq 'DELETE1'.
      DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
    ENDIF.
    Now you can modify your database table using the MODIFY statement.
    MODIFY ZDB FROM TABLE gt_itab.

  • How to print all columns in one page

    Hi,
    Can anybody explain me how to print all columns in one page.we have around 15 to 20 columns for 4 reports and all these reports are build on one multiprovider.we are using BW 3.5.
    Can anyone explain me  how to print ALL COLUMNS IN ONE PAGE  .currently they are getting all columns in 2 to 3 pages. They are using PORTAL to run the reports here.
    Is it possible to do by customizing Webtemplate or by macros in Workbook.Please help me
    Edited by: kotha123 on Oct 11, 2010 5:58 PM

    Hi,
    Your best bet is to use a workbook template or else Excel to pdf option...Thanks

  • How can i suppress columns in ALV ?? Will reward points.

    Hello Gurus, how can i suppress column in ALV when i`m using the transparent table:
    CALL METHOD grid->set_table_for_first_display
          EXPORTING
            i_structure_name = 'ZIANEXE'
            is_layout        = wa_layout
            is_variant       = wa_variant
            i_save           = 'U'
            IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
          CHANGING
            it_outtab        = itab[]
            it_fieldcatalog  = fieldcat.
    Please help.

    in the fieldcatalog you are providing there is a field NO_OUT use this.
    Loop over internal table and check fieldname. If fieldname = column you want to hide, NO_OUT = 'X'.
    Edited by: Micky Oestreich on May 8, 2008 12:06 PM

  • How to read BLOB column from a table in SQL or PL/SQL

    I have table which is having one BLOB data type column . Ihave inserted few rows in that table . Now i want to see wheather BLOB column has been inserted properly or not . How to read that column through SQL or PL/SQL.
    Can anyone help me to do this.

    You can only manipulate LOBs in PL/SQL because you have to use the DBMS_LOB package.
    Check out the Oracle Developer's Guide

  • FBL5N : how to add a column of the Account's name?

    Hi,
    the list displayed by Tcode : FBL5N contain only the number of account, please how to add a column of Account's name ?
    Please advise
    Regards.

    When you are in the FBL5N display results screen, use the menu option Settings --> Special Fields. 
    There are also the following notes which would explain you how to add special or new fields to the line items :
    - 310886     Line items: Dynamic selections ignored
    - 215798     FBL*N: Special fields are not displayed
    - 373268     Line item: new display field
    The special field has to exist in table T021S.

  • How to modify a column name & How to modify a constraint name

    How to modify a column name?
    How to modify a primary key constraint name if the pk has been referenced by another foreign key?
    Thanks.

    Hi,
    What version of oracle are you using? If it is 9i,
    then you can the command
    alter table <table_name> rename column <column_name> to <new_column>;
    if it is 8i or earlier, you can create a view with the required names.
    hth
    Always post the oracle version and the platform you are using to get better response.

  • How to use the column names generated from Dynamic SQL

    Hi,
    I have a problem with Dynamic SQL.
    I have written an SQL which will dynamically generate the Select statement with from and where clause in it.
    But that select statement when executed will get me hundreds of rows and i want to insert each row separately into one more table.
    For that i have used a ref cursor to open and insert the table.
    In the select list the column names will also be as follows: COLUMN1, COLUMN2, COLUMN3,....COLUMNn
    Please find below the sample code:
    TYPE ref_csr IS REF CURSOR;
    insert_csr ref_csr;
    v_select VARCHAR2 (4000) := NULL;
    v_table VARCHAR2 (4000) := NULL;
    v_where VARCHAR2 (4000) := NULL;
    v_ins_tab VARCHAR2 (4000) := NULL;
    v_insert VARCHAR2 (4000) := NULL;
    v_ins_query VARCHAR2 (4000) := NULL;
    OPEN insert_csr FOR CASE
    WHEN v_where IS NOT NULL
    THEN 'SELECT '
    || v_select
    || ' FROM '
    || v_table
    || v_where
    || ';'
    ELSE 'SELECT ' || v_select || ' FROM ' || v_table || ';'
    END;
    LOOP
    v_ins_query :=
    'INSERT INTO '
    || v_ins_tab
    || '('
    || v_insert
    || ') VALUES ('
    || How to fetch the column names here
    || ');';
    EXECUTE IMMEDIATE v_ins_query;
    END LOOP;
    Please help me out with the above problem.
    Edited by: kumar0828 on Feb 7, 2013 10:40 PM
    Edited by: kumar0828 on Feb 7, 2013 10:42 PM

    >
    I Built the statement as required but i need the column list because the first column value of each row should be inserted into one more table.
    So i was asking how to fetch the column list in a ref cursor so that value can be inserted in one more table.
    >
    Then add a RETURNING INTO clause to the query to have Oracle return the first column values into a collection.
    See the PL/SQL Language doc
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/returninginto_clause.htm#sthref2307

Maybe you are looking for

  • Why won't my program run when I schedule it.

    I am trying to schedule an executable and it says it is successful, but the program never runs.  I even tried setting up a simple batch file that will call the program and when I schedule it it says successful but never runs. When I run it on the des

  • Select records based on the closest given time

    Dear SQL gurus, I have a table T1: Name Null? Type ID NOT NULL NUMBER(5) MOMENT NOT NULL DATE [DD.MM.YYYY HH24:MI] MEASUREMENT NOT NULL NUMBER(8,3) Example (ID, MOMENT, MEASUREMENT) -- START OF EXAMPLE -- 9380 18.11.2000 03:45 17.6 9380 18.11.2000 04

  • Hang on I Tunes screen during update IOS 8

    My Iphone 5 hang on connect Itunes screen during update IOS 8 for more than 3 hours, please assist.

  • Multiple clients in DEV and QA for CHARM setup

    Blog /people/dolores.correa/blog/2008/07/26/first-steps-to-work-with-change-request-management-scenario is an excellence introduction to CHARM setup. However in real world, we have multiple clients on DEV and QAS systems. Could you help explain how t

  • How to run with an HREF thru the handler

    Hi, my HREF request doesn't run thru my handler. My commands do so ? How do I tell my handler to handle my links as well. I can see the faces servlet is called but not my handler. Thanx Oliver