How to disable the input fields and labels.
Hi,
I have a requirement, when i click on button all the fields and labels in the form will be disable .
Hi,
You code wizard, in popup select set radio button and select the attribute and click on Ok, It will generate code automatically. Else find the below code
DATA lo_el_context TYPE REF TO if_wd_context_element.
lo_el_context = wd_context->get_element( ).
CALL METHOD lo_el_context->set_attribute
EXPORTING
name = `DISABLE` " Here disable is the name of attribute which u created in context of type wdy_boolean
value = 'X' .
Hope this helps u.,
Thanks & Regards,
Kiran.
Similar Messages
-
How to enable/disable the input fields based on the data entered in the web dynpro application abap? If the user enters data in one input field then only the next input field should be enabled else it should be in disabled state. Please guide.
Hi,
Try this code.
First create a attribute with the name readonly of type wdy_boolean and bind it read_only property of input field of which is you want to enable or disable.
Next go to Init method.
Set the readonly value as 'X'.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
DATA lv_visible TYPE wd_this->element_context-visible.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* @TODO handle not set lead selection
IF lo_el_context IS INITIAL.
ENDIF.
* @TODO fill attribute
* lv_visible = 1.
* set single attribute
lo_el_context->set_attribute(
name = `READONLY`
value = 'X').
After that Go to the Action ENTER.
First read the input field ( first input field, which is value entered field) , next give a condition
if input value is not initial then set the readonly value is ' '.
DATA lo_nd_input TYPE REF TO if_wd_context_node.
DATA lo_el_input TYPE REF TO if_wd_context_element.
DATA ls_input TYPE wd_this->element_input.
DATA lv_vbeln TYPE wd_this->element_input-vbeln.
* navigate from <CONTEXT> to <INPUT> via lead selection
lo_nd_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
* @TODO handle non existant child
* IF lo_nd_input IS INITIAL.
* ENDIF.
* get element via lead selection
lo_el_input = lo_nd_input->get_element( ).
* @TODO handle not set lead selection
IF lo_el_input IS INITIAL.
ENDIF.
* get single attribute
lo_el_input->get_attribute(
EXPORTING
name = `VBELN`
IMPORTING
value = lv_vbeln ).
if lv_vbeln IS not INITIAL.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
DATA lv_visible TYPE wd_this->element_context-visible.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* @TODO handle not set lead selection
IF lo_el_context IS INITIAL.
ENDIF.
* @TODO fill attribute
* lv_visible = 1.
* set single attribute
lo_el_context->set_attribute(
name = `READONLY`
value = ' ' ). -
In BSP how to give the input field as mandatory?
Hi friends,
In BSP how to give the input field as mandatory?
In BSP i want to validate the input field (example checking the material no is valid or not)
if this material no doesnot exit means i want to pass error message.What is the code for that.
Moosahi
try this
in LAYOUT
<htmlb:inputField id = "vname" disabled = "False" value = "<%= v_visitor %>"/> <font color="red" size="2"><b><%= page->messages->assert_message( 'vname' ) %></b></font></td>
in DO_HANDLE_EVENT
in oninputprocessing
CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
IF event_id = CL_HTMLB_MANAGER=>EVENT_ID.
DATA: event TYPE REF TO CL_HTMLB_EVENT.
event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
IF event->name = 'button' AND event->event_type = 'click'.
DATA: button_event TYPE REF TO CL_HTMLB_EVENT_BUTTON.
button_event ?= event.
ENDIF.
case event->id.
when 'select'.
if v_visitor = ''.
page->messages->add_message(
condition = 'vname'
message = 'Visitor Name can not be blank'
severity = page->messages->CO_SEVERITY_ERROR ).
ELSE.
here u can write ur when ur field getting filled
endif.
endcase.
endif.
give marks if it is helpful
thanks -
How to disable the security code and use only the Touch ID
how to disable the security code and use only the Touch ID
You can't use Touch ID without a passcode.
http://support.apple.com/kb/HT5883 -
How to disable the text field in File upload element?
Hi,
How can we disable the text field in the "File upload" UI element so that the user won't be able to type the file path there, but he will still be able to browse the file using the Browse button?
Regards
PraveenHi Praveen,
This is not possible with the Web Dynpro File Upload UI element.
Thanks,
Samta -
How to make the input field of an uplaod button to readonly
Hi all,
I have to upload an excel file using upload button.But the problem here is i want the user to use only browse button to upload a file..but he should not enter mannulally in the input field.Is it possible to gray out the input filed but the browse button should be in active state.
Regards
Padma NHi,
I dont think you can make the readonly only for the inputfield which is part of the FileUpload UI.
I guess your issue is related with user entering invalid urls and system hangs.
Regards
Ayyapparaj -
How to read the input field value into ABAP variable?
Hi All,
i need a read the value of an input field into an ABAP variable,and i am doing this in the following way
lstring = request->get_form_field('myFlag').
here 'myFlag' is the input field name,but this is not returning me any value into lstring.
I have gone through the SDN and tried to do this.
could you please help me out to resolve this issue.
Thanks in Advance,
PraveenaDear Praveena
In which event are you putting this code. Place it in oninputprocessing event(Page with flow logic Model of coding). Then it will surely work.
Regards
Vijay.M -
How to validate the input field data in VC using RFC FM
HI,
Could any body please give me the solution for the following issue?
When ever I enter a value in the input field of an iView, this value has to be validated from the backend BW system. Is this validation is possible using RFC function module?
If yes, please explain me.Hi Deepak,
U can validate input fields using javascript.Write OnClientClick function for that submit button if ur using htmlb or onClick if u r using html.Refer the follows
http://help.sap.com/saphelp_nw70/helpdata/en/03/900e41a346ef6fe10000000a1550b0/frameset.htm
There are two ways to achieve ur task.
1.By checking for all alphabets.in this u need check all the alphabetic characters one by one.Refer the following
http://www.shiningstar.net/articles/articles/javascript/javascriptvalidations.asp?ID=ROLLA
http://www.shiningstar.net/articles/articles/javascript/checkNumeric.asp?ID=AW
2.By using regular expressions.its very easy and a single line code.here u need to specify single expression for whole alphabets.Refer this
http://aspzone.com/blogs/john/articles/173.aspx
Regards,
Naren -
How to keep the input field from PDF Form to RTF
Hi,
I'm looking to keep the input fields from my pdf form document to Rtf so I can use them in my Rtf document.
Regards,
AlanGood day Alan,
I'm afraid that's not possible as form fields in a PDF file have no equivalent either in a Word format (.docx/.doc) or within the Rich Text Format (.rtf). That data is simply stripped during the conversion as there's no equivalent available.
Kind regards,
David
Acrobat Community Manager
Adobe Systems -
How to change the input field's color in SE51
Hi:
I need to change the color of input fields in module pool.
I tried to modify its screen-color but it did not work.
Need your suggestion.
Regards
Shashihi,
Check this similar thread
Regarding the input field color
thanks -
How to validate the input field
Hi,
I have a input form which is draged from input port of a RFC.
in this input form i have two input fields nad submit button.
on of this input field should always take the character values only. it should not take any numeric value
and other input field should always take numeric value only.
i.e how to validate this two input fields.
regards
srinivasHi,
U can validate input fields using javascript.Write OnClientClick function for that submit button if ur using htmlb or onClick if u r using html.Refer the follows
http://help.sap.com/saphelp_nw70/helpdata/en/03/900e41a346ef6fe10000000a1550b0/frameset.htm
There are two ways to achieve ur task.
1.By checking for all alphabets.in this u need check all the alphabetic characters one by one.Refer the following
http://www.shiningstar.net/articles/articles/javascript/javascriptvalidations.asp?ID=ROLLA
http://www.shiningstar.net/articles/articles/javascript/checkNumeric.asp?ID=AW
2.By using regular expressions.its very easy and a single line code.here u need to specify single expression for whole alphabets.Refer this
http://aspzone.com/blogs/john/articles/173.aspx
Everything has been given for validating in javascript.i hope u also validating in javascript only.
For more details on "Regular expressions" search google.
Regards,
Tamil K -
How to disable a input field in OVS search
Hi friends,
I have crated a OVS search help for matnr.
i have two input field like matnr and mat desc.. user can enter any value and hit SEARCH..
im getting results.
Now i want to hardoced a value of matnr = 001.. and make this field read only..
how can we do it..
i just took a example of matnr and mat desc. to make u understand easily...
kindly help.
NirajaHi Niraja,
You can initialize the value for MATNR in the phase 1 of the eventhandler method for OVS. Try refer the code segment below. Am initializing the values for MATNR & MAKTX fields in the lines:
ls_search_input-matnr = 'D*'.
ls_search_input-maktx = '*'.
* pass the values to the OVS component
ovs_callback_object->set_input_structure(
input = ls_search_input ).
Regards,
Uday
Below is the complete code from my eventhandler method:
method ON_OVS .
" declare data structures for the fields to be displayed and for the table columns of the selection list
types:
begin of lty_stru_input,
" add fields for the display of your search input here
matnr type string,
maktx type string,
end of lty_stru_input.
types:
begin of lty_stru_list,
" add fields for the selection list here
matnr type string,
maktx type string,
end of lty_stru_list.
data: ls_search_input type lty_stru_input,
lt_select_list type standard table of lty_stru_list,
ls_text type wdr_name_value,
lt_label_texts type wdr_name_value_list,
lt_column_texts type wdr_name_value_list,
lv_window_title type string,
lv_group_header type string,
lv_table_header type string.
field-symbols: <ls_query_params> type lty_stru_input,
<ls_selection> type lty_stru_list.
data: lv_matnr type mara-matnr,
lv_maktx type makt-maktx.
case ovs_callback_object->phase_indicator.
when if_wd_ovs=>co_phase_0. "configuration phase, may be omitted
" in this phase you have the possibility to define the texts, if you don't want to use the defaults (DDIC-texts)
ls_text-name = `MATNR`. "must match a field name of search
ls_text-value = `Material Number`. "wd_assist->get_text( `001` ).
insert ls_text into table lt_label_texts.
ls_text-name = `MAKTX`.
ls_text-value = `Material Description`.
insert ls_text into table lt_label_texts.
ls_text-name = `MATNR`. "must match a field in list structure
ls_text-value = `Col1 -> Material Number`. "wd_assist->get_text( `002` ).
insert ls_text into table lt_column_texts.
ls_text-name = `MAKTX`. "must match a field in list structure
ls_text-value = `Col2 -> Material Description`. "wd_assist->get_text( `002` ).
insert ls_text into table lt_column_texts.
ovs_callback_object->set_configuration(
label_texts = lt_label_texts
column_texts = lt_column_texts
group_header = lv_group_header
window_title = lv_window_title
table_header = lv_table_header
col_count = 2
row_count = 10 ).
when if_wd_ovs=>co_phase_1. "set search structure and defaults
" In this phase you can set the structure and default values of the search structure. If this phase is omitted, " the search fields will not be displayed, but the selection table is displayed directly.
" Read values of the original context (not necessary, but you may set these as the defaults). A reference to " the context element is available in the callback object.
ovs_callback_object->context_element->get_static_attributes
( importing static_attributes = ls_search_input ).
" Setting the default values to be displayed in the selection screen
ls_search_input-matnr = 'D*'.
ls_search_input-maktx = '*'.
" pass the values to the OVS component
ovs_callback_object->set_input_structure( input = ls_search_input ).
when if_wd_ovs=>co_phase_2.
" If phase 1 is implemented, use the field input for the selection of the table
" If phase 1 is omitted, use values from your own context.
assign ovs_callback_object->query_parameters->*
to <ls_query_params>.
lv_matnr = <ls_query_params>-matnr.
lv_maktx = <ls_query_params>-maktx.
replace all occurences of: '*' in lv_matnr with '%',
'*' in lv_maktx with '%'.
select a~matnr
b~maktx into corresponding fields of table lt_select_list up to 10 rows
from mara as a inner join
makt as b on a~matnr = b~matnr where
( a~matnr like lv_matnr and b~maktx like lv_maktx and b~spras = 'EN' ).
" call business logic for a table of possible values
" lt_select_list = ???
ovs_callback_object->set_output_table( output = lt_select_list ).
when if_wd_ovs=>co_phase_3.
" apply result
assign ovs_callback_object->selection->* to <ls_selection>.
if <ls_selection> is assigned.
ovs_callback_object->context_element->set_attribute(
name = `MATNR`
value = <ls_selection>-MATNR ).
concatenate 'Description from MAKT:'
<ls_selection>-MAKTX
into <ls_selection>-MAKTX separated by space.
ovs_callback_object->context_element->set_attribute(
name = `MAKTX`
value = <ls_selection>-MAKTX ).
endif.
endcase.
endmethod. -
How to disabled the input parameter dialog box in crystal reports 9
Post Author: Murtaza
CA Forum: General
Hi friends,I have got stuck with a weird problem. In my
crystal report, I have set up some input parameters. I am setting
values for these parameters somewhere inside code. But I don't
want to show the default input parameter dialog box. Under any case,
user should not see the ugly parameter dialog box that crystal
presents. Please suggest me how I can achieve
this. I cannot do this through code, because our environment does
not allow that. I have to do this in crystal reports viewer and
by setting some property of the crystal report object. But everything
must be done on UI, not through code. So, the solution should not be the following.
// step before step 1
// **** the line needs to refer to the report and be set before setting
ReportSource in the viewer to myReport
myReport.EnableParameterPrompting = False
Any help would be greatly appreciated. MurtazaPost Author: sleahcim
CA Forum: General
Hi Murtaza,
Unfortunately, I am not aware of any method to suppress the prompt for the input parameters, but still use them. It is truly a design-related issue for the report. The reason that the prompt appears is because the parameter it is prompting for is used in the report; in particular either the Group or Record Selection, or referenced in another formula.
The only way I can think of to not show the prompt, is to not use the parameter in the report. You did mention that you are setting the value of the parameter inside of the report -- are you doing this through using a formula? Perhaps you can just remove the parameter and only use the formula that you are setting the default values with.
-Michael -
How to Test the individualmapping field and conditions...
Hi Frnds,
I done mapping from source to destination as per tech spec in my scenario based on some conditions
i used node functions also..
But my question is how to test the every mapping filed , condition is correct or not, what i used node function working properly or not...
Regards,
RajHi
If you want to check mapping for individual mapping then in design go to test tab and put your data there and then come again on Design tab and click on any target field fro which you want to check mapping then right click on target field in mpping area and click on Display queue and check whether it is expected output for that particular field mapping.
Regards
Sami
Reward points if useful. -
when I click on search button, I get the search result, but along with those results, I see some input fields automatically assigned the values in the search input, which should not be.
values are assigned to these fields because of controller context field values, once the values are populated these values are assigned everywhere where istle feild referring to.
How to keep the user input without changes?
Thanks!Naveen,
You set contradictory requirements: on one hand you have mapping, where values are always synchronized; on other hand you whant them to be unique.
Just break your existing mappings.
1. Create separate attributes in view context(s) if you do not need to access them in component controller or you do not need to be synchronized between views.
2. Create unique set of attributes in component controller for combination of attributes that really must be synchronized. Then map view context attributes accordingly.
VS
Maybe you are looking for
-
Creation of inbound delivery with reference to a purchase order
Hi Everyone on the Forum, I have an inbound delivery (ASN), z that programmatically (1) (2) I will develop, I found two modules function, BBP_INB_DELIVERY_CREATE and BBP_INB_DELIVERY_CREATE_31I. The two modules operate to create inbound delive
-
Quality issues: Sony CX-7 HD Camera, MacBook Pro, iMovie 08
Hey, everyone. I'm having some difficulties where final quality of movies is concerned. I'm an amateur, so the problem is probably between the chair and the keyboard, but I figured I'd check in and see what anyone here had to say. I've imported HD fo
-
Hi guys. Does someone know how to search contacts on 3720 by both first and last name. Ex. I have a contact Andrew Smith. If I search for "Sm" it won't display anything. Will only show my contact if I search for "An". Thanks.
-
Upgrade to Elements 11 and Premiere 11 for Windows
I purchased an upgrade to Elements 11 and Premiere 11 for Windows a couple of days ago. When I tried to install, I received the following error message: "The installation process has encountered an error while installing Shared Technologies. Please r
-
Adobe Premiere Pro Help | Color correction and adjustment
This question was posted in response to the following article: http://helpx.adobe.com/premiere-pro/using/color-correction-adjustment.html