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

Editable ALV with Drop down and Popup window

hello friends,

can u help me to create Editable ALV With dropdown box.

And Popup As input .

thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 11:42 AM

    If you need a sample program on Editable ALV find it below.

    TYPE-POOLS: slis.
    
    
    
    DATA: it_fcat TYPE slis_t_fieldcat_alv,
    
          wa_fcat LIKE LINE OF it_fcat.
    
    
    DATA: it_data TYPE vbap_t,
          wa_data TYPE vbap.
    
    *data selfield TYPE slis_selfield.
    
    
    
    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-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.
    
    
    wa_fcat-fieldname = 'ZMENG'.
    
    wa_fcat-tabname  = 'IT_DATA'.
    
    wa_fcat-outputlen = 13.
    
    wa_fcat-edit = 'X'.
    
    wa_fcat-seltext_l = 'Quantity'.
    
    APPEND wa_fcat TO it_fcat.
    
    
    PERFORM display_data.
    
    
    
    **&---------------------------------------------------------------------*
    *
    **&      Form  user_command
    *
    **&---------------------------------------------------------------------*
    *
    **       text
    *
    **----------------------------------------------------------------------*
    *
    FORM usercomm  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 'SAVE'.
    
          "Do Update the Data base here....
    
          selfield-refresh = 'X'.
    
          UPDATE VBAP FROM TABLE it_data.
    
      ENDCASE.
    
    ENDFORM.                    "user_command
    
    
    *&---------------------------------------------------------------------*
    
    *&      Form  display_data
    
    *&---------------------------------------------------------------------*
    
    *       text
    
    *----------------------------------------------------------------------*
    
    FORM display_data.
    
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_callback_pf_status_set = 'ABC'
          i_callback_user_command  = 'USERCOMM'
          it_fieldcat              = it_fcat
        TABLES
          t_outtab                 = it_data.
    
      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  ABC
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    *      -->EXTAB      text
    *----------------------------------------------------------------------*
    FORM abc USING extab TYPE slis_t_extab.
      SET PF-STATUS 'ABC'. " excluding extab.
    ENDFORM.                    "ABC

    Regards,

    Murthy.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 23, 2008 at 11:41 AM

    Hi,

    Please go through BCALV_EDIT_01 to BCALV_EDIT_08

    Regards

    Ramchander Rao.K

    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.