Skip to Content
0
Former Member
Oct 24, 2005 at 02:20 PM

Foreign Key check in ALV Grid

951 Views

Hi all.

I'm trying to have data automatically validated using Foreign Keys in an (editable) ALV Grid. I managed to get the proper values in a dropdown on F4, but i want the manual entries validated without coding every field individually.

The field in question is LFA1-REGIO. This field has a Foreign Key in T005S. I'm using F.M. DDIF_TABL_GET to populate my Field Catalog. This gives me all Foreign Key fields for my fields.

If the user enters 'ZZ' as a Region(LFA1-REGIO), the auto-validation of CL_GUI_ALV_GRID does not recognize that this value is invalid.

I've debugged the class methods that handle the validation, but it seems the problem is in the way i'm setting up my Foreign Key info.

Could someone tell me how to set this up properly? i also have access to the dependant field LAND1, and would like to integrate it in the Validation, but this is a second priority. Thanks in advance.