‎2008 Aug 26 8:25 AM
hi
Can anybody suggest me with FM to validate given input( field should accept input form the table) and throw an error incase user has entered worng data.
<removed_by_moderator>
regards,
Saipriya.
Edited by: Julius Bussche on Aug 26, 2008 1:03 PM
‎2008 Aug 26 8:31 AM
Hi supriya,
To validate the field you can give F4 help to it and pass the internal table to it, which has valid entries. or
you can put a SELECT SINGLE <> to the entry from that table, if sy-subrc eq 0 then data is valid.
hope its helpfull.
<removed_by_moderator>
Amresh
Edited by: Julius Bussche on Aug 26, 2008 1:03 PM
‎2008 Aug 26 8:33 AM
Hi,
Please mention which fields you want to validate.
regards
jana
‎2008 Aug 26 8:36 AM
Hi,
There is no function module available. You can validate in
AT SELECTION-SCREEN ON <field> event.
Regards,
Bhaskar
‎2008 Aug 26 8:38 AM
Hi,
parameters:
P_carrid type s_carr.
at selection-screen.
select single
carrid
into w_carrid
where carrid = p_carrid.
if sy-subrc ne 0.
ur error message
endif.
Hope it helps you.
Regards
Manjari..
‎2008 Aug 26 8:39 AM
hiii
there is no such FM which can validate entered value..but yes you can enter some already validated values by using following FM
F4_FIELD_ON_VALUE_REQUEST
F4IF_FIELD_VALUE_REQUEST
F4IF_INT_TABLE_VALUE_REQUEST
F4IF_START_VALUE_REQUEST
and you can also validate entered value by using select query for that entered value like
CHECK s_matnr IS NOT INITIAL.
SELECT matnr
INTO w_matnr
FROM mara
UP TO 1 ROWS
WHERE matnr IN s_matnr.
ENDSELECT.
CHECK sy-subrc NE 0.
SET CURSOR FIELD 'S_MATNR'.
MESSAGE e010(zmsg). " Invalid Materialregards
twinkal