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

Former Member
0 Likes
605

Hi,

I have created a ALV grid using ABAP OO.

I need to make some of the fields as mandatory ones.

Pls help me on this.

I tried using DATA_CHANGED. But for the first time it brings up all the fields(even if teh fields are not modified) in the MT_GOOD_CELLS .

Pls help

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
579

Hi,

Which ever field you want as mandatory,in the fieldcatalog place the component VALEXI as 'X'. It would make that field mandatory.

<REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>

Thanks,

Dishant

Edited by: Alvaro Tejada Galindo on Aug 25, 2008 5:21 PM

3 REPLIES 3
Read only

Former Member
0 Likes
579

It is not possible to set some fields as mandatory using fieldcatalog or by layout setting. But we can write some logic to check the whether required fields are filled or not and then give an error message.

Before updating the values, check the internal table whether all the required fields have been filled or not, other wise give an error.

LOOP AT lt_output INTO lwa_output.

IF lwa_output-req_field IS INITIAL.

MESSAGE e000(z1). "Field is mandatory

ENDIF.

ENDLOOP.

Regards

Read only

Former Member
0 Likes
580

Hi,

Which ever field you want as mandatory,in the fieldcatalog place the component VALEXI as 'X'. It would make that field mandatory.

<REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>

Thanks,

Dishant

Edited by: Alvaro Tejada Galindo on Aug 25, 2008 5:21 PM

Read only

0 Likes
579

Hi Dishant,

thats not right, sorry...valexi works only, if in the dictionary is a foreignkey or valuetable defined...

Greetz

Sabrina