2006 Oct 04 4:36 PM
I am new for dialog programming...
In a screen I need to do a validation that the value to be filled in should be between a range ex. 20 to 40.How do I do it?Please even tell me where should I do this coding in PBO or PAI?
2006 Oct 04 4:39 PM
Hi,
Create a ranges..
RANGES: r_value for int4.
r_value-sign = 'I'.
r_value-option = 'BT'.
r_value-low = '20'.
r_value-high = '40'.
append r_value.
if not v_value in r_value.
message e000.
endif.
OR
IF v_value between 20 AND 40.
DO NOTHING..
ELSE.
MESSAGE E000.
ENDIF.
Thanks,
Naren
I am new for dialog programming...
In a screen I need to do a validation that the value to be filled in should be between a range ex. 20 to 40.How do I do it?Please even tell me where should I do this coding in PBO or PAI?
2006 Oct 04 4:39 PM
2006 Oct 04 4:40 PM
2006 Oct 04 4:41 PM
PAI Module
Module CheckValue.
In main program
Form CheckValue.
if ScrVal < 20
or ScrVal > 40.
message with value out of range
endif.
EndForm.
2006 Oct 04 4:43 PM
In your PAI module Flow logic
FIELD S_VAL module validate_sval.
in your PAI module pool.
module validate_sval.
if s_val < 20 or s_val > 40.
--error message.
endif.
endmodule.
2006 Oct 04 4:39 PM
Hi,
Create a ranges..
RANGES: r_value for int4.
r_value-sign = 'I'.
r_value-option = 'BT'.
r_value-low = '20'.
r_value-high = '40'.
append r_value.
if not v_value in r_value.
message e000.
endif.
OR
IF v_value between 20 AND 40.
DO NOTHING..
ELSE.
MESSAGE E000.
ENDIF.
Thanks,
Naren
2006 Oct 04 4:41 PM
You should do in the PAI module..
Also please check my previous reply for a sample code..
Thanks,
Naren
2006 Oct 04 4:41 PM
You can do it understanding this:
PAI: Process After input
PBO: Process Before output
Take a look
2006 Oct 04 4:45 PM
Hi,
You have to code this in PAI.
PROCESS AFTER INPUT.
FIELD FIELD1 MODULE VALIDATE_FIELD1 ON INPUT.
Write your logic in the program to validate the FIELD1 like below.
MODULE MODULE VALIDATE_FIELD1 INPUT.
IF NOT FIELD1 BETWEEN 20 AND 40.
MESSAGE E398(00) WITH 'ERROR'.
ENDIF.
ENDMODULE.
Thanks,
ramakrishna
2006 Oct 04 4:59 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |