2007 May 17 8:18 PM
Hi,
What are validationsand validation types?Can you give explanation with sample code?
Give more sample code of validation .
Regards,
Chow.
Hi,
What are validationsand validation types?Can you give explanation with sample code?
Give more sample code of validation .
Regards,
Chow.
2007 May 17 8:29 PM
At selection-screen - normal validation
at selection-screen output.dynamic validation
see ABAPDOCU Example transaction
2007 May 18 4:08 AM
hi
Validations are nothing but checking for the values that u have entered i can differnet validations like when we enter values the values shoud be under this range if it voilets than it should trigger some messages so that basing on that mesage the user can decide whether he enter correcot values or not.
sample code:
if cno-low < 100 and cno-high > 1000
message e000.
else.
message s001.
endif.
this is simple validation for select-options.
reward points if helpful
Regards,
srinivas.
2007 May 18 4:14 AM
Validations can basically on the screen elements .
consider the selection screen which has company code on the screen . The validation is checkw whether the company code entered exists in the master table (t001) .
code :
parameter : p_bukrs type bukrs
at selection-screen .
peform validate_Cocode.
form validate_cocode.
select * from t001 into ls_t001 where bukrs = p_bukrs.
if sy-subrc ne 0
company code doesnt exists,
endif.
endform.
2007 May 18 4:17 AM
Hi
For example you have a requirement to divide two numbers and display the result,
if the end user wants to divide the first number by 0, i.e., num2 = 0, in this case,
if you execute the program it goes for a dump.... so restrict the user by giving an error message... or according to the requirement...
It allows solid data entry regarding special rules. According to previous rules, the system can evaluate an entry and a message can appear on the user's terminal if a check statement is not met. A validation step contains prerequisite statement and check statement. Both of them are defined using Boolean Logic or calling an ABAP/4 form.
chk this:
Reward All the helpfull answers......
2007 May 18 4:29 AM
Hi,
Please take a look at my example below.
REPORT z_aris_test_15
MESSAGE-ID zsd.
TABLES: t001.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: p_bukrs TYPE t001-bukrs.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN ON p_bukrs.
SELECT SINGLE bukrs butxt
FROM t001
INTO (t001-bukrs, t001-butxt)
WHERE bukrs = p_bukrs.
IF sy-subrc = 0.
MESSAGE s000 WITH 'You have selected company' t001-butxt.
ELSE.
MESSAGE e000 WITH p_bukrs 'is not defined as a company code'.
ENDIF.
What it does is to validate the company code entered by the user.
Hope it helps...
P.S. Please award points if it helps...
2007 May 18 4:30 AM