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

Editable ALV

Former Member
0 Likes
1,018

Hi Expert,

I have an editable ALV where I handled DATA_CHANGED event and doing some menupulation with the data and the current cell value also.

suppose I am entring '2' in the current cell and press enter and did some calculation in the data_changed event handler, where few cell value getting updated which are non-editable.

In the non-editable cell I am able to see the chages in value with decimal places like '8.00' but the same I need for non editable cell as well. In this case, entered value in the editable cell has 2, after hadling event need to display 2.00.

more specific

when I enter value 5 in the editable cell and handled data_changed event and want to display current cell value to 5.00.

How to achieve that,

Pls help.

9 REPLIES 9
Read only

Former Member
0 Likes
928

Hi Rajesh,

Use this.

DATA:

lv_ref_grid TYPE REF TO cl_gui_alv_grid.

CLEAR : gv_tcode.

*-- to ensure that only new processed data is displayed

IF lv_ref_grid IS INITIAL.

CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'

IMPORTING

e_grid = lv_ref_grid.

ENDIF.

IF NOT lv_ref_grid IS INITIAL.

CALL METHOD lv_ref_grid->check_changed_data.

ENDIF.

Regards,

Vijay

Read only

0 Likes
928

Hi,

Where to write this piece of code,

I tried writing inside data_changed event handler but going to infinite loop.

reg,

Rajesh.

Read only

venkat_o
Active Contributor
0 Likes
928

Hi Rajesh, <li>Check the demo program BCALV_EDIT_04. DATA_CHANGED event has been clearly expained. Thanks Venkat.O

Read only

Former Member
0 Likes
928

Change the DAta Type for the field automatically it will show you 2.00

Eg. change the field type

DATA col1(7) type p decimals 2.

Read only

Former Member
0 Likes
928

Non-editable fields are showing correctly, bu editable field or enterd value is not getting changed.

Read only

Former Member
0 Likes
928

Non-editable fields are showing correctly, bu editable field value or enterd value is not getting changed from 2 to 2.00.

Read only

Former Member
0 Likes
928

BCALV_TEST_GRID_EDITABLE

Read only

Former Member
0 Likes
928

what field type you have defined for the editable field?

this has to be defined as a type P decimals 2. or any currency field.

Edited by: Soumyaprakash Mishra on Sep 23, 2009 5:08 PM

Read only

0 Likes
928

Change the DAta Type for the field automatically it will show you 2.00

Eg. change the field type

DATA col1(7) type p decimals 2

change this where you have declare this filed ,

i.e. in the Internal table or Structure

Regads,

Amit