12-14-2011 2:27 PM
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
12-14-2011 2:48 PM
try fields ref_tabname / ref_fieldname of structure SLIS_T_FIELDCAT_ALV
grx.
A.
12-14-2011 2:53 PM
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
12-15-2011 5:58 AM
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