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 - Validate Data after User-Command (SAVE)

Former Member
0 Likes
2,258

Hi Everbody !

I created a quite nice editable ALV-Grid, that works almost fine.

The only problem I have and don't understand is the valditation in the PAI-Module of my dynpro, e.g. at the 'SAVE'-Command, if the 'ENTER'-Button wasn't pushed before.

In case of an error, the protocol shows up, but the false entry in alv is overwritten by the old content.

I call the method MY_ALV->CHECK_CHANGED_DATA.

What have i to do then?

Can anybody explain this to me?

Thanks a lot!

Sabrina

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,235

You need to Make use of the DATA_CHANGED event.

Check the sample program : BCALV_EDIT_03

It is for Verification of modified cells

3 REPLIES 3
Read only

Former Member
0 Likes
1,236

You need to Make use of the DATA_CHANGED event.

Check the sample program : BCALV_EDIT_03

It is for Verification of modified cells

Read only

0 Likes
1,235

Hi!

Thanks for the immediate reply!

The Data-Changed-event is not the problem:

i registered it that way and implemented the handling inclusive error-protocoll.

CALL METHOD my_ALV_->REGISTER_EDIT_EVENT

EXPORTING

I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.

the user has to push 'ENTER' to check the changed data on one rush.

But if the user only pushes 'SAVE' or something beyond the alv-toolbar, the pai-module will be processed.

So, i get the method alv->CHECK_CHANGED_DATA, to check the entries.

That works well, the protocoll is displayed, but the wrong entry in Alv (which is normally marked as error) is overwritten by the old, correct content.

Read only

Former Member
0 Likes
1,235

In th USER_COMMAND subroutine of ur REUSE_ALV_GRID_DISpLAy FM

FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM

P_SELFLD TYPE SLIS_SELFIELD.

case p_ucomm.

Data ref1 type ref to cl_gui_alv_grid.

CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'

IMPORTING

E_GRID = ref1.

call method ref1->check_changed_data

when 'SAVE'.

  • write ur code her