How to Freeze all columns in OO ALV.

Hi Guys,
    I don't want the user to drag one column from one position to another position.How to attain this in OO ALV.
Thanx in advance.
Regards,
Anji

You can probably use the FIX_COLUMN field when building your field catalog.  For every column set this to "X".
  clear: ls_fcat.
  ls_fcat-reptext    = 'Created By'.
  ls_fcat-fieldname  = 'CRUSR'.
  ls_fcat-ref_table  = 'I_ALV'.
  ls_fcat-outputlen  = '12'.
<b>  ls_fcat-fix_column = 'X'.</b>
  append ls_fcat to fieldcat.
Regards,
Rich Heilman

Similar Messages

  • 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 to bring all columns in a single/first page in report painter

    Hi Experts,
    There are 9 columns in a report painter which includes 1 lead column.
    7 columns comes in a first page including lead column and rest 2 columns goes to second page. This report is copied from another report where all columns comes in a first page only. if the original report comes in one page then why not the new report.
    Please suggest how to bring all columns in a single/first page in the new report.
    Please revert if I'm confused anywhere.
    Thanks in advance
    Arabinda

    Hi Rajneesh,
    Thanx for the quick reply. When I change the column width to 10 it comes in one page. But the requirement is to keep the column width to at least 12 or 14 and moreever the original report from where this report is copied having the same no of columns and the column width for original report is 14 and it comes in one page only.
    Do I need to do something more to achieve this. My question is how the original reports data comes in one page where as the current report having issue with same number of columns.
    Pls suggest.
    Thanx,
    Arabinda

  • How to freeze a column in numbers with ipad

    Wondering how to freeze a column in numbers on the ipad. Anybody know?

    You can also set the lockedColumnCount property in the mx:DataGrid as well:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:DataGrid id="dg3" lockedColumnCount="1" horizontalScrollPolicy="auto" width="300">
            <mx:dataProvider>
                <mx:ArrayCollection>
                    <mx:Object c1="1" c2="one" c3="ONE" c4="OnE" c5="The quick brown" />
                    <mx:Object c1="2" c2="two" c3="TWO" c4="tWo" c5="Fox jumps over" />
                    <mx:Object c1="3" c2="three" c3="THREE" c4="ThReE" c5="The lazy dog" />
                </mx:ArrayCollection>
            </mx:dataProvider>
        </mx:DataGrid>
    </mx:Application>
    Peter

  • How to remove all columns and cells in numbers

    how to remove all columns and cells in numbers

    Click on the Table's icon in the Sheets list. Press delete.
    Done.
    Regards,
    Barry

  • How to return all columns starting with E?

    How to return all columns starting with E in emp table?
    My attempts (below) were unsuccessful.
    SQL> SELECT E* from emp;
    SELECT E* from emp
    ERROR at line 1:
    ORA-00936: missing expression
    SQL> SELECT E.* FROM EMP;
    SELECT E.* FROM EMP
    ERROR at line 1:
    ORA-00904: "E": invalid identifier
    SQL> SELECT EMP.E* FROM EMP;
    SELECT EMP.E* FROM EMP
    ERROR at line 1:
    ORA-00936: missing expression

    You need to do it dynamically:
    SQL>  var cur refcursor
    SQL>  declare
      co varchar2(40);
    begin
      for c in (select column_name from cols where table_name = 'EMP' and column_name like 'E%') loop
        co := co || c.column_name || ',';
      end loop;
      open :cur for 'select '|| rtrim(co,',') || ' from emp';
    end;
    PL/SQL procedure successfully completed.
    SQL>  print cur
         EMPNO ENAME    
          7369 SMITH    
          7499 ALLEN    
          7521 WARD     
          7566 JONES    
          7654 MARTIN   
          7698 BLAKE    
          7782 CLARK    
          7788 SCOTT    
          7839 KING     
          7844 TURNER   
          7876 ADAMS    
          7900 JAMES    
          7902 FORD     
          7934 MILLER   
    14 rows selected.

  • How to freeze the columns in excel exported from SSRS report??

    We have created a report for our client. The client wants the report in excel format. As there are nearly about 30,000 rows in the excel. Client wants us to freeze the column header names in the excel so that even after scrolling down they
    will be able to see the column names.
    can anybody have idea how to achieve this in SSRS?

    Hi Shard,
    Thanks for your post, You can achive your requiremets by using the below logic. hope this will help you.
    Steps to achieve it
    1. Select the tabix and click on Tablix properties.
    2. In the General tab under Column Headers section you can see "Keep header visible while scrolling" checkbox, check it.
    3. Now the header row will be remain fixed in the report.
    OR
    1.    In the grouping pane, make sure to turn on advanced mode (click on the small black down arrow on the far right of the grouping pane) 
    2.  Select the corresponding (Static) item in the row group hierarchy
    3.  In the properties grid, set RepeatOnNewPage to true
    4. KeepwithGroup to After
    OR
    1)Freeze the header of all columns[ Freezing table header ] : To do select static member of table header row from  row groups [ Advanced Mode ] and set  FixedData to true
    2) Freeze the initial 2 columns : To do select static member of columns in column group and set fixedData to true .
    How do you freeze the tablix header row in an Excel export file in SSRS 2008
    Suhas Kudekar
    Mark as Answer if this resolves your problem or "Vote as Helpful" if you find it helpful.
    My Blog
    Follow @SuhasKudekar

  • How to increase the column size of Alv tbale

    Hi All,
    I created an Alv table to display the content of my database table. In one of the column the entire data from my database are not displayed the last few characters are missing. The data type for that column in the database is char. Can any one help me how to increase the column size in my Alv table or any suggestions to resolve this issue.

    Hi Vadiv,
    Try with this..
    DATA: LR_IF_CONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE,
    LR_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE,
    LR_CMDL TYPE REF TO CL_SALV_WD_CONFIG_TABLE,
    LR_TABLE_SETTING TYPE REF TO IF_SALV_WD_TABLE_SETTINGS.
    LR_CMP_USAGE = WD_THIS->WD_CPUSE_ALV( ).
    IF LR_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
    LR_CMP_USAGE->CREATE_COMPONENT( ).
    ENDIF.
    " get reference to the ALV model
    LR_IF_CONTROLLER = WD_THIS->WD_CPIFC_ALV( ).
    LR_CMDL = LR_IF_CONTROLLER->GET_MODEL( ).
    LR_TABLE_SETTING ?= LR_CMDL.
    " Set column width
    DATA LR_COL TYPE REF TO CL_SALV_WD_COLUMN.
    LR_COL = LR_CMDL->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'PERNR' ).
    LR_COL->SET_WIDTH( '70' ) .
    LR_COL = LR_CMDL->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'ENAME' ).
    LR_COL->SET_WIDTH( '100' ) .
    LR_TABLE_SETTING->SET_FIXED_TABLE_LAYOUT( ABAP_TRUE ).
    You can refer to webdynpro component SALV_WD_TEST_TABLE_PROPS. Go to the view TABLE and look inside the method SET_COLUMN_SETTINGS. I hope this will help you.
    Cheers,
    Kris.

  • How to extract the column width in ALv report if its executed in background

    I am executing an ALV report in background , in front end i am getting data properly, in back end for some columns some of the digits are missing.For example if PO no is of 10 digits it will display only 8 becos column size is like that , how to extract coulmns in back ground.
    I have executed in background and checked the spool and  for some of the columns width is not sufficient to display comeplete data so please suggest how to extract the columns sizes if executed inj background for an ALV

    Hi Deepthi,
    you can try with the above mentioned suggestions ,if its worked its fine ,
    If not use Docking container instead of custom container, For ALV in back ground jobs, its suggest to use docking container instead of custom container , below you can find the declaration for docking container and code to use docking and custom container in your program for fore and back ground.
    or you can use docking container alone for both operations.
    Data : G_DOCK1 TYPE REF TO CL_GUI_DOCKING_CONTAINER,
    IF CCON IS INITIAL. (ccon is container name )
    *Check whether the program is run in batch or foreground
        IF CL_GUI_ALV_GRID=>OFFLINE( ) IS INITIAL.
    *Run in foreground
          CREATE OBJECT CCON
            EXPORTING
              CONTAINER_NAME = 'CON1'.
        CREATE OBJECT GRID1
            EXPORTING
              I_PARENT = parent_1.
    ELSE.
    *Run in background
          CREATE OBJECT GRID1
            EXPORTING
              I_PARENT = G_DOCK1.
        ENDIF.
      ENDIF.
    B&R,
    Saravana.S

  • How to freeze the column edit in Draft document?

    Hi,
    I try the following code and want to freeze the column edit in Item code, Item description and quantity.  However, it just work in Sales Order or PUrchase Order those normal marketing document.  it doesn't work in Draft document.  Anyone can help?
      If BusinessObjectInfo.FormTypeEx = "133" And BusinessObjectInfo.Type = 112 And BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD Then
                    If BusinessObjectInfo.BeforeAction = True Then
                        oForm = SBO_Application.Forms.Item(BusinessObjectInfo.FormUID)
                        oboDS = oForm.DataSources.DBDataSources.Item("ODRF")
                        oGenvalue = oboDS.GetValue("U_InvoiceFlag", 0)
                        Dim oOrderMat As SAPbouiCOM.Matrix = oForm.Items.Item("38").Specific  'Content Row'
                        Dim oColumns As SAPbouiCOM.Columns = oOrderMat.Columns
                        Dim oItemColumn As SAPbouiCOM.Column = oColumns.Item("1")       'Item No
                        Dim oItemColumn3 As SAPbouiCOM.Column = oColumns.Item("3")
                        Dim oItemColumn11 As SAPbouiCOM.Column = oColumns.Item("11")
                        If oGenvalue.Trim = "Y" Then
                            'Set Itemcode and Quantity to non-editable
                            oItemColumn3.Editable = False
                            oItemColumn.Editable = False
                            oItemColumn11.Editable = False
                        Else
                            oItemColumn3.Editable = True
                            oItemColumn.Editable = True
                            oItemColumn11.Editable = True
                        End If
                    End If
                End If

    Hi Anna,
    Thanks for posting your code - that helps a lot isolating the issue!
    While your code could work, if the SDK would have been implemented differently, it won't do what you want it to:
    - There is no et_FORM_DATA_LOAD event fired when a draft is loaded (use EventLogger from the B1DE tools - it would have told you that you are looking at an event that doesn't get fired...).
    - Not sure how "BusinessObjectInfo" is defined, but oForm.BusinessObject.Type = "112" does not occurr:
    The business object behind the form is the "real" business object - an Invoice ("13") in your case.
    Thus your code never reaches the lines where you disable the relevant columns... - you could e.g. use .NET Profiler form B1TE to get at least a better idea of what is happening inside the add-on, if you don't like to step through you add-on code.
    - oForm.BusinessObject.Type is a string (remember UDOs!) - not a number.
    - Table "ODRF" is not a datasource behind form "133" - please check the form's XML!
    If you would like to run that check you have to do it differently - using DI API...
    HTH,
    Frank
    Edited by: Frank Moebius on Aug 3, 2009 4:28 PM

  • How to compare all columns in a SELECT with all columns in a Cursor ?

    Hi All,
    I would like to know if something like this is possible in PL/SQL
    I have a cursor CUR1 which is a SELECT * FROM T1.
    And in my loop for every record found in CUR1 I am trying to retrieve its consecutive record in the table T2. Unfortunately T1 and T2 do not have a primary key so there are duplicates. But if I can compare each column of CUR1 with its respective column in T2, I can find the record. But the question is how ?
    So I tried something like this, but of course this is wrong, but hope this would give you an idea of what I trying
    VAR_T2 T2%ROWTYPE;
    CUR_T1 IS SELECT * FROM T1
    LOOP CUR_TI
    SELECT * INTO VAR_T2
    FROM T2 WHERE
    ‘ALL COLUMNS OF T2’ = ALL COLUMNS OF CUR1;
    So is there a easy way to accomplish this. Thank you, AJ

    As Walter says, this is simply an intersect if you are comparing all the columns.
    However, if you really must do it in a slow by slow, PL/SQL loop (no real valid reason why you would though)...
    DECLARE
      VAR_T2 T2%ROWTYPE;
      CUR_T1 IS
        SELECT * FROM T1;
    BEGIN
      FOR i IN CUR_TI
      LOOP
        SELECT * INTO VAR_T2
        FROM T2
        WHERE T2.col1 = i.col1
          AND T2.col2 = i.col2
          AND T2.col3 = i.col3
          AND T2.colN = i.colN;
      END LOOP;
    END;There is no simple mechanism for just saying "compare all the columns", you will have to specify each one individually in the WHERE clause.

  • How to select all columns in a trigger?

    I add a "before delete" trigger on a table, in order to insert the records to a backup table before they are deleted.
    but I cannot write like this : insert into t_backup select * from :old;
    The table has more than 30 columns so I don't want to select them one by one, how can I select all columns?

    Yes, it is possible by writing something like this :
    where col1 = :old.col1; But it is not directly supported. First, we need a package to remember all the OLD records:.... and please see below link for complete code in action :
    http://www.dbforums.com/oracle/925729-trigger-back-up-data.html
    What I am doing here, just copying the code and replacing "emp" with "test" (The table name on which I am going to apply this using notepad find and replace):
    SQL> select * from test_backup;
    no rows selected
    SQL> select * from test;
             A
             1
             2
             4
             5
    SQL> select * from test_backup;
    no rows selected
    SQL>
    create or replace package test_trg_pkg as
      type test_type is table of test%ROWTYPE index by binary_integer;
      test_tab test_type;
    end;
    create or replace trigger test_bds before delete on test
    begin
      test_trg_pkg.test_tab.delete;
    end;
    create or replace trigger test_adr after delete on test
    for each row
    declare
      -- To allow us to select the old values
      pragma autonomous_transaction;
    begin
      select *
      into   test_trg_pkg.test_tab(test_trg_pkg.test_tab.COUNT+1)
      from   test
      where  a = :old.a;  <----- Here you have to give your column name.
    end;
    create or replace trigger test_ads after delete on test
    begin
      for i in 1..test_trg_pkg.test_tab.COUNT loop
        insert into test_backup values test_trg_pkg.test_tab(i);
      end loop;
    end;
    SQL> delete from test where a=1;
    1 row deleted.
    SQL> select * from test_backup;
             A
             1
    SQL> delete from test where a=2;
    1 row deleted.
    SQL> select * from test_backup;
             A
             1
             2
    SQL>Regards
    Girish Sharma

  • How to check all columns existing in a table?

    Hello.
    I'm writing a function that returns average value of every numeric column existing in a database.
    I have a general idea how to do it, but I need just one more thing, look at the expamle:
    select table_name from user_tables where rownum=1
    this allows me to select names of all tables, and then I can access them 1 by 1...
    But now i have a little problem - how to access all the atributes in selected table in this way?
    Oh, and I have a problem with this rownum... For example it works for 1 (shows 1st row - name of first table) but does not for 2, or greater number :(.
    And expresions like rownum < 5 work, but rownum > 3 not :/. What may be the reason?
    Thank you for help!
    Regards.

    user13483761 wrote:
    Thanks a lot! This 3 atributes is all I need, its a way lot easier than I thought before. I simply use cursor loop and your advices.
    Almost got working code - but there is 1 error telling that select is incorrect :/. Why is that?
    create or replace
    FUNCTION SHOW_ALL
    RETURN VARCHAR2 IS
    v_ret VARCHAR(100):='Null';
    BEGIN
    DECLARE
    CURSOR cur_stats IS SELECT table_name, column_name, data_type
    FROM user_tab_columns;
    v_zdanie VARCHAR(100);
    BEGIN
    FOR v_cur IN cur_stats LOOP
    IF v_cur.data_type = 'NUMBER'
    THEN
    strike
    --> select 'In table ' || v_cur.table_name || ' average value of ' ||--
    --> v_cur.column_name || ' is:' || avg(v_cur.column_name)--
    --> into v_zdanie--
    --> from v_cur.table_name;--
    strike
    >
    dbms_output.put_line(v_zdanie);
    END IF;
    END LOOP;
    RETURN v_ret;
    END;
    END SHOW_ALL;
    select 'In table ' || v_cur.table_name || ' average value of ' ||
    v_cur.column_name || ' is:' || avg(v_cur.column_name)
    into v_zdanie
    from v_cur.table_name;
    sql_developer tells that this 'table or perspective does not exist' or sth like that, I translated from my native language.You are missing lot of things in the function, you are hard coding the return value to null?
    What you should do is as below:
    remove the part what you have written, i have strike that above. declare a variable your_select_statement VARCHAR2(1000);
    your_select_statement := 'select nvl(avg('||v_cur.column_name||'),0) from '||v_cur.table_name;
    execute immediate your_select_statement into v_zdanie;
    dbms_output.put_line('In table ' || v_cur.table_name || ' average value of ' ||v_cur.column_name || ' is:' ||v_zdanie);

  • How can we restrict Column length in ALV using POWL.

    Hello,
    I have a new assignment o ABAP Web Dynpro, data displaying ALV by using POWL is a part of that assignment. Everything went fine and at last moment I was stuck with a small issue. In my application I am displaying first ALV by using POWL concept and on the basis of selected row I am displaying second level LAV by using normal ALV procedure (SALV_WD_TABLE). Here the issue is as soon as second ALV is displaying columns in first level ALV are getting expanded. How can I restrict Column length in first level ALV using POWL. I browsed a lot for getting the solution for this, Can any one help me out from this issue.
    Regards,
    Kumar

    Done, in field catalog method...

  • How to preselect all rows before displaying ALV report

    I would like to select all rows before sending ALV Grid Display. User then can unselect couple of rows for further processing. How do I do that ?. Im using Method grid1->SET_TABLE_FOR_FIRST_DISPLAY for ALV Report Display. Any help appreciated.

    Ok,
    I've started the editor and check my code. I made few small mistakes (like with this exporting/importing), here's the sample - correctly working - code:
    DATA: it_selected TYPE lvc_t_row,
          wa_selected TYPE lvc_s_row,
          wa_sflight TYPE sflight,
          ltp_layout TYPE lvc_s_layo.
         SELECT *
           FROM sflight
           INTO TABLE gi_sflight.
    ltp_layout-stylefname = 'CELLTAB'.
    ltp_layout-sel_mode = 'A'.
    LOOP AT gi_sflight INTO wa_sflight.
          wa_selected-index = sy-tabix.
          APPEND wa_selected TO it_selected.
    ENDLOOP.
    *   * Load data into the grid and display them
         CALL METHOD go_grid->set_table_for_first_display
           EXPORTING i_structure_name = 'SFLIGHT'
                     is_layout            = ltp_layout
                     i_save = 'A'
           CHANGING  it_outtab        = gi_sflight.
    CALL METHOD go_grid->set_selected_rows
          EXPORTING
            it_index_rows = it_selected.
    This time it is 100% correct.
    Edited by: Marcin Cudo on Apr 11, 2010 2:13 AM

Maybe you are looking for