Skip to Content
author's profile photo Former Member
Former Member

editable alv

Hi

I need a editable alv to be developed where i can edit the fields of a particular row and i need to save the edited data into a standard table. Any sample program without using any custom tables or structures or any FM so that i can execute the same program in my server.

Thanks

Nanda

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 02:37 PM

    hi

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 24, 2008 at 02:38 PM

    Hi,

    Check this programs,

    Use the Programs

    BCALV_EDIT_01

    BCALV_EDIT_02

    BCALV_EDIT_03

    BCALV_EDIT_04

    BCALV_EDIT_05

    BCALV_EDIT_06

    BCALV_EDIT_07

    Check this link you will find example for individual fields of an ALV grid editable.

    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_editable.htm

    For more info,

    how-to-create-an-editable-alv

    editable-alv

    How to have Multiple lines as an editable field in ALV

    check boxes in ALV report

    how to save an editable field in alv

    Regards

    Adil

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 02:39 PM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 02:39 PM

    \[removed by moderator as it was just a copy and paste answer of someone else's work without giving a source\]

    Edited by: Jan Stallkamp on Jul 24, 2008 4:54 PM

    Add a comment
    10|10000 characters needed characters exceeded

    • >

      > Hi

      >

      > Thanks to all for your inputs can i have any one program where there are no custom tables or screen so that i can directly edit the alv and save the related data in standard table

      >

      > Thanks

      >

      > Nanda

      Without a custom table, where are you going to save the data? And if it's a standard table you shouldn't be updating it directly anyway.

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 02:44 PM

    Hi

    check the demo programs BCALV_FULLSCREEN_GRID_EDIT

    BCALV_GRID_EDIT

    BCALV_TEST_GRID_EDIT_01

    BCALV_TEST_GRID_EDITABLE

    reusealvgrid-editable

    alv-grid-editable-fields

    Just to make things a bit easy

    In the layout,there is a property called edit, make it 'X' for the particular field whichever you want to make editable.

    With Regards

    Nikunj Shah

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 24, 2008 at 02:56 PM

    Check the sample code

    Check the sample code..

    REPORT  ztest_alv.
    TYPE-POOLS: slis.
    
    DATA: it_fcat TYPE slis_t_fieldcat_alv,
          wa_fcat LIKE LINE OF it_fcat.
    
    DATA: it_data TYPE vbap_t.
    
    
    SELECT *
      FROM VBAP
      INTO TABLE it_data
      UP TO 20 ROWS.
    
    wa_fcat-fieldname = 'VBELN'.
    wa_fcat-tabname  = 'IT_DATA'.
    wa_fcat-outputlen = 5.
    wa_fcat-edit = 'X'.
    wa_fcat-input = 'X'.
    wa_fcat-ref_fieldname = 'VBELN'.
    wa_fcat-ref_tabname = 'VBAK'.
    wa_fcat-seltext_l = 'Sales Order'.
    APPEND wa_fcat TO it_fcat.
    clear wa_fcat .
    
    wa_fcat-fieldname = 'POSNR'.
    wa_fcat-tabname  = 'IT_DATA'.
    wa_fcat-outputlen = 5.
    wa_fcat-seltext_l = 'Item'.
    APPEND wa_fcat TO it_fcat.
    
    PERFORM display_data.
    
    *&---------------------------------------------------------------------*
    *&      Form  user_command
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    FORM user_command USING ucomm TYPE sy-ucomm
                selfield TYPE slis_selfield.
    
      DATA: gd_repid LIKE sy-repid, "Exists
      ref_grid TYPE REF TO cl_gui_alv_grid.
      IF ref_grid IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            e_grid = ref_grid.
      ENDIF.
      IF NOT ref_grid IS INITIAL.
        CALL METHOD ref_grid->check_changed_data .
      ENDIF.
    
      CASE ucomm.
        WHEN '&DATA_SAVE'.
    
      "Save here to some CUSTOM TABLE
      ENDCASE.
    
    ENDFORM.                    "user_command
    
    *&---------------------------------------------------------------------*
    *&      Form  display_data
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    FORM display_data.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_interface_check       = sy-repid
          it_fieldcat             = it_fcat
          i_callback_user_command = 'USER_COMMAND'
        TABLES
          t_outtab                = it_data
        EXCEPTIONS
          program_error           = 1.
    ENDFORM.                    "display_data

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 24, 2008 at 02:58 PM

    Hi.

    1) Use SDN search or any other search engine on the web before posting

    2) Don't ask ALV-questions here. There is a forum for UI programming you can use.

    This thread will be locked.

    Best regards,

    Jan Stallkamp

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.