Add input field with date salector inside a TableView

I’m trying to build an user interface for my ones step-screen flow command, this user interface needs a TableView and for each row i need an input field with date selector.
I’ve been trying to use de DefaultTableViewModel as the model for my TableView. I create a method to build my vector with the data for my DefaultTableViewModel as follow.
     private Vector createData() {
          Vector dataVec = new Vector();
          Vector retVector= new Vector();
          TextView text1 = new TextView("text1");
          dataVec.addElement(text1);
          TextView text2 = new TextView("text2");
          dataVec.addElement(text2);
          InputField date1 = new InputField("date1");
          date1.setType(DataType.DATE);
          dataVec.add(date1);
          retVector.add(dataVec);
          return retVector;
then i use the vector as follow:
Vector data=createData();
          Vector colName = new Vector();
          colName.addElement("Col1");
          colName.addElement("Col2");
          DefaultTableViewModel model = new DefaultTableViewModel(data, colName);
          TableView tabla = new TableView("tabla", model);
But when I Display my user interface the TableView shows a string that I thing is a reference of the Input and the TextView inside my TableView instead of showing the components.
Any Ideas?
Regards,
Orlando Covault

Hi Orlando,
   Check this thread on date selector in tableview.
<a href="https://www.sdn.sap.com/irj/sdn/thread?threadID=198839">Tableview</a>
Hope it helps.
Regards,
Saravanan

Similar Messages

  • JS error while using input fields with type=file on XP SP2

    Hi all,
    we found a new problem in applications which use input fields with type=file running in a browser on Microsoft Windows XP with SP2.
    A typical test layout might look like:
    <html>
      <head>
        <title>File-Upload</title>
      </head>
      <body>
        <form action="/cgi-bin/upload.pl" method=post
              enctype="multipart/form-data">
          <input type=file size=50 maxlength=100000 name="file"
                 accept="text/*"><br>
          <button onclick="document.forms[0].submit();">Send</button>
        </form>
      </body>
    </html>
    When you add a link without the fully qualified path (for example pic01.jpg instead of c:\pictures\pic01.jpg) and click on the 'Send' button, nothing happens and you get a Javascript error 'Access denied'.
    The solution can be found in the MS Knowledge Base article 892442:
    http://support.microsoft.com/default.aspx?scid=kb;en-us;892442
    We still investigate this issue and will inform you about the further proceeding.
    Regards,
    Rainer

    Hi Yepin Jin,
    I am facing the same issue did you solved it?
    Regards,
    Orlando Covault

  • Adding fields with data type "TIMS" to the BP transaction

    hi all,
      This  is Anil regarding the addition of fields to the BP transaction.
    here my problem is for BP transaction I could not find any BADI or screen exit  to add the fields. Even EEWB tool does not allow us to cretate the fields with data type "TIMS". so could you please suggest any other way to add these fields to BP?
    when I enter the values to the time fields in BP transaction, they must reflect in
    BUT000 table also?
    Regards,
    Anil .

    In the physical layer, Column Properties change the data type to int.
    If still problem exists, In the Business Model, write a case statement like
    case when column1=1 then 1 end
    and apply count aggregation on the new calculated column,add the column to presentation table, use that new calculated column for report.
    - Madan

  • How can I add table fields with existing structure ?

    I like to add PSTLZ field to stucture KOMGG.Is it possible to add table field with the existind structure.If yes how can I do this?kindly help me on this.

    hi
    go to se11
    in change mode select the button append
    create new append which starts from Zpstlz in this komgg structure and add data element and domain to this field and activate with request number
    then in field catalogue this field should be visible ,here ends your append
    now it is ready to use in condition tables.
    reward if helps !!!!!

  • EEWB : in CRM 4.0 adding  field with data element = table type

    Hi,
    Do you have experience in CRM4.0 to add a customer field with data element that is a table type ?

    Marie,
    I don't believe it is possible in CRM 4.0.  Another drawback of the EEWB is that you can't add currency or quantity fields using the EEWB tool.
    Good Luck,
    Stephen

  • How can I add some fields with LSMW standard program(Direct methods)

    Is this possible to add some fields with LSMW standard program?I like to upload data for MM01 using LSMW direct method,but some fields are not in standard program.How can I solve this problem?kindly help me pls.....

    Hi
    I think this should be possible. While doing LSMW, when the first record is uploaded system reads the fields ans stores them.
    Regards]
    Aravind

  • How to make a list item field with DATE data type?

    I have a column with DATE data type. Using forms 6i I want to generate a poplist list item field with this column while the value of the elements in the list to will be day names like SATURDAY,SUNDAY,MONDAY. if we change the data type from date to char, it will work properly but now with DATE data type behind it, it gives the following error message
    "FRM-32082: Invalid value for given item type.
    List WEEKREST
    Item: WEEKREST
    Block: EMPRESTS
    Form: MODULE3
    FRM-30085: Unable to adjust form for output."
    Using forms 6i how to make a list item field with DATE data type which can hold day names?

    Set your date column as a hidden (non-displayed) field. Create your list item with the varchar2 day names. Create the list item as a non-base-table field that accepts the text values of day names. On that field, create a when-validate-item trigger that translates the text into a real date, which it then uses to set the value of the actual base-table item.

  • Add new field with Report ME80FN

    I would like to Add Invoice number and order acknowlegment field with standreport ME80FN. How can I add these field with that report.pls any1 sugesst me ?
    Thanks in advance

    This report is a query on logical database MEPOLDB, why don't you build your own query ?
    Regards,
    Raymond

  • How to link label with an input field in data table?

    I am curious if there is a nice way to link a label to input field in a data table directly in JSP? Data filling the table are dynamically bounded.
    Sample, simplified code below. Values of "label" property are unique in the collection binded to dataTable.
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core"
         xmlns:h="http://java.sun.com/jsf/html"
         xmlns:jsp="http://java.sun.com/JSP/Page">
         <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" />
         <f:view>
              <html>
              <body>
              <h:dataTable value="#{screen$monitoring$errorlog$CorrectHopper.dataset}" var="DATA_ROW">
                   <h:column>
                        <f:facet name="header">
                             <h:outputText value="Name" />
                        </f:facet>
                        <h:outputLabel value="#{DATA_ROW.label}" for="#{DATA_ROW.label}_id" />
                   </h:column>
                   <h:column>
                        <f:facet name="header">
                             <h:outputText value="Value" />
                        </f:facet>
                        <h:inputText value="#{DATA_ROW.label}" id="#{DATA_ROW.label}_id" />
                   </h:column>
              </h:dataTable>
              </body>
              </html>
         </f:view>
    </jsp:root>
    returns:
    17:39:01,390 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
    java.lang.IllegalArgumentException: #{DATA_ROW.label}_id
    what is related to EL expression in h:inputText's "id" attribute.
    Is there any other way to bind label with dynamically created input field in JSP? Do I really have to bind input field directly to component objects with "binding" and set IDs manually with setId() (what is ugly solution because it moves View related logic to Model layer)?

    I've thought of using EL because I have to somehow
    link a label to an input field dynamically. Somehow? Dynamically? Just use plain text :)Well... just look at my code snippet (notice: we want to join the pairs of labels and text boxes placed in a datatable [or any other repeater-like component rendering properties of objects from a collection]):
    <h:dataTable value="#{screen$monitoring$errorlog$CorrectHopper.dataset}" var="DATA_ROW">
    <h:column>
    <f:facet name="header">
    <h:outputText value="Name" />
    </f:facet>
    <h:outputLabel value="#{DATA_ROW.label}" for="#{DATA_ROW.label}_id" />
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Value" />
    </f:facet>
    <h:inputText value="#{DATA_ROW.label}" id="#{DATA_ROW.label}_id" />
    </h:column>
    </h:dataTable>
    and what is your idea of using plain text as "id" attribute value in this case? :)
    Regards,
    Michal

  • Add input field to PO header

    Hi all,
    In the purchase order header, the customer made subscreen "Customer data" has already been added with a few fields from the EKKO_CI structure. The screen is named SAPLXM06 0101, and I can see that the user exits EXIT_SAPMM06E_006 and EXIT_SAPMM06E_008 from enhancement MM06E005 have been implemented. This all works fine.
    Now I have to add a new field to this screen, and I don't know how to go about it. Can anybody provide me with an instruction on how to do this?
    Thanks
    - Mari Virik

    Hi,
    Add a new field in structure EKKO_CI which will get added to the table EKKO..
    Then go to se51..Give the program name SAPLXM06 and give the screen number 0101..
    Press change..
    Press layout button..
    Then create a new input field and give the fieldname as EKKO-ZZxxxx..
    So that it will refer the DDIC properties..
    Thanks,
    Naren

  • How do you wrap the text on an input field with type="button"

    I want to put 2 lines of text on an input field.
    The button size is fixed at 75 and if there is more than 10 characters it truncates the text.
    The input field is defined as :
    <input type="button"
    value="CI<br>Discrepency"
    class="buttons75x75"
    onclick="javascript:callForm('ciDiscrepency');"/>
    If you can show me how, I would really appreciate it.
    -Gary

    Dug up the code I used to do this a while back:
    //The style sheet
      <style type="text/css">
        .buttonUp {
          border-style:outset;
          border-width:2px;
          width:3em;
          float:left;
          padding:2px;
          background-color:#ccc;
          text-align:center;
        .buttonDown {
          border-style:inset;
          border-width:2px;
          width:3em;
          float:left;
          padding:2px;
          background-color:#ccc;
          text-align:center;
    </style>
    //... Example buttons
      <div class="buttonUp" onmousedown="this.className='buttonDown';"
                            onmouseup="this.className='buttonUp';"
                            onclick="alert('Clicked on Small One');">He</div>
      <div class="buttonUp" onmousedown="this.className='buttonDown';"
                            onmouseup="this.className='buttonUp';">Hello</div>
      <div class="buttonUp" onmousedown="this.className='buttonDown';"
                            onmouseup="this.className='buttonUp';">Hello World</div>
      <div class="buttonUp" onmousedown="this.className='buttonDown';"
                            onmouseup="this.className='buttonUp';">Hello<br/>World</div>
      <div class="buttonUp" style="width:5em;" onmousedown="this.className='buttonDown';"
                            onmouseup="this.className='buttonUp';">Hello World</div>You could put any javascript you want on the onclick event, so you would call the javascript you previously used to submit the form and set the input name. In this example I had all the buttons be a fixed width, if you leave out the width in the style sheet then the block will snap to fill the same width as the text inside it, much like normal buttons do. The difference is, with a fixed width then text wrapping occurs automatically (like in the 3rd button) while without a defined width the div will only display a second line when the line break is added. Note the the fixed width can be over-ruled by an inline style if needed (last sample).
    The website I pointed to before has a simpler solution (less javascript events needed). An implementation for his approach would be:
    //The style sheet
      <style type="text/css">
        .button {
          border-style:outset;
          border-width:2px;
          color:#000;
          float:left;
          padding:2px;
          background-color:#ccc;
          text-align:center;
          text-decoration:none;
          display:block;
        .button:active {
          border-style:inset;
          border-width:2px;
          color:#000;
          float:left;
          padding:2px;
          background-color:#ccc;
          text-align:center;
          text-decoration:none;
          display:block;
      </style>
    //... Example buttons
      <a class="button" href="#" onclick="this.blur();alert('Now you clicked linkey');return false;">Hello<br/>World</a>Same deal here with the fixed-width vs.fit-to-content. I add the 'return false;' to the list of the onclick commands so IE doesn't make the 'link clicked' noise and the URL doesn't go to thispage.html#.
    All these buttons work in FireFox 2, IE 7, and Safari 3 if they are running in STRICT mode. The button colors and borders don't precisely match FF and IE buttons, but they are close (although they aren't close at all to Safari buttons).

  • CRM_IC - add input field

    Hello,
    I'm trying to add a new input field to a view in CRM_IC. I'm following the Cookbook and have created a copy Z_CRM_IC with the corresponding Views and Controllers, updated the profile and also placed it in the view, no problem. But how do I take care of the database update/search? The field does not exist in the context node. Any hint would be appreciated!
    Regards,
    Henrik

    Hi Orlando,
       Check this thread on date selector in tableview.
    <a href="https://www.sdn.sap.com/irj/sdn/thread?threadID=198839">Tableview</a>
    Hope it helps.
    Regards,
    Saravanan

  • Disable an Input field with the help of a radio button selection.

    Hi Guys,
    I know it is a very basic question and also has many threads for the mentioned query. None of the threads gave me a real clue about the problem. It is as follows:
    Simply, I have an input field and there are two more radio buttons on the screen, say rd1, and rd2.
    Initially Rb_gtgr is active and input field is blank and disabled, and when i select Rb_selgr, input field should be active and mandatory. It means when i try to execute the code with out entering any value after it is enabled, an error message should appear. For this the code is as follows:
    AT SELECTION-SCREEN OUTPUT.
      PERFORM screen_grace_on.
    AT SELECTION-SCREEN ON p_grace.
      PERFORM check_grace_days.
    FORM screen_grace_on .
      DATA: l_v_grace TYPE char2.
      CONSTANTS: l_c_grace TYPE char7 VALUE 'P_GRACE'.
    l_v_grace = p_grace.
    CLEAR p_grace.
      IF rb_selgr EQ c_x.
        LOOP AT SCREEN.
          IF screen-group1 = 'ABC'.
            screen-required = 1.
           screen-active = 1.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-group1 = 'ABC'.
            screen-input = 0.
            screen-active = 1.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " SCREEN_GRACE_ON
    FORM check_grace_days.
      IF rb_selgr EQ c_x AND  p_grace EQ 0.
        PERFORM screen_grace_on.
        MESSAGE e492(/ams/ramfcmess1).          " Enter the number of Grace days
      ELSEIF rb_selgr EQ c_x AND p_grace GE 0.
        PERFORM screen_grace_on.
      ENDIF.
    ENDFORM.
    Ideally this code should work since in the PBO i.e., At selection screen output i am enabling the fields, and also when i select the second radio button i am also checking for the value too..
    I am working on 4.7 version of SAP. The Most interesting observation is it works fine for few variants, and not with others.
    Thank you

    Hi,
    Go through this following code,
    selection-screen begin of block B2 with frame title TEXT-005.
    selection-screen begin of line.
    parameters:     P_BIRPT type C radiobutton group RAD1 default 'X' user-command UCOMM.
    selection-screen comment 3(20) TEXT-002 for field P_BIRPT.
    selection-screen end of line.
    selection-screen begin of line.
    parameters:     P_COLRPT type C radiobutton group RAD1.
    selection-screen comment 3(20) TEXT-003 for field P_COLRPT.
    selection-screen end of line.
    selection-screen begin of line.
    parameters:     P_PAYRPT type C radiobutton group RAD1.
    selection-screen comment 3(20) TEXT-004 for field P_PAYRPT.
    selection-screen end of line.
    selection-screen end   of block B2.
    selection-screen begin of block B1 with frame title TEXT-001.
    select-options: SO_KTOKD for  KNA1-KTOKD modif id M4,
              SO_BLART for  BSIS-BLART modif id M2.
    parameters:     P_PAID   type ZCLEAR     modif id M3 as listbox visible length 20.
    selection-screen end   of block B1.
    at selection-screen output.
      loop at screen.
        if P_BIRPT eq 'X'.
          if SCREEN-GROUP1   = 'M2' or SCREEN-GROUP1 = 'M3' .
            SCREEN-INVISIBLE = '1'.
            SCREEN-ACTIVE    = '0'.
            modify screen.
          endif.
        elseif P_COLRPT eq 'X'.
          if SCREEN-GROUP1   = 'M3'.
            SCREEN-INVISIBLE = '1'.
            SCREEN-ACTIVE    = '0'.
            modify screen.
          endif.
        elseif P_PAYRPT eq 'X'.
          if SCREEN-GROUP1   = 'M2'.
            SCREEN-INVISIBLE = '1'.
            SCREEN-ACTIVE    = '0'.
            modify screen.
          endif.
          if SCREEN-GROUP1   = 'M4'.
            SCREEN-INVISIBLE = '1'.
            SCREEN-ACTIVE    = '0'.
            modify screen.
          endif.
        endif.
      endloop.
    Thanks
    Anil D

  • How to populate dynamic internal table fields with data??

    Hi Folks,
    How to assign a particular internal table field to a dynamically assigned internal table?
    I have an excel sheet, and i upload the excel sheet data into an internal IT_EXLOAD table using FM ALSM_EXCEL_TO_INTERNAL_TABLE
    Now i created a dynamic internal table which has the same column as in my DB table.
    I have to fill the dynamically created Internal table with the IT_EXLOAD data dynamically.
    Suppose in future if i add some field in DB table and for that field if i add some column in excel sheet there is no need to change in the program.
    Looking for reply...
    Best Regards,
    Sayak

    hi,
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                filename                = p_path
                i_begin_col             = '1'
                i_begin_row             = '2'
                i_end_col               = '2'
                i_end_row               = '1000'
           TABLES
                intern                  = intern
           EXCEPTIONS
                inconsistent_parameters = 1
                upload_ole              = 2
                OTHERS                  = 3.
    *declare intern_tmp as internal table tb_data in wich you want the data
    *and declare a field symbol <fs_123>
    LOOP AT intern.
        ASSIGN COMPONENT intern-col OF STRUCTURE
        intern_tmp TO <fs_123>.
        IF NOT <fs_123> IS ASSIGNED.
          CLEAR intern.
          CLEAR intern_tmp.
          CONTINUE.
        ENDIF.
        <fs_123> = intern-value.
        AT END OF row.
          CLEAR tb_data.
          MOVE-CORRESPONDING: intern_tmp TO tb_data.
          APPEND tb_data.
          CLEAR intern_tmp.
        ENDAT.
        CLEAR intern.
      ENDLOOP.
    **paste this code and you can see the data in ur tables dynamically.
    Thanks
    Nitin Sachdeva

  • Problem populating html form fields with data from database.

    I'm using a straight forward piece of code to populate a form with data from a database, to create and 'edit record' page. The code is as follows;
    TO RETREVE THE DATA FROM THE DATABASE;
         $query = "SELECT * FROM $table WHERE newsletter_id = '$newsletter_id'" ;
         mysql_select_db($database) ;
         $result = mysql_query($query, $connect);
         $numRows = mysql_num_rows($result);
         $dbnewsletter_title = mysql_result($result,$i,'newsletter_title');
    TO POPULATE THE FORM FEILD;
    <tr>
              <td width="140"><p class="admin">Newsletter title</p></td>
              <td><input name="newsletter_title" type="text" <? print "value=$dbnewsletter_title";}?> /></td>
            </tr>
    However, when I view the page, the string shows in the text feild, but seems to be split at the point of the first space. So basically only the first word of the string shows in the text field. If I try to print '$dbnewsletter_title' outside of the table, the string is shown in full as it should be.
    Does anyone know what is causing this problem?
    Many Thanks

    Put the value in quotes:
    <?php print "value='$dbnewsletter_title'"; ?>

Maybe you are looking for