How to insert the checkbox as a separate column  in alv grid display

Hi
How to insert the checkboxes as a separate column  in alv grid display with using the reuse_alv_fieldcatlog_mege.
example
matnr    maktx  ersda                 checkbox
10        books  28/03/2009          checkbox
Thanks
chinnu

Hi,
    Check the following code.
TYPE-POOLS: slis.
TYPES:
      BEGIN OF ty_output,
      chk TYPE c,
      number TYPE i,
      name(20) TYPE c,
      END OF ty_output.
DATA: gt_output TYPE STANDARD TABLE OF ty_output,
      gs_output TYPE ty_output.
DATA: wa_layout           TYPE slis_layout_alv.
DATA: it_fieldcatalog TYPE slis_t_fieldcat_alv,
After you populate the data, build the field catlog like shown below.
wa_fieldcatalog TYPE slis_fieldcat_alv.
wa_fieldcatalog-fieldname = 'CHK'.
  wa_fieldcatalog-outputlen = '3'.
  wa_fieldcatalog-col_pos = '1'.
  wa_fieldcatalog-seltext_m   = 'CHK'.
  wa_fieldcatalog-checkbox = 'X'.
  wa_fieldcatalog-edit = 'X'.
  APPEND  wa_fieldcatalog TO it_fieldcatalog.
wa_fieldcatalog-fieldname = 'NUMBER'.
  wa_fieldcatalog-outputlen = '10'.
  wa_fieldcatalog-col_pos = '2'.
  wa_fieldcatalog-seltext_m   = 'NUMBER'.
  APPEND  wa_fieldcatalog TO it_fieldcatalog.
  CLEAR  wa_fieldcatalog.
  wa_fieldcatalog-fieldname = 'NAME'.
  wa_fieldcatalog-outputlen = '10'.
  wa_fieldcatalog-col_pos = '3'.
  wa_fieldcatalog-seltext_m   = 'NAME'.
  APPEND  wa_fieldcatalog TO it_fieldcatalog.
  CLEAR  wa_fieldcatalog.
  wa_layout-box_fieldname     = 'CHK' .
  wa_layout-box_tabname       = 'GT_OUTPUT' .
Now call the FM
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
*   I_INTERFACE_CHECK                 = ' '
*   I_BYPASSING_BUFFER                = ' '
*   I_BUFFER_ACTIVE                   = ' '
      i_callback_program                = sy-repid
      i_callback_pf_status_set          = 'PF_STATUS'
      i_callback_user_command           = 'USER_COMMAND_GRID'
*   I_CALLBACK_TOP_OF_PAGE            = ' '
*   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
*   I_CALLBACK_HTML_END_OF_LIST       = ' '
*   I_STRUCTURE_NAME                  =
*   I_BACKGROUND_ID                   = ' '
*   I_GRID_TITLE                      =
*   I_GRID_SETTINGS                   =
      is_layout                         = wa_layout
      it_fieldcat                       = it_fieldcatalog
*   IT_EXCLUDING                      =
*   IT_SPECIAL_GROUPS                 =
*   IT_SORT                           =
*   IT_FILTER                         =
*   IS_SEL_HIDE                       =
*   I_DEFAULT                         = 'X'
*   I_SAVE                            = ' '
*   IS_VARIANT                        =
*   IT_EVENTS                         =
*   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_HYPERLINK                      =
*   IT_ADD_FIELDCAT                   =
*   IT_EXCEPT_QINFO                   =
*   I_HTML_HEIGHT_TOP                 =
*   I_HTML_HEIGHT_END                 =
* IMPORTING
*   E_EXIT_CAUSED_BY_CALLER           =
*   ES_EXIT_CAUSED_BY_USER            =
    TABLES
      t_outtab                          = gt_output
* 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.

