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: 

Making a column Mandatory / Required in an Editable ALV Grid

Former Member
0 Kudos

Hi. I am using oops method to make an editable ALV grid.

How do I <b>set a columns as Required</b>

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Flora,

One option is while saving u can do validations on that field

when 'SAVE'.

  loop at itab.
     if itab-fld is initial.
        message e000 with 'fld1 should not be initial'.
     endif.
   endloop.

11 REPLIES 11

Former Member
0 Kudos

I am not sure if there is a setting which will take care of the same, unless you declare that column as key.

You should be able to take care of the same in the DATA_CHANGED / DATA_CHANGE_FINISHED events, right?

Regards,

Ravi

Former Member
0 Kudos

Hi Flora,

One option is while saving u can do validations on that field

when 'SAVE'.

  loop at itab.
     if itab-fld is initial.
        message e000 with 'fld1 should not be initial'.
     endif.
   endloop.

former_member188685
Active Contributor
0 Kudos

Hi Flora,

is it Normal ALV or OO ALV.

Regards

vijay

0 Kudos

Hi Vijay,

As i hav specified in my post this is OO ALV

0 Kudos

Hi,

i didn't find it , any way , Have a look at the Demo Program <b>BCALV_EDIT_04</b>.

You get Idea . Create new records using Create Button , if you don't enter data in some fields and try saving it. then see what will happen.

Regards

vijay

0 Kudos

Hi Vijay, When u replied this post, I was assured of a solution, as you hav solved all my alv related problem in the past

Anyway, lets see if i can find something.

One more thing, i got a solution for "Delete button in editable alv : not triggering efore_user_command event ", you can see it on:

0 Kudos

Hi Flora,

What fields you are making mandatory and are those fields are key fields to some table. and

But if you see the example above mentioned , you can get idea ,the example is used to validate the entries which are edited by the user .please check it. Always ready to help you.

Regards

vijay

0 Kudos

Hi,

Did you got the Solution for the Above thread.

Regards

vijay

0 Kudos

Hi Vijay,

I m still looking for solution for "Making a column Mandatory / Required in an Editable ALV Grid"

But the post "Delete button in editable alv : not triggering before_user_command event " problem is sloved

0 Kudos

Hi Flora,

only thing i can see is Validation, using the Validation you can Throw errors. when you don't see any data in the field. thats how you can Force user to enter the value in the fields which are Mandatory ones.

Regards

vijay

0 Kudos

I too have a requiremnt like i need to show up madatory indicator in some mandatory colums of editable alv.I am using OOPS programming.

Please update.Is this possible?

Thanks,

Phani.

Edited by: phanisreedhar lakamsani on Nov 20, 2008 10:57 AM