Setting columns to invisible in a cl_salv_table

Hello,
I'm using a cl_salv_table to display data in a popup and I'm trying to set most columns to invisible.
I've used in some cases:
cl_salv_column->set_visible
However in the current situation, I have too many columns to hide (I only need to display 2 columns from a total of 125).
So, is there any way to hide all columns?
I've seen in another post ([hiding columns in ALV Grid output;) a possible solution, which is using the method SET_COLUMNS_INVISIBLE of class CL_GUI_ALV_GRID. But I don't know how I am supposed to use this method with my cl_salv_table class.
Thanks for any help you can provide =)
Regards,
Cris

Hi,
U can make column invisble as  set_visible (' ').
For example,
data:  w_column TYPE REF TO cl_salv_column,
w_columns TYPE REF TO cl_salv_columns_table,
     w_column ?= w_columns->get_column( 'M' ).
      w_column->set_medium_text( 'Material' ).
      w_column->set_long_text( 'Material' ).
      w_column->set_output_length( 20  ).
      w_column->set_visible( ' ' ).
For class cl_gui_alv_grid, u have to build catlog as
data:wa_fieldcat TYPE lvc_s_fcat,
it_fieldcat TYPE TABLE OF lvc_s_fcat,
  CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = 'M'.
    wa_fieldcat-coltext = 'Material.
   wa_fieldcat-NO_OUT = 'X'.
    APPEND wa_fieldcat TO it_fieldcat.
Thanks & Regards,
Anagha Deshmukh

