Application Development and Automation 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: 
Read only

alv grid editable using OOPS

Former Member
0 Likes
597

hi friends,

I wants to make my alv grid editable using OOPS concept and then after i want to save all edited record in database. can any one plz give me code for this.

You will get your reward points.

Thanks,

Regards,

Virat

4 REPLIES 4
Read only

Former Member
0 Likes
554

Hi,

use

<b>DATA:LAYOUT TYPE LVC_S_LAYO.

LAYOUT-EDIT = 'X'.</b>

CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

IS_LAYOUT = <b>LAYOUT</b>

CHANGING

IT_FIELDCATALOG = FCAT[]

IT_OUTTAB = MARA.

RGDS,

bharat.

Read only

rodrigo_paisante3
Active Contributor
Read only

Former Member
0 Likes
554

check the program <b>BCALV_EDIT_05</b>

Read only

Former Member
0 Likes
554
* generate own entries if database table is empty
    perform generate_entries changing pt_outtab.
  endif.

  call method g_grid->set_table_for_first_display
       exporting it_toolbar_excluding  = lt_exclude
       changing  it_fieldcatalog       = pt_fieldcat
                 it_outtab             = pt_outtab.

* Set editable cells to ready for input initially
  CALL METHOD g_grid->set_ready_for_input
   EXPORTING
    I_READY_FOR_INPUT = 1.

  clear lt_f4.
  lt_f4-fieldname = 'WUNIT'.
  lt_f4-register = 'X'.
  append lt_f4.

reward points if it is usefull ...

Girish