How to display check box in atable control

hi
here is my requirement
how can i display check box in table control and also when i check that check box it has to dispaly one pop up screen with the records of table control row
points will be rewarded
Thanks&Regards
Nagesh.Paruchuri

Hi,
See this code for how to display check box in atable control
*---- Table declaration.
TABLES: KNA1.
CONTROLS TC1 TYPE TABLEVIEW USING SCREEN 200.
CONTROLS TC2 TYPE TABLEVIEW USING SCREEN 300.
*---- Data declaration.
DATA:OKCODE LIKE SY-UCOMM.
DATA:V_KNA1 LIKE KNA1.
*DATA:ERROR TYPE C.
*---- Internal Table declaration.
DATA:BEGIN OF IT_TAB OCCURS 0,
      CHK,
      VBELN TYPE VBELN_VA,
      KUNNR TYPE KUNAG,
      ERDAT TYPE ERDAT,
      AUDAT TYPE AUDAT,
      VBTYP TYPE VBTYP,
     END OF IT_TAB.
DATA:BEGIN OF IT_TAB1 OCCURS 0,
      VBELN TYPE VBELN_VA,
      POSNR TYPE POSNR_VA,
      MATNR TYPE MATNR,
      MATWA TYPE MATWA,
      PMATN TYPE PMATN,
     END OF IT_TAB1.
*&      Module  USER_COMMAND_0100  INPUT
MODULE USER_COMMAND_0100 INPUT.
  OKCODE = SY-UCOMM.
  CASE OKCODE.
    WHEN 'DISP' OR SPACE.
      SELECT *
         FROM VBAK
         INTO  CORRESPONDING FIELDS OF TABLE IT_TAB
         WHERE KUNNR = KNA1-KUNNR.
      IF SY-SUBRC <> 0.
        MESSAGE 'No sales document exists'(001) TYPE 'I'.
      ENDIF.
      LEAVE TO SCREEN 200.
      CLEAR OKCODE.
*--- To leave Transaction
    WHEN 'BACK' .
      LEAVE PROGRAM.
      CLEAR OKCODE.
  ENDCASE.
ENDMODULE.                 " USER_COMMAND_0100  INPUT
*&      Module  validate_kunnr  INPUT
MODULE VALIDATE_KUNNR INPUT.
  V_KNA1 = KNA1.
  SELECT SINGLE *
    FROM KNA1
   WHERE KUNNR = KNA1-KUNNR.
*-----Process error condition
  IF SY-SUBRC <> 0.
    CLEAR KNA1.
    KNA1-KUNNR = V_KNA1-KUNNR.
    CASE OKCODE..
      WHEN 'BACK' OR 'EXIT' .
        LEAVE PROGRAM.
    ENDCASE.
    MESSAGE 'Customer Does Not Exist'(002) TYPE 'I'.
    LEAVE TO SCREEN 100.
  ENDIF.
ENDMODULE.                 " validate_kunnr  INPUT
*&      Module  STATUS_0100  OUTPUT
MODULE STATUS_0100 OUTPUT.
  SET PF-STATUS 'PF'.
ENDMODULE.                 " STATUS_0100  OUTPUT
*&      Module  USER_COMMAND_0200  INPUT
MODULE USER_COMMAND_0200 INPUT.
  CASE OKCODE.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
      LEAVE TO SCREEN 100.
      CLEAR OKCODE.
      CLEAR IT_TAB1.
    WHEN 'DISP' .
      CLEAR OKCODE.
      READ TABLE IT_TAB WITH KEY CHK = 'X'.  
   IF SY-SUBRC = 0.
        SELECT  VBELN   POSNR  MATNR MATWA PMATN
     FROM VBAP
     INTO  TABLE IT_TAB1
     WHERE VBELN = IT_TAB-VBELN.
        IF SY-SUBRC = 0.
          SORT IT_TAB.
          DESCRIBE TABLE IT_TAB LINES TC1-LINES.
          LEAVE TO SCREEN 300.
        ELSE.
          MESSAGE E016(YBHV).
        ENDIF.
      ELSE.
        MESSAGE 'Please select one record' TYPE 'I'.
      ENDIF.
  ENDCASE.
