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: 

editable alv ?

Former Member
0 Kudos

hi friends..

i have one basic doubt.

we can edit the data in grid.

my question is is it reflected in database.

ie the modified data will updated in database or not ?

can you send me sample program for this scenario ?

12 REPLIES 12

Former Member
0 Kudos

HI,

no it will not be reflected in DB.

it will be reflected only in the internal table which u r using to hold the data in alv.

<b>reward if helpful</b>

rgds,

bharat.

Former Member
0 Kudos

Hi,

you can modify the data base tables from alv

but it is not suggestable as the std tables should be modified through

std transactions or bdc programs or bapi ..

through alv

in the fiedl catalog you have the option for edit

for a particular field

catalog-edit = 'X'.

and then display it

after seeing the display you can edit that field

when you clik the save button

capture the sy-ucomm code and do the coding accordingly

and in the user command you have to take those values and modify your

internal table and

then you can use the statements

modify ztable from table itab.

or update ztable from table itab.

thanks & regards,

Venkatesh

Former Member
0 Kudos

Hi,

The Update won't reflect in Database Tables.Because while displaying the Grid,u will use only the Internal Table & not the Database Table.

If u modify the grid,it will affect only the Internal Table & not the Database Table.

U just display the Internal Table Values & Database Table Values after Updating the Grid.U come to know this.

Regards,

Padmam.

Former Member
0 Kudos

Hi

Refer to this report

<b>BCALV_FULLSCREEN_GRID_EDIT</b>

Regards

Ravish

<b>

Reward if helpful</b>

Former Member
0 Kudos

H selva,

No it will not be reflected in Database,

and AS as friend i want to tell one thing,

this question was answerd number of times in this forum itself,

before posting any question plz plz verfiy carefully, if ur not satisfied then u post it.

sorry selva if u feel bad .

Reward points if u think there is some useful meaning in this thread.

Thanks

Naveen khan

Message was edited by:

Pattan Naveen

0 Kudos

k naveen..

sorry 4 this..

i will correct it future

0 Kudos

suppose i want to edit the data in alv..this should be reflected in database ?

how i do this ?

0 Kudos

Hi Selva,

If the changes should reflect in the Database means,first u have to update the Internal Table Values.After that using Internal Table Values u can update the Database Values.

If u edit some Field in Grid,it wont reflect in the Internal Table.For that u have to call one method <b>CHECK_CHANGED_DATA</b>

For Eg.,

CASE OKCODE.

WHEN 'UPDATE'.

CALL METHOD <ur grid name>->CHECK_CHANGED_DATA.

ENDCASE.

It will Update only the Internal Table Values.U have to write codings for Updating the Database Tables.

In my Scenario,I used BAPI for Updating the Database Tables from Internal Table.

Regards,

Padmam.

0 Kudos

hi padman..

which Bapi you used for your program can you please...

As u mentioned

CASE OKCODE.

WHEN 'UPDATE'.

CALL METHOD <ur grid name>->CHECK_CHANGED_DATA.

ENDCASE.

to use this should i need to use class. if s pls let me know the class name and how to use?

in my scenario i am using the reuse_alv_grid_display. Function module.

after changing the data in the output of result. how could i change my internal table

Former Member
0 Kudos

Hi Selva,

check out this thread,

hope this helps.

Former Member
0 Kudos

Hello,

follow this link for sample program on editable ALV.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20...

Regards,

Deepu.K

Former Member
0 Kudos

hi

good

yes if you r editing any data in the grid than it ll update the data accordingly.

http://www.erpgenie.com/abap/controls/alvgrid.htm

thanks

mrutyun^