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: 

report

Former Member
0 Kudos

how we can validate the selection creteria of a report? an how we can display initial values in a selection screen?plz tell

3 REPLIES 3

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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