Similar Messages

  • How to Restrict the values of Field TASKTYPE on a ALV Grid.?

    Hi;
    Let me explain my problem. I have report written by another abap developer who has gone now.
    On the ALV Grid there is a field called "Activity Process". By F1 F9 I can read that field depends on table TCATX_TASKTYPES and field TASKTYPE   . From se11 I can see that there is no search help related with the field.
    When the user press F4 all the data in the table is listed . The user want to filter some of the listed data according to same logic .
    When I debug the code after F4 on the field I found that the system finds Search Help: TCATX_TASKTYPES of type 'CT'. But unfortunately SE11 says that there in  no search help such as TCATX_TASKTYPES.
    The previous abap developer used BADI NETW_USER_FIELDS_F4 AT_F4 with class ZCL_IM_NETW_USER_FIELDS_F4 and interface IF_EX_NETW_USER_FIELDS_F4  for the transaction cj20n to filter the same field but this is not triggered by the F4 on the ALV Grid.
    What can I do ?
    Would you please help me ?

    I know i can do this using ADF Business Components as the business service but the problem is that the initial value for that attribute will be changed depending on the screen ... ill give u a simple example : lets say that I have employee table ( which include dept column) and under that table I have a table called "Emp_dept_movements" now in the main ADF page "employee entry" I have two blocks Employee data ( master view) employee dept data ( detail view ) now when the user press the create-insert button on the employee dept view the system should copy the dept no from the employee view to the dept no on the emp_dept_movements view... and the "Emp_dept_movements" will be used in another screen called " employee departement movements" without any initial value for the DeptNo
    I dont want to create more than one view and cant set the initial value for that attribute in the view , Can this be done through the UI by adding set action listener on that button and specifying from ( binding master_view.dept ) - to (binding of detail_view.dept) ..
    hope that am clear this time,
    Edited by: Delta on Jul 5, 2010 11:21 PM

  • Hi Gurus! how to count number of records in any column of ALV Grid report

    Hi Guys!
    I want to know how can we count the number of records in any column selected by the user. Like for oe customer there might be 20 sale order that means for 10 customer there will be 200 Sale order. So if i select cutomer number column ti should give 10 out put and whern select sale order it should give 200 as output.
    -Anurag Jain

    Hi,
    Either you can use the hotspot_click event or double_click to show the Pop-up info of the Sales Order count or customer Count depending on the selection.
    In the hotspot_click event  method you have E_ROW_ID E_COLUMN_ID..using these you can find the Sales Ordert or customer Number.. Loop the internal table and find the Count.
    In the double_click event  method you have E_ROW E_COLUMN..using these you can find the Sales Ordert or customer Number.. Loop the internal table and find the Count.

  • How to Insert the Text in Selected Text Frame-Reg.

    Dear all,
    I am using the SnipperRunner - SDK, and create the TextFrame, but I can't insert the Text in the Particular Frame. so please give me the soultions,
    (*) Create TextFrame is ok,
    (*) Select TextFrame is also ok,
    (*) now, my Query ->
    How to Insert the Text in the Selected Frame?. (or)
    How to Link the Selectable Frame and my Text.? (or)
    How come to know the TextFrame is select?.
    Please any one can suggest me through the Coding....I will appreciate you...
    Thanks & Regards,
    T.R.Harihara SudhaN

    Hi,
    you have to get the TextModel associated with the textframe. Once you got that, ITextModel has an Insert()-method. You could also process kInsertTextCmdBoss - there are quite a few examples around. I believe WriteFishPrice also inserts text into a frame, just as an example. Good luck ...
    Bernt

  • How to insert the style in sap-script? and in smart form?

    how to insert the style in sap-script? and in smart form?

    Hi..,
    For SAP scripts u need to create them in SE72 ...
    and u can include them in the script editor as..
    /: STYLE <STYLE-NAME>
    P1 text...............  (*** P1 is the Paragraph format created in SE72 )
    /: STYLE *
    For smartforms u need to go for the transaction (tcode) SMARTSTYLES... here u can create paragraph and character formats globally...
    <b>Sunil, plz do remember to close all your threads, when ur problem is solved !!</b>
    reward all helpful answers,
    sai ramesh

  • How to insert the data from XML to a table

    Hi,
    I'm using Oracle 10g Express Edition
    I need help in How to insert the data from XML file into the table.
    Below is the example i'm working on..
    I have create ridb user with below mentioned privileges:
    Account Status Locked Unlocked
    Default Tablespace: USERS
    Temporary Tablespace: TEMP
    User Privileges :
    Roles:
    CONNECT
    RESOURCE
    Direct Grant System Privileges:
    CREATE DATABASE LINK
    CREATE MATERIALIZED VIEW
    CREATE PROCEDURE
    CREATE PUBLIC SYNONYM
    CREATE ROLE
    CREATE SEQUENCE
    CREATE SYNONYM
    CREATE TABLE
    CREATE TRIGGER
    CREATE TYPE
    CREATE VIEW
    & table is created TRIALZIPCODES below mentioned is the DDL:
    CREATE TABLE TRIALZIPCODES
    STATE_ABBR VARCHAR2(20) NOT NULL
    , ZIP_CODE NUMBER(10, 0) NOT NULL
    , ZIP_CODE_EXT VARCHAR2(20)
    Below is the XML FILE: which is stored in C:\OracleProject Folder
    File name: trial.xml
    <?xml version="1.0" ?>
    <metadata>
    - <Zipcodes>
    - <mappings Record="4">
    <STATE_ABBREVIATION>CA</STATE_ABBREVIATION>
    <ZIPCODE>94301</ZIPCODE>
    </mappings>
    - <mappings Record="5">
    <STATE_ABBREVIATION>CO</STATE_ABBREVIATION>
    <ZIPCODE>80323</ZIPCODE>
    <ZIP_CODE_EXTN>9277</ZIP_CODE_EXTN>
    </mappings>
    </Zipcodes>
    </metadata>
    PL/SQL Procedure:which i'm trying to execute from SQLDeveloper
    create or replace
    PROCEDURE TRIAL AS
    BEGIN
    DECLARE
    -- declare attributes
    charString varchar2(80);
    finalStr varchar2(4000) := null;
    rowsp integer;
    v_FileHandle UTL_FILE.FILE_TYPE;
    l_context_handle dbms_xmlgen.ctxHandle;
    insCtx DBMS_XMLStore.ctxType;
    begin
    -- DBMS_XMLGEN.setRowTag ( ctx IN ctxHandle, rowTag IN VARCHAR2);
    -- DBMS_XMLGEN.setRowSetTag ( ctx IN ctxHandle, rowSetTag IN VARCHAR2);
    -- the name of the table as specified in our DTD
    DBMS_XMLGEN.SETROWSETTAG(l_context_handle,'zipcodes');
    -- the name of the data set as specified in our DTD
    DBMS_xmlgen.setRowTag(l_context_handle,'mappings');
    -- for getting the output on the screen
    dbms_output.enable(1000000);
    -- open the XML document in read only mode
    v_FileHandle := utl_file.fopen('c:/OracleProject','trial.xml', 'r');
    loop
    BEGIN
    utl_file.get_line(v_FileHandle, charString);
    exception
    when no_data_found then
    utl_file.fclose(v_FileHandle);
    exit;
    END;
    dbms_output.put_line(charString);
    if finalStr is not null then
    finalStr := finalStr || charString;
    else
    finalStr := charString;
    end if;
    end loop;
    -- for inserting the XML data into the table
    insCtx := DBMS_XMLSTORE.NEWCONTEXT('RIDB.TRIALZIPCODES');
    insCtx := DBMS_XMLSTORE.INSERTXML(insCtx, finalStr);
    dbms_output.put_line('INSERT DONE '||TO_CHAR(rowsp));
    DBMS_XMLStore.closeContext(insCtx);
    END;
    END TRIAL;
    For the first time when i complied i got the errors as :
    Procedure RIDB.PROCEDURE1@RIDB
    Error(16,14): PLS-00201: identifier 'UTL_FILE' must be declared
    Error(16,14): PL/SQL: Item ignored
    Error(29,1): PLS-00320: the declaration of the type of this expression is incomplete or malformed
    Error(29,1): PL/SQL: Statement ignored
    Error(33,1): PL/SQL: Statement ignored
    Error(33,19): PLS-00320: the declaration of the type of this expression is incomplete or malformed
    Error(36,1): PL/SQL: Statement ignored
    Error(36,17): PLS-00320: the declaration of the type of this expression is incomplete or malformed
    So i logged in as sys & grant the permission to execute on UTL_FILE to ridb (user):
    SQL Statement:
    grant execute on utl_file to ridb
    So, it got compiled successfully but when i execute it gives me error as:
    Source does not have a runnable target.
    What does this mean?
    So I browse through forum & i got to know that i need to initial the UTL_FILE_DIR ="C:/OracleProject" in init.ora
    So can i edit the init.ora with notepad.When i tried to do that it says permission denied
    In my system it shows the init.ora file in path C:\oraclexe\app\oracle\product\10.2.0\server\config\scripts
    but there is also other file initXETemp in the same path do i need to do the changes in it.
    I have tried even editing the SPFILE as mentioned below:
    C:\oraclexe\app\oracle\product\10.2.0\server\dbs\SPFILEEXE - I had edit this file using notepad & set the value of UTL_FILE_DIR ="C:/OracleProject". So next time when i restarted i'm unable to log on to the database.
    So i had reinstall the software again.
    Could you please let me know how to proceed..

    hi,
    I have created the directory from sys database
    CREATE or replace DIRECTORY XML_DIR2 AS 'C:\OracleProject';
    & grant read,write access to the user
    grant read,write on directory XML_DIR2 to RIDB;
    & i had change the tag name in the xml file as shown below:
    <?xml version = '1.0'?>
    <metadata>
    <Zipcodes>
    <mappings Record="4">
    <STABBRE>CA</STABBRE>
    <ZIPCODE>94301</ZIPCODE>
    </mappings>
    <mappings Record="5">
    <STABBRE>CO</STABBRE>
    <ZIPCODE>80323</ZIPCODE>
    <ZIPCODEEXT>9277</ZIPCODEEXT>
    </mappings>
    </Zipcodes>
    </metadata>
    TRIALZIPCODE table as shown below:
    CREATE TABLE "RIDB"."TRIALZIPCODE"
    (     "STABBRE" VARCHAR2(20 BYTE),
         "ZIPCODE" NUMBER(*,6) NOT NULL ENABLE,
         "ZIPCODEEXT" NUMBER
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS" ;
    I have tried two methods as shown below:
    Procedure 1:
    create or replace
    PROCEDURE TRIAL_V2 AS
    BEGIN
    DECLARE
    -- declare attributes
    charString varchar2(80);
    finalStr varchar2(4000) := null;
    rowsp integer;
    v_FileHandle UTL_FILE.FILE_TYPE;
    l_context_handle dbms_xmlgen.ctxHandle;
    insCtx DBMS_XMLStore.ctxType;
    cnt NUMBER;
    xmldoc xmltype := xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') );
    --XML_DIR VARCHAR2(40) := 'C:\\OracleProject';
    BEGIN
    insCtx := DBMS_XMLStore.newContext('DEV.TRIALZIPCODES');
    DBMS_XMLStore.setUpdateColumn(insCtx, 'STABBRE');
    DBMS_XMLStore.setUpdateColumn(insCtx, 'ZIPCODE');
    DBMS_XMLStore.setUpdatecolumn(insCtx, 'ZIPCODEEXT');
    DBMS_XMLStore.setRowTag(insCtx, 'mappings');
    cnt := DBMS_XMLStore.insertXML(insCtx, xmldoc);
    DBMS_XMLStore.closeContext(insCtx);
    END;
    Procedure 1 was compiled with out errors but when i execute i got the error as :
    Source does not have a runnable target.
    Procedure 2_
    CREATE OR REPLACE PROCEDURE TRIAL_V3 AS
    BEGIN
    DECLARE
    -- declare attributes
    charString varchar2(80);
    finalStr varchar2(4000) := null;
    rowsp integer;
    v_FileHandle UTL_FILE.FILE_TYPE;
    l_context_handle dbms_xmlgen.ctxHandle;
    insCtx DBMS_XMLStore.ctxType;
    cnt NUMBER;
    xmldoc xmltype := xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') );
    --XML_DIR VARCHAR2(40) := 'C:\\OracleProject';
    BEGIN
    INSERT INTO trialzipcode (STABBRE, ZIPCODE, ZIPCODEEXT)
    SELECT extractvalue(x.column_value, 'mappings/STABBRE'),
    extractvalue(x.column_value, 'mappings/ZIPCODE'),
    extractvalue(x.column_value, 'mappings/ZIPCODEEXT')
    FROM TABLE(
    XMLSequence(
    EXTRACT(
    xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') ),
    'metadata/Zipcodes/mappings'
    ) x
    END;
    END TRIAL_V3;
    Procedure 2 was complied without errors but when i execute i got the error as:
    Connecting to the database RIDB.
    ORA-22288: file or LOB operation FILEOPEN failed
    The system cannot find the file specified.
    ORA-06512: at "SYS.DBMS_LOB", line 523
    ORA-06512: at "SYS.XMLTYPE", line 287
    ORA-06512: at "RIDB.TRIAL_V3", line 12
    ORA-06512: at line 2
    Process exited.
    Disconnecting from the database RIDB.
    Could you please let me know how to proceed...

  • How to insert the image or logo into the table as a field in webdynpro abap

    Hi Friends,
    Please tell me how to insert the image or logo into the table as a field in webdynpro abap.........

    Hi Alagappan ,
          In your view layout you take table UI element and then you bind it with some context nodes.
    The attributes of your nodes comes as a field.
    Now in these fields you can set various properties and image is one of them.
    Go to ->
    1. View Layout -> Right Click on ROOTUIELEMENTCONTAINER -> INSERT ELEMENT -> TABLE
    2. Right click on table -> Create Binding.
       Here you have to bind it with the appropriate context node.
    You will get two properties here
    a- Standard Cell Editor :- ( make it image )
    b- Standard properties :- ( If required set image properties ).
    3. If you want put image from out side then import it as a mime object and set the source of your table field ( used as a image )
    also have a look :-
    [Image Properties|http://help.sap.com/saphelp_nw04/helpdata/en/f3/1a61a9dc7f2e4199458e964e76b4ba/content.htm]
    Hope this will solve your problem.
    Reply if any case of any issue.
    Thanks & Regards,
    Monishankar C

  • How to capture the checkbox status in ALV Grid display

    I need some immediate help regarding Grid ALV.
    My Requirement: I need to display an ALV grid report along with checkboxes. Further, I need to provide an option wherein the user can checkboxes and select the records that I need to process further (by clicking the process button on the ALV Report).
    My Query: The problem here is that I am not able to capture the status of the checkboxes. This means that I am not able to capture which of the records have been selected by checking their resp checkboxes.
    Solutions that I have tried: I have tried capturing the same at user command by checking the value in slis_selfield. But all the records show the value as 1 for the checkbox field.
    Kinldy suggest how to go about it.
    I am not using Object Oriented ALV. Please suggest something to be used in ALV Grid display in 4.6C version.
    Regards,
    Namrata

    Here is a Sample code , it might help you
    TABLES : sflight.
    TYPE-POOLS: slis.
    DATA : w_repid LIKE sy-repid.
    w_repid = sy-repid.
    DATA: BEGIN OF it_sflight OCCURS 0,
      checkbox(1),
      carrid LIKE sflight-carrid,
    END OF it_sflight.
    *layout
    DATA: wa_layout TYPE slis_layout_alv.
    *field catalog
    DATA: it_fieldcatalog TYPE slis_t_fieldcat_alv,
              wa_fieldcatalog TYPE slis_fieldcat_alv.
    START-OF-SELECTION.
      SELECT carrid FROM sflight
         INTO CORRESPONDING FIELDS OF TABLE it_sflight.
    END-OF-SELECTION.
      CLEAR it_fieldcatalog.
      REFRESH it_fieldcatalog.
      wa_fieldcatalog-fieldname = 'CHECKBOX'.
      wa_fieldcatalog-outputlen = '3'.
      wa_fieldcatalog-col_pos = '1'.
      wa_fieldcatalog-seltext_m = 'Chk'.
      wa_fieldcatalog-checkbox = 'X'.
      wa_fieldcatalog-edit = 'X'.
      APPEND wa_fieldcatalog TO it_fieldcatalog.
      CLEAR wa_fieldcatalog.
      wa_fieldcatalog-fieldname = 'CARRID'.
      wa_fieldcatalog-outputlen = '10'.
      wa_fieldcatalog-col_pos = '2'.
      wa_fieldcatalog-seltext_m = 'Carrid'.
      APPEND wa_fieldcatalog TO it_fieldcatalog.
      CLEAR wa_fieldcatalog.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = w_repid
          is_layout = wa_layout
          i_callback_user_command = 'USER_COMMAND'
          it_fieldcat = it_fieldcatalog
        TABLES
          t_outtab = it_sflight
        EXCEPTIONS
          program_error = 1
          OTHERS = 2.
    *& Form USER_COMMAND
    FORM user_command USING p_ucomm TYPE sy-ucomm
      p_selfld TYPE slis_selfield.
      CASE p_ucomm.
       WHEN '&DATA_SAVE'.
          DATA ref1 TYPE REF TO cl_gui_alv_grid.
          CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
             IMPORTING
               e_grid = ref1.
          CALL METHOD ref1->check_changed_data.
          LOOP AT it_sflight WHERE checkbox = 'X'.
             DELETE it_sflight INDEX sy-tabix.
          ENDLOOP.
          p_selfld-refresh = 'X'.
      ENDCASE.
    ENDFORM. "user_command

  • How to insert the new field to standard scheduling agreement script form.

    Hi Gurus,
    how to insert the new fields to standad sheduling agreement script form. its a need for me, i want to display the AEDAT field in scheduling agreement form ,
    The below one is my requirement,
    ex:-   Itu2019s requested the change of Scheduling Agreement printout. Itu2019s requested for this type of   document, the insertion, into the field u201CData Emissionu201D into the print, of the document last modify date instead of the document creation date. (This change will be done only for position change into the Scheduling Agreement). No change into the PO.
    Change SAPSCRIPT printout. Introduction, into the Scheduling Agreement, of last modified  
          document date (field EKPO-AEDAT).
    Thanks & Regards
    chinnu

    open TNAPR table and give the output type you need to modify.... get the print program name and check if some structure already have the date you wanted... if you have it already... then open the form in SE71 tr. and provide the strcuture name - feild in the position you want to have the date...
    se71--->
    &<str. name>-AEDAT&

  • How to Edit the CheckBox in Classic ALV GRID Display

    Hi,
    I want to Edit the checkbox in Grid Display.
    I have one checkbox field in my internal Table,
    Code Of the Program,
    Data :
    Begin of itab occurs 0,
    CHK type C,
    MATNR like MARA-MATNR,
    end of itab.
    Iam building the fieldcatelog using Merge Funcion module.
    After that I am chaning the properties of the field
    catelog like below,
    loop at I_FCAT assigning <FCAT>.
    Case <FCAT>-Fieldname
    When 'CHK'.
    <FCAT>-Checkbox = 'X'.
    <FCAT>-INPUT = 'X'.
    I dont have edit option in fieldcatelog.
    modify I_FCAT from <FCAT>.
    endcase.
    endloop.
    In the Layout,
    I_LAYOUT-box_fieldname = 'CHK'.
    I_LAYOUT-box_tabname = 'ITAB'.
    It is displaying the Checkbox field.but I couldnt edit the checkBox.
    I can able to edit in REUSE_ALV_LIST_DISPLAY.
    But I  have to use REUSE_ALV_GRID_DISPLAY.How to edit the checkbox.
    Thanks in Advance,
    Sumithra

    Hi vasu,
    The below procedure explains you to create a checkbox cloumn in the grid and allows you to edit i hope this will helps u.
    The ALV Grid Control displays the cells of a column as checkboxes if the column is marked as a checkbox column in the field catalog.
    •     Add another field to the output table in which you want to display checkboxes
    OR
    •     Define an existing field as a checkbox.
    Procedure
    1.     Add a field to your output table:
    Data: gt_fieldcat type lvc_t_fcat.
    Types: begin of gs_outtab.
    Types: checkbox type c. "field for checkbox
    Include structure <ABAP Dictionary structure> .
    Types: end of gs_outtab.
    Data: gt_outtab type gs_outtab occurs 0 with header line.
    2 * Add an entry for the checkbox to the field catalog
    clear ls_fcat.
    ls_fcat-fieldname = 'CHECKBOX'.
    * Essential: declare field as checkbox and
    * mark it as editable field:
    ls_fcat-checkbox = 'X'.
    ls_fcat-edit = 'X'.
    * do not forget to provide texts for this extra field
    ls_fcat-coltext = text-f01.
    ls_fcat-tooltip = text-f02.
    ls_fcat-seltext = text-f03.
    append ls_fcat to gt_fieldcat.
    regards,
    venu.

  • How to insert the data even the trigger returned null

    Hi Gurus,
    I have a question regarding on how to insert the record even the condition being used by a "before insert trigger" returned null.
    The scenario is:
    2 tables have the same structure:
    Table A (Name varchar2 (100), No Number)
    Table B (Name_1 varchar2 (100), No Number)
    A script is using to load the data into table A daily, and a “before insert trigger” is being used to get the value for A.Name = B.Name whenever the condition A.No equals to B.No.
    If the B.No exists, then the trigger work fine, otherwise the records will be rejected, this is not the way we wanted, so I just wonder, is there any way to load all the data to the other fields but still using this trigger ?
    Thanks,
    Tran

    Either amend the select in the trigger that gets the name value to not raise a NO_DATA_FOUND exception (e.g. change "select name..." to "select min(name)..." ) or handle the NO_DATA_FOUND exception in an exception handler.
    e.g.
    EXCEPTION
      WHEN no_data_found THEN
        :new.name = 'where the streets have no name';

  • How to get the checkbox value

    Hi,
    i am working in Oracle APEX. Can anyone tell me how to get the checkbox value Thru Pl/sql Procedure.
    Ex:
    if i have three users like 1) super admin 2) HR 3) user i am giving different grants to all. there s a check box i used if HR selected three grants i have to get the checked value from my procedure and put into a table in a single column.
    grants :
    1)user creation
    2)salary details
    3)Attendance details
    4)Allowance
    5)contacts
    if its checked i am returning 1 not checked i hav to return 0
    in my table i ahv to store 10111 like that......
    Edited by: user12356342 on Dec 16, 2009 3:33 AM

    Hi,
    As a starting point, look at: [http://download-uk.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28839/check_box.htm#CHDCGIFA] as this explains how to use checkboxes on forms and reports
    Andy

  • How to insert the select query result into table?

    How to insert the select query result into table?
    SELECT  top 20 creation_time  
            ,last_execution_time 
            ,total_physical_reads
            ,total_logical_reads  
            ,total_logical_writes
            , execution_count 
            , total_worker_time
            , total_elapsed_time 
            , total_elapsed_time / execution_count avg_elapsed_time
            ,SUBSTRING(st.text, (qs.statement_start_offset/2) + 1,
             ((CASE statement_end_offset 
              WHEN -1 THEN DATALENGTH(st.text)
              ELSE qs.statement_end_offset END 
                - qs.statement_start_offset)/2) + 1) AS statement_text
    FROM sys.dm_exec_query_stats AS qs
    CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) st
    ORDER BY total_elapsed_time / execution_count DESC;
    Thanks,
    Tirumala

    1. SELECT INTO
    Below method will create table when data is inserted from one table to another table. Its useful when you need exactly same datatype as source table.
    Use AdventureWorks2008R2;
    Go
    ---Insert data using SELECT INTO
    SELECT AddressLine1, City
    INTO BothellAddresses
    FROM Person.Address
    where City = 'Bothell';
    GO
    ---VERIFY DATA
    Select AddressLine1, City
    FROM BothellAddresses
    ---DROP TABLE
    DROP TABLE BothellAddresses
    GO
    2. INSERT INTO SELECT
    Below method will need table to be created prior to inserting data. Its really useful when table is already created and you want insert data from
    another table.
    Use AdventureWorks2008R2;
    Go
    ---Create Table
    CREATE TABLE BothellAddresses (AddressLine1 NVARCHAR(60), City NVARCHAR(30))
    ---Insert into above table using SELECT
    INSERT INTO BothellAddresses(AddressLine1, City)
    SELECT AddressLine1, City
    FROM Person.Address
    where City = 'Bothell';
    ---VERIFY DATA
    Select AddressLine1, City
    FROM BothellAddresses
    ---DROP TABLE
    DROP TABLE BothellAddresses
    GO
    Regards,
    Vishal Patel
    Blog: http://vspatel.co.uk
    Site: http://lehrity.com

  • How to insert the data using matrix

    Hi
      All how to insert the data using matrix feild
      plz help me
       thanks
        Loy

    Hi Loy,
    The best way to fill an entire matrix is to use a DBDatasource, here is some sample code:
    Dim oForm As SAPbouiCOM.Form
    oForm = SBO_App.Forms.Item("YourFormTypeID")
            '1. Add a DBDataSource to the form
            oForm.DataSources.DBDataSources.Add("OUSR")
            Dim oColumnDBS As SAPbouiCOM.Column
            Dim oColumnUDS As SAPbouiCOM.Column
            Dim i As Integer
            Dim GenEdt As SAPbouiCOM.EditText
            Dim oMatrix As SAPbouiCOM.Matrix
            Dim oColumns As SAPbouiCOM.Columns
            Dim oDBDataSource As SAPbouiCOM.DBDataSource
            oMatrix = oForm.Items.Item("7").Specific
            oColumns = oMatrix.Columns
            '2. DBDataSource: Binding a field / alias of the table to a column
            oColumnDBS = oColumns.Item("V_1")
            oColumnDBS.DataBind.SetBound(True, "OUSR", "U_NAME")
            '3. getting the data sources bound to the form
            oDBDataSource = oForm.DataSources.DBDataSources.Item("OUSR")
            oMatrix.Clear()
            ' Querying the DB Data source
            oDBDataSource.Query()
            ' Adding the data to the matrix
            oMatrix.LoadFromDataSource()
    When you want to fill a specific field use :
    GenEdt = oMatrix.Columns.Item("V_2").Cells.Item(1).Specific
                    GenEdt.String = "Hello"

  • If Both tables having References then how to insert the data each other

    Hai EveryOne..,
    My Sample data.,
    Create table emp (empno number primary key,ename varchar2(20));
    Create table emp_dup (empno number references emp(empno),ename varchar2(20) primary key);
    alter table emp add constraint ename_fk foreign key(ename) references emp(ename);
    My Question is How to insert the data into these two tables?
    Its a *"Circular Reference"* Concept.
    Please ...
    Thank You!!

    You need to set the DEFERRED clause of the constraint when you create your foreign key as DEFERRABLE by which you can move the constraint validation at transaction level.
    In an interview point of view that could be a reasonable answer. But in real time this could be strongly questionable.
    Here is an example
    SQL> create table emp1 (empno number, ename varchar2(10))
      2  /
    Table created.
    SQL> create table emp2 (empno number, ename varchar2(10))
      2  /
    Table created. Define Primary Key for two tables
    SQL> alter table emp1 add constraint emp1_pk primary key (empno)
      2  /
    Table altered.
    SQL> alter table emp2 add constraint emp2_pk primary key (ename)
      2  /
    Table altered. Add foreign key for two tables with DEFERRED clause set as DEFERRABLE
    SQL> alter table emp1 add constraint emp1_fk foreign key (ename) references emp2(ename) initially deferred deferrable
      2  /
    Table altered.
    SQL> alter table emp2 add constraint emp2_fk foreign key (empno) references emp1(empno) initially deferred deferrable
      2  /
    Table altered. Now here is the test case
    SQL> insert into emp1 values (1, 'karthick')
      2  /
    1 row created.
    SQL> commit      
      2  /
    commit
    ERROR at line 1:
    ORA-02091: transaction rolled back
    ORA-02291: integrity constraint (ARBORU.EMP1_FK) violated - parent key not found So the validation is done at Transaction level. Now let insert the value into both tables.
    SQL> insert into emp1 values (1, 'karthick')
      2  /
    1 row created.
    SQL> insert into emp2 values (1, 'karthick')
      2  /
    1 row created.
    SQL> commit
      2  /
    Commit complete.

Maybe you are looking for

  • Problem with Blog comments

    Hi @ll, I have the following problem: I set up my iWeb page (materials for a lecture) including a feedback forum page for the students. The forum worked well until the "update" to MobileMe started. Since then it is not possible for the students to se

  • Crm plugin issue when updating parent account field in account.

    Hi , In my CRM Application ( CRM 2011) we have accounts and contacts. when account parent account is updated their contacts owner id will be updated in crm db server and external server using notification service which is called by pulgin. so in one

  • Will not print in color

    I try to print to an HP Color Laserjet 2600 and, whatever program I try to print from, it comes out black and white. I can print from other computers to it and it prints in color.

  • Replace GRUB2 with Gummiboot

    I've istalled GRUB2 during installation. How can I replace it with Gummiboot and enable UEFI from the BIOS without killing my booting?

  • Time-shifted mail - help!

    Hello , I am writing an article for a popular online magazine and stuck in my recherche The question is: how can I send emails with Mac time-shifted ? For help and answers I would be very grateful! Kind regards , Nicole