Read Only ID Columns

Hi,
I have several simple look up tables with two columns, ID and DESCRIPTION.
ID is a numeric primary key.
They have been put into their own groups with the Layout Style set to "table".
The ID attribute's "Updateable?" has been set to "When New".
My problem is that when I go to the pages that edit these tables, some of the ID columns
are editable while some of the ID columns are read-only. I want all of the ID columns
to be read-only (except for the new row).
The ID attribures look identical in the ADF BC Properties Editor for all of the tables.
Where else should I look for differences?
Cheers,
Patrick Cimolini

Patrick,
Actually, the line should not be present in the View Object file. Only if it is cleared, the value from the Entity Object should be picked up. I have experimented a bit and I could reproduce one weird case.
Start by going to the Entity attribute and set it to 'Always'. Then go to the View attribute and set it to 'Always' as well. Now check the ViewObject xml file. The 'isUpdateable' attribute should NOT be there now! If it is, something weird is going on and I would close JDev, remove the attribute in notepad and launch JDev again.
In the next bit, take care you follow the steps in this exact order. Go to the View Object attribute, and set it to 'While New'. Go to the Entity Attribute and set it to 'Never'. Go back to the View Object attribute. It will now be set to 'Never' and you won't have the option to put it back to 'While New' or 'Always' (greyed out). All very nice and logical, but if you look at the View Object XML file, it still says 'isUpdateable="while_insert"'. This is indeed an inconsistency between the JDev GUI and the actual XML file. As JHeadstart uses the XML file, it will use the 'while_insert' instead of the 'Never' that both the Entity and ViewObject GUI are showing you.
However, this is the only problem I have found. Could you please make sure that if you set everything back to 'Always', if necessary remove that 'isUpdateable' attribute from the ViewObject XML file as I mentioned above, then only set the 'While New' at the Entity level, and make sure that the 'isUpdateable' property is NOT present at the ViewObject XML file, if everything works as expected when running the generator?
Kind regards,
Peter Ebell
JHeadstart Team

