2007 Dec 17 8:28 AM
I have a quantity input field
i want to enter only numeric value and it shud give error if i enter some alpha numeric ot special symbol eg. 'ahj#$%'
how can i do it
I have a quantity input field
i want to enter only numeric value and it shud give error if i enter some alpha numeric ot special symbol eg. 'ahj#$%'
how can i do it
2007 Dec 17 8:37 AM
Hi Karan
Use only type i, or f type for quantity. or use Unit for the quantity.
Please reward points.
Regards
deepanker
2007 Dec 17 8:38 AM
Hi Karan,
You should define Data Type of that field "QUAN" type.....It will not allow or accept any alpha numeric values... Or you have to validate the same at PAI event Or at selection screen for field...
This will help you...
Reward Points...
Cheers,
Sagun Desai...
2007 Dec 17 8:42 AM
wen i enter invalid values program is terminated
instead of that i want to give error msg
type is quantity only
2007 Dec 17 8:45 AM
ok give a error messsage in the if condition.
example :-
if input field = alphanumeric
error.
endif.
reward points if it will be helpful.
2007 Dec 17 8:47 AM
Hi,
check this code write it in this way then u can get display the error message.
data: n(10) type N.
parameters: pa_matnr(10) type N.
if pa_matnr eq n.
message e000(zmsmsg).
endif.
write:/ pa_matnr
try this hope u get some idea how to do tht.
regards,
Sana.
reward for useful answers.
2007 Dec 17 9:39 AM
i need to chk 4 general value not a single value
how can i chk for a type in dat field
the assignment is
ls_plantdata-reorder_pt = int_table-nvalue.
the thing is int_table-nvalue is char type from table control
and ls_plantdata-reorder_pt is quan i cant change int_table-nvalue to quan bt need to chk it b4 assinment only as it gives dump after assignment
2007 Dec 17 9:43 AM
2007 Dec 17 9:43 AM
Hi karan,
IF wa_weight-truckno CA '_' OR wa_weight-truckno CA '-' OR
wa_weight-truckno CA '*' OR wa_weight-truckno CA '/' OR
wa_weight-truckno CA '+' OR wa_weight-truckno CA '`' OR
wa_weight-truckno CA '\' OR wa_weight-truckno CA '#' OR
wa_weight-truckno CA '&' OR wa_weight-truckno CA '%' OR
wa_weight-truckno CA '$' OR wa_weight-truckno CA '@' OR
wa_weight-truckno CA '!' OR wa_weight-truckno CA '^' OR
wa_weight-truckno CA '(' OR wa_weight-truckno CA ')' OR
wa_weight-truckno CA '=' OR wa_weight-truckno CA '<' OR
wa_weight-truckno CA '>' OR wa_weight-truckno CA '?' OR
wa_weight-truckno CA ':' OR wa_weight-truckno CA ';' OR
wa_weight-truckno CA '|' OR wa_weight-truckno CA '{' OR
wa_weight-truckno CA '}' OR wa_weight-truckno CA '[' OR
wa_weight-truckno CA ']' OR wa_weight-truckno CA ',' OR
wa_weight-truckno CA '.' OR wa_weight-truckno CA '~' OR
wa_weight-truckno CA '"' .
use this.
Reward Points if useful,
Regards,
Sumanjeet.
2007 Dec 17 9:45 AM
no i cant use this much of hard coding 4 dat
is there any othe method
2007 Dec 17 9:54 AM
i need to chk 4 general value not a single value
how can i chk for a type in dat field
the assignment is
ls_plantdata-reorder_pt = int_table-nvalue.
the thing is int_table-nvalue is char type from table control
and ls_plantdata-reorder_pt is quan i cant change int_table-nvalue to quan bt need to chk it b4 assinment only as it gives dump after assignment
plzzz helpp
2007 Dec 17 10:13 AM
2007 Dec 17 10:39 AM
plzzzz helppppppppppppppp
is thr no one to help on this???????
2007 Dec 17 1:09 PM
2008 Apr 29 12:32 PM
Hi
Try this:
codePARAMETERS: P1(24) TYPE C.
DATA: _NUMBER TYPE P DECIMALS 2.
CATCH SYSTEM-EXCEPTIONS CONVT_NO_NUMBER = 1.
MOVE P1 TO _NUMBER.
ENDCATCH.
IF SY-SUBRC 0.
WRITE: P1, 'is not number'.
ENDIF.[/code]
-Suthan
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |