Application Development and Automation 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: 
Read only

validation

Former Member
0 Likes
659

hi,

how to validate document number(bkpf-blart) in the selection screen such that it should accept only document types as KD,KC,KG,KA.

4 REPLIES 4
Read only

Former Member
0 Likes
630

hi,

using the event "AT SELECTION-SCREEN" or "AT SELECTION-SCREEN ON FIELD" event we can validate it.

Read only

Former Member
0 Likes
630

Hi,

If u want to validate the selection-screen input values, you need to use the event "AT SELECTION-SCREEN"

ex:-

AT SELECTION-SCREEN ON BLART.

select single blart from bkpf into bkpf

where blart = 'KD'

and blart = 'KC'

and blart = 'KG'

and blart = 'KA'.

if sy-subrc ne 0.

message i009(zcsmsg).

submit (sy-repid) via selection-screen.

endif.

Reward,if useful.

Thanks,

Chandu

Read only

Former Member
0 Likes
630

at selection-screen.

if bkpf-blart <> kd and bkpf-blart <> kg.

else if bkpf-blart <> kc and bkpf-blart <> ka.

select the data..............

else.

message e000(z00) with 'enter the available document'.

endif.

endif.

Reward if it useful.

Dara.

Read only

Former Member
0 Likes
630

Write the following code:

At Selection-Screen Output.

If bkpf-blart = 'KD' or bkpf-blart = 'KC' or bkpf-blart = 'KG' or bkpf-blart = 'KA'.

else.

message e000(zmes) with 'Enter Valid data'.

endif.

Reward if useful.