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: 

How to validate values in alv report with check table

former_member150968
Participant
0 Kudos

Hi All,

I have created one editable ALV in which user can enter material(matnr). Now I want to validate the value entered by the user before saving it to my custom table. I am using 'SLIS_T_FIELDCAT_ALV' as field catalog. Is there any field in this which I need to pass to validate material. I don't want to go for coding for this. I tried to search for this but did not get anything. Please help.

Regards,

Manish Sethia

3 REPLIES 3

andreas_mann3
Active Contributor
0 Kudos

try fields ref_tabname / ref_fieldname of structure SLIS_T_FIELDCAT_ALV

grx.

A.

0 Kudos

Hi Andreas,

I tried but that is not working. Do I need to handle some event or command to get it validated. My code is as follows.

FORM f_build_field_catalouge USING p_fieldname TYPE any

p_tabname TYPE any

p_inputlen TYPE any

p_fieldtext TYPE any

p_edit TYPE any

CHANGING p_col_pos TYPE any.

CLEAR wa_fcat.

p_col_pos = p_col_pos + 1.

wa_fcat-fieldname = p_fieldname .

wa_fcat-tabname = p_tabname.

IF p_fieldname = 'MATNR'.

wa_fcat-ref_tabname = 'MARA'.

wa_fcat-ref_fieldname = 'MATNR'.

ELSEIF p_fieldname = 'MATPGRP'.

wa_fcat-ref_tabname = 'ZOTC_FLEX_MAT'.

wa_fcat-ref_fieldname = 'MATPGRP'.

ENDIF.

wa_fcat-intlen = p_inputlen . "colume width

wa_fcat-seltext_m = p_fieldtext.

wa_fcat-edit = p_edit ."'X'.

wa_fcat-col_pos = p_col_pos.

APPEND wa_fcat TO t_fcat.

ENDFORM.

But this one is not working.

Regards

0 Kudos

Hi,

The reference variables will just get the technical properties of the field. But, it willl not validate the value in table.

Handle the validation as an event.

Regards,

Santosh