on 09-24-2008 6:06 AM
Hi All,
I have a table view with one field editable , the user should be able to enter only numbers and only upto 4 numbers.I searched the forum and found the thread:
but it gives the OBJECT EXPECTED error , moreover what modifications are required to use for an inputfield in tableview and restrivt length to four....
Thanks,
Anubhav Jain.
are you using iterator to render input field in TV? if yes
to restrict the length
p_replacement_bee = cl_htmlb_inputfield=>factory(
id = p_cell_id
disabled = 'true'
maxlwngth = '4' ).
and to trigger the js function for onchange of value in the field.
write the following code in the layout just after the htmlb:tableview
< sc ript for="<tableviewcell id>" eve nt=onch ange type="te xt/javas cript">
checkNu meric();
< /s crip t>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raja,
My iterator code is:
WHEN 'QTY'.
IF p_edit_mode IS NOT INITIAL.
DATA: qty TYPE string.
matnr = m_row_ref->qty.
DATA: if_fifth TYPE REF TO cl_htmlb_inputfield.
if_fifth = cl_htmlb_inputfield=>factory( id = p_cell_id id_postfix = '_fifth'
alignment = 'center' maxlength = '6'
size = '6'
type = 'BCD'
decimals = '2'
dovalidate = 'TRUE'
cellvalue = 'TRUE').
But it does not restricts the field length to 6 .
What am i doing wrong?
Thanks,
Anubhav.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.