Similar Messages

  • Spry select list code to wire it to html data table SET column?

    I am making a page based on Figure 15-14, Pg 878, in David Power's book, "Dw CS4 with CSS, Ajax and PHP. I have two separate html data tables hidden in the page, one for the specialties drop down select list and the other for the teachers master/detail regions. These are populated with php and working well. The spry select list and master/detail regions are working great except for one issue. The column in my html data table that is being filtered ("Specialty" in my code = 'Category' in the book's example code) is a SET column (with possible value of 1, 2, 3, 4, and/or 5). Clicking on the drop down menu brings up the records with a single value beautifully. The result for records with multiple values is a spry error "Invalid row number: 0". After four different versionings and methods of messing with this, I still haven't a clue. Please help me with how to rewire the Spry select list code so that it will read the records that have multiple items in that column. I have included the code below.
    var data_set_teachers = new Spry.Data.HTMLDataSet(null, "teacher_data");
    data_set_teachers.gallery = '1';
    function chooseSet(dataSet, row, rowNumber)
    if (row["Specialty"] == data_set_teachers.gallery) {
       return row;
    return null;
    data_set_teachers.filter(chooseSet);
    function changeSet(set)
    data_set_teachers.gallery = set;
    data_set_teachers.filter(chooseSet);
    data_set_teachers.setCurrentRowNumber(0);
    var rows = data_set_teachers.getData();
    for (var i = 0; i < rows.length; i++) {
       if (rows[i]["Specialty"] == set) {
         data_set_teachers.setCurrentRowNumber(i);
         break;
    var data_set_specialties = new Spry.Data.HTMLDataSet(null, "specialty_data");

    Well I'll be damned!
    What's done in the sample app is, of course, the intuitively obvious choice and is exactly what I started out trying to do the first time round.
    But as I mentioned before, when I first tried it (yes: I'm pretty sure I set the "for" attribute on the inlineMessage components), I got the non-unique component id exception for the inlineMessage component(s) after adding the second (but not the first) row to the page.
    Anyway, after dragging my inlineMessages to the exact same position as those in the AppModel example, now things work fine (except I think I'd like a line break before the message and to change the row/column styles so the values and messages line up properly...the look is rather ugly in the AppModel example when there are validation messages displayed).
    Not sure, but I'm thinking maybe there was an issue with where the inline message markup was placed, my first time through, relative to the data table value bound component and the column header facet?
    I was using the application view drag 'n drop feature the first time round and dragged the inlineMessage component to the spot just below the data table value bound component and hence just above the column header facet. In the AppModel example, OTOH, the inline messages are placed just after the column header facet.
    Of course, I will now try to duplicate the original exception.
    If I can (and it is an issue with placement), I will post back some sort of bug report or RFE. Otherwise, I'll post back declaring what a bone head I've been...;-)
    Anyway, thanks for the quick response, v.
    Campbell

  • How do I get and set column attributes in a table or a treetable with Java?

    Using 11.1.1.4.0
    Hi,
    How do I get and set column attributes in a table or a treetable with Java? For a simple example, say I have a table and want certain roles to see all columns (including address), and other roles can see only certain columns (no address). In a Java method, I want to test if a table's column visible attribute is true and if so, set it to false before rendering it.
    Thanks in advance,
    Troy

    Hi,
    this use case would be a perfect example for using seeded MDS customization. Instead of checking what users are allowed to see or not upon rendering time, you have a customization class and thus the framework doing this for you.
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/31-mds-sample-169173.pdf
    In this paper and sample, specific users see different layouts. It also contains a customization class that shows how this can leverage ADF Security
    Frank

  • Display Document Set Columns Within The Document Set

    Hello all! Hopefully you all can let me know if the idea I have in my head is possible:
    Background: I have a Document Library with a custom made Document Set that has about 15 columns. The way I initially designed this, I left about 10 of the fields as "Hidden" because we didn't want the user to fill out that information
    when creating a Document Set. That information would be completed in the next step through a Workflow. The Document Set Welcome Page has been left pretty much untouched with the usual web parts for Document Set Properties and the view of the items within the
    Document Set.
    Question: What I would like to know is...would it be possible to display those Document Set fields within the Document Set itself? At the moment, if I try to add another Document Library web part and view it, the information web part is
    empty, or it contains information about one of the items within the Document Set.
    Simplified Structure of Document Set:
    Name (required)
    Fiscal Year (Required)
    Total Cost (Required)
    Approval Date (Hidden)
    Requisition # (Hidden)
    Team Members (Hidden)
    Reminder Date (Hidden)
    User creates a new Document Set, fills out the information, and saves (this triggers a background workflow that approves the Document Set). After approval, a new workflow is started to provide the information for the Hidden fields (and also schedules a reminder
    for that Reminder date.)
    The goal would be to display those Hidden fields in another web part on the page. Right now, I have users going back up to the main level of the Document Library to look at a view that contains those fields.
    Hopefully I haven't confused you all too much! Please let me know if my idea is possible and any resources you might have!
    Thanks!
    Toni
    Toni Marie

    Here is the approach to read document set columns and assign to other webparts:
    for each document set you can find the id when you clicking on the document set or navigating to the welcome page,
    using this id read query string and  the associated item column values and assign to otherwebpart .
    Reference code:
    //page_load for other webpart read the query string of welcome page
    if (Page.Request.QueryString["ID"] != null)
                    ID = Convert.ToInt32(Page.Request.QueryString["ID"]);
                    if (itemID > 0)
                        GetDocumentSetItem(ID , site);
      protected void GetDocumentSetItem(int itemid, SPSite sSiteUrl)
                SPSite site = sSiteUrl;
                SPWeb web = site.OpenWeb();
                SPList list = web.Lists.TryGetList("DocumentlibraryName"); //where documentset content type attached
                SPListItemCollection items = list.GetItems();
                SPListItem item = null;
                if (itemid > 0)
                    item = list.Items.GetItemById(itemID);//getting the current item
       //read the document set item column values and assign it other webpart controls , 
                    txtDocsetidname.Text = Convert.ToString(item["FileLeafRef"]);
                    txtDocsetid.Text = Convert.ToString(item["hiddenfield"]);
    In the welcome page I have placed button to load webpart ,while loading the webpart I am reading the query string assigning the values to otherwebparts.
    G1

  • Setting Column Names in Dynamic Pivot Query

    Hi all,
    I'm having trouble setting column names in a dynamic pivot query and was wondering if someone could please help me figure out what I need to do.
    To help you help me, I've setup an example scenario in my hosted account. Here's the login info for my hosted site at [http://apex.oracle.com]
    Workspace: MYHOSTACCT
    Username : DEVUSER1
    Password : MYDEVACCTAnd, here is my test application info:
    ID     : 42804
    Name   : dynamic query test
    Page   : 1
    Table 1: PROJECT_LIST         (Alias = PL...  Listing of Projects)
    Table 2: FISCAL_YEAR          (Alias = FY...  Lookup table for Fiscal Years)
    Table 3: PROJECT_FY           (Alias = PF...  Intersection table containing project fiscal years)
    Table 4: PROJECT_FY_HEADCOUNT (Alias = PFH... Intersection table containing headcount per project and fiscal year)Please forgive the excessive normalization for this example, as I wanted to keep the table structure similar to my real application, which has much more going on.
    In my sample, I have the "Select Criteria" region, where the user specifies the project and fiscal year range that he or she would like to report. Click the Search button, and the report returns the project headcount in a pivoted fashion for the fiscal year range specified.
    I've got it working using a hard-coded query, which is displayed in the "Hardcoded Query" region. In this query, I basically return all years, and set conditions on each column which determines whether that column should be displayed or not based on the range selected by the user. While this works, it is not ideal, as there could be many more fiscal years to account for, and this is not very dynamic at all. Anytime a fiscal year is added to the FISCAL_YEAR table, I'd have to update this page.
    So, after reading all of the OTN SQL pivot forums and "Ask Tom" pivot thread, I've been able to create a second region labeled "Dynamic Query" in which I've created a dynamic query to return the same results. This is a much more savvy solution and works great; however, the column names are generic in the report.
    I had to set the query to parse at runtime since the column selection list is dynamic, which violates SQL rules. Can anyone please help me figure out how I can specify my column names in the dynamic query region to get the same column values I'm getting in the hardcoded region?
    Please let me know if you need anymore information, and many thanks in advance!
    Mark

    Hi Tony,
    Thanks so much for your response. I've had to study up on the dbms_sql package to understand your function... first time I've used it. I've fed my dynamic query to your function and see that it returns a colon delimited list of the column names; however, I think I need a little more schooling on how and where exactly to apply the function to actually set the column names in APEX.
    From my test app, here is the code for my dynamic query. I've got it in a "PL/SQL function body returning sql query" region:
    DECLARE 
      v_query      VARCHAR2(4000);
      v_as         VARCHAR2(4);
      v_range_from NUMBER;
      v_range_to   NUMBER;         
    BEGIN
      v_range_from := :P1_FY_FROM;
      v_range_to   := :P1_FY_TO;
      v_query      := 'SELECT ';
      -- build the dynamic column selections by looping through the fiscal year range.
      -- v_as is meant to specify the column name as (FY10, FY11, etc.), but it's not working.
      FOR i IN v_range_from.. v_range_to  LOOP
        v_as    := 'FY' || SUBSTR(i, 3, 4);
        v_query := v_query || 'MAX(DECODE(FY_NB,' || i || ',PFH_HEADCOUNT,0)) '
          || v_as || ',';
      END LOOP;
      -- add the rest of the query to the dynamic column selection
      v_query := rtrim(v_query,',') || ' FROM ('
        || 'SELECT FY_NB, PFH_HEADCOUNT FROM ('
        || 'SELECT FY_ID, FY_NB FROM FISCAL_YEAR) A '
        || 'LEFT OUTER JOIN ('
        || 'SELECT FY_ID, PFH_HEADCOUNT '
        || 'FROM PROJECT_FY_HEADCOUNT '
        || 'JOIN PROJECT_FY USING (PF_ID) '
        || 'WHERE PL_ID = ' || :P1_PROJECT || ') B '
        || 'ON A.FY_ID = B.FY_ID)';
      RETURN v_query;
    END;I need to invoke GET_QUERY_COLS(v_query) somewhere to get the column names, but I'm not sure where I need to call it and how to actually set the column names after getting the returned colon-delimited list.
    Can you (or anyone else) please help me get a little further? Once again, feel free to login to my host account to see it first hand.
    Thanks again!
    Mark

  • Setting column width in a command-line program

    Is there a way to send data to the screen in a command-line Java program that will be formatted as a number
    of columns with a set column width? I am looking for something similar to the C++ setw() I/O manipulator
    used in cout.
    Thanks,
    Steve

    If you go to: http://java.sun.com/docs/books/tutorial/essential/io/writingFiltered.html
    it will show you how to subclass a filtered output stream and add your own formatting methods.Then you can chain your new class to System.out
    like this:
    YourFilteredStream yfs = new YourFilteredStream(System.out); .
    Then:
    yfs.yourNewMethod(); goes directly to system out in the new format.

  • How to dynamically set column name in Answers

    Hi.
    How to dynamically set column name in Answers, for example I want to put presentation variable in column header. Is this possible?
    Regards,
    Goran Ocko
    http://108obiee.blogspot.com/

    May be a rude way .. but it works.
    Add narrative view and use Java script to change the column headings based on the variables.
    <script language="javascript" type="text/javascript">
    var a = document.getElementById('idResultsTableParent');
    var rows= a.getElementsByTagName('tr');
    rows[1].cells[1].innerText ="@{Presentation Variable}";
    </script>
    Editing the same post to remove irrelevant information.
    - Girish

  • Set Column width in query (not using SQL*Plus)

    How can I Set Column width in query
    I understand you can set column width using
    column col1 FORMAT A5
    select col1 from table1;But this only works in SQL*Plus
    I want to be able to do this in a regular SQL query window (not in SQL*Plus), how can I do it.....
    I am using a 'SQL window' in PL/SQL Developer IDE
    and when I use this syntax it says:
    ORA-00900: Invalid SQL statement
    Any suggestions are appreciated...
    thanks,
    M.

    Did you try using RPAD or LPAD functions? They fill the unfilled part of a string with character you provide... either on right or left side depending on what function you use.
    e.g.
    SELECT RPAD('Smith', 10, ' ') Name FROM dual;http://www.adp-gmbh.ch/ora/sql/rpad.html
    Edited by: Zaafran Ahmed on Nov 10, 2010 11:50 AM

  • How to set column widths in tables for selected table only, not globally throughout document?

    I've been utilizing the below script (thank you so much Ramkumar. P!) to set column widths throughout a sizable InDesign book with tables on every page and it is truly a time saver. At this point in time, I have three versions of it because there are different column widths throughout the book. Is it possible to augment the script to run only on a selected text frame (containing a table)? If so, would someone be kind enough to share the augmented script with me? I've been trying to figure out this seemingly simple change through trial and error with no success as yet. I realize this is a totally newbie request and I'm entirely at the mercy of the kindness of the Javascript gods that contribute within this forum. Seeing that in a different post related to this script, one such guru responded to a request as simple as "Where do I put the scripts in InDesign" gave me enough courage to ask for some help! Thank you in advance to anyone willing to provide a solution.
      var myDoc = app.activeDocument;
         var myWidths = [100, 100, 150, 150];
         for(var T=0; T < myDoc.textFrames.length; T++){
             for(var i=0; i < myDoc.textFrames[T].tables.length; i++){
                 for(var j=0; j < myWidths.length; j++){
                     myDoc.textFrames[T].tables[i].columns[j].width = myWidths[j];
         alert("Table width updated successfully...");

    Hello all
    I have the same problem in that I'm not a scripting person, but was able to get the above script working without problem, and it does set irregular table column widths perfectly, so thanks to Ramkumar. P for that.
    BUT, it changes the column width for ALL tables in the document, whereas I would like to just target the selected table.
    Any ideas as to how I might amend this script to achieve this?
    Thx, Christian

  • How to set a layer invisible?

    Hi guys,
    Can you tell me how to set a layer invisible? Thanks.

    function hideAllLayers()<br />{<br />     forEach(document.layers, function(layer) {<br />          layer.visible = false;<br />     });<br />}<br /><br />function showAllLayers()<br />{<br />     forEach(document.layers, function(layer) {<br />          layer.visible = true;<br />     });          <br />}<br /><br />function forEach(collection, fn)<br />{<br />     var n = collection.length;<br />     for(var i=0; i<n; ++i)<br />     {<br />          fn(collection[i]);<br />     }<br />}

  • Left border in a DataGrid column is invisible

    I have created a DataGrid as below, but the left border of the Unit column is invisible.
    I have checked the datagrid properties but does not seem to find any property that affect this,
    Any help is appreciated.  Thanks in advance!
    aobsz

    Your renderer code looks a little strange. This works, and
    may get you started:

  • PHP - MySQL - SET column

    In my sql database I have a set column that works fine.  The user can select multiple options.  However, I am having trouble displaying those options using the record set in dreamweaver.  I want the recordset to find any one of the possible options and display the record, but it's not displaying anything.  Am I missing something here?

    OK, my bad. So a SET is sort of a user defined datatype, where the developer sets the allowable values of the column?  The thing that troubled me is that the example the reference guide gives shows it being used to store multiple values as in the last line here:
    For example, a column specified as SET('one', 'two')         NOT NULL can have any of these values:
    'one'
    'two'
    'one,two'
    So that's not really a problem inherent in a SET column, just a way that it can be misused like any other string column.
    David_Powers wrote:
    bregent wrote:
    I'll just put in my $0.02 that +99% of the time using a SET to store more than one piece of data in a database field is a bad idea. It violates rules of normalization and makes data analysis very difficult.
    Not really. A SET column in MySQL doesn't violate the rules of normalization. It's actually a shorthand way of creating a lookup table - or a linking table, since it creates a many-to-many relationship. Internally, MySQL simply stores a numerical reference to each value. In other words, behind the scenes it's storing a bunch of foreign keys.
    The way you search for a particular option stored in a SET column is to use the MySQL function, FIND_IN_SET().
    SELECT * FROM mytable
    WHERE FIND_IN_SET('whatever', column_name)

  • [SOLVED] set columns in vim does not work

    I would like to set the window size of my vim to 95 when working with markdown files, so put
    set columns=95
    into an autosourced file when opening Markdown files. Unfortunately this has no effect and when I look at
    set columns?
    the window size is still 179 characters long.
    When I try to do
    set columns=95
    with vim already open, vim very shortly resizes the text/window, but after a second return to the original size which is 179 character (screen width)
    I tried ot figure out if it is a problem of my .vimrc by temporaliy working with a new empty .vimrc but the problem remains the same. I tried it out in another terminal emulator, but the problem remains the same. I tried it out logged in as root user before starting the XServer and here it worked as expected. So my gues is it has to do or with a X setting or with my window manager or with my shell.
    I am using i3, urxvt and zsh in the context where it didn't work and the Arch install default setting in the context where it works. Still I have no clue what causes the problem.
    Last edited by cutuchiqueno (2013-12-05 12:18:36)

    x33a wrote:I believe you'll need to float urxvt in i3 to do that.
    Thanks, I haven't thought of that possibility and it works. Although what I wanted to achieve is not possible with this solution though I found the Vimroom plugin which did the job, so thanks again.

  • VF03 - Userexit to make column details invisible

    Dear techies,
    Following is my requirement in tcode VF03 & VF02:
    In line item details, i need to make data in column 'COST' invisible.
    I have gone through all userexits avaliable for tcode VF02 nad VF03. But none of them satisfies my requirement.
    Please let me know if there is any BADI, screen exit or any other way to make the data in that particular column invisible.
    Thanks and regards,
    Bharati

    hi bharati,
    this can be done using SHD0 transaction variants ..
    enter shd0 ,enter tcode-vf02,transaction name as zvf02 and enter this takes u to tht screen enter some doucment number and press enter this popups screen variant of tht screen , press continue,this again takes u to inside screen ... here again press enter this gives u screen variants of tht screen ...here in the screen variant u can find invisible option for different coloumns ... check which coloumn u want and select and mark invisible...
    after this exit and save as local object ...and test. .. follow the same with VF03 also
    kindly check nd revert back ..
    regards
    pushpa

  • How to set column size in sqlplus.exe ?

    SQL> select * from dba_cons_columns where user='USER1' and table_name='PARENT1';
    OWNER                          CONSTRAINT_NAME
    TABLE_NAME
    COLUMN_NAME
      POSITION
    USER1                          PARENT1_PK
    PARENT1
    COL2
             2
    OWNER                          CONSTRAINT_NAME
    TABLE_NAME
    COLUMN_NAME
      POSITION
    USER1                          PARENT1_PK
    PARENT1
    COL1
             1doesn't it seems bit ugly to see these data.Why length of columns is so long ?please tell how to set the length of columns and other parameters so that data that is displayed should come out in screen in a well managed and beautiful way.
    Like this:
    OWNER     CONSTRAINT_NAME     TABLE_NAME       COLUMN_NAME   POSITION
    USER1        PARENT1_PK              PARENT1             COL2                  2
    USER1        PARENT1_PK              PARENT1             COL1                  1I have written this by hand. How to get display in sqlplus.exe ?

    This command sets column size for all forthcoming commands. Suppose there is select command for different columns, and i want to set different size for different columns. e.g.,select name,address,zone from table1;
    How can i set column size for name to (say) 20 char, address to 30 char and zone to 3 char ?
    You need to do it in some sort of sql script which would set the column formatting before the query would start and then would clear the formatting after the query gets finished. See an example below,
    SQL> column ename format a20 heading emp_name
    SQL> select ename from emp
      2  ;
    emp_name
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    emp_name
    JAMES
    FORD
    MILLER
    14 rows selected.
    SQL> column ename clear
    SQL> select ename from emp;
    ENAME
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    ENAME
    JAMES
    FORD
    MILLER
    14 rows selected.
    SQL>So likehtis you have to format all the columns on individual lines and then clear the fomattings of each once th query isdone.
    HTH
    Aman....

Maybe you are looking for

  • Can two iPhones with different iSO get synchronized via the same iTunes?

    Me and my wife have two iPhones 3S, sharing the same iTunes store account, which get usually synchronized via iTune 9.2. Now, I want to upgrade my iPhone to iSO4, while my wife is quite happy to momentarily stay with iSO 3.1.3. The question is will s

  • How do I get safari to open a pdf in window.

    How do I get safari to open a pdf in the browser window. A while ago I turned it off by typing  defaults write com.apple.Safari WebKitOmitPDFSupport -boolean yes   into the terminal. Basically how do I undo that command

  • Why are my alarms for my ical not going off

    I have alarms set to go off for several ical events.  I have tried many files to be the alarm form my itunes, but im not sure why they are not working, and my daily alarm clock is not going off.  I have tried several different times also

  • Bex opening error

    Hello BW Experts, While opening Bex, First I got the message that the Bex Macro signature is expired or not valid. And then second time I try to open it I get the following message. 1) from programs menu: 'The document sapbex.xla caused a serious err

  • AFP Shares

    Hi. I am experiencing a lot of problems with MAC OSX mountain lion and network shares, maybe someone here can help me. I have a freenas installed where I keep all my multimedia files (i.w. photos, musics, etc...) and I have 2 users on Mac that I norm