Enable input fields in a view container
Hi,
I have inserted a view in another view's view container.
But the input fields are disabled.
can anybody tell me how to enable them?
readonly property is set to false...
Hi..
This situation may arise when the attributes (mapped to the input field in the view) are mapped to the interface controller via the component controler and the IsInputElement property of the node in the interface controller is set to True.
In this case you cannot change the cardinality of the node from the component controller also.
If this is the case, try by removing the interface controller and component controller binding.
Regards,
Sayan Ghosh
Similar Messages
-
How can we change the input field on a view stop showing zeros
Hello,
To make screen look consistent with other character input field. How can we change the input field on the view stop displaying zeros even though the data type is NUMC and data type should not be change?
Edited by: sap_learner on Mar 25, 2010 5:44 PM
Edited by: sap_learner on Mar 25, 2010 5:49 PM
Edited by: sap_learner on Mar 25, 2010 5:55 PMhello Manas Dua,
Thanks for your help. I am able to resolve my problem.
My code will help the future comers to resolve this kind of issues.
*The code is applied to method WDDOINIT of the default view.
DATA lo_nd_terms_input TYPE REF TO if_wd_context_node.
DATA lo_nd_terms_input_i TYPE REF TO if_wd_context_node_info.
DATA lv_zeros TYPE wdy_attribute_format_prop.
lv_zeros-null_as_blank = 'X'.
lo_nd_terms_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
lo_nd_terms_input_i = lo_nd_terms_input->get_node_info( ).
lo_nd_terms_input_i->set_attribute_format_props(
EXPORTING
name = `ENTER THE ATTRIBUTE NAME`
format_properties = lv_zeros ).
Edited by: sap_learner on Mar 26, 2010 5:02 PM -
Not able to display the values in the input fields of the view
Hi All.
I am facing an unique issue.
My custom element created in my custom node getting a null value
from a Get Vendor Details RFC written in RFC.
The values are getting populated in the custom element but not coming in the
input field of the corresponding view.
Then, I wrote this code
wdContext.nodeCustom.setLeadSelection(1);
and all the output came in the input field.
Now, after a build it is not coming in the input fields of the view.
All my custom nodes are Singleton and values are coming in the custom elements
as I can print them by wdComponentApi.getMessageManager.reportSuccess(""+customnode.getField());
All my nodes are Singleton.
Please give your valuable inputs.
Regards
Kaushik BanerjeeHi
Check the node property
initializeLeadSelection true
if not make it true , I would suggest to make a value node of the same structure as in RFC after execuation of the RFC populate the value manually.Dont bind it directly to the UI element.
BR
Satish Kumar -
Hello.
I am creating a web dynrpo application for creating a sales order. I am using Bapi_salesorder_createfromdat1.
All the input fields on screen are disabled when application is deployed and viewed on browser. I set the enabled property of input fields as true. But still fields are disabled.
Can anyone tell me how to solve this??
regards
Vijay KalluriDear Vijay,
Try this..
Create a new Value Node with the Structure Binding with the model node in which your values are coming.
Then use the CopyService to copy the values from the Model node to the newly created Value Node.
IWDNode ValueNode = wdContext.nodeYourValueNode();
IWDNode ModelNode = wdContext.nodeYourModelNode();
WDCopyService.copyElements(ModelNode,ValueNode);
Now bind the Value node to your input field.
Hope this helps!!
Warm Regards
Upendra Agrawal -
Hi,
I am Working on CRM Web UI. In one of the view of BP, I have added new Input Field. I have also Updated in Runtme Repository.it is showing Input Field over there also. But when i run this on Web UI, it is displaying only Field( not as an Input Field, it is disable and cant enter into thar). I have done all Possible parts means assigning new Role and assignment to Design Layer....so on. Can anyone help me out from this issue......................!
Thanx in advance.........................!
Harkesh DangHi Ruby,
The Field is added properly into UI but when entering a any value into that input field, then i process any event ie if i hit enter button the value disappears means it does not store in buffer.
I have debugged that and it is showing the exception CX_SY_REF_IS_INITIAL and return to main code and showing nothing.
How should i proceed further for this issue...............!
My requirement is that i have after entering this value i have to save this value.
Ok do i have to write anything for this means any method or ????????
i ran EEWB for this, though BOL entity whether this data enter into databse or not???????
There is no such method callled GET_LINE*SAMPLE..........................! in that context node...!
Thanks & Regards,
Harkesh Dang -
How to populate read only input field or text view form value help only
Hi experts,
I have one requirement to populate a read-only field or text view from value help.
User cant put any value there.value comes only from the value help.
For example,
when we read context using Code Wizard,we cant type any value there.value only comes from value help.
How to implement that functionality?
Please reply.
Thanks in advance,
Subhasis.Yes it is possible.
1.Create a context Attribute and then bind this attribute to the Text view UI element.
2. read context attribute and then set value to the context attribute like this way.
DATA:
elem_context1 TYPE REF TO if_wd_context_element,
stru_context1 TYPE if_first=>element_context ,
item_potxt LIKE stru_context-potxt.
get element via lead selection
elem_context1 = wd_context->get_element( ).
stru_context1-potxt = 'PO'.
elem_context1->set_attribute(
VALUE = stru_context1
name = 'POTXT'
thanks
Suman
Edited by: suman kumar chinnam on Sep 9, 2008 12:12 PM -
Add data to table view from input fields in a page
Hi
I am developing a BSP page which will be called from SRM shop transaction. After user enters the line item data, data will be passed back to shop transaction using OCI interface and the page attributes (URL).
(1) How can I add data from input fields to table view on a page on a button click? I am able to add first line but I could not retain first line data when I try to add the second line.
I am able to add multiple lines to table view if I use view and controller by adding to the line data to static attribute of the controller. I cant use the controller and view because I can not set the attribute to Controller automatically.
(2) Is there a way to pass an attribute (URL) to controller from SPRO? Like we pass an attribute to page automatically (Automatic page attribute).
(3) How can I call a controller and view and pass the page attribute to the controller on a button click from a page with out controller?
Thanks
SreenivasI'm trying to test the merge with the following data in a test.txt file:
ZZZZZ114923000004
1234Z400660000001
ZZZZZ114923000010
Getting an error:
SQL> @C:\dataformats\sql\pc12seriesMerge.sql
Directory created.
SP2-0552: Bind variable "17" not declared.
SQL>
here it the pc12seriesMerge.sql file
set serveroutput on
create or replace directory user_dir as 'c:\dataformats\incoming\';
DECLARE
v_filename VARCHAR2(100); -- Data filename
v_file_exists boolean;
v_file_length number;
v_block_size number;
f utl_file.file_type;
s varchar2(200);
lineString varchar(200);
v_account varchar(5);
v_IDN varchar(6);
v_quantity varchar(6);
BEGIN
v_filename := 'TEST.TXT';
DBMS_OUTPUT.PUT_LINE(v_filename); --shows filename
utl_file.fgetattr('USER_DIR', v_filename, v_file_exists, v_file_length ,v_block_size );
IF v_file_exists THEN
dbms_output.put_line('File Exists');
create table ext_table (
account varchar2(5),
idn number(6),
quantity varchar2(6)
organization external (
type oracle_loader
default directory user_dir
access parameters (
records delimited by newline
fields (
account position(1:5) char(5),
idn position(6:11) char(6),
quantity position(12:17) char(6)
location ('test.txt')
reject limit unlimited;
MERGE INTO id_req_stg t
USING (
SELECT account,
idn,
decode(quantity, '-', 0, to_number(quantity)) as quantity
FROM ext_table
) v
ON ( t.account = v.account AND t.idn = v.idn )
WHEN MATCHED THEN
UPDATE SET t.quantity = v.quantity
DELETE WHERE t.quantity = 0
WHEN NOT MATCHED THEN
INSERT (account, idn, quantity)
VALUES (v.account, v.idn, v.quantity);
ELSE
dbms_output.put_line('File Does Not Exist');
END IF; -- file exists
EXCEPTION
WHEN UTL_FILE.ACCESS_DENIED THEN
DBMS_OUTPUT.PUT_LINE('No Access!!!');
WHEN UTL_FILE.INVALID_PATH THEN
DBMS_OUTPUT.PUT_LINE('PATH DOES NOT EXIST');
WHEN others THEN
DBMS_OUTPUT.PUT_LINE('SQLERRM: ' || SQLERRM);
END;
/ -
Dynamic enabling of input fields via radio btn in report selection screen?
Hi there!
I was wondering whether one can dynamically enable/disable input fields on a selection screen of a report-program.
Or is this only possible for selection screens in dynpro-programs?
If possible for reports - could you give an example?
Thanx a lot.
AndreasHi,
yes..You can dynamically disable and enable inputs fields in the selection screen..
Check this ex..If you press the first radio button..The second input will be disabled...And vice versa..
PARAMETERS: p_r1 RADIOBUTTON GROUP g1 USER-COMMAND usr DEFAULT 'X',
p_r2 RADIOBUTTON GROUP g1.
PARAMETERS: p_input1 TYPE matnr MODIF ID m1,
p_input2 TYPE matnr MODIF ID m2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_r1 = 'X'.
IF screen-group1 = 'M2'.
screen-input = '0'.
ENDIF.
ELSE.
IF screen-group1 = 'M1'.
screen-input = '0'.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Thanks,
Naren -
Dynamically changing attributes of a field in view container UI element
In the layout of the web dynpro component I have added a view container UI element. I am populating the fields in the view container UI element in methods in component controller using the following code
*--Adding a Checkbox
lv_str = wd_assist->if_wd_component_assistance~get_text( '009' ).
CALL METHOD wd_this->att_wd_handler->add_parameter_field
EXPORTING
i_id = 'CHB_DOWNLOAD_CHECKBOX'
i_description = lv_str
i_value = lv_chb_download_checkbox
i_as_checkbox = abap_true.
*--Adding a Parameter
lv_str = wd_assist->if_wd_component_assistance~get_text( '010' ).
CALL METHOD wd_this->att_wd_handler->add_parameter_field
EXPORTING
i_id = 'CHB_DOWNLOAD_PATH'
i_description = lv_str
i_value = lv_chb_download_path
i_as_checkbox = abap_false.
Now based on the checkbox selection I want to make the field CHB_DOWNLOAD_PATH mandatory and also on F4 for CHB_DOWNLOAD_PATH I want a method to be called. Where must i write the coding for the above conditions and how? Please help.hi
In your method there would be a parameter ie ON_TOGGLE where you can write the name of your event .
Whenever your checkbox will be clicked that event wil be called.
You can write your code in that event itself.
Regards
Kuldeep -
Creating Input Field inside Docking Container bar
Hello.
Does anyone know how I can put an input field inside a docking container object ? Just like it appears in SE80.
I have created a docking container bar, and in one of those bars i want to put a text field.
Anyone please ?
Thank you
EDIT----
I found how to do this with cl_gui_container_bar_2 and with dynamic documents.
Edited by: Ricardo Monteiro on Aug 25, 2010 1:30 PMHi,
Check Program SAPSIMPLE_TREE_CONTEXT_MEN_DEM and check event node_context_menu_request
Hope this helps you.
Thanks,
Prashanth
Edited by: Prashanth KR on Jun 2, 2009 7:50 AM -
Disabling one input field if i enter text in second inputfield
Hi,
I am new to WebDynpro. My problem is very simple. I have two input fields. When i enter text in one input field i want the second input field to be disabled & Vice versa. The idea is that i want to give the user the option to enter in only 1 input field of his choice. The second input field should automatically get disabled. He can choose any input field of his choice. The second one should get disabled.
EG: Assume that there are two input fields "Item No" & "Material". The user wants do a search using any one of these parameters, but not both. So, when he chooses to do a search based on "Item No", the "Material" input field should be greyed out(disabled). And, vice versa. The user may decide to choose any one of these fields.
Please advise.This is not possible because there is no "onFocus" event on the input field.
But you could use two radio buttons R1, R2 to enable exactly one of the input fields F1, F2 at a time.
In the view designer, set R1.keyToSelect = "1", R2.keyToSelect = "2".
Bind R1.selectedKey and R2.selectedKey to a common context attribute A (type string).
If (at runtime) A contains "1", radio button R1 is selected, if A contains "2", radio button R2 is selected.
To enable input field F1 exactly if R1 is selected:
Create a calculated boolean attribute E1 that returns the boolean value ("1".equals(A)), bind property F1.enabled to E1. Do the same for F2.
Armin -
Input field validation in web dynpro abap
Hi....i have a input field in a view, which is bound with dictionary object of char type ,through context.for this input field, i have to allow the end users to enter the numeric and float values only,but in my condition it accepting everything and returns runtime error.for this how to validate inputs other than numerics.
Thanks & regards,
pavan maganti.DATA lo_nd_itab2 TYPE REF TO if_wd_context_node.
DATA lo_el_itab2 TYPE REF TO if_wd_context_element.
DATA ls_itab2 TYPE wd_this->element_itab2.
DATA lv_non_numeric TYPE wd_this->element_itab2-non_numeric.
* get message manager
DATA lo_api_controller TYPE REF TO if_wd_controller.
DATA lo_message_manager TYPE REF TO if_wd_message_manager.
* navigate from <CONTEXT> to <ITAB2> via lead selection
lo_nd_itab2 = wd_context->get_child_node( name = wd_this->wdctx_itab2 ).
* get element via lead selection
lo_el_itab2 = lo_nd_itab2->get_element( ).
* get single attribute
lo_el_itab2->get_attribute(
EXPORTING
name = `NON_NUMERIC`
IMPORTING
value = lv_non_numeric ).
IF lv_non_numeric CO '1234567890'.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager.
* report message
CALL METHOD lo_message_manager->report_success
EXPORTING
message_text = 'All numeric'.
ELSE.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager.
* report message
CALL METHOD lo_message_manager->report_warning
EXPORTING
message_text = 'Contains characters'.
ENDIF. -
Insert input field into Transparentcontainer
Hello all,
I am editing standard ESS /MSS dc threw NWDS . in the view of dc i am creating a Transparentcontainer in this container i am inserting a lable and input field.but when i am running the application the lable and the input field is not coming at proper position.
I want to how may i change the position of these fields so that i can them on screen as per my requiremnt .
Thanks.
PunitHi Punit,
Try the following piece of code (assuming you are adding UI element dynamically) before adding the label and the input field to the transparent container.
IWDTransparentContainer someObjName = (IWDTransparentContainer)view.createElement(IWDTransparentContainer.class, "SomeContainerName");
someObjName.setWidth("70%");
IWDGridLayout ContainerGridLayout = (IWDGridLayout) someObjName.createLayout(IWDGridLayout.class);
ContainerGridLayout.setColCount(2);
Hope it helps you. -
How to get Input field value?
Hi All,
I have some problem in getting of input value from View to customcontroller.
My problem is I have created a Input field in the view and if Iam giving the value to that field I can capture the value from View to customcontroller and send it as BAPI input.But My input filed is in the view Context.
How can i capture InputFiled value from View to CustomController.
Advance thanks
Nageswara.
Message was edited by: nageswar mandapatiThanks for your response Patrick,
In my customcontrollerView all my BAPI mathods instances and execute methods are declared.All the attributes directly getting from model class.
But I have two views , in first view I created a input field(for that i created valueAttribute in that context).
Here I want give the conditions If the input field is empty then directly call the execute method of BAPI.
Otherwise give any input to the inputfiled then capture that value and send it input to BAPI from view to BAPI.
In my customcontroller
BAPI b = new BAPI();
b.Param1();
b.param2();
and
execute BAPI()
I done like this.
How can i capture the view input value how to send as a b.parama();
Please guide me .
Any snippests appriciate.
Thanks
nageswara. -
Hello Folks,
i have requirement of auto-search in ui5 project.For that i have used sap.m.input control and register in controller like below:
onInit : function() {
var g = this.getView().getController();
/*Input field defined in view.xml*/
var areaInpt = g.byId(sap.ui.core.Fragment.createId("photos",
"autoComplete"));
/*autoComplete Instance*/
autoText = new google.maps.places.Autocomplete($("#"+areaInpt), {
types : [ 'geocode' ]
But when page load it was showing undefined is not function.And when i commented above autoText line then error is not coming.
NS: i am using following api : https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places
Below is the screenshot for same:I have the same question. Anybody has an answer for this?
Grant
Maybe you are looking for
-
Why does my iPhone 5 take very grainy flash photographs in the dark will a hard reboot be safe to do to try to fix or is it a hardware issue? And By hard boot I mean holding the home and power button down at the same time for 10 seconds or whatever I
-
Revision: 16869 Revision: 16869 Author: [email protected] Date: 2010-07-12 02:01:25 -0700 (Mon, 12 Jul 2010) Log Message: Minor change to the build file to get it working on Mac. Modified Paths: blazeds/trunk/apps/team/build.xml
-
Removing items from startup/ at login
I let my nephew use my mac for a bit and after that it started up with loading virex scan and i movie can get it of form startup menu in utilities, system, or individual prefrence panes. HELP ME I have Fallen and can't re configure.
-
Added a field VIQMEL-REFNUM on screen 7510 program SAPLIQS0
Hi, I have added a field in program SAPLIQS0 on screen 7510.This is for transaction IW52. The new field is displayed in th screen.When I enter any value and press enter or try to save it the value for field Reference Number disappears. Please let
-
XI Error DYNAMIC_CALL_FAILURE during PO transferring to SUS
Hi! We have ECS up and running and now would like to transfer PO from EBP to SUS. We have already transfer vendors from EBP to SUS. When PO is created in EBP it is possible to see message in XI and it is recieved in SUS successfully, but in SUS in TR