Skip to Content

How to Input Value in ALV report at reuntime...?

Dear All,

How to Input Value or change the value of a field in ALV report at runtime...?

regards,

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Aug 03, 2006 at 04:20 AM

    HI,

    To input value in ALV you have to make it editable.

    to change values at runtime you have to capture some events and then change your values in internal table which is used to display alv.

    Here is an example of editable ALV.

    <b>REPORT ZWA_ALV_EDITABLE_FM .
    
    
    type-pools: slis.
    
    data: gs_layout type slis_layout_alv.
    DATA: d_ref TYPE REF TO data.
    
    DATA: itab type table of fmfint.
    
    SELECT * FROM fmfint
    INTO TABLE itab.
    
    gs_layout-edit = 'X'.
    
    * Call ABAP List Viewer (ALV)
    call function 'REUSE_ALV_GRID_DISPLAY'
         exporting
              i_callback_program      = 'ZWA_ALV_EDITABLE_FM'
              i_callback_user_command = 'USER_COMMAND'
              i_structure_name        =  'fmfint'
              is_layout               = gs_layout
         tables
              t_outtab                = itab.
    
    
    form user_command using r_ucomm type sy-ucomm
                            rs_selfield type slis_selfield.
      if r_ucomm = '&DATA_SAVE'.
    
        message i000(SU) with 'saved'.
    
        MODIFY fmfint FROM TABLE itab.
    
        call function 'REUSE_ALV_LIST_DISPLAY'
             exporting
                  i_structure_name = 'fmfint'
             tables
                  t_outtab         = itab.
      endif.
    endform.</b>

    Regards,

    Wasim Ahmed

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2006 at 04:25 AM

    Hi

    Its Simple, just when you are building fieldcat put edit = 'X'. Please refer to standard program in SE38 BCALVEDIT to get the logic of approach

    Hope This Helps

    Anirban

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2006 at 04:33 AM

    Hai,

    There is option in fieldcatalog EDIT parameter which is set to 'X' to the field to be accept input.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2006 at 06:09 AM

    Hi,

    Refer the ALV demo programs starting with B*ALV, you can also have a look at the following,

    BCALV_EDIT_01

    BCALV_EDIT_02

    BCALV_EDIT_03

    Rgds,

    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.