Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Edit in ALV List display.

Former Member
0 Kudos
452

I have a requirement to create a report of similar to LT10. But i have to add one editable column as transfer quantity after the column available stock. So i copied the standard program of transaction LT10 and made some modification to add a editable field. Now the problem is what ever  value i'm entering in that field is not not getting reflected in the internal table.

Since it is not object oriented program i'm generating events using function module REUSE_ALV_EVENTS_GET, But it doesn't populate event slis_ev_data_changed. So i manually added it to the table of events. Then i passed to REUSE_ALV_LIST_DISPLAY function module. But its triggering error as

Internal error has occurred (FM REUSE_ALV_HIERSEQ_LIST_DISPLAY).

please help for the solution.....

Regards

siva

8 REPLIES 8

Former Member
0 Kudos
243

Hi Sivakumar,

Please use the below function modules to get the changed data.

The form save is callled to save the changed data.

FORM save USING r_ucomm TYPE sy-ucomm
                        rs_selfield TYPE slis_selfield.
  DATA : ref_grid TYPE REF TO cl_gui_alv_grid,
         l_valid TYPE c,
         ls_zempl TYPE zempl,
         li_zempl TYPE STANDARD TABLE OF zempl.
* Checking if the user has pressed the SAVE button
  IF r_ucomm = 'SAVE'.
    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
        IMPORTING
          e_valid = l_valid.

    ENDIF.

    LOOP AT i_output INTO wa_output.
      MOVE-CORRESPONDING wa_output TO ls_zempl.
      APPEND ls_zempl TO li_zempl.
    ENDLOOP.

* Modifying the database table.
    MODIFY zempl FROM TABLE li_zempl.
    MESSAGE s003(zmsg).

  ENDIF.
ENDFORM

Regards,

Archna

0 Kudos
243

Hi Archana,

But i'm using ALV list display and its not object oriented,it sequential.Its because i copied standard program. Is there anything i can do? Please let me know

Regards

Siva

0 Kudos
243

Hi Siva,

The above code which i gave is only for ALV list display, where save is passed to the exporting parameter

  I_CALLBACK_USER_COMMAND

in REUSE_ALV_LIST_DISPLAY

.

Let me know if u need more inputs.

Former Member
0 Kudos
243

Hi if you use the standard programme also you need to do some  manually like  int_table if it is in class check the privt or pblic

0 Kudos
243

I never tried REUSE_ALV_HIERSEQ_LIST_DISPLAY with editable mode. Serious doubt tis is possible.

Regards

Clemens

former_member200701
Participant
0 Kudos
243

Hi Siva,

I have the same requirement as you posted earlier, My Requirement is need to edit the values in Available stock.

I need to know the step which you followed in your requirement (i.e Includes, where to insert the custom code etc..)

Thanks....


0 Kudos
243

Hi Muthu,

     we got a same requirement here, is this doable?

if you completed the requiremnt.kindly share the steps.

Regards,

Satheesh

0 Kudos
243

Fixed from my side... thank you all...