ENDMODULE.                 " USER_COMMAND_0200  INPUT
*&      Module  STATUS_0200  OUTPUT
MODULE STATUS_0200 OUTPUT.
  SET PF-STATUS 'PF3'.
ENDMODULE.                 " STATUS_0200  OUTPUT
*&      Module  USER_C.OMMAND_0300  INPUT
      text
MODULE USER_COMMAND_0300 INPUT.
  SET PF-STATUS 'PF3'.
  CASE OKCODE.
    WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
      CLEAR OKCODE.
      LEAVE TO SCREEN 200.
  ENDCASE.
ENDMODULE.                 " USER_COMMAND_0300  INPUT
*&      Module  modify  INPUT
MODULE MODIFY INPUT.
  MODIFY IT_TAB INDEX TC1-CURRENT_LINE.
ENDMODULE.                 " modify  INPUT
*&      Module  okcode  OUTPUT
      text
MODULE OKCODE OUTPUT.
  CLEAR OKCODE.
ENDMODULE.                 " okcode  OUTPUT
Reward Pointsa If usefull
Regards
Fareedas

Similar Messages

  • How to add check box in table control?

    Dear frnds,
    In our requirement i am used tablec ontrol for dialog programming, but i am confused about addition of check box as fields in table control.
    Any help are welcome from your side.

    Hi,
    Chk this demo program: DEMO_DYNPRO_TABCONT_LOOP_AT
    & RSDEMO02.
    Another way:
    Go to the edit mode of the screen select the table control column you want to make it as check box and follow the menu EDIT->CONVERT->check box.
    (make sure that column definition in itab/ddtab is of size 1 char)
    Also chek out this link:
    Add Check box in Table control
    Hope these help you.
    Regards,
    Anjali

  • How to display check box in the search help restriction pop-up window

    Hi Experts,
    I have created one searc help with dialog value restrictions. Search help contains 4 fields.
    Out of which one field has length one character.
    As oon as user press on F4 on particular field, it will display pop-up window with restrictions and displayed 4 fields.
    I would like to show that field ( one character length field) as check box in search help restrictions pop-up window.
    Pls help me ,... How can we acheive this..
    Thanks
    Raghu

    Ur Exact Requirement,
    Types : begin of itab,
         fields type c,
         Check type c,(For Check Box)
         end of itab.
    data it_tab type standard table of itab.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_input-low.(If it is in select-options)
      CLEAR  v_input.
      GET CURSOR FIELD s_input VALUE  v_input.
      CALL FUNCTION 'AIPC_CONVERT_TO_UPPERCASE'
        EXPORTING
          i_input  = v_input
          i_langu  = sy-langu
        IMPORTING
          e_output = v_input.
      CLEAR s_input-low.
      IF v_input NE '' .
        IF v_input NE '?'..
          v_input1-sign = 'I'.
          v_input1-option = 'CP'.
          v_input1-low = v_input.
          APPEND v_input1.
        ENDIF.
      ENDIF.
    SELECT DISTINCT   Field
                      FROM Table
                      INTO TABLE it_tab
                      WHERE field IN v_input.
    CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
              EXPORTING
                i_title                 = 'Select Colors'
               i_selection             = 'X'
                i_zebra                 = 'X'
                i_screen_start_column   = 5
                i_screen_start_line     = 5
                i_screen_end_column     = 30
                i_screen_end_line       = 12
                i_checkbox_fieldname    = 'CHECK'
                i_tabname               = 'IT_TAB'
                i_scroll_to_sel_line    = 'X'
                it_fieldcat             = it_fieldcat1
                i_callback_program      = sy-repid
                i_callback_user_command = 'USER_COMMAND1'
              IMPORTING
                es_selfield             = selfield
              TABLES
                t_outtab                = it_tab
              EXCEPTIONS
                program_error           = 1.
    Cheers,
    Naveen

  • How to display Check box in Reports

    Hello all,
    I just want to know about how to have a check box in the Reports.
    The check box should be checked if the value in the columns is true and unchecked if the value is False.
    Thank you
    Susan

    Try the below code
    select
         APEX_ITEM.CHECKBOX(1, field_name ,decode(fileld_name , 'N',null,'CHECKED'))
          field1 ,
          field2
    from some_table;Regards,
    Shijesh

  • How to add check box in SAP B1 grid controls..

    hi all,
    Anyone know how to add check box in SAP grid control?
    It will be great if you could show me some sample code.
    thanks.
    regards,
    sohch

    Hi Sohch,
    1. First of all you should define the Column in a matrix as it_CHECK_BOX. Like
            oColumns = oMatrix.Columns
            oColumn = oColumns.Add("chk_YesNo", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX)
            oColumn.TitleObject.Caption = "YesNo"
            oColumn.Width = 60
            oColumn.Editable = True
    2. Bind it with a DBDataSource as defined
            oColumn = oColumns.Item("chk_YesNo")
            oColumn.DataBind.Bind("UDTable", "U_YesNo")
    3. Make Sure that the value that is being put into the Database is either 'Y' or 'N'.
    Hope this Helps
    Rizwan Hafeez
    Team Lead
    SAP Addon Development Section
    Abacus Consulting - Pakistan

  • What r the steps to display check box in smartform

    can anyone tell me the procedure to display the steps in smartform

    Hi~
    You can find so many stuffs here as vinod said.
    If I explain more additionaly,
    In your smartforms, you can find small icon for 'TXT Editor' and then you could find symbols here,
    Inclue -> Characters -> SAP Symbols.
    In symbols, you may find 'SYM_CHECKBOX' for checked one, and the other 'SYM_LARGE_SQUARE'.
    looks like somepeole says it doesn't work in some cases, at that case, you can use [X] ,[ ] instead.
    refer this one.
    https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode6-1&contenttype=url&content=https://Urgent ! how to put check box in the smartform
    Regards
    kyung woo

  • . How to put Check box in every row in Table

    Hi Friends,
    I have one doubt in Webdynpro with java. How to put Check box in every row in Table?
    For Exam My requirement is I am getting BAPI from ECC System. So I have to go given input details in first view and output details in SecondView. So in Second View I will taken Table that data will displayed in rows. I need each and every row first I need check box.
    Here Select Check Box of particular row then click GetData button.  That row data will be displayed in one popup window.
    In table suppose 6 rows available in table. Every Row first Check box available.
                             empid, name, sal  ,firstname, last Name
                             empid, name, sal  ,firstname, last Name
                             empid, name, sal  ,firstname, last Name 
    How to put Check box in every row in Table?  can you send any examples applications
    Regards
    Vijay

    Hi Friend,
    When we are getting BAPI From ECC System. that BAPI Have nodes and Attribues...in under node we can't create "CheckBox"
    attribute.
    So i am doing like this.I am create on Checbox attribue out side of Node. Check Box data type is boolean.
    next i am creating table ( that table having rows and columns) Right click on table-->Click on Insert GroupedColumn->again right click on nsert GroupedColumn---> Here Select Check Box.
    Okay...here i am getting one problem. i have got Check boxes .But i am select check box in  first row. that time all check boxes will be selected.
    i need select first row check box that only first row will be selected suppose i selected second row check box that only second will be selected.
    i need this can u help me....
    Regards
    Vijay

  • How to create check box in ALV Reports?

    how to create check box in ALV Reports?

    Hi
    check the report  BCALV_TEST_GRID_EDITABLE
    or
    check this report
    REPORT ZRFC346_TST.
    TABLES:SFLIGHT,RL034.
    TYPE-POOLS:SLIS.
    INCLUDE:<ICON>,<SYMBOL>.
    DATA: G_REPID          LIKE SY-REPID,
          G_FIELDCAT       TYPE SLIS_T_FIELDCAT_ALV,
          G_IT_SORT        TYPE SLIS_T_SORTINFO_ALV,
          G_LAYOUT         TYPE SLIS_LAYOUT_ALV,
          G_TABNAME_HEADER TYPE SLIS_TABNAME,
          G_TABNAME_ITEM   TYPE SLIS_TABNAME,
          G_KEYINFO        TYPE SLIS_KEYINFO_ALV,
          G_VARIANT        LIKE DISVARIANT,
          G_EXTAB          TYPE SLIS_T_EXTAB,
          I_SLIS_EXIT_BY_USER TYPE SLIS_EXIT_BY_USER.
    DATA: XEVENT         TYPE SLIS_T_EVENT,
          AEVENT         TYPE SLIS_ALV_EVENT,
          VARIANT        LIKE DISVARIANT,
          LAYOUT         TYPE SLIS_LAYOUT_ALV,
          ASP_GROUP      TYPE SLIS_SP_GROUP_ALV,
          GT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV,
          EXTAB          TYPE SLIS_T_EXTAB WITH HEADER LINE,
          XFIELD         TYPE SLIS_T_FIELDCAT_ALV,
          AFIELD         TYPE SLIS_FIELDCAT_ALV,
          G_SUCOMM      LIKE SY-UCOMM,
          G_SELFLD       TYPE SLIS_SELFIELD.
    DATA: SAV_SY_REPID      LIKE SY-REPID.
    CONSTANTS: CON_SFLIGHT TYPE LVC_FNAME VALUE 'SFLIGHT',
               CON_DISPLAY_FULL TYPE I VALUE 3.
    Data to be displayed
    DATA: BEGIN OF GT_SFLIGHT OCCURS 0.
            INCLUDE STRUCTURE SFLIGHT.
    DATA:ACTIVATE(1).
    DATA: END OF GT_SFLIGHT.
    INITIALIZATION.
    *........Initialisierung...............................................
      PERFORM INITIALIZATION_RL034.
    *........Field cata....................................................
      PERFORM FIELD_CAT.
    *........SPECIAL GROUP.................................................
      PERFORM E07_SP_GROUP_BUILD USING GT_SP_GROUP[].
    START-OF-SELECTION.
    Selection
      SELECT * FROM SFLIGHT INTO TABLE GT_SFLIGHT.
    *........ALV CALL.......................................................
      PERFORM ALV_CALL.
      PERFORM USER_COMMAND_LOCAL USING G_SUCOMM G_SELFLD.
          FORM USER_COMMAND_LOCAL                                       *
    -->  G_UCOMM                                                       *
    -->  G_SELFIELD                                                    *
    FORM USER_COMMAND_LOCAL USING G_UCOMM LIKE SY-UCOMM
                                  G_SELFIELD TYPE SLIS_SELFIELD.
      CASE G_UCOMM.
        WHEN 'ACT'.
      ENDCASE.
    ENDFORM.
          FORM ALV_CALL                                                 *
    FORM ALV_CALL.
    Call ABAP List Viewer (ALV)
    G_LAYOUT-BOX_FIELDNAME = 'ACTIVATE'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
                 EXPORTING
                I_BACKGROUND_ID         = 'ALV_BACKGROUND'
                   I_BYPASSING_BUFFER                = SPACE
                   I_BUFFER_ACTIVE                   = SPACE
                    I_CALLBACK_PROGRAM                = SAV_SY_REPID
                    I_CALLBACK_PF_STATUS_SET          = 'STATUS'
                   I_CALLBACK_USER_COMMAND           = 'USER_COMMAND_LOCAL'
                I_CALLBACK_TOP_OF_PAGE            = ' '
                I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
                I_CALLBACK_HTML_END_OF_LIST       = ' '
                 I_STRUCTURE_NAME                  = 'SFLIGHT'
                I_BACKGROUND_ID                   = ' '
                I_GRID_TITLE                      =
                I_GRID_SETTINGS                   =
                  IS_LAYOUT                         = G_LAYOUT
                  IT_FIELDCAT                       = XFIELD[]
                IT_EXCLUDING                      =
                  IT_SPECIAL_GROUPS                 = GT_SP_GROUP[]
                IT_SORT                           =
                IT_FILTER                         =
                 IS_SEL_HIDE                       = 'X'
                I_DEFAULT                         = 'X'
                  I_SAVE                            = 'A'
                IS_VARIANT                        =
                 IT_EVENTS                         = XEVENT
                IT_EVENT_EXIT                     =
                IS_PRINT                          =
                IS_REPREP_ID                      =
                I_SCREEN_START_COLUMN             = 0
                I_SCREEN_START_LINE               = 0
                I_SCREEN_END_COLUMN               = 0
                I_SCREEN_END_LINE                 = 0
                IT_ALV_GRAPHICS                   =
                IT_ADD_FIELDCAT                   =
                IT_HYPERLINK                      =
                I_HTML_HEIGHT_TOP                 =
                I_HTML_HEIGHT_END                 =
                IT_EXCEPT_QINFO                   =
              IMPORTING
                E_EXIT_CAUSED_BY_CALLER           =
                ES_EXIT_CAUSED_BY_USER            =
                  TABLES
                    T_OUTTAB                          = GT_SFLIGHT
              EXCEPTIONS
                PROGRAM_ERROR                     = 1
                OTHERS                            = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.
          FORM status                                                   *
    -->  EXTAB                                                         *
    FORM STATUS USING EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'STAT' EXCLUDING EXTAB.
    ENDFORM.                               " STATUS
    *&      Form  INITIALIZATION_RL034
          text
    -->  p1        text
    <--  p2        text
    FORM INITIALIZATION_RL034.
      SAV_SY_REPID = SY-REPID.
    ENDFORM.                    " INITIALIZATION_RL034
    *&      Form  DEFINE_EVENTS_RL034
          text
    -->  p1        text
    <--  p2        text
    FORM DEFINE_EVENTS_RL034.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                I_LIST_TYPE = 0
           IMPORTING
                ET_EVENTS   = XEVENT.
       exceptions
            list_type_wrong = 1
            others          = 2.
    ENDFORM.                    " DEFINE_EVENTS_RL034
    *&      Form  FIELD_CAT
          text
    -->  p1        text
    <--  p2        text
    FORM FIELD_CAT.
      DATA: LS_FCAT TYPE SLIS_FIELDCAT_ALV,
            L_LIN   TYPE I.
      REFRESH XFIELD.
           1. per Default eingeblendete Felder                          *
    *........Ikone/Symbol..................................................
      CLEAR AFIELD.
      DATA: LS1_FCAT TYPE SLIS_FIELDCAT_ALV,
            L_LIN1   TYPE I.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                I_STRUCTURE_NAME       = CON_SFLIGHT
                I_BYPASSING_BUFFER     = SPACE
                I_BUFFER_ACTIVE        = SPACE
           CHANGING
                CT_FIELDCAT            = XFIELD
           EXCEPTIONS
                INCONSISTENT_INTERFACE = 1
                PROGRAM_ERROR          = 2
                OTHERS                 = 3.
      DESCRIBE TABLE XFIELD LINES L_LIN1.
      ADD 1 TO L_LIN1.
      CLEAR LS_FCAT.
      LS1_FCAT-FIELDNAME = 'ACTIVATE'.
      LS1_FCAT-CHECKBOX  = 'X'.
    LS1_FCAT-KEY       = 'X'.
      LS1_FCAT-INPUT     = 'X'.
      LS1_FCAT-EDIT     = 'X'.
      LS1_FCAT-INTTYPE   = 'C'.
      LS1_FCAT-DATATYPE  = 'CHAR'.
      LS1_FCAT-INTLEN    = 1.
      LS1_FCAT-COL_POS   = L_LIN1.
      LS1_FCAT-SELTEXT_S = LS1_FCAT-FIELDNAME.
      LS1_FCAT-SELTEXT_M = LS1_FCAT-FIELDNAME.
      LS1_FCAT-SELTEXT_L = LS1_FCAT-FIELDNAME.
      LS1_FCAT-SP_GROUP = 'A'.
      APPEND LS1_FCAT TO XFIELD.
      ADD 1 TO L_LIN.
    ENDFORM.                    " FIELD_CAT
    FORM E07_SP_GROUP_BUILD USING E07_LT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV.
      DATA: LS_SP_GROUP TYPE SLIS_SP_GROUP_ALV.
      CLEAR  LS_SP_GROUP.
      LS_SP_GROUP-SP_GROUP = 'A'.
      LS_SP_GROUP-TEXT     = 'SPECIAL'.
      APPEND LS_SP_GROUP TO E07_LT_SP_GROUP.
    ENDFORM.
    Regards
    Shiva

  • Displaying Check boxes in the Report Output

    hi Folks,
               I need to dispay check boxes for every line item in my report output, the user can select particular line item by clicking the check box. and if the user click one button on the report, the corresponding dunning form should be generated. How can i acheive this. is displaying check boxes possible in normal reports or we need to go for ALV. please help me regarding this.
                   thnx,
                   santosh.

    We can do it with the normal report also.Create a charecter field and while the field to the screnn
    write :/ field as check box.
    this will create acheck box in the output

  • How to display icon status in table control

    hi, i trying to display icon in table control its not displaying
    i given below statment.
    DATA: BEGIN OF WA_MARA,
            ICON1(4) TYPE C,
             END OF WA_MARA.
         INCLUDE <list>.
    MOVE ICON_GREEN_LIGHT TO IT_MARA-ICON1.
    APPEND IT_MARA..
    when i debugging it display green icon but after run the program its display ' @08@ '   in table control.
    how to display green icon in table control help me.

    Hi,
    check the link:
    Table control in custom infotypes

  • How to print Check Box in smartform

    HI,
      How to print check box in smartforms. I am using Include Sap Symbol but in the print it is coming as #. Do we need to do any setting like we do for barcode?
    Thanks
    Raghavendra

    hi,
    u can print a check box in different ways.. by inserting symbols and making window as check box..
    once go through the thread u will get to k now differnt ways
    putting checkboxes in smartform?
    Please Close this thread.. when u r problem is solved. Reward all Helpful answers
    Regards
    Naresh Reddy K

  • BSP: How to create check box in a column of a Table View

    Hi All,
    I have a table view in Web IC scenario. my requirement is to display check box in one of the column of the table view.. so that i can select multiple lines from the table and do some calculations!.
    Anybody have any hint/clue
    Thanks in advance,
    sudeep v d.

    Hi,
    This can be achieved by using a Table iterator.
    Please check the standard examples for this.
    Thanks,
    Rashmi.

  • How can multiple check boxes be added at one time to a form?

    How can multiple check boxes be added at one time to a form?

    Thanks for your response, but copying and pasting creates a link. If the user places a check mark in one of the boxes, all the rest of the boxes will have a check mark also. I will research this some more.
    Carol Deatherage
    Receptionist
    Novar/Honeywell
    1000 SE 14th Street
    Bentonville, AR 72712
    Office:  (800) 341-7795
    Fax: (479) 271-0657
    [email protected]<mailto:[email protected]>
    Your feedback is important to us! Please take a moment to rate this response.
    Click Here to Access the Survey<https://www.surveymonkey.com/s/NovarSurvey>!
    This email and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this email in error destroy it immediately.
    Novar Confidential ***

  • How to insert check box fields in a htmlb: tableview

    Hi,
    Can anybody tell me how to insert check box fields in a htmlb: tableview in a sequence of rows in a table view. How to generate the sequence no for the checkbox inorder to know the row that is checked.
    Thanks in advance,
    Aruna.

    Here is the code which has the custom "Checkbox" in the tableview & Triggers the event. <b>You can identify the checkbox based on cell ID (p_cell_id)</b> in the method "IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START" & Based on the event name + Cell ID. Look at the code & let me know if you any issue.
    <b>Layout:</b>
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content id               = "content"
                   design           = "design2002+design2003"
                   controlRendering = "SAP"
                   rtlAutoSwitch    = "true"
                   forceEncode      = "ENABLED" >
      <htmlb:page title="Test " >
        <htmlb:form>
          <%
      data TV_ITERATOR Type Ref To zcl_itr.
      data iterator type ref to IF_HTMLB_TABLEVIEW_ITERATOR.
      create object tv_iterator exporting appl_cons = application.
      iterator = tv_iterator.
          %>
          <htmlb:tableView id              = "fligts"
                           headerText      = "Flight"
                           width           = "100"
                           headerVisible   = "true"
                           design          = "alternating"
                           visibleRowCount = "10"
                           fillUpEmptyRows = "true"
                           showNoMatchText = "true"
                           filter          = "server"
                           sort            = "server"
                           onHeaderClick   = "MyEventHeaderClick"
                           table           = "<%= APPLICATION->itab %>"
                           iterator        = "<%= ITERATOR %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b>Event Handling:</b>
    DATA: EVENT_ID1 TYPE REF TO IF_HTMLB_DATA.
    EVENT_ID1 = CL_HTMLB_MANAGER=>GET_EVENT_EX( REQUEST ).
    CASE EVENT_ID1->EVENT_SERVER_NAME.
    IF NOT event_id1 IS INITIAL.
       if event_id1->server_event+0(9) = 'chkevent'.
      SPLIT event_id1->server_event AT '-' INTO v_event v_dummy v_row v_col.
      endif.
    endif.
    method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS.
         CLEAR p_column_definitions.
        CLEAR p_overwrites.
        DATA: tv_column  TYPE TABLEVIEWCONTROL.
        tv_column-COLUMNNAME  = 'FLDATE'.
        tv_column-edit        = 'X'.
        tv_column-sort        = 'X'.
        tv_column-TITLE               = 'Flight Date'.
        tv_column-WIDTH  = '100'.
        APPEND tv_column TO p_column_definitions.
        CLEAR tv_column.
        tv_column-edit        = 'X'.
        tv_column-COLUMNNAME          = 'CONNID'.
        tv_column-TITLE               = 'Conn.ID'.
        tv_column-WIDTH  = '70'.
        tv_column-HORIZONTALALIGNMENT = 'center'.
        APPEND tv_column TO p_column_definitions.
        CLEAR tv_column.
        tv_column-edit        = 'X'.
        tv_column-COLUMNNAME          = 'CHECKBOX1'.
        tv_column-TITLE               = 'Check Box'.
        tv_column-WIDTH  = '30'.
        tv_column-HORIZONTALALIGNMENT = 'center'.
        APPEND tv_column TO p_column_definitions.
    endmethod.
    METHOD IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
           DATA: L_EVENT TYPE STRING.
      CASE P_TABLEVIEW_ID.
        WHEN 'fligts'.
          CASE P_COLUMN_KEY.
            WHEN 'CHECKBOX1'.
    *          CONCATENATE 'chk_event' '123' '2323' INTO L_EVENT SEPARATED BY '-' .
    CONCATENATE 'chkevent' p_cell_id INTO l_event SEPARATED BY '-'.
              P_REPLACEMENT_BEE = CL_HTMLB_CHECKBOX=>FACTORY( ID = P_CELL_ID
            ONCLICK = L_EVENT CHECKED = 'false' ).
          ENDCASE.
      ENDCASE.
    ENDMETHOD.
    Hope this will solve your problem.
    <b><i>* Reward each helpful answer.</i></b>
    Raja T
    Message was edited by:
            Raja T

  • How to insert check box value in table?

    Hi all
    kindly help me how to insert check box value in database. what code i have to use as i am new in programing.
    thanx in advance

    Hi,
    There is no "Check box" in a table, a check box is a GUI (Graphical user interface) item.
    What you want is to store a boolean value in a table. For that you can use the varchar2(1) datatype and store Y or N. (or anything else)
    (you cannot define boolean as a datatype for a column).
    If you're using a front-end application like apex then it might be useful for you to read the documentation about chekc boxes :
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/check_box.htm#CHDDFBFH
    (for the rest if it's Oracle Forms then everything is already said).
    Edited by: user11268895 on Aug 17, 2010 10:44 AM

Maybe you are looking for