Very Urgent!!!! Reg Tables in Web Dynpros

Hi all,
The following is my requirement.
I need to display values in my table on the view. But based on the Field content in one perticular column i need to make that entire row editable/in editable.
Say I have a column Status in my Table.
If the status field content for a given row is 'In progress' then that row should be made Editable and all other rows with status other than 'In Progress' should be made Ineditable.
Please Revert back ASAP.
Thanks
Sravan.

No, do not use wdDoModifyView().
You could add a calculated boolean attribute "ReadOnly" under the data source node "Rows", and (assuming the table cell editor is an InputField) bind the "readOnly" property of the input field to this attribute.
In the generated getter for the calculated attribute, you would write something like
boolean getRowsReadOnly(IWDNodeElement element)
  //@@begin ...
  IRowsElement row = (IRowsElement) element;
  return row.getState() != State.IN_PROGRESS;
  //@@end
Armin

Similar Messages

  • Database table in Web dynpro

    Hi All,
    I am trying to use a database table in Web Dynpro. For this, o already created and deployed a dictionary project and one database table in that project. In my web dynpro project when i am accessing this table columnname it works fine, but its not allowing to insert the data.It is giving following error:
    The SQL statement "INSERT INTO "TMP_2" ("NAME") VALUES ( "ASDFGH") " contains the semantics error[s]: - 1:36 - the column >>ASDFGH<< is undefined in the current scope  where NAME is my column name.
    Also when i change some column name or add one more column to my table and then deploy it. After this, when i run my web dynpro project it doesn't show the updated column name and column count.
    Please help.
    Regards,
    Chirag Aneja

    Hi,
    Try using prepare statement as follows
    PreparedStatement pstmt = con.prepareStatement("INSERT INTO TMP_2(NAME) VALUES ( ?) );
    pstmt.setString(1, "ASDF");
    Regards
    Ayyapparaj

  • How to create the Dynamic UI element table in web dynpro in abap

    Hi All,
    Does anybody have reference note or teach me how to create dynamic UI element table in web dynpro in abap ?
    Regards,
    Luke

    HI LukeWong ,
    for creating any UI dynamically you shoul use their runtime class that always start with cl_wd_* ui element name*
    so for the Table UI element the runtime class is CL_WD_TABLE
    now reffer the below code for creating the Table UI dynamically
    METHOD wddomodifyview.
    DATA lr_table TYPE REF TO cl_wd_table.
    DATA lr_flow_data TYPE REF TO cl_wd_flow_data.
    DATA lr_container TYPE REF TO cl_wd_uielement_container.
    DATA lr_column_name TYPE REF TO cl_wd_table_column.
    DATA lr_text_view TYPE REF TO cl_wd_text_view.
    DATA lr_table_header TYPE REF TO cl_wd_caption.
    DATA lr_column_name_header TYPE REF TO cl_wd_caption.
    IF first_time EQ abap_true.
    lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
    lr_table = cl_wd_table=>new_table(
    id = 'TBL_TABLE'
    bind_data_source = 'TABLE'
    design = cl_wd_table=>e_design-alternating
    visible_row_count = 3
    lr_flow_data = cl_wd_flow_data=>new_flow_data( element =
    lr_table ).
    lr_container->add_child( lr_table ).
    lr_column_name = cl_wd_table_column=>new_table_column(
    id = 'TBL_EXAMPLE_NAME'
    lr_table_header ?= cl_wd_caption=>new_caption( text = 'Table UI elem
    ent - example').
    lr_table->add_column( the_column = lr_column_name ).
    lr_table->set_header( lr_table_header ).
    lr_text_view = cl_wd_text_view=>new_text_view(
    id = 'TXV_NAME'
    bind_text = 'TABLE.NAME'
    lr_column_name_header ?= cl_wd_caption=>new_caption( text = 'Name').
    lr_column_name->set_table_cell_editor( the_table_cell_editor = lr_text_view).
    lr_column_name->set_header( lr_column_name_header ).
    ENDIF.
    ENDMETHOD.
    Regards
    Chinnaiya P
    Edited by: chinnaiya pandiyan on Sep 17, 2010 12:01 PM

  • How to display an status Icon in Table UI web dynpro ABAP?

    Hi Experts ,
    How to display an status Icon ( Traffic light ) in Table UI web dynpro ABAP? can somebody tell with a coding example. also I need to update status on condition so whats the best way?
    Thanks in advance.
    Regards,

    Hi Laeeq,
    click on table cntrol n place it on the screen..
    now click on the icon button n place it in the table control area.. a column of icons get created. name it (say) ICON.
    in the PBO..
    loop at internal table and call module in the loop (say) .
    MODULE ICON_DISP.
    now in the module try the foll code :
    module icon_display output.
    check some condition and assign the icon to the variable icon_r
      icon_R = 'ICON_GREEN_LIGHT'.
      CALL FUNCTION 'ICON_CREATE'
        EXPORTING
          name                        = ICON_R
        TEXT                        = ' '
        INFO                        = ' '
        ADD_STDINF                  = 'X'
       IMPORTING
         RESULT                      = ICON
      EXCEPTIONS
        ICON_NOT_FOUND              = 1
        OUTPUTFIELD_TOO_SHORT       = 2
        OTHERS                      = 3
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      endmodule.
    where icon(35) and icon_r(35) type c .
    hope this helps u..
    Regards
    Aparna

  • Binding arraylist, list, or multi-dimensional array to table in web dynpro

    Greetings,
    I like to ask if anyone knows how to bind data from an arraylist, list, or multi-dimensional array list to a table in web dynpro, your help is much appreciated.
    Thanks in advance.
    Cory

    Is there a way to create or cast a multi-dimensional
    array from a Collection or Vector ?
    ArrayList list = new ArrayList();
    list.add( new Object[4] );
    Object[] array2 = list.toArray(); // is only
    single dimension !
    Of course it is a single dimension array.
    Check the definition of the toArray() function, and the specification of arrays in general.
    toArray() returns a one dimensional array.
    In your case it will return an array of arrays. So array2[0] will be an array of 4 objects.
    That just happens to be a 2 dimensional array though you may (I haven't checked it) need some parentheses to call the elements.
    Try Object o = array2[0][1]; and if that doesn't work Object o = (array2[0])[1];

  • Drop down in allready displaying table in web dynpro

    Hi Experts,
    We have  a requirement where we are displaying the data of the table KNA1 in a table form (Web dynpro) which is editable.for the field NAME1 there must be drop down box which contain some values , so that for any row user can select one of the value and then when press SAVE button the table KNA1 should be updated with the new value of NAME1.
    Can you please let us know how to do this.
    Thanks
    Mahesh

    >Can you please let us know how to do this.
    Which part of what you describe and what exactly are you having problems with.  You can of course change the cell editor of your column to DDLB.  Is that where you are having problems.  Or are you trying to decied between DDLBByKey and DDLBByIndex.  For that I would suggest you read the following:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/bb/69b441b0133531e10000000a155106/frameset.htm

  • Declare global table in web dynpro

    Hi,
    How can I declare a global table in web dynpro?

    Hi,
    If you want to declare an global internal table,
    You can declare it in componentcontroller's 'ATTRIBUTES'  Tab,
    This internal table you can access in componentcontroller's method using 'wd_this' reference.
    for example: "wd_this->itab".
    If you want to access the same in any view's methods then you can do it using 'ig_componentcontroller' reference.
    for example: "ig_componentcontroller->itab".

  • Update cluster table from Web dynpro

    Hi
    I am trying to export data to a cluster table from web dynpro using this statement:
    EXPORT zhr_sanct_st100 FROM zhr_sanct_st100 TO DATABASE zhr_clrm(ep) ID zhr_clrm-srtfd.
    same piece of code work well if I include it in a report program through se38, but If I use it in Web dynpro, it doesnt update the cluster table and there is no error shown.
    please reply ASAP.
    Vishal kapoor

    Thanks for your immediate reply. it worked this way:
    IMPORT structure name TO structure name
      FROM DATABASE cluster table name
      TO wa_zhr_clrm
      ID zhr_clrm-srtfd.
    initially i missed to insert a work area wa_zhr_clrm, which has all the key fields of the cluster table.
    Regards
    Vishal Kapoor

  • Date Column not getting sorted in a table in web Dynpro Java

    Hi All,
    I am facing an issue while sorting the date column in a table in my web dynpro java application.
    When the date is displayed in the sql format in tha table, I am able to sort the date column successfully but when we convert the date field from sql format to util format in our table and then sort it does not work.
    Kindly let us know the steps to be followed in this case to sort the date column of a table in Simple Date format as we do not want date in the sql format to be displayed.
    Thanks & Regards,
    Anurag

    Hi,
    You might want to check whether both your browser's language settings are identical. The browser language could also determine the date format.
    As a workaround, you could add an extra attribute to your context, and set the calculated property to 'true'.
    In your table, add a new column and bind to this new attribute, and hide your original date column
    If you sort using the date column that's hidden now, you could use the calculated field to fixed-format your date the way you prefer (by using the SimpleDateFormatter class for instance)
    Cheers,
    Robin

  • Creating a radio button group in a column of a table in Web Dynpro

    Hi,
    I want to put a radio button group in a column of a table in Webdynpro. I added a column to a web dynpro view and then inserted a tableCellEditor for that column.. But I cannot define it as Radio Button group. I want the user to be able to select 3 statuses using this group.
    Does anyone have a solution for this??
    Thanks in advance...
    Nakul

    Hi,
    You wont be able create three RB in one cell.
    Create as many column as the no of options is.Here it is 3.
    Create 4 attributes inside the node , option 1,option 2,option 3 and selectedoption.
    Map each RB s keytoSelect to option 1,2,3. Map all the RBs selectedKey atribute to selectedoption.
    Now selection for each row will be stored in the selected option.
    Regards
    Bharathwaj

  • Using the XML returned by XI to populate table in Web Dynpro UI

    Hi,
    In Web Dynpro,I have a scenario where i have to generate reports. For this, I enter the "Customer number", "Date" & "Item No" in 'Generate report' page  and hit the "submit" button. These details are sent as XML to XI which interacts with the ABAP R/3 system, performs the search and returns the search results as an XML
    Now, I want to display search results contained in this XML by populating it in a table.
    From, the point where the XML is returned by XI, could you please tell me the step by step process to populate this XML in a table. Please include code, if any.
    Kindly help.

    Hello Sandeep,
    Create context node with following strucure:
    <i>
    result
    -CustomerNumber
    -ItemNumber
    -Material
    -OrderDate</i>
    Create data handler:
    public class XIDataHandler extends DefaultHandler {
         private String lastAttribute;
         private IWDNodeElement newElement;
         public void startElement(String namespaceURI, String localName, String rawName, Attributes atts) {
              if ("Result".equals(localName)) {
                   newElement = wdContext.createResultElement();
                   wdContext.nodeResult().addElement(newElement);
              } else {
                   if(null!=newElement)
                        lastAttribute = localName.trim();
         public void endElement(String namespaceURI, String localName, String rawName) {
              if ("Result".equals(localName)) {
                   newElement = null;
                   lastAttribute = null;
         public void characters(char[] data, int off, int length) {
              if(null!=newElement && null!=lastAttribute) {
                   final String value = new String(data, off, length).trim();
                   if(!"".equals(value)) {
                        newElement.setAttributeValue(lastAttribute, value);
    And parse XML in appropriate place within your application:
    try {
         SAXParserFactory factory = SAXParserFactory.newInstance();
         SAXParser parser = factory.newSAXParser();
         //Loading XML from string (XI_DOCUMENT), change if source differs
         StringReader sr = new StringReader(XI_DOCUMENT.trim());
         InputSource is = new InputSource(sr);
         parser.parse(is, new XIDataHandler());
    } catch (Exception e) {
         final StringWriter sw = new StringWriter();
         final PrintWriter pw = new PrintWriter(sw);
         e.printStackTrace(pw);
         wdComponentAPI.getMessageManager().reportException(sw.toString(), true);
    Create table and table columns and map your context to it.
    Best regards, Maksim rashchynski.

  • Accessing portal dictionary tables from Web Dynpro project

    Hi
    Am a new to whole portal and webdynpro thing, and I hope that you can help here
    I created a new dictionary project through NWDS and created a table with columns and I successfully deployed it
    I also created a web dynpro project and I added a TABEL UI to the layout
    how can I connect or access the table I created in the dictionary project from the Web dynpro project so I can query all data to fill the TABEL UI  in the web dynpro ?
    is there a driver that I can use like JDBC where I can just write regular SQL queries ?
    regards

    Hi swathi
    See the persistence API--Adv and Disadvantages what ever you mentioned come under the persistence API
    Relational Persistence
    =================
    SQL-based coding: expressive!
    SQLJ: for static SQL, checked at design time,
    recommended
    JDBC: for dynamic SQL, can be combined with SQLJ
    =======================
    Object-relational Persistence
    ======================
    SQL-free! Portable!
    JDO: light-weight object persistence, Java-like dynamic
    query language
    EJB CMP: part of J2EE standard, relatively heavy-weight,SQL-like static query language
    Regards,
    Venkata Kalyan Karanam

  • Create dynamic table in web dynpro abap

    Hi Friends,
    I want to create several tables in a web dynpro. For this reason I have created a View, a group1 and a context node.
    Now I want create a table for each characteristic group from cabn in the ui group1.
    For this reason I want to use create_table_from_node and I have to craete dynamicly attributes in the node.
    Is it the propper way  or is there a different approach.
    So in this case
    1. I read the node
    2. craete attribute for each characteristic group in this node
    3. create a UI Table with create_table_from_node for each attribute
    4. bind the data to the UI Table
    Can I do the same without to craete attributes?
    Thank in advance.
    RG. Jimbob

    Hi Jimbob,
    Have you looked at using the row-repeater UI element? You could then have as many tables as per your characteristic groups.
    Although this would be more difficult if the attributes of each table were to also be only known at run-time. (I'm not sure that this is the case though from your description of the issue.)
    so have a context of the form:
    Context Root
    --->node_characteristic_group (0..n)
    >node_char_group_details(0...n) (non-singleton child node)
    then bind your row repeater to node "node_characteristic_group " and bind the table inside the row repeater to node "node_char_group_details".
    Each time you had a new element in the node_characteristic_group you would get a new table...
    Much easier to support that anything dynamically created.
    Cheers,
    Chris

  • Upload .xls file in internal table in web dynpro abap

    Hi everyone,
    i want to upload .xls(excel file) into an internal table.....after lots of attempts i came to a conclusion that web dynpro only supports .CSV(another format of excel file) to be uploaded into internal table....i tried many ways....is there a way i can upload .xls file...kindly help me in the same. following is the code i m using
      DATA LO_EL_CONTEXT TYPE REF TO IF_WD_CONTEXT_ELEMENT.
      DATA LS_CONTEXT TYPE WD_THIS->ELEMENT_CONTEXT.
      DATA ITEM_FILE TYPE WD_THIS->ELEMENT_CONTEXT-EXCEL_UPLOAD.
      get element via lead selection
      LO_EL_CONTEXT = WD_CONTEXT->GET_ELEMENT( ).
      @TODO handle not set lead selection
      IF LO_EL_CONTEXT IS INITIAL.
      ENDIF.
      get single attribute
      LO_EL_CONTEXT->GET_ATTRIBUTE(
        EXPORTING
          NAME =  `EXCEL_UPLOAD`
        IMPORTING
          VALUE = ITEM_FILE ). "xstring format
    DATA S_CONT TYPE STRING.
    DATA CONVT TYPE REF TO CL_ABAP_CONV_IN_CE.
    DATA: FIELDS1 TYPE STRING_TABLE.
    1st tried this code-> using "cl_abap_conv_in_ce"
    CALL METHOD cl_abap_conv_in_ce=>create
    EXPORTING
    *encoding = c_encoding "optional
    input = ITEM_FILE
    RECEIVING
    conv = CONVT.
    CALL METHOD CONVT->read
    IMPORTING
    data = S_CONT.
    when it didnt work out...then tried followin function module
      CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
        EXPORTING
          IN_XSTRING        = ITEM_FILE "xsrting
       IMPORTING
         OUT_STRING          = S_CONT
    TYPES: BEGIN OF TY_TAB,
           NAME_CHAR TYPE  STRING,
           DESCR_CHAR TYPE  STRING,
           NUMBER_DIGITS TYPE  STRING,
           END OF TY_TAB.
    DATA: FIELDS TYPE STRING_TABLE.
    DATA: LV_FIELD TYPE STRING.
    DATA: S_TABLE TYPE STRING_TABLE.
    DATA: ITAB TYPE TABLE OF TY_TAB.
    DATA: STR_ITAB TYPE TY_TAB.
    *splits string based on new line
    SPLIT S_CONT AT CL_ABAP_CHAR_UTILITIES=>CR_LF INTO TABLE S_TABLE.
    FIELD-SYMBOLS: <WA_TABLE> LIKE LINE OF S_TABLE.
    LOOP AT S_TABLE ASSIGNING <WA_TABLE>.
    splits string on basis of tabs
      SPLIT <WA_TABLE> AT ',' INTO
                      STR_ITAB-NAME_CHAR
                      STR_ITAB-DESCR_CHAR
                      STR_ITAB-NUMBER_DIGITS.
      APPEND STR_ITAB TO ITAB.
    ENDLOOP.
    I am able to do the uploading if the file is in .CSV format and not .XLS format....
    there are lots of forums on SDN for the same....but at the end there is no solution provided.....
    experts kindly solve it this time...thanks in advance

    Hi,
    It is not possible to upload an xls file because it will be having some binary characters. better to go with .csv file format.
    Refer this [link too|Re: Excel File Uplaod] it will explain you clearly.
    Regards
    Arun.P

  • Deletion of data of R/3 table using Web Dynpro

    Hi Experts,
    I have to delete some records from R/3 table CATSDB using Web Dynpro form. I am using BAPI_CATIMESHEETMGR_DELETE for this purpose. Can you please let me know the steps to accomplish this exercise.
    I have displayed the records of CATSDB using one custom made BAPI. Using this BAPI, I am able to display the data. I have created one button called "Delete Data" button on the form. I have called BAPIs using following code:
    public void onActionDeleteData(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionDeleteData(ServerEvent)
        wdThis.wdGetTimesheetCompController().executeBapi_Catimesheetmgr_Delete_Input();
        wdThis.wdGetTimesheetCompController().executeBapi_Transaction_Commit_Input();
    //@@end
    However, when I am selecting the record and trying to delete the record, record is not getting deleted. Can you please help me in resolving the issues? What is going wrong?
    Regards,
    Brian

    Hi Ashwani,
    I have checked the BAPI - BAPI_CATIMESHEETMGR_DELETE. I am unable to delete the record using even R/3 screen. For deleting the record, I have to provide following four parameters:
    PROFILE, TESTRUN, RELEASE_DATA and AGENT.
    I don't know what should be the value of TESTRUN, RELEASE_DATA and AGENT. I know only the value of PROFILE. From ABAPers, I have come to know that in order to delete the reccord I must provide the value of COUNTER. However, the BAPI,  BAPI_CATIMESHEETMGR_DELETE is not asking me to enter the COUNTER.
    Can you please let me know how to delete the record from BAPI using R/3 screen. After that I will try to delete record using Web Dynpro application.
    Regards,
    Brian

Maybe you are looking for

  • In the af:table selected row need to display in the next page?

    Hi, I am using jdev 11.1.2.3.0. I tried one sample application, in that jspx page, I am having the af:table and button in my view activity. In that table select one row and click on the button that time, the navigation page always show the first row.

  • Verizon dsl issues with macbook pro

    Hi there We recently got Verizon high speed internet and it's (mostly) been working fine.  We have a home network set up on various devices: 2 MacBooks, 3 iPhones, 1 iPad.  The WiFi has been perfect on the smartphones and tablets, but there are two o

  • OutOfMemoryError in Adapter module

    Hi all, I have scenario where I have to do some complex things in a adapter module. with little messages it works fine, but with the greate ones (about 15MB) I get a OutOfMemoryError after 2 messages. The system itself has anough memory I have about

  • Quick Look will not play MPEG files

    I know this is possible because before I bought a new hard-drive it worked. I deleted the preferences file and restarted my computer to no avail. Any other ideas? Perian and Flip4Mac are installed. Message was edited by: GDuran144

  • How to disable air play on Iphone 5s

    How to disable air play on Iphone 5s so I can use fire/HDMI adaptor to see on TV