Need help in hiding particular column of a table depending upon value

Hi experts,
I have developed a custom smartform and Print program.
My problem is ..depending upon the data i recieve,...i have to hide a particular column.
For example ... i have a table with 2 rows...one header and main row..This table has 3 column.
I have to hide one of the column depending upon the data i recieve. So my output should have 2 rows and 2 columns.
Please help.

well vishwa u r right it wont work for multiple columns,
then i guess this shud work.
@thendral
U can try like this create the rows with single column
then print all ur text elements with spaces inserted manually between them with text editor then in conditions tab of the text elements specify ur condition according to what all u want to print.
кu03B1ятu03B9к

Similar Messages

  • How to set color for a particular column in advance table?

    How can we set the color of a particular column in advance table based on some parameter feteched from vo query in process request?

    i have tried the same way as mentioned in the post but ,its giving error
    java.lang.ArrayIndexOutOfBoundsException: 0
    processRequest code
    OAAdvancedTableBean table =
    (OAAdvancedTableBean)webBean.findIndexedChildRecursive("TimEntAdvtbl");
    if (table != null)
    System.out.println("table");
    OAColumnGroupBean daily =
    (OAColumnGroupBean)table.findIndexedChildRecursive("DailyColGrp");
    if (daily != null)
    System.out.println("daily col");
    OAColumnGroupBean ColGrp6 =
    (OAColumnGroupBean)table.findIndexedChildRecursive("ColGrp6");
    if (ColGrp6 != null)
    System.out.println("ColGrp6");
    OAColumnBean SatCol =
    (OAColumnBean)webBean.findIndexedChildRecursive("SatCol");
    if (SatCol != null)
    System.out.println("col");
    OAMessageTextInputBean sat1 =
    (OAMessageTextInputBean)SatCol.findIndexedChildRecursive("sat");
    if (sat1 != null)
    System.out.println("sat1");
    OADataBoundValueViewObject csssat= new OADataBoundValueViewObject(sat1,"Color");
    sat1.setAttributeValue(oracle.cabo.ui.UIConstants.STYLE_CLASS_ATTR, csssat);
    Error Page
    ## Detail 0 ##
    java.lang.ArrayIndexOutOfBoundsException: 0
         at oracle.sql.NUMBER._fromLnxFmt(NUMBER.java:3199)
         at oracle.sql.NUMBER.toString(NUMBER.java:761)
         at oracle.sql.NUMBER.stringValue(NUMBER.java:2090)
         at oracle.jbo.domain.Number.toString(Number.java:390)
         at oracle.apps.fnd.framework.webui.OADataBoundValue.formatObject(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValue.convertValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValue.convertValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValueViewObject.convertValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValue.getValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OADataBoundValueViewObject.getValue(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.getAttributeValueImpl(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean.getAttributeValueImpl(Unknown Source)
         at oracle.cabo.ui.BaseUINode.getAttributeValue(Unknown Source)
    Please help

  • How to get the column name and table name with value

    Hi All
    I have one difficult requirement
    I have some column values and they have given some alias column names but i need to find the correct column name and table name from the database.
    For example value is "SRI" and i dont know the table and exact column name so is there any possibilities to find the column name and table name for the given value
    Thanks & Regards
    Srikkanth.M

    Searching all the database for a word...
    Courtesy of michaels...
    michaels>  var val varchar2(5)
    michaels>  exec :val := 'as'
    PL/SQL procedure successfully completed.
    michaels>  select distinct substr (:val, 1, 11) "Searchword",
                    substr (table_name, 1, 14) "Table",
                    substr (t.column_value.getstringval (), 1, 50) "Column/Value"
               from cols,
                    table
                       (xmlsequence
                           (dbms_xmlgen.getxmltype ('select ' || column_name
                                                    || ' from ' || table_name
                                                    || ' where upper('
                                                    || column_name
                                                    || ') like upper(''%' || :val
                                                    || '%'')'
                                                   ).extract ('ROWSET/ROW/*')
                       ) t
    --        where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
           order by "Table"or
    11g upwards
    SQL> select table_name,
           column_name,
           :search_string search_string,
           result
      from (select column_name,
                   table_name,
                   'ora:view("' || table_name || '")/ROW/' || column_name || '[ora:contains(text(),"%' || :search_string || '%") > 0]' str
              from cols
             where table_name in ('EMP', 'DEPT')),
           xmltable (str columns result varchar2(10) path '.')
    TABLE_NAME                     COLUMN_NAME                    SEARCH_STRING                    RESULT   
    DEPT                           DNAME                          es                               RESEARCH 
    EMP                            ENAME                          es                               JAMES    
    EMP                            JOB                            es                               SALESMAN 
    EMP                            JOB                            es                               SALESMAN 
    4 rows selected.

  • Can we hide column in a query depending upon the variable selected

    Hi all,
    let us say my report have 10 column.
    now i am giving user option to select the values (let us say 'a' or 'b')
    columns must be displayed depending upon the value selected by user ..
    for example if user has selected 'a' then first five columns should be displayed..and if user has selected 'b' last five column should be displayed..(it will be OK even if we can hide the columns depending upon the selection )
    Is it possible in BEx...please let me know

    I did it sometime back. A bit complicated process.
    Create an infoobject, manually enter the values "keyfig1" and "keyfig2".
    Include this infoobject in the filters and restrict it using a "ready for input" variable.
    Now create two formula variables.
    Write a customer exit such that when you select "keyfig1", first formula variable's value should be set to 1 and other one's to 0.
    Then in the query create two calculated key figures, multiply both with the formula variable. Also supress column (all active value == 0).
    Then it will show the key figure which you have selected.
    Pravender

  • Need help to fit the records of a table into a particular region

    Hi All,
    Need help in getting the records of table to be fitted into a particular region provided for it. But in my case as the records increases the textbox below are moving down accordingly into next page that i dont want.  
    As shown in the below image i have to fit 22 no. of records in that given area only not disturbing the below textbox alignments.
    Thank in advance...
    Sreekanth Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem.*****

    Hello,
    In SSRS, Report items within a report can be
    kept together on a single page implicitly or explicitly by setting the keep with group or keep together properties.
    In your case, you can try to specify the "KeepTogether" property to True on the Table properties windows.
    If there are other report items  under or above the Table and you want keep all items on the single page, you can try to add a Rectangle and put all items into the Rectangle.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Need help in writing NVARCHAR2 column to an excel sheet

    Hi All,
    I have a NVARCHAR2 column in my table. I want to store the data present in the column into an excel file. When i write the data to an excel file the data is getting converted to some other form. It's not in human readable form.
    Language is not fixed for the column.
    I need help in storing the NVARCHAR2 data into an excel file without any implicit conversion done by the oracle.
    Please help.
    Thanks,
    Girish G
    Edited by: Girish G on Jul 14, 2011 2:02 AM

    Export data to BLOB (csv)

  • Need help on getting the column names of Tabletype

    I have a table Mapping with the following values: This Mapping table contains the table names (in Tabname) and the column names(colname) of various tables and values(ValuesTobeFilled) for the columns.
    I have to insert into the tables present in the Tabname field with the values present in the ValuesTobeFilled in the columns present in the Colname field.
    Note: The Mapping table need not contain all the columns of the base table. The columns that are not present can be filled with null. And this mapping table is not fixed i.e. rows can be inserted/deleted frequently.
    Sample values in mapping table:
    Tabname                        Colname        ValuesTobeFilled
    sample_items     Eno     Corresponding Expression to get the values from XML input
    sample_items     Ename     Corresponding Expression to get the values from XML input
    XXX     YYY     Corresponding Expression to get the values from XML input
    Before filling in the actual tables, I have to store the entire data temporarily and I have used a tabletype declared as follows:
    TYPE T_sample_items IS TABLE OF sample_items%ROWTYPE INDEX BY BINARY_INTEGER;
    l_sample_items T_sample_items;
    Where the table sample_items have the following columns:
    •     Eno
    •     Ename
    •     Eaddress
    •     Eemail
    So, the tabletype should be filled as:
    Eno     Ename     Eaddress     EEmail
    1     XXX     -     -
    I have declared a cursor to select the values from mapping table and I need to fill in the ValuesTobeFilled values to the corresponding table.
    CURSOR c_xpath (c_tname mapping.TABNAME%type)
    IS
    select * from mapping where tabname = c_tname;
    CURSOR c_tables
    IS
    SELECT DISTINCT TABNAME FROM mapping;
    FOR crsr IN c_tables
    LOOP
    p_tname := CRSR.TABNAME;
    FOR csr IN c_xpath(p_tname)
    LOOP
    IF l_xml_doc.EXISTSNODE(CSR.XPATH_EXP) = 1
    THEN
    l_node_value := l_xml_doc.extract(CSR.XPATH_EXP).getStringVal(); -- This is the value to be stored in the corresponding column
    ELSE
         l_node_value := NULL;
    END IF;
    IF CSR.COLUMN_NAME = ‘eno’
    THEN
         l_sample_items(1).eno := l_node_value;
    ELSIF CSR.COLUMN_NAME = ‘ename’
    THEN
         l_sample_items(1).name := l_node_value;
    END IF;
    END LOOP;
    END LOOP;      
    And I need to eliminate hard coding while comparing the column names (in the following piece of code) as the Mapping table values are subject to insertion/deletion:
    IF CSR.COLUMN_NAME = ‘eno’
    THEN
         l_sample_items(1).eno := l_node_value;
    ELSIF CSR.COLUMN_NAME = ‘ename’
    THEN
         l_sample_items(1).ename := l_node_value;
    END IF;
    I need to insert the values directly into the tabletype without this hardcoding. Please suggest me ways to compare the mapping table values with the field (column) names of the tabletype. If it is not possible using tabletype, please suggest any other ways of fixing the problem.
    Many thanks,
    Gopi

    I take it this isn't going to be a serious production system at the end of the day?
    Storing metadata in tables for extraction and insertion of data is just wrong in so many ways. It smells heavily of Entity Attribute Value modelling, which is the most wrong way to use a relational database and is known to have major performance implications and be liable to bugs and issues. The idea that EAV modelling allows for 'generic' databases where new data items can be added flexibly later on without having to change code is usually justified with an excuse of "it means we don't have to update all our tables when we want a new column" which is easily countered with "if you're adding a single column a good relational design wouldn't require you to add it to more than one table anyway in most cases".
    Just what exactly are you trying to do and why? There has to be a better way.

  • SQL Help -- Need help with pivoting the columns to rows

    I have a requierement to split the columns into multiple rows. For example:
    EMP_DEPT
    rowid empid1 ename1 dept1 empid2 ename2 dep2 empid2 ename2      dep3 empid4 ename4 dept4
    100001 1 'SCOTT' 10 2 'DAVE' 20 3 'MILLER'     10 4 SMITH 20
    100002 1 'SCOTT' 10 2 'DAVE' 20 3 'MILLER'     20      
    Note: EMP_DEPT may not always have all the 4 employee info populated for example in row 2 only 3 employees info is there
    I need to convert it and insert into EMPLOYEE table as follows:
    EMPLOYEE
    empid ename dept
    1 SCOTT 10
    2 DAVE 20
    3 MILLER 10
    4 SMITH 20
    1 SCOTT 10
    2 DAVE 20
    3 MILLER 20
    Thanks
    Kev

    Frank Thank You for your response.
    I am on oracle 10gR2.
    Posting some sample DDL and data here as requested:
    CREATE TABLE EMP
      PK          NUMBER(10),
      EMP_NAME1   VARCHAR2(100 BYTE),
      EMP_ID1     NUMBER(10),
      EMP_NAME2   VARCHAR2(100 BYTE),
      EMP_ID2     NUMBER(10),
      DEPT_NAME1  VARCHAR2(200 BYTE),
      DEPT_ID1    NUMBER(10),
      DEPT_NAME2  VARCHAR2(200 BYTE),
      DEPT_ID2    NUMBER(10)
    CREATE TABLE EMP_DEPT
    ( PK NUMBER(10),
    ENTY_TYPE VARCHAR2(100),
    ENTY_NAME VARCHAR2(100),
    ENTY_ID NUMBER(10)
    Insert into EMP
       (PK, EMP_NAME1, EMP_ID1, EMP_NAME2, EMP_ID2, DEPT_NAME1, DEPT_ID1, DEPT_NAME2, DEPT_ID2)
    Values
       (1, 'SCOTT', 10001, 'FRANK', 10002,
        'MARKETING', 10, 'ACCOUNTING', 20);
    Insert into EMP
       (PK, EMP_NAME1, EMP_ID1, EMP_NAME2, EMP_ID2, DEPT_NAME1, DEPT_ID1)
    Values
       (2, 'SCOTT1', 10003, 'FRANK1', 10004,
        'MARKETING1', 30);
    COMMIT;
    SELECT
    FROM
    EMP;
    PK     EMP_NAME1     EMP_ID1     EMP_NAME2     EMP_ID2          DEPT_NAME1     DEPT_ID1     DEPT_NAME2     DEPT_ID2
    1     SCOTT          10001     FRANK          10002          MARKETING     10          ACCOUNTING     20
    2     SCOTT1          10003     FRANK1          10004          MARKETING1     30               My requirement is to:
    SELECT from emp and INSERT INTO EMP_DEPT so that columns are broken into rows as follows
    PK ENTY_TYPE, ENTY_NAME    ENTY_ID
    1  EMPLOYEE   SCOTT        10001
    2  EMPLOYEE   FRANK        10002
    3  DEPARTMENT MARKETING    10
    4  DEPARTMENT ACCOUNTING   20    
    5  EMPLOYEE   SCOTT1       10003
    6  EMPLOYEE   FRANK1       10004
    7  DEPARTMENT MARKETING1   30          Thanks
    Kevin
    Edited by: user10210466 on Dec 8, 2010 1:37 PM

  • Need Get the count of Columns Of a Table!!!

    hi every one just simple question need help regarding the way to get the row count of a particular column and place the number of rows for Ex:if we have 5 rows then I have to place this 5 in a JList means having order as 1,2,3,.. one by one,anybody please help me out how it can be done
    JList list = new JList();
    String[] arr;
    int columnCount;
    while(rs.next()){
    // what should I have to write here
    list.add(arr);// Is this the correct way to add to the JList
    i think it is a bit wrong but do help me out how it can be done
    thanking you,
    with regards

    i think using getmetadata content may help

  • Reading particular column from internal table

    Hi
    I am having one internal table with one row. I know the column number. I want to read that particular column value. What should I add with the below statement.
    Read table itab index 1.
    This will give me the whole row. I want only the particular column.
    Please help me to solve this issue
    Thanks.

    Hi,
    FIELD-SYMBOLS <FS_ANY>
    ASSIGN COMPONENT N OF STRCUTURE OF WORKAREA TO <FS_ANY>
    WRITE <FS_ANY>
    Where n is the column number and workarea is the row of the internal table.
    Rgards,
    Ravi
    Note : Please mark the helpful answers

  • Hideing a Column in ALV Table which is Displaying the POWL Query data

    Hi SDNers,
    I want to hide a column of ALV Table which is displaying my POWL Query data in it and hideing should be based on the Role as well. i.e few of the role the column shoudl be hidden and few of the roles should have the Column visible.
    waiting for the Valueble Answers.
    Thanks & Regards,
    Govindu

    Hai Kris,
        I took help from ur link and i declared a global attribute request_number.
    and i created an event handler ON_ALV_INSERT and did the follwing coding for giving default value wen ever am inserting new row.
    FIELD-SYMBOLS: <wa_row> LIKE LINE OF r_param->t_inserted_rows.
      DATA bill_details TYPE REF TO zdom_bill_detail.
      LOOP AT r_param->t_inserted_rows ASSIGNING <wa_row>.
        bill_details ?= <wa_row>-r_value.
        IF bill_details->REQ_NUMBER IS INITIAL.
      DATA lo_nd_bill_detail TYPE REF TO if_wd_context_node.
      DATA lo_el_bill_detail TYPE REF TO if_wd_context_element.
      DATA ls_bill_detail TYPE wd_this->Element_bill_detail.
    navigate from <CONTEXT> to <BILL_DETAIL> via lead selection
      lo_nd_bill_detail = wd_context->get_child_node( name = wd_this->wdctx_bill_detail ).
    lo_el_bill_detail = lo_nd_bill_detail->get_element( index = <wa_row>-index ).
          lo_el_bill_detail->set_attribute(
            EXPORTING
              name  = 'REQ_NUMBER'
              value = wd_comp_controller->request_number
    Wen am  setting the value of wd_comp_controller->request_number to my context attribute am getting NULL object ref error.
    lo_el_bill_detail->set_attribute(
        name =  `REQ_NUMBER`
        value = wd_comp_controller->request_number ).
    Pls give some suggestions,
    Thanks in Advance,
    Nalla.B

  • Need help in stroring CLOB data into a table

    Hi All,
    I have a CLOB data. Which contains delimited data.
    Example:
    "111#|#ABC#|#asfsdffgh $|$222#|#XYZ#|#jdsfgdskdsf $|$"
    #|# - is column delimiter.
    $|$ - is row delimiter
    I want to extract and store the above data into a table which has 3 columns. Need help.
    I have Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    Thanks in advance,
    Girish G

    Hi Girish,
    Please go through the below url's...It will give you fair idea and solution. HOpe you know the sql *loader utility. or external table.
    http://www.oracle-base.com/articles/10g/LoadLobDataUsingSqlLoader.php
    http://www.oracle-base.com/articles/10g/ExternalTablesContainingLobData.php
    KPR.

  • How to make a particular record in a particular column in a table as a link

    Hi All,
    I have a table in which the data is getting populated from the response of the BAPI.
    I have a column in this table which is not related to the BAPI response. I am binding the column with locally created attribute which is related to the custom controller also.
    The name of this column is LINK. The records for this column is "click to view".
    According to the requirement,I have two webservices which I am suppose to use in the same table.
    So the "click to view" should be enbled for the records from one webservice and should be disabled for the other.
    Now I have successfully added the column LINK and the record for it is also"click to view" as i have set it.But its not acting as a link.
    So kindly help me out.Looking forward to you.
    Regards
    DK

    Hi Dipendra,
    You can dynamically change TableCellEditor as you want a LINK at one time and no LINK(i.e. TextView ) at other time.
    You can get the handle for your table with IWDTable interface and then get handle for your table column with IWDTableColumn. Once you get these you can change the TableCellEditor for that column at runtime.
    I would sugesst you to read <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7f531207-0301-0010-5f9c-8652a3232ae0">this</a> document for further details on how to set TableCellEditor at runtime etc.
    Hope this helps,
    Regards,
    Mausam

  • How to access the children of a particular column of af:table

    Hi
    I need to access and change the inputtext value, which is child of af:column of af:table(table rows dynamically change) , through javascript
    I tryed as fallows, but failed, can any one tell the answer
    <f:facet name="metaContainer">
    <af:group>
    <![CDATA[
    script>
    function isRowVisited(evt){
    var x=AdfPage.PAGE.findComponent('qstVisited');//this is the child of af:column
    alert(x);// showing as undifined
    x.setValue('yes')     ;
    </script>
    ]]>
    </af:group>
    </f:facet>
    <af:column width="60px" rendered="true">
    *<af:inputText id="qstVisited" value="1" clientComponent="true">*
    *</af:inputText>*
    <af:selectBooleanRadio text="yes" id="radioYes2" value="yes" group="qstGrp3" >
    <af:clientAttribute name="rowVisited" value="#{row.visited}" />
    <af:clientAttribute name="rowQuestion" value="#{row.name}" />
    <af:clientListener method="isRowVisited" type="click" />
    </af:selectBooleanRadio>
    <af:selectBooleanRadio text="No" id="radioNo2" value="No" group="qstGrp3" />
    </af:column>
    thnaks in advance
    GiriBabu

    Hi,
    see " Accessing the content of a selected table row" in http://thepeninsulasedge.com/frank_nimphius/adf-faces-rich-client-javascript-programming/ to get an idea. Note that the af:column child must have clientComponent=true set in its properties
    Frank

  • Need logic to update Varchar column in a table

    Hi,
    Could you give me logic for below.
    I have a table xx_dbc where one of the column Attribute1 is varchar2(240).
    Attribute1 has values like 
    ==================
    (AIN,PUP,GRI,NINE)
    (AIN,PUP)
    (AIN)
    (GRI,NINE)
    I have to update this column for every record with values AIN=10 , PUP=20 , GRI=30 , NINE=40
    Columns should be updated like below
    (10,20,30,40)
    (10,20)
    (10)
    (30,40)
    Thanks.

    Hi,
    Here's one way:
    WITH  replacements  AS
        SELECT  'AIN' AS old_str, '10' AS new_str  FROM dual  UNION ALL
        SELECT  'PUP',            '20'             FROM dual  UNION ALL
        SELECT  'GRI',            '30'             FROM dual  UNION ALL
        SELECT  'NINE',           '40'             FROM dual
    ,    normalized_data  AS
        SELECT  p_key
        ,       LEVEL               AS sort_key
        ,       REGEXP_SUBSTR ( attribute1
                              , '[^(,)]+'
                              , 1
                              , LEVEL
                              )     AS str
        FROM    xx_dbc
    --  WHERE   ...     -- If you need any filtering, put it here
        CONNECT BY   LEVEL              <= 1 + REGEXP_COUNT (attribute1, ',')
                AND  PRIOR p_key        = p_key
                AND  PRIOR SYS_GUID ()  IS NOT NULL
    SELECT    '(' || LISTAGG ( NVL (r.new_str, n.str)
                             ) WITHIN GROUP (ORDER BY sort_key)
                  || ')'  AS  new_attribute1
    ,         n.p_key                         -- If wanted
    FROM             normalized_data  n
    LEFT OUTER JOIN  replacements     r  ON  r.old_str  = n.str
    GROUP BY  n.p_key
    ORDER BY  n.p_key
    Like everything else, it depends on your Oracle version.
    In the query above, p_key can be any unique key from xx_dbc, including attribute1 or ROWID.
    Relational databases, like Oracle, work best when each column of each row contains only 1 piece of information, not a delimited list of any number of pieces.  This is so fundamental to table design that it's called First Normal Form.  Most of the work in this problem involves converting your denormalized data into First Normal Form, and then converting it back again.  This problem, like many others, would be much simpler and more efficient if your table was in First Normal Form.
    The query above assumes the replacement strings (such as 'AIN' and '10') are not already in a table.  If they are, or if they can be derived from a table, then you don't need the replacements sub-query; use your real table instead.

Maybe you are looking for

  • Reading files from ZIP in memory

    Hi, I need to extract some files from a ZIP archive which will be in memory, accessed with an InputStream (ByteArray). As ZIP files are likely to be large, I'd like to have some sort of "random access" in the way java.util.ZipFile does, allowing me t

  • Financial extension sets and flb1 post processing items are not there

    "Forum moderators, if you reject this post please tell me exactly what is incorrect about it in your rejection message". Hello experts, We are currently in 4.7 and have activated financial extension set EA-FIN.  I tested electronic lockbox programs b

  • Edit does not appear in upper right corner of the main screen in camera roll of my iPhone 4S.

    Edit does not appear in upper right corner of the main screen in camera roll of my iPhone 4S. My software is the latest ver. 6.1.3 and I know it is supposed to be there because we have other iPhone 4S phones and it is there on them.

  • Invalid column name (with ojdbc)

    hi, I created a resultSet by executing query with more then one table in it. (left join) and now i want to getObject. so I execute resultSet.getObject("tablename.columnName") and I get this error "invalid column name". when i'm doing the same thing w

  • Writing lead-out problem ...?

    Howdy All, I am using iDVD6 to burn a project to RIDATA DVD+R DL discs. The burn in iDVD6 90% of the time fails at the end (no error logs). However, after playing the DVD on a number of players (computer and dedicated) the DVD seems to be fine (all a