How to set a line of table as read only during runtime?

How to set a line (or a cell) of table as read only during runtime?

hi wei
      when you create a table keep the readonly property of table as false
you create the columns of table as inputfield.you bind the readonly property of
the inputfield to two context variables
say one for all the columnfields you to want always have as readonly and let this contextattribute of type boolean and let this be attr1
and another for all the columnfields you donot want to be readonly and let this contextattribute of type boolean and let this be attr2
initially set the context attributes attr1 and attr2 as true so the entire table is readonly.
based on the condition you want to check change the attr2 to be false.
if(your condition)
wdcontext.currentcontextelement.setattr2(false);
hope this helps.
regards
saravana

Similar Messages

  • How to set border lines in table and also in template in the smartforms ?

    How to set border lines in table and also in template in the smartforms ?
    As I have to create table with following detals
    total row = 3
    row1 = 3 column
    row2 = 6 column
    row3 = 9 column
    for 2nd and 3rd row data to be fetched using coding.
    so can anybody explain me what should i use
    Table or Template ?
    and I want the border like excel format.
    Can anybody suggest me ?
    Thanks
    naresh

    if the data is multiple i.e. line items choose table.
    if the data is single i.e. fixed choose template.
    Create table
    >  Draw u r no lines
    > choose option select pattern
    > select display framed patterns
    Choose u r required one.
    out lined, or full lined. u can choose option.
    same procedure to be followed for template also.
    with regards,
    Kiran.G

  • How to make a column in Table popin read only

    Hi Everyone
    Could anyone let me know how to make a column in table popin read only.
    Regards

    if you ar eusing an ALV table
    try this
      DATA: lr_salv_wd_table TYPE REF TO iwci_salv_wd_table,
            r_table TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
    * get reference to ALV component interface
      lr_salv_wd_table = wd_this->wd_cpifc_alvmain( ).
    * get ConfigurationModel from ALV Component
      wd_this->r_table = lr_salv_wd_table->get_model( ).
    * init ColumnSettings
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
            lr_col_header TYPE REF TO cl_salv_wd_column_header.
      lr_column_settings ?= wd_this->r_table.
    * get table of column settings - each line one column
      DATA: lt_columns TYPE salv_wd_t_column_ref.
      lt_columns = lr_column_settings->get_columns( ).
    * loop over table - in each loop another column can be modified
      DATA: ls_column TYPE salv_wd_s_column_ref.
    * define visible columns (fields) by naming them,
    * exclude others by setting visibility to none
      DATA: ls_tooltip TYPE string.
      LOOP AT lt_columns INTO ls_column.
        " get header of column
        lr_col_header = ls_column-r_column->get_header( ).
        " do settings here
    ENDLOOP.
    Or see this document for more tips.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40794172-b95a-2910-fb98-b86d8a0918b4">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40794172-b95a-2910-fb98-b86d8a0918b4</a>
    regards,
    Joris

  • How to set charactersitic in material master as read-only and changable?

    Hi experts
      We try to change classifcaiton view screen variant. Our target is only one transaction variant could change the classification type z02 ,its characeristic in material master. we hope to know for such case, we could use transaction varaint to meet the target or not ?
      We try to use this first, but we use shd0 and click " change in process" button, it will say " variants are possible only for dialog transactions". I checked in se93, it seems this variant maybe is not for dialog transaction .
      But how to change such screen varaiant content?Any steps we should follow ?
    Thanks
    Alice

    >
    alice zhang wrote:
    > Hi
    >
    >  Really appreciated for your help.  Does that mean transaction variant maybe is not good to classificaiton view ?
    >
    i searched in service.sap.com and from what i read this seems not to be the most recommended way to solve such a problem -> see the note i mentionend - but there were others, you might want to search for yourself.
    >
    alice zhang wrote:
    >  currently ,we use mm02 with variant A, and zmm02 with variant B which could change material status and descritpion.
    >
    >  Do you mean if we set varaint for classficaiton z02, xxx characteristic, Is it possible ? Or it many impact other classfication type like z01 , and when we exit this screen, the variant will be lost?
    >
    >
    the only way to find out for sure is if you test it thoroughly. i cannot help you there, since i don't know about your setup in classes and characteristics. you might want to try your transaction variant of several different material always trying to change the classification. there's another thing: one material might belong to n classes. test that scenario by adding one material to class z01 and z02 and check how the variant behaves ...
    >
    alice zhang wrote:
    >  For authoriiation, it could be set for specific class type and characteristic field?
    >
    yes it can. maybe you have to do a bit more configuration about classification, especially if you want to group screens etc. -> please refer to help.sap.com for detailed documentation.

  • How to determine fixed line of table control using BDC program ?

    Dear All,
    I create program using BDC that contains table control.
    Unfortunately the table control line of BDC program will depend on the resolution of our PC setting.
    Sometime I have 2 lines, sometime 3 lines (in different PC).
    How to determine fixed line of table control?
    So it will never be confusing me whether I have 2 or 3 lines.
    Thnx - Regards,
    (Taufik K.)

    Hi Taufik,
    Check the table CTU_PARAMS and field DEFSIZE for setting fixed line of a table control.
    CALL TRANSACTION 'VA01' USING it_bdcdata
    OPTIONS FROM OPT
    MESSAGES INTO it_mesg.
    opt of type ctu_params.
    WA_CTU_PARAMS-DISMODE = 'N'. "no screen mode
    WA_CTU_PARAMS-UPDMODE = 'S'. "synchronus update
    WA_CTU_PARAMS-NOBINPT = 'X'.
    WA_CTU_PARAMS-NOBIEND = 'X'.
    WA_CTU_PARAMS-DEFSIZE = 'X'. "Default size
    Default size will play good role in terms of resoultion. in one system in table control you can see 10rows, but in others system it will show 20 records. it depends on resoultion. but when you set the default size then it will take same (default screen size) in all the systems when you run BDC.
    Reward if helps.
    Regards,
    Senthil
    Message was edited by: senthil kumar

  • How to set dash line color(two colors)?

    hello all:
    Does anyone know how to set dash line color in java?
    I only know how to set line color with a single color.
    g2.setColor(Color.black);
    g2.setStroke(dashed);
    g2.draw(new Rectangle2D.Double(50, 50, 200,100));
    what I need to implement is two colors interleave on the dash line.
    so that dash line looks like this:
    ==== ====
    red white red white
    thank you for any comments.
    -Daniel.

    create 2 strokes, space them appropriately, draw the rectangle twice.

  • How to set a extended attribute as read-only in runtime

    Hi Team,
    I would like to set a extended attribute as read-only in runtime based in a condition.
    I tried with "Criterion" in a extended model definition, but if the condition is false the content field disappear.
    Best regards

    Hi Bruno,
    About the first part of your problem : User with permission and user without permission.
    To meet your needs I would have defined a Group named "WithPermission" and associated this group to a Member (user) "A"
    While other users would not have been associated with this group.
    When an user login I would have checked what groups that are associated with. If the group "WithPermission" was found I would have allowed the current login user to write "My Example". If the current login user was not associated to group name "WithPermission". The user would not have been able to edit the field.
    I did a search in the metamodel object and I found nothing Method. Following my reading it seems that it is not possible. Read below.
    In Sybase Guide "Customizing and Extending PowerDesigner" - CHAPTER 7: Scripting PowerDesigner you can read the following :
    Manipulating the Repository By Script
    PowerDesigner lets you access the Repository feature via scripting using the RepositoryConnection as BaseObject global property.
    It allows you to retrieve the current repository connection, which is the object that manages the connection to the repository server and provides access to documents and objects stored under the repository.
    The RepositoryConnection is equivalent to the root node in the Repository browser.
    You can access the repository documents, but you cannot access the repository administration objects, like users, groups, configurations, branches, and list of locks. In addition, only the last version of a repository document is accessible using scripting.
    As described by Dirk I think the only thing you can do is to make a check on a specific username. Unfortunately it will be "hard coded" in your program. Or If you can by vb script access the repository tables. You could resolve your problem by checking Group permission associated to each users logged in..

  • How to set enable usage rights in adobe reader?

    Dear all,
    How to set "enable usage rights in adobe reader..." in acrobat sdk?
    I did that through menu event but it shows saveAs dialog window.
    Please anyone guide how to handle the saveas window. Otherwise if there is any method to directly enable the option.
    Thanks...
    vijay

    There is no way to automate this in the Acrobat SDK.  If you need to automate Reader Enablement, you need another product – LiveCycle Reader Extension Server.

  • Tables in read only mode

    Hi friends.
    In my job we insert data in some tables, in the end of the month we do some operations with this data and for the next month we use other tables.
    How do I change my tables for read only mode, because is so dangerous that for error erase the old tables?

    Hi,
    You can revoke all privs like insert, update, delete... from all other users for these tables. Then only the owner can do some damage.
    If the database user is used by many different people and you rather don't trust them, copy the 'old' tables to another schema and don't spread the password.
    And most important: Have backups in place!

  • How to use same view as editable and read only in ADF

    Hi,
    how to use same view as editable and read only in ADF ?? How can we achieve this in TF's ???
    -mrudul

    Hi,
    Steven Davelaar wrote a presentation about this "Building Highly Reusable Taskflows"
    Starting slide 14 is where your use case comes into play
    Frank

  • SAPUI5: How to set the appearance of Table control?

    Hi there,
    I have a table on my app UI. Now I want simply show the table grid lines (currently, the vertical lines between columns are not shown). Any idea?
    Furthermore, how to set the width of the bord lines or even teh color of the lines?
    Thanks very much in advance!
    Dong Zhu

    Hi,
    The demo link provided by Chandra uses Blue Crystal theme, hence it shows the vertical lines between the columns of the table. If you are using Gold Reflection theme, then to get the vertical lines, you need to play with CSS. Add the below snippet of CSS between <head></head> of your html file.
    <style>
    .sapUiTableTr>td {
                  border-right: 1px solid #cccccc !important;
    </style>
    Thanks & Regards,
    Vishwa

  • How to set vertical line in SAPScript

    Dear All,
    I have to set vertical line at a particular position of SAPScript. Here the lines are of varying length. Can you suggest how to do that?
    Line 1......................            | Vertical Line
    Line 2.........................         | Vertical Line
    Line 3...............                   | Vertical Line
    Thanks and regards,
    Atanu

    Hii
    use this
    BOX WIDTH 0 FRAME 10
    BOX HEIGHT 0 FRAME 10 
    BOX WIDTH 5 CM  HEIGHT 1 CM FRAME 10 TW INTENSITY 10
    BOX WIDTH 7 CM  HEIGHT 5 CM FRAME 10 TW INTENSITY 10
    HOPE THIS HELPS
    Thanks & Regards
    Naresh

  • How to Set a line's BackGroundColor in JTextPane?

    I want to change a whole line's(not only the characters) background color.(display as we set breakpoint in a debug environment).
    i tried
    DefaultStyleDocument.setCharacterAttributes(start,end-start,MyAttr, false);
    This can not set whole line but the begin to the end of the characters in line.
    Help,and Thanks

    This isn't exactly what you want, but it may give you some idea on how to approach it.
    import java.awt.*;
    import java.net.*;
    import javax.swing.*;
    import javax.swing.text.*;
    public class BackgroundLines extends JFrame
         public BackgroundLines()
              throws Exception
              JTextArea textComponent = new JTextArea()
                   public void paintComponent(Graphics g)
                        Rectangle drawHere = g.getClipBounds();
                        int lineHeight = g.getFontMetrics().getHeight();
                        int startOffset = getInsets().top;
                        int start = (drawHere.y / lineHeight) * lineHeight + startOffset;
                        int startLineNumber = (drawHere.y / lineHeight);
                        int endLineNumber = startLineNumber + (drawHere.height / lineHeight) + 1;
                        for (int i = startLineNumber; i <= endLineNumber; i++)
                             g.setColor( i % 2 == 0 ? getBackground() : Color.lightGray );
                             g.fillRect(drawHere.x, start, drawHere.width, lineHeight);
                             start += lineHeight;
                        super.paintComponent(g);
              textComponent.setOpaque( false );
              JScrollPane scrollPane = new JScrollPane(textComponent);
              scrollPane.setPreferredSize(new Dimension(300, 250));
              getContentPane().add( scrollPane );
         public static void main(String[] args)
              throws Exception
              BackgroundLines frame = new BackgroundLines();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setVisible(true);
    }

  • How to set divider line in Project Task List?

    Hi
    Does anyone know how to set the position of the divider line in project task list?
    Thanks

    Hi,
    As I understand, you would like to customize divider line between task list view and grantt view.
    You could press F12 to locate the CSS code of this line, then customize it via CSS style code.
    In addition, the line could move by clicking it via Mouse. If you think Gantt view is not clear enough, you could click Zoom in or Zoom out to adjust it.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to delete a row in table control(accepts only input)?

    Hi All,
    I have an empty table control which is only use for data input(this data will then be use to store information to a custom table). I have two buttons, Create Entry and Delete Entry.
    In my screenPainter for the table control, I have the checkbox w/SelColumn ticked and assign variable T_DATA-MARK on it.
    Please see the actual screenshots and code below:
    The aim of the table control is just to accept inputs, so the internal table in the PBO is always empty.
    Table Control Screen Painter ScreenShot and Actual SAP Output:
    http://img710.imageshack.us/img710/4751/tablecontrolrowdelete.jpg
    PBO
    PROCESS BEFORE OUTPUT.
      LOOP WITH CONTROL TC_ID.
        MODULE LOAD_TABLECTRL.
      ENDLOOP.
    module LOAD_TABLECTRL output.
      READ TABLE T_ID_CHECK INTO WA_ID_CHECK INDEX TC_ID-current_line.
      IF SY-SUBRC EQ 0.
        MOVE-CORRESPONDING T_ID_CHECK TO TC_ID.
      ELSE.
          "EXIT FROM STEP-LOOP.
          CLEAR ZQID_CHECK.
      ENDIF.
    PAI
    PROCESS AFTER INPUT.
       LOOP WITH CONTROL TC_ID.
         CHAIN.
          MODULE CHECK_ENTRIES     ON CHAIN-INPUT.     
          MODULE MODIFY_T_ID_CHECK ON CHAIN-INPUT.
          MODULE DELETE_ROW        ON CHAIN-INPUT
         ENDCHAIN.
       ENDLOOP.
    module CHECK_ENTRIES input.
      CASE ok_code.
        WHEN 'DEL'.
            PERFORM F_FILL_ITABCREATE USING ZQID_CHECK-MATNR
                                            ZQID_CHECK-LICHA
                                            ZQID_CHECK-LIFNR.
      ENDCASE.
    endmodule.    
    form F_FILL_ITABCREATE  using    us_zqid_check_matnr LIKE MARA-MATNR
                                     us_zqid_check_licha LIKE MCHA-LICHA
                                     us_zqid_check_lifnr LIKE LFA1-LIFNR.
      MOVE: us_zqid_check_matnr TO WA_ID_CHECK-MATNR,
            us_zqid_check_licha TO WA_ID_CHECK-LICHA,
            us_zqid_check_lifnr TO WA_ID_CHECK-LIFNR.
      APPEND WA_ID_CHECK TO T_ID_CHECK.
      CLEAR WA_ID_CHECK.
    endform.
    module MODIFY_T_ID_CHECK input.
    DATA W_TEMPMARK(1) TYPE C.
      MOVE: T_ID_CHECK-MARK TO W_TEMPMARK,
            W_TEMPMARK TO T_ID_CHECK-MARK.
    MODIFY T_ID_CHECK INDEX SY-TABIX TRANSPORTING MARK.
    endmodule.
    module DELETE_ROW input.
      LOOP AT T_ID_CHECK WHERE MARK EQ 'X'.
        DELETE T_ID_CHECK.
      ENDLOOP.
    endmodule.   
    Edited by: Jaime Cabanban on Jan 7, 2010 8:46 PM

    Debugging the PBO part after deletion will help you know why the rows are getting deleted
    This is the sap doc answer for you question regarding LINE.
    Controls the scroll bar of the table control. At LOOP without internal table, LINES has the initial value zero and must be set in the program so that the scroll bar can be used. At LOOP AT <itab> the system sets this component to the number of rows of the internal table, whenever the table control is processed for the first time. The initialization event of a table control is not determined uniquely. If the corresponding internal table is not fully created at this event, then the LINES variable receives an incorrect value. If LINES in the LOOP loop is smaller as the number of rows of the internal table, then the table control contains blank rows at the end.
    Therefore you should always set the LINES component explicitly in the ABAP program, including at LOOP AT <itab>. In this way you have full control over the dimensions of the vertical scroll bar and so can control the number of rows that are ready for input. Initialization should usually occur at PBO directly before the LOOP statement for the table control.

Maybe you are looking for

  • Terrible Sony Customer Service

    Hi, I am posting this message here as a first step to create awareness regarding Sony's awful customer service. I stay in Toronto, Canada. My laptop's screen had issues with it and so I wanted to send it in for repair. I called Sony and they told me

  • HT4113 i have problem with my new ipad

    Good Morning

  • Add field group and Logical field group for ANLU

    Hi all, On my project, the table ANLU is containing many specifics fields. I would like to know how I could add a field group and logical field group corresponding to this specifics fields on ANLU, in order to be taking into account on my validation

  • Maintain Development Environment vs Production Environment - suggestions?

    We are doing an internal application on apex.oraclecorp.com and need to of course continue to make changes to the application, even though it is now in production. We need a way of either implementing either easy version control to promote versions i

  • Cs4 - Recompression and "life" panning.

    Hello  Input: 1920x1080 29.97fps progressive mpeg4 from toshiba camileo x100, audio 2x48kHz aac. Output: 640x480, 30fps, progressive, audio wav 2x.44.1kHz  I would like to use CS4 for this job.  Input movie holds some scene from my trip to Bangkok, i