Similar Messages

  • How to read only particualr columns from excel sheet to internal table

    Hi,
    I have and excel sheet which has around 20 columns, in which i want to read only 6 columns. They are at different column positions, means the 1st column, 6thcolumn, 8th column so on..
    Can we do this in sap? do we have any FM to do this?
    Thanks.
    Praveena.

    hi,
    Use the below logic to fetch the data into internal table..You need to read the data cell by cell and update the internal table,
    DATA l_count TYPE sy-tabix.
       CONSTANTS: lc_begin_col TYPE i VALUE '1',
                  lc_begin_row TYPE i VALUE '2',
                  lc_end_col   TYPE i VALUE '2',
                  lc_end_row   TYPE i VALUE '3000'.
      CLEAR p_i_excel_data. REFRESH p_i_excel_data.
    * Function module to read excel file and convert it into internal table
       CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
         EXPORTING
           filename                = p_p_file
           i_begin_col             = lc_begin_col
           i_begin_row             = lc_begin_row
           i_end_col               = lc_end_col
           i_end_row               = lc_end_row
         TABLES
           intern                  = i_data
         EXCEPTIONS
           inconsistent_parameters = 1
           upload_ole              = 2
           OTHERS                  = 3.
    * Error in file upload
       IF sy-subrc NE 0 .
         MESSAGE text-006 TYPE 'E'.
         EXIT.
       ENDIF.
       IF i_data[] IS INITIAL .
         MESSAGE text-007 TYPE 'E'.
         EXIT.
       ELSE.
         SORT i_data BY row col .
    * Loop to fill data in Internal Table
         LOOP AT i_data .
           MOVE i_data-col TO l_count .
           ASSIGN COMPONENT l_count OF STRUCTURE p_i_excel_data TO <fs_source> .
           MOVE i_data-value TO <fs_source> .
           AT END OF row .
    * Append data into internal table
             APPEND p_i_excel_data.
             CLEAR p_i_excel_data.
           ENDAT .
         ENDLOOP .
       ENDIF .

  • Implement Conditional Read-Only of Column Across Two Tables

    Hello,
    I would like to implement a "conditional read-only" mechanism on a column in a table with two tables in total being involved in this situation.
    I have a demo/proof of concept of this and things are working as expected in the tests I have performed; however, I would like any input as to whether there is a better way, etc.
    Here's a contrived demo but which illustrates the key ingredients nevertheless. Oracle version 10.2.0.4 64-bit on Windows Server 2008 Release 2 64-bit.
    - Table DDL and small sample data
    create table band(
      band_id   number primary key,
      band_name varchar2(20),
      status    varchar2(20)
    create table band_member(
      band_id references band,
      member_name varchar2(20)
    insert into band values(3, 'The Rutles', 'prefab4');
    insert into band values(4, 'The Beatles', 'established');
    commit;
    insert into band_member values(3, 'Ron Nasty');
    insert into band_member values(3, 'Dirk McQuickly');
    insert into band_member values(3, 'Stig O''Hara');
    insert into band_member values(3, 'Barrington Womble');
    commit;
    insert into band_member values(4, 'John Lennon');
    insert into band_member values(4, 'Paul McCartney');
    insert into band_member values(4, 'George Harrison');
    insert into band_member values(4, 'Ringo Starr');
    commit;- The rules regarding the conditional read-only goal
    1. Not permitted to update band.band_name when band.status='prefab4'
    2. Not permitted to insert/update/delete any rows in band_member when the parent row has band.status='prefab4'
    - Triggers used to implement the goal (current solution)
    create or replace trigger t1
    before update of band_name on band
    for each row
    when (old.status = 'prefab4' or new.status = 'prefab4')
    begin
      raise_application_error(-20010,
        'can not update band_name when status=''prefab4''');
    end;
    create or replace trigger t2
    before insert or update or delete on band_member
    for each row
    declare
      l_status band.status%type;
      l_band_id band_member.band_id%type;
      cursor l_cursor (p_band_id number) is
      select status from band
      where band_id = p_band_id
      for update;
    begin
      if updating or inserting then
        l_band_id := :new.band_id;
      else
        l_band_id := :old.band_id;
      end if;
      open l_cursor(l_band_id);
      fetch l_cursor into l_status;
      close l_cursor;
      if l_status = 'prefab4' then
        raise_application_error(-20011,
          'can not update child when parent status=''prefab4''');
      end if;
    end;
    /- Quick sample test for each condition
    update band
    set    band_name = 'THE RUTLES'
    where  band_id = 3;
    update band
    ERROR at line 1:
    ORA-20010: can not update band_name when status='prefab4'
    ORA-06512: at "DEMO.T1", line 2
    ORA-04088: error during execution of trigger 'DEMO.T1'
    update band_member
    set    member_name = 'RON NASTY'
    where  member_name = 'Ron Nasty';
    update band_member
    ERROR at line 1:
    ORA-20011: can not update child when parent status='prefab4'
    ORA-06512: at "DEMO.T2", line 18
    ORA-04088: error during execution of trigger 'DEMO.T2'As I say, whilst my simple tests look to show the correct results, I'm left wondering if there might be a better way to implement said functionality.
    I've attempted to provide the required information, but if I've managed to omit anything, please let me know.
    Cheers,
    Chalfont

    Hi, Chalfont,
    user13146957 wrote:
    I went the cursor route to add the "for update" clause to force serialisation on the row - i.e. the idea was to avoid the case where another session might have wanted to update the status an instant after my fetch but before the remainder of the code completed. Does that make sense?No not really. The trigger on band prevents anyone from ever changing status from 'prefab4' to anything else (or vice-versa).
    Even aside from that, you're putting in some effor to prevent something that will be allowed a split second later (or maybe the other way around). What's so significant about that split second?
    I've been thinking of other ideas rather than the trigger approach, but have come up empty, as it were, thus far. I'm open to using other approaches and making some schema changes is not off the table either.FGA (Fine Grained Access), or its older sibling VPD (Virtual Private Database) can also do what you want, but, instead of raising an error, they just ignore the illegal action. This may be an advantage or a disadvantage, depending on your requirements.
    Another approach is for the owner of the table not to grant INSERT, UPDATE or DELETE privileges to anyone: all DML must be done through a procedure (or procedures) owned by the table owner, who grants EXECUTE privileges instead of the other privileges.

  • Read only specific Columns into the cursor

    Hey everybody,
    I'm trying to make a cursor which takes only column 2 to n-2 (when n is the number of cloumns). The table size should be variable.
    Is there any possibility to do that?
    Like
    CURSOR nodes IS SELECT * FROM nn_input WHERE column_id > 1 AND column_id < count(columns)-2;
    Another possibility to solve the problem could be to read all cloumns in the cursor and then, in the for-loop, writing the 2nd to (n-2) value in table1 and the last two values in table2...
    Anyone an idea? Thanks a lot!

    You need to use dynamic SQL and build up your query at run time. You could use something like the following to generate the list of columns...
    CREATE TABLE test_columns
    col1 number,
    col2 number,
    col3 number,
    col4 number,
    col5 number
    SELECT LTRIM(MAX(SYS_CONNECT_BY_PATH(column_name,',')),',')
    FROM   user_tab_columns
    START WITH column_id = &start_col_num
    AND        table_name = 'TEST_COLUMNS'
    CONNECT BY column_id = PRIOR column_id +1
    AND  table_name = PRIOR table_name
    AND  level <= &end_col_num-&start_col_num+1;Using a start_col_num =2 and end_col_num=4 gives:
    LTRIM(MAX(SYS_CONNECT_BY_PATH(COLUMN_NAME,',')),',')
    COL2,COL3,COL4There are lots and lots of other options...
    Greg

  • BULK INSERT from a text (.csv) file - read only specific columns.

    I am using Microsoft SQL 2005, I need to do a BULK INSERT from a .csv I just downloaded from paypal.  I can't edit some of the columns that are given in the report.  I am trying to load specific columns from the file.
    bulk insert Orders
    FROM 'C:\Users\*******\Desktop\DownloadURL123.csv'
       WITH
                  FIELDTERMINATOR = ',',
                    FIRSTROW = 2,
                    ROWTERMINATOR = '\n'
    So where would I state what column names (from row #1 on the .csv file) would be used into what specific column in the table.
    I saw this on one of the sites which seemed to guide me towards the answer, but I failed.. here you go, it might help you:
    FORMATFILE [ = 'format_file_path' ]
    Specifies the full path of a format file. A format file describes the data file that contains stored responses created using the bcp utility on the same table or view. The format file should be used in cases in which:
    The data file contains greater or fewer columns than the table or view.
    The columns are in a different order.
    The column delimiters vary.
    There are other changes in the data format. Format files are usually created by using the bcp utility and modified with a text editor as needed. For more information, see bcp Utility.

    Date, Time, Time Zone, Name, Type, Status, Currency, Gross, Fee, Net, From Email Address, To Email Address, Transaction ID, Item Title, Item ID, Buyer ID, Item URL, Closing Date, Reference Txn ID, Receipt ID,
    "04/22/07", "12:00:21", "PDT", "Test", "Payment Received", "Cleared", "USD", "321", "2.32", "3213', "[email protected]", "[email protected]", "", "testing", "392302", "jdal32", "http://ddd.com", "04/22/03", "", "",
    "04/22/07", "12:00:21", "PDT", "Test", "Payment Received", "Cleared", "USD", "321", "2.32", "3213', "[email protected]", "[email protected]", "", "testing", "392932930302", "jejsl32", "http://ddd.com", "04/22/03", "", "",
    Do you need more than 2 rows? I did not include all the columns from the actual csv file but most of it, I am planning on taking to the first table these specfic columns: date, to email address, transaction ID, item title, item ID, buyer ID, item URL.
    The other table, I don't have any values from here because I did not list them, but if you do this for me I could probably figure the other table out.
    Thank you very much.

  • Restict read only users to certain columns

    Hi guys ,
    I want to restrict read-only users to read only certain columns on the table.How do I go about restricting?

    Always include the following information when asking a question:
    <ul>
    <li>Full APEX version</li>
    <li>Full DB/version/edition/host OS</li>
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)</li>
    <li>Browser(s) and version(s) used</li>
    <li>Theme</li>
    <li>Template(s)</li>
    <li>Region/item type(s)</li>
    </ul>
    935462 wrote:
    Hi guys ,
    I want to restrict read-only users to read only certain columns on the table.How do I go about restricting?Who are readonly users? How are they determined?
    What exactly are you talking about?
    Is it a report, If then which report Interactive or Classic?
    In either of them you can do conditional display of column using the same login
    Look at this for options http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/bldapp_rpt_att.htm#BCEBDIFA

  • Editable AdvancedDataGrid / Read-only SummaryRow

    tl;dr - How do I have read-only SummaryFields for an editable column in the AdvancedDataGrid?
    I have an AdvancedDataGrid based on flat data in a GroupingCollection that groups on one field (named "day"). There are 2 known read-only columns, and N additional columns (N is equal for all rows in the grid). My goal is to have the N additional columns editable (numeric) with a read-only SummaryRow at the group level for those columns.
    I can display everything properly, but I cannot figure out how to make the SummaryRow read-only.
    AdvancedDataGrid and AdvancedDataGridColumn seems to the be only classes that allow you to toggle an "editable" flag.
    When I use an AdvancedDataGridRendererProvider, my custom Label-based renderer is called, but I do not know which column it is being called for, so even though I have access to the child data, I do not know which fields in the children to summarize and display in the text field of the label.
    Data is in an ArrayCollection where each item (row) has the following format:
         "day": 1,
         "hour": "Shift 1",
         "Skill0": 4,
         "Skill1": 8,
         "Skill2": 15,
         "Skill3": 16,
         "Skill4": 23,
         "Skill5": 42
    where "day" is the column the grouping occurs on, "day" and "hour" are displayed as read-only fixed columns, and the "SkillN" fields are displayed as editable columns.
    I hope I am missing some simple bit of information here. I have spent many hours on this!
    Am I approaching the solution wrong? Hints and advice are appreciated!
    Thanks,
    Matt

    Thank you so much, Sameer. Unfortunately, I have not been able to get this working. I am using SDK 3.5 in Flex Builder 3.
    Below is a sample app that shows the "editable" property not working properly. Here is a screenshot of the result showing that the summary row is editable:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
      <mx:AdvancedDataGrid initialize="gc.refresh()" editable="item">
        <mx:dataProvider>
          <mx:GroupingCollection id="gc">
            <mx:source>
              <mx:ArrayCollection>
                <mx:Object day="1" hour="1" Skill0="1"/>
                <mx:Object day="1" hour="2" Skill0="1.5"/>
                <mx:Object day="1" hour="3" Skill0=".25"/>
              </mx:ArrayCollection>
            </mx:source>
            <mx:grouping>
              <mx:Grouping>
                <mx:GroupingField name="day">
                  <mx:summaries>
                    <mx:SummaryRow summaryPlacement="group">
                      <mx:fields>
                        <mx:SummaryField dataField="Skill0"/>
                      </mx:fields>
                    </mx:SummaryRow>
                  </mx:summaries>
                </mx:GroupingField>
              </mx:Grouping>
            </mx:grouping>
          </mx:GroupingCollection>
        </mx:dataProvider>
        <mx:columns>
          <mx:AdvancedDataGridColumn dataField="day"/>
          <mx:AdvancedDataGridColumn dataField="hour"/>
          <mx:AdvancedDataGridColumn dataField="Skill0"/>
        </mx:columns>
      </mx:AdvancedDataGrid>
    </mx:Application>

  • Read Only Columns

    Hi,
    We have designed a update METADATE type custom integrator to download, update and re-upload data to Oracle Apps. As a part of the integrator we are displaying few extra columns for the end users viewing purpose. The client want us to make such view only columns as 'READ ONLY' and prevent any changes to them. They want such columns to either be greyed out or protected in order to prevent any changes. Is it possible to achieve this using WebADI? We tried updating the READ_ONLY_FLAG column in the table bne_interface_cols_b but it doesn't work as expected. This set-up allows the end user to update/make changes to the column in the excel sheet and throws an error only when the sheet is uploaded, not before that.
    Any suggestions/help is appreciated. We are on R11i.
    Thanks,
    Nitin jain

    As suggested, an update statement like below will address the issue in R11i:
    update bne_layout_cols
    set style = 'mso-protection:locked;'
    where application_id = <>
    and interface_code = <>
    and sequence_num in <>;

  • Read only column in tabular form

    There is a not null column ( say SEQ) in a tabular form that is getting an auto value from other process. 2 more columns need user input on each row.I need to make this column(SEQ) as read only.
    If I make this column (SEQ) as standard report column then when I submit the newly added row , I always get ORA-20001 error- can not insert NULL into SEQ.. even though I can see there is a value there. Switch ithe column back to text field, the insert went just fine .
    How do you solve this read only column issue ?
    Thanks a bunch for your help.
    Tai

    thank you for your reply.
    Nope, SEQ is not the first column. Primary Key is and I leave the pK alone.
    When I press ADDROW button , tabular form is like the following: ( table alreay has 2 rows), I auto populate SEQ column and I like to make this SEQ column display only.
    -- represents checkbox
    PK      SEQ      col1           col2
    --     1     890          test1
    --     2     675          test2
    --     3     

  • ALV: columns in read-only mode look like editable columns in edit mode

    Hi,
    My application contains an ALV table which should be toggled between display and edit mode like the rest of the fields.
    The evident solution was to use
    if_salv_wd_table_settings~set_read_only( abap_true or abap_false)
    However, unlike the rest of the fields, when the application changes into display mode and the fields get grey like in any SAP application, the columns in the table which were editable remain white, and those which were not editable and thus grey, get now white, too, instead of the other way round. So it will look to the normal user, as if now all columns would be editable!
    Of course, he would realize that they are not when he tries to edit them, but this is irritating.
    See following link with screenshots (only active for 3 weeks from now on):
    [Link to my webmail space/SDN: .|https://businesswebmail.telekom.at/filestorage/MzYxMTk1OTMx/]
    I have looked
    through my books ("Einstieg in Web Dynpro for ABAP", "Praxisbuch Webdynpro for ABAP", ...)
    through the wiki for Webdynpro for ABAP here in SDN as well as through this forum (by searching with "ALV edit")
    through the notes in BC-WD-CMP-ALV
    but could not find any solution. Most tables in those PDF articles found here in the WD4A wiki also show white cells although they are probabliy in read-only mode (e.g. the imitation of the SE16N browser article).
    The attributes to the LO_CELL_EDITOR for both Inputfields and textview columns contain exactly the same values when toggling between display and edit mode (read-only in table settings), so also no chance to change here anything.
    Also changing the cell design is not a solution as there is no design that looks like grey for not editable according to WDUI_TABLE_CELL_DESIGN  ([SAP Help - WDUI_TABLE_CELL_DESIGN|http://help.sap.com/saphelp_nw2004s/helpdata/en/56/5e9041d3c72e7be10000000a1550b0/frameset.htm].
    I do not know if I have made an error, as this is my 3rd Web Dynpro (after the first 2 of the introduction book), or SAP is really inconsistent in User interface between "normal" fields and ALV table fields.
    Can you please help me?
    Thanks in advance,
    Erlend

    Hi,
    In my application aslo, i have 30 columns out of which 10 are input fields. But, i'm showing the table as ABAP_TRUE incase of Non-editable otherwise to abap_false. Now i'm getting everything as in WHITE cells.
    Do you want to show it is Grey mode with Non-editable feature. Is that so.
    How many columns are there which has Input fields.
    Get the column references.
    Now, based on the mode of display create the object as Input or Textview field.
    For that column -
    If mode eq 'D'.
    Create an object for Textview(cl_salv_wd_uie_text_view)
    else.
    Create an Object for Inputfield(cl_salv_wd_uie_input_field)
    endif.
    The Append row is a standard button or custom one on ALV toolbar.
    Do you want to hide the toolbar or just disable these buttons.
    If you want to hide the toolbar then refer my wiki -
    http://wiki.sdn.sap.com/wiki/display/WDABAP/NullreferenceforUPDATETOOLBARerrorsofALVinthewebdynpro+ABAP
    Regards,
    Lekha.
    Edited by: Lekha on Sep 30, 2009 8:06 PM

  • Can a Column in a Project Plan be set to Read Only for everyone except Admins

    At my company the Project Server Admins create the initial project plans.  We want to add a new column that will designate each task in the plan as Capital or Operational.  We do not want anyone to have the ability to change these.
    When the Project Managers need additional tasks on their plans they will need to copy an existing one in order to have this piece of information pre-populated on their new tasks, since we do not want them deciding what the task should be themselves and populating
    the field as they create tasks.

    In addition to Dale's excellent answer, I'd mention that it is possible to make a column "read-only" for certain security groups in MS Project Pro with VBA code. 
    That being said, I'd suggest to follow Dale's advice using a "soft" solution.
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • Read only set for few rows of a column in a table (not ALV)

    Hi Gurus,
    I have a table with multiple rows and columns. Under a particular column, I have to make few rows as read only, few rows as editable based on a coondition. How can I achieve this. I know how to make the whole column as editable or read only. But I'm not able to achieve few rows in a particular column as editable and few read only. Please give me more detail code.
    Appreciate your help.
    Regards,
    David.

    Hello,
    That you can achieve by creating an attribute isReadOnly of type WDY_BOOLEAN in the context node that you bind to the TABLE. And set isReadOnly attribute based on your condition whether to set readonly or editable for all the context elements.
    And in the layout view, for the column which has to be made readOnly or editable, bind the property readOnly to the context attribute isReadOnly.
    When you run application, you will see the column as readOnly if the attribute was set to true and editable if it was set to false.
    Hope this helps!
    Regards,
    Srilatha

  • How to get a list of displayed columns from a UIX read only table

    I am using JDev 9.0.5.2 ADF UIX. Is there a way to get all the columns and/or column labels displayed in a UIX read only table? I would like to be able to do this in my DataForwardAction.

    Please don't post the same question multiple times.

  • Selectively mark Excel columns in MDS as Read-Only

    Is there an internally supported feature in MDS 2012 Excel add-in wherein we can set some columns (e.g Code column) as Read-Only? The use case we're trying to evaluate is to not allow users to make changes to the Business Key column of an entity (populated
    from an actual DW dimension) and instead accept changes to only a few attributes. We'd want to display the read-only attributes for informational purposes to the user.

    Hi Muqadder,
    In the Master Data Services Add-in for Excel, the following input statuses are possible:
    Status
    Description
    Error
    One or more values in the row don’t meet system requirements like length or data type. The value is not updated in the MDS repository.
    New Row
    The values in the row have not yet been published to the MDS repository.
    Read Only
    The logged in user has Read-only permissions to one or more values in the row and the value(s) cannot be updated.
    Unchanged
    No values in the row have been changed in the worksheet. This does not mean the values in the repository have not changed; to get the latest data in the sheet, in the
    Connect and Load group, click Load or Refresh.
    This is the default setting for each row.
    For more information, please see:
    Validating Data (MDS Add-in for Excel):
    http://technet.microsoft.com/en-us/library/hh479625.aspx
    Master Data Services Add-in based on the user permission to determine the data is read-only or not. It is not possible to mark some column as Read-only.
    Thanks,
    Elvis Long
    TechNet Community Support

  • Make few columns of Excel file read only when downloaded

    Hi Experts,
    Is there any way we can set few of the columns in excel sheet as read only when downloaded from SAP.
    We have requirement where a program will generate a report and download it into an excel file on desktop.  When the file is downloaded, two of its columns should be non editable.
    I know complete sheet of excel can be protected using OLE, can we protect few columns also using OLE?
    any idea how can it be done?

    Hi Swapnil,
    check this
    Re: OLE EXCEL : how to block cells ?
    hope it is useful to you.
    Thanks

Maybe you are looking for