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: 

Appending rows in ALV Grid

Former Member
0 Kudos
630

Hi all,

I am using CL_GUI_ALV_GRID to create an ALV grid.

I set some fields to be editable.When I tried to use the APPEND ROW button in the tool bar it is showing a popup where i get the error message

<i><b>Unit validity period: Enter a valid value.</b></i>

the field unit validity period is having fixed values in the domain.

the message is coming because when a new row is inserted the value of the field unit validity period is blank and blank value is not there in the fixed values of the domain.

ideally when a new row is inserted the initial value will be blank and later on the user enters the correct value.but the system is throwing a popup and is not allowing to proceed further.

Can any one help on how to handle this.

1 ACCEPTED SOLUTION

michael-john_turner
Active Participant
0 Kudos
153

Hi,

Try setting AUTO_VALUE in your field catalog to 'X' for the fields in question, but I don't think that's going to work for you as you want the field to be empty. To achive the result you want, you will probably need to trap and remove the error message in the DATA_CHANGED event.

See program BCALV_EDIT_04 for an example of defaulting values when a new row is added.

MJ

2 REPLIES 2

michael-john_turner
Active Participant
0 Kudos
154

Hi,

Try setting AUTO_VALUE in your field catalog to 'X' for the fields in question, but I don't think that's going to work for you as you want the field to be empty. To achive the result you want, you will probably need to trap and remove the error message in the DATA_CHANGED event.

See program BCALV_EDIT_04 for an example of defaulting values when a new row is added.

MJ

Former Member
0 Kudos
153

Hello,

Check out SAP sample ALV grid examples in the BCALV_GRID_* series..

Regards,

Shehryar Dahar