‎2007 Dec 24 11:57 AM
how we can validate the selection creteria of a report? an how we can display initial values in a selection screen?plz tell
‎2007 Dec 24 11:59 AM
hi,
for validating the data in selection screen, u need to compare it with the master table values for the particular field.
and display the initial values u can use DEFAULT option with select option.
Pls reward if helpful
‎2007 Dec 24 12:00 PM
Hi,
we can validate the selection screen fields by using the event
at selection-screen on field.
by using this we can validate the fields.
we can assign the values to this event as low, high values.
please reward points, if it is useful to u,
regards,
satish.
‎2008 Jan 31 4:46 AM
HI Shrinath,
any field of a database table has a check table field.
u need to compare ur selection screen input with this check table field. this can be done using , AT SELECTION SCREEN event.
________________________________________________
AT SELECTION-SCREEN.
PERFORM field_validation USING s_bukrs-low
s_monat-low
s_monat-high
p_gjahr.
_________________________________________________
FORM field_validation USING p_s_bukrs_low TYPE any
p_s_monat_low TYPE any
p_s_monat_high TYPE any
p_p_gjahr TYPE any.
v_year = sy-datum+0(4). " Fetching Year from SY-Datum
IF NOT s_bukrs IS INITIAL.
SELECT SINGLE bukrs
FROM t001 INTO v_bukrs
WHERE bukrs EQ p_s_bukrs_low.
IF sy-subrc <> 0.
MESSAGE e002(/scl/tin_rtr).
ENDIF.
ENDIF.
IF p_s_monat_low > c_12 OR p_s_monat_high > c_12.
MESSAGE e019(/scl/tin_rtr).
ENDIF.
IF p_p_gjahr > v_year.
MESSAGE e018(/scl/tin_rtr).
ENDIF.
IF NOT s_hkont IS INITIAL.
SELECT SINGLE saknr
FROM skb1 INTO v_hkont
WHERE saknr EQ s_hkont-low.
IF sy-subrc <> 0.
MESSAGE e020(/scl/tin_rtr).
ENDIF.
ENDIF.
ENDFORM.
________________________________________________
I hope this can help u and reward the points if found useful.
Romanch