How to insert textedit ui element in ALV

hi experts,
i need to insert textedit ui element in one of the column of ALV.
thanks

No you cann't use the TExtedit in ALV cell.
Check out the thread [Line break in ALV cells|Re: Line break in ALV cells?] for more details.

Similar Messages

  • How to insert blank lines in the ALV output.

    Hi Friends,
    Could any body help me out How to insert blank lines in the ALV output.?? Any Code pls...
    Thank you,
    Vikram.C

    hi vikram
    do like this
    In the fieldcatalog table all the fields should be in editable mode
    ie lw_fcat-edit = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    i_callback_pf_status_set = 'SET_PF_STATUS'
    i_callback_user_command = 'USER_COMMAND'
    is_layout = lv_layout
    it_fieldcat = lt_fcat[]
    i_save = 'A'
    is_variant = lv_variant
    TABLES
    t_outtab = lt_license[]
    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. " display_data
    *& Form user_command
    FORM user_command USING r_ucomm TYPE sy-ucomm
    rs_selfield TYPE slis_selfield.
    CASE r_ucomm.
    WHEN 'ADD'. "
    data: lv_ind type i.
    data: lv_line type i.
    describe table lt_license lines lv_line.
    loop at lt_license into lw_license.
    lv_ind = sy-tabix.
    if lv_ind = lv_line.
    append initial line to lt_license.
    endif.
    endloop.
    ENDCASE.
    ENDFORM. "user_command
    reward points if useful
    Rohan

  • How to insert a specific record into alv

    Hi everyone,
      here is my problem:
        I put an ALV GRID control in my screen , it display some records.
        and I create a new button on the toolbar, and in the "handle user command class" , I need to
    select a record from DB table into a work area.
        after I select the record I need, here is the key question:
          *I want to insert the record into the ALV at a specific row position which the user decided,
    what should I do?*
      METHOD HANDLE_ON_USER_COMMAND.
        CASE E_UCOMM.
          WHEN CL_GUI_ALV_GRID=>MC_FC_LOC_INSERT_ROW.
          WHEN 'FC_ASSIGN'.
    ***I do some selection here  
            select %%%$$%%%^&&** into GS_HOLIDAYS.
    *** after the selection, what should I do then????
    *** I want to insert the work area GS_HOLIDAYS into ALV at a specific position
    *** e.g.  into the 3rd row.
    *** how can I achieve that????
    ***call a method or something??????I don't know    
          WHEN 'FC_DELETE'.
          WHEN OTHERS.
        ENDCASE.
      ENDMETHOD.
    pls don't let me go through the programs in package "SLIS",because I have already done that and
    I haven't solved my problems yet.
    Thanks for your help.

    All u need to do is on user command for inserting new records u just insert a blank record in your internal table that u are displaying with required style informaion for making it editable and then refresh alv display by method REFRESH_TABLE_DISPLAY.
    Thanks & Regards,
    Vivek Gaur

  • How to insert line with values in ALV (CL_GUI_ALV_GRID)?

    Hi,
    Does anyone know how to get control of new line inserted in ALV (I am using class CL_GUI_ALV_GRID) before the new line is shown to the user. What I want the user to see is not a completely blank line, but a new line with certain fields filled with data.
    I have tried with ALL events in CL_GUI_ALV_GRID but without any luck. If I create my own user command and insert it in the alv menu I get control, but not with the standards. Why?
    Please help
    Kind regards - Keld Gregersen

    Hi,
    I created a nice work around...
    CLASS lcl_event_handler DEFINITION.
    handle_toolbar
    FOR EVENT toolbar OF cl_gui_alv_grid
    IMPORTING e_object e_interactive,
    handle_user_command
    FOR EVENT user_command OF cl_gui_alv_grid
    IMPORTING e_ucomm.
    ENDCLASS. "lcl_event_handler DEFINITION
    CLASS lcl_event_handler IMPLEMENTATION.
    METHOD handle_toolbar.
    DATA:
    l_toolbar TYPE stb_button.
    Here I replace SAP standard functions with own functions
    READ TABLE e_object->mt_toolbar INTO l_toolbar
    WITH KEY function = '&LOCAL&APPEND'.
    IF sy-subrc = 0.
    l_toolbar-function = 'OWN_APPEND'.
    MODIFY e_object->mt_toolbar FROM l_toolbar INDEX sy-tabix.
    ENDIF.
    READ TABLE e_object->mt_toolbar INTO l_toolbar
    WITH KEY function = '&LOCAL&COPY_ROW'.
    IF sy-subrc = 0.
    l_toolbar-function = 'OWN_COPY_ROW'.
    MODIFY e_object->mt_toolbar FROM l_toolbar INDEX sy-tabix.
    ENDIF.
    ENDMETHOD. "handle_toolbar
    METHOD handle_user_command.
    CASE e_ucomm.
    WHEN 'OWN_APPEND'.
    CALL METHOD ref_alv->check_changed_data
    IMPORTING
    e_valid =
    CHANGING
    c_refresh = 'X'
    CREATE YOUR OWN CODE HERE
    CALL METHOD ref_alv->refresh_table_display
    EXPORTING
    is_stable = 'X'
    i_soft_refresh =
    EXCEPTIONS
    finished = 1
    others = 2
    ENDMETHOD. "handle_user_command
    ENDCLASS. "lcl_event_handler IMPLEMENTATION
    Kind regards
    Keld Gregersen

  • How to insert spaces in elements in message mapping

    Hi All,
             I have scenario, where in the incoming data is put into a file, but if there is no incoming data for any element it should insert spaces equivalent to the lenght of the field. how can this be done?
    XIer

    Xier,
    your problem is that the MapWithDefault function will fill only the fields which have no value, for example, if that tag is like <field2/>. When you have <field2></field2>, you have a value, even though this value is an empty string.
    To test your scenario properly, change your input xml to:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Countresult xmlns:ns0="urn:sce.com:xi:FI:TestProjectStructureUpload">
         <record>
              <field1>a</field1>
              <field2/>
              <field3>b</field3>
         </record>
    </ns0:MT_Countresult>
    If your requirement is to insert spaces when you have empty string as the input (<field2></field2> case), then you can't use MapWithDefault. In this case, you have to use an if logic: if input = "" (empty string) then output = "    " (4 blankspaces), else output = input.
    If you don't know how the input will come, best scenario would be to combine the MapWithDefault + If logic, in order to solve both cases (no input or empty string input).
    Regards,
    Henrique.

  • How to expand a Root-Element in ALV-Tree?

    Hi,
    i use ALV-Tree and try to expand the first hierarchie.
    I try this:
      TRY.
          GR_TREE_NODE = GR_TREE_NODES->ADD_NODE(
            RELATED_NODE = ROOT_KEY
            *EXPANDER     = ABAP_TRUE*
            RELATIONSHIP = CL_GUI_COLUMN_TREE=>RELAT_FIRST_CHILD
            TEXT         = 'Meldungen').
        CATCH CX_SALV_MSG.
      ENDTRY.
    but this element will not be expandet?
    I know this for expand all:     CALL METHOD GR_TREE_NODES->EXPAND_ALL.
    but want to expand only the first hierarch-elemet (root).
    Can anyone tell me what i'm doing wrong?
    Thanks.
    Regards, Dieter

    Hi,
    solved by this:
    GR_TREE_NODE->EXPAND( ).
    Regards, Dieter

  • How to add button ui element in alv table data in web Dynpro ABAP

    Hi Experts,
    I have one requirement,
    Actually I was devloped normal table in web Dynpro ABAP
    in that i have one column Display as a button .
    when i select that button need to display some data.
    same requirement i need to devlope in alv table.
    i am going to attach file please check.
    Thanks in advance.
    Regards,
    Subba Reddy.

    Hi,
    You can create Button in your ALV table column with below code
    DATA lo_button              TYPE REF TO cl_salv_wd_uie_button.
    CREATE OBJECT lo_button.
        CALL METHOD lv_value->if_salv_wd_column_settings~get_column
          EXPORTING
            id    = <your column name>
          RECEIVING
            value = lo_system_select_hdr.
        lo_button->set_enabled( value = abap_true ).
       lo_button->set_text( value = 'Avaliable List'  ).
        lo_button->set_tooltip( value = 'Avaliable List' ).
        lo_system_select_hdr->set_cell_editor( value = lo_button ).
    And for button click action,
    Create a method (say SHOW_DATA( ) ) with on_click event handler.And when you click button on your ALV table, SHOW_DATA( ) method will trigger.
    Thanks
    KH

  • About inserting color to rows in alv

    hi ,
        could any one tell me how to insert colors to rows in alv.
    regards,
    pavan.

    hi,
    try like this
    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      line_color(4) TYPE c,     "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-info_fieldname =      'LINE_COLOR'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = gd_repid
          is_layout          = gd_layout
          it_fieldcat        = fieldcatalog[]
          i_save             = 'X'
        TABLES
          t_outtab           = it_ekko
        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.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      DATA: ld_color(1) TYPE c.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekko.
    *Populate field with color attributes
      LOOP AT it_ekko INTO wa_ekko.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
              i.e. wa_ekko-line_color = 'C410'
        ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
        IF ld_color = 8.
          ld_color = 1.
        ENDIF.
        CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
        MODIFY it_ekko FROM wa_ekko.
      ENDLOOP.
    ENDFORM.                    " DATA_RETRIEVAL
    reward if usefull....

  • How to insert horizontal lines in alv report?

    hi,
        i have to insert horizontal lines in alv report.( RM07MLBB )
            actually my requirement is:
                               basis list = RM07MLBB.
    first secondary list = another report is called here ( RM07DOCS )
                      i want to insert horizontal lines in the first secondary list, when i execute individually RM07DOCS , i can get horizontal lines, but when i dounle click in the basic list --> in the first secondary list , i am not getting the horizontal lnes.
    functional modules used are REUSE_ALV_HIERSEQ_LIST_DISPLAY & REUSE_ALV_GRID_DISPLAY.
        here in this program,
                        is_layout = alv_layout.
    hence i tried to give     
                  alv_layout-no_hline = ' '. 
    but not effecting.
              can some one please tell me , how to insert lines in the alv report.
    thanks in advance,
    Dastagir.

    hello,
         so i cannot insert horizontal lines in the first secondary list according to my sorting condition, i.e., in a single block there should be :
           if same delivery challan number is repeating they should come in the same block,
    for the corresponding delivery challen number, if have po number, is repeating , they also should come in the same block.
                       in this way i have to seperate the blocks containing EXNUM , EBELN CONDITIONED.

  • How to insert a node in an Element ?

    I have the following XSD :
    *<?xml version="1.0" encoding="windows-1252" ?>*
    *<schema>*
    *     <element name="Donnee">*
    *          <complexType>*
    *               <sequence>*
    *                    <element name="Field1" type="string"/>*
    *                    <element name="Field2" type="string"/>*
    *                    <element name="ListField" minOccurs="0" maxOccurs="unbounded">*
    *                         <complexType>*
    *                              <sequence>*
    *                                   <element name="SubField1" type="string"/>*
    *                                   <element name="SubField2" type="string"/>*
    *                              </sequence>*
    *                         </complexType>*
    *                    </element>*
    *               </sequence>*
    *          </complexType>*
    *     </element>*
    *</schema>*
    I want to create a new Element following that schema.
    Once created (empty), I can fill the "Field1" and "Field2" fields.
    But I cannot insert a "FieldList" element !
    I tried with Java :
    setVariableData("my_variable", "Donnee/ListField[1]/SubField1", "my value"):
    But this throw me an error, because this xpath doesn't exists.
    I don't see how I can insert a new element...
    Thank you for your help.

    Hi,
    Change you XSD Schema definition as given below:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://xmlns.oracle.com/Donnee" targetNamespace="http://xmlns.oracle.com/Donnee" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="Donnee">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="Field1" type="xs:string"/>
                        <xs:element name="Field2" type="xs:string"/>
                        <xs:element ref="ListField" minOccurs="0" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="ListField">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="SubField1" type="xs:string"/>
                        <xs:element name="SubField2" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>
    Now you can create variables of type ListField, create variables of ListField type and populate them.
    Append these variables into parent element Donnee using the append operation. Append operation is available in Assign activity.
    Regards,
    Dharmendra
    http://soa-howto.blogspot.com

  • How to get Inserted and Deleted Rows in ALV

    I have looked at the BC_EDIT* examples but I still can't figure out how to determine which rows were Inserted and Deleted from the ALV list.  Can someone please provide me the code to do this?
    Thanks.
    Sandy

    Hi sandy,
    i dont think you will have issue in inserting a row in ALV because whenever the user done some actions say for eg clicking the pushbutton at the toolbar you could insert the a new row into the ALV.for creating pushbutton you need to use the events TOOLBAR,USER_COMMAND.
    deleting a row may also follow the above procedure.
    Have a look at the demo program
    BCALV_GRID_05
    Cheers,
    Abdul Hakim

  • How to insert data in table UI elements

    Hi Guys,
    Here is my questions. How to insert data in table UI elements.
    Here i try to insert data by using Add button
    data:
        Node_Item                           type ref to If_Wd_Context_Node.
        Node_Item = wd_comp_controller->get_data_node( ).
      data:
        lr_table_line type ref to ITEM.
       lr_table_line = Node_Item->create_element( ).
      field-symbols:
        <ls_table> type any.
      assign lr_table_line->* to <ls_table>.
      Node_Item->bind_element(
        new_item             = <ls_table>
        set_initial_elements = abap_false
        index                = 1 ).
    But i got syntax error the result type of the function method cannot not be converted in to the type of lr_table_line.
    And i set cardinality and selection as 0.n.
    Pls, let me know for the soulutions
    Chandru
    Message was edited by:
            chandrasekar muthuvelraj

    Chadru, another option is for you to bind the table UI field to an internal table and to populate the internal table. Then, automatically, your Table UI field will be populated with the data from the internal table. Here is the code that does that and works for me.  Good luck!
    method FILL_DATA .
    DATA: node_level1 type ref to if_wd_context_node,
          node_level2 type ref to if_wd_context_node,
          node_items type ref to if_wd_context_node,
          stru_ResItems type BAPI2093_RES_ITEM,
          tab_ResItems TYPE TABLE OF BAPI2093_RES_ITEM,
          n type i.
    node_level1 = wd_context->get_child_node( name = 'BAPI_RESERVATION_CRE' ).
    node_level2 = node_level1->get_child_node( name = 'CHANGING' ).
    node_items = node_level2->get_child_node( name = 'RESERVATIONITEMS' ).
    n = 2.
      do n times.
        insert stru_ResItems into table tab_ResItems.
      enddo.
    node_items->bind_table( tab_ResItems ).
    endmethod.

  • How to insert database elements?

    Hi all,
    could you please tell me .. how to add insert command in our abap program to insert the database elements?  and also we want to know whether we can add the same insert statement we are using on the oracle.we tried with that command but it cause some problem.
    INSERT INTO ZJEYC1 VALUES (' & CUSTNO ' , ' & CUSTNAME & ' , ' & CUSTADDRESS & ' , ' & CUSTMOB & ').
    is it correct?...
    if no please send me the code...

    INSERT - Insert in a database table
    Variants
    1. INSERT INTO dbtab VALUES wa. or
    INSERT INTO (dbtabname) VALUES wa.
    2. INSERT dbtab. or
    INSERT *dbtab. or
    INSERT (dbtabname) ...
    3. INSERT dbtab FROM TABLE itab. or
    INSERT (dbtabname) FROM TABLE itab.
    Effect
    Inserts new lines in a database table .
    You can specify the name of the database table either in the program itself in the form dbtab or at runtime as the contents of the field dbtabname . In both cases, the database table must be defined in the ABAP/4 Dictionary . If the program contains the name of the database table, it must also include a corresponding TABLES statement. Normally, lines are inserted only in the current client. Data can only be inserted using a view if the view refers to a single table and was defined in the ABAP/4 Dictionary with the maintenance status "No restriction".
    INSERT belongs to the Open SQL command set.
    Notes
    You cannot insert a line if a line with the same primary key already exists or if a UNIQUE index already has a line with identical key field values.
    When inserting lines using a view , all fields of the database table that are not in the view are set to their initial value (see TABLES ) - if they were defined with NOT NULL in the ABAP/4 Dictionary . Otherwise they are set to NULL .
    Since the INSERT statement does not perform authorization checks , you must program these yourself.
    Lines specified in the INSERT command are not actually added to the database table until after the next ROLLBACK WORK . Lines added within a transaction remain locked until the transaction has finished. The end of a transaction is either a COMMIT WORK , where all database changes performed within the transaction are made irrevocable, or a ROLLBACK WORK , which cancels all database changes performed within the transaction.
    Variant 1
    INSERT INTO dbtab VALUES wa. or
    INSERT INTO (dbtabname) VALUES wa.
    Addition
    ... CLIENT SPECIFIED
    Effect
    Inserts one line into a database table.
    The line to be inserted is taken from the work area wa and the data read from left to right according to the structure of the table work area dbtab (see TABLES ). Here, the structure of wa is not taken into account. For this reason, the work area wa must be at least as wide (see DATA ) as the table work area dbtab and the alignment of the work area wa must correspond to the alignment of the table work area. Otherwise, a runtime error occurs.
    When the command has been executed, the system field SY-DBCNT contains the number of inserted lines (0 or 1).
    The return code value is set as follows:
    SY-SUBRC = 0 Line was successfully inserted.
    SY_SUBRC = 4 Line could not be inserted since a line with the same key already exists.
    Example
    Insert the customer Robinson in the current client:
        TABLES SCUSTOM.
        SCUSTOM-ID        = '12400177'.
        SCUSTOM-NAME      = 'Robinson'.
        SCUSTOM-POSTCODE  = '69542'.
        SCUSTOM-CITY      = 'Heidelberg'.
        SCUSTOM-CUSTTYPE  = 'P'.
        SCUSTOM-DISCOUNT  = '003'.
        SCUSTOM-TELEPHONE = '06201/44889'.
        INSERT INTO SCUSTOM VALUES SCUSTOM.
    Addition
    ... CLIENT SPECIFIED
    Effect
    Switches off automatic client handling. This allows you to insert data across all clients even when dealing with client-specific tables. The client field is then treated like a normal table field which you can program to accept values in the work area wa that contains the line to be inserted.
    The addition CLIENT SPECIFIED must be specified immediately after the name of the database table.
    Example
    Insert the customer Robinson in client 2:
        TABLES SCUSTOM.
        SCUSTOM-MANDT     = '002'.
        SCUSTOM-ID        = '12400177'.
        SCUSTOM-NAME      = 'Robinson'.
        SCUSTOM-POSTCODE  = '69542'.
        SCUSTOM-CITY      = 'Heidelberg'.
        SCUSTOM-CUSTTYPE  = 'P'.
        SCUSTOM-DISCOUNT  = '003'.
        SCUSTOM-TELEPHONE = '06201/44889'.
        INSERT INTO SCUSTOM CLIENT SPECIFIED VALUES SCUSTOM.
    Variant 2
    INSERT dbtab. or
    INSERT *dbtab. or
    INSERT (dbtabname) ...
    Additions
    1. ... FROM wa
    2. ... CLIENT SPECIFIED
    Effect
    These are the SAP -specific short forms for the statements explained under variant 1.
    INSERT INTO dbtab VALUES dbtab. or
    INSERT INTO dbtab VALUES *dbtab. or
    INSERT INTO (dbtabname) VALUES wa.
    When the command has been executed, the system field SY-DBCNT contains the number of inserted lines (0 or 1).
    The return code value is set as follows:
    SY-SUBRC = 0 Line successfully inserted.
    SY_SUBRC = 4 Line could not be inserted, since a line with the same key already exists.
    Example
    Add a line to a database table:
        TABLES SAIRPORT.
        SAIRPORT-ID   = 'NEW'.
        SAIRPORT-NAME = 'NEWPORT APT'.
        INSERT SAIRPORT.
    Addition 1
    ... FROM wa
    Effect
    The values for the line to be inserted are not taken from the table work area dbtab , but from the explicitly specified work area wa . The work area wa must also satisfy the conditions described in variant 1. As with this variant, the addition allows you to specify the name of the database table directly or indirectly.
    Note
    If a work area is not explicitly specified, the values for the line to be inserted are taken from the table work area dbtab if the statement is in a FORM or FUNCTION where the table work area is stored in a formal parameter or local variable of the same name.
    Addition 2
    ... CLIENT SPECIFIED
    Effect
    As for variant 1.
    Variant 3
    INSERT dbtab FROM TABLE itab. or
    INSERT (dbtabname) FROM TABLE itab.
    Additions
    ... CLIENT SPECIFIED
    ... ACCEPTING DUPLICATE KEYS
    Effect
    Mass insert: Inserzts all lines of the internal table itab in a single operation. The lines of itab must satisfy the same conditions as the work area wa in variant 1.
    When the command has been executed, the system field SY-DBCNT contains the number of inserted lines.
    The return code value is set as follows:
    SY-SUBRC = 0 All lines successfully inserted. Any other result causes a runtime error .
    Note
    If the internal table itab is empty, SY-SUBRC and SY-DBCNT are set to 0 after the call.
    Addition 1
    ... CLIENT SPECIFIED
    Effect
    As for variant 1.
    Addition 2
    ... ACCEPTING DUPLICATE KEYS
    Effect
    If a line cannot be inserted, the processing does not terminate with a runtime error, but the return code value of SY-SUBRC is merely set to 4. All the remaining lines are inserted when the command is executed.
    regards,
    srinivas
    <b>*reward for useful answers*</b>

  • 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.

  • How to insert new record in ALV GRID?

    Hi all,
       I am displaying ztable data into grid format using method  SET_TABLE_FOR_FIRST_DISPLAY of Class CL_GUI_ALV_GRID using OOPS concept.now i want to insert a new record into ALV grid?
    If anyone has tried then please tell me?
    Thanks and Regards,
    Arpita

    Hi Avinash,
    Thanks for replay.
    My problem is solved.i did it as follows.
    HANDLE_DATA_CHANGED
          FOR EVENT DATA_CHANGED OF CL_GUI_ALV_GRID
               IMPORTING ER_DATA_CHANGED
                           E_UCOMM.
    METHOD HANDLE_DATA_CHANGED.
    LOOP AT ER_DATA_CHANGED->MT_GOOD_CELLS INTO WA_GOOD_CELLS.
    CASE WA_GOOD_CELLS-FIELDNAME.
      WHEN 'ZCARRID'.
          CALL METHOD ER_DATA_CHANGED->GET_CELL_VALUE
              EXPORTING
                I_ROW_ID = WA_GOOD_CELLS-ROW_ID
                I_FIELDNAME = WA_GOOD_CELLS-FIELDNAME
              IMPORTING
                E_VALUE = ZCARRID1.
         WA_FLI-ZCARRID = ZCARRID1.
    ENDMETHOD.
    Using method CALL METHOD ER_DATA_CHANGED->GET_CELL_VALUE,
    i am reading individual values and assinning it to WA and then insert into ZTBALE.
    Thanks,
    Arpita

Maybe you are looking for

  • How to go from one slide to another by pressing a key

    Dear forum, I am a newby to Captivate 5 but even after having read all related documentation I got stuck with a beginners problem: I have recorded a demo from a software simulation (120 slides) and when I play the movie its all fine. I would like how

  • Have 'Web Named Colors' as default?

    When opening GL CS2 the default color select is 'Recent Colors' when I click on a color well, is it possible to set that default to be 'Web Named Colors' instead? Thanks.

  • Why does Firefox crash every time I am on Facebook since 3 or 4 days now?

    everytime I go on Facebook it lets me register in write a bit of a message and then crashes. It started about 3 or 4 days ago.

  • Edge counting with digitial pause trigger

    Hi I should write a program for edge counting with digital pause trigger in visual basic.  I have found an example of using pause trigger in edge counting but it is written in C#. Steps in the program followed is: 1) creating task 2) creating count e

  • How do I stop the music???

    OK, silly question, but I just got an iPhone yesterday, and started downloading iTunes today. Is there a stop button on this thing?