Dynamic Creation of UI Elements
Hi,
Can anyone help me to create a DropDownByIndex and CheckBox dynamically in the Implementation tab of a View. Also I am not able to insert values into the dropdown.
If someone send the code it would be very helpful
Thanks
Kalyan
Hi,
Create one static node name like 'NodeA'
Create one Node(MultiNode) with one attribute(roles) using the following code. Inside the DoInit() method
Step 1:
IPrivate<ViewName>.INodeAElement ele = wdContext.createNodeAElement();
wdContext.nodeNodeA().addElement(ele);
IWDNodeInfo multipleinfo = wdContext.nodeNodeA().getNodeInfo();
IWDNodeInfo multiplenode = multipleinfo.addChild("MultiNode" , null, true, false, true, true, false, true, null, null, null);
multiplenode.addAttribute("roles", "ddic:com.sap.dictionary.string");
Step 2:
Assign values for Dropdown. Here i assigned 5 values.if you want assign values from database/BAPI also.
IWDNode node1 = wdContext.nodeNodeA().getChildNode("MultiNode", IWDNode.NO_SELECTION);
IWDNodeElement elem1;
for(int s=0;s<5;s++){
elem1 = node1.createElement();
elem1.setAttributeValue("roles","Value"+s);
node1.addElement(elem1);
Step 3:
Inside Domodifyview create IWDDropDownByIndex UI Element and Bind it.
IWDDropDownByIndex dropDownList = (IWDDropDownByIndex)view.createElement(IWDDropDownByIndex.class, "drop");
IWDAttributeInfo info = wdContext.getNodeInfo().getChild("NodeA").getChild("MultiNode").getAttribute("roles");
dropDownList.bindTexts(info);
Finally add this Dropdown into container. Like this you can create more Dropdown and add action to the dropdown as dynamically.
<b>Valuable answer=points</b>
Kind Regards,
S.Saravanan.
Similar Messages
-
ABAP: dynamic creation of nested elements
Hello,
I need to create a dropDown and put it into transparent container dynamically. Here is some things that I have:
Trasparent container:
transparent_container = cl_wd_transparent_container=>new_transparent_container( ).
cl_wd_grid_layout=>new_grid_layout( container = transparent_container ).
cl_wd_grid_data=>new_grid_data( element = transparent_container ).
ui_container->add_child( transparent_container ).
and a dropDown:
drop_down_figure = cl_wd_dropdown_by_key=>new_dropdown_by_key( bind_selected_key = 'REPOSITORY.FIGURES' on_select = 'GET_OPERATOR' ).
cl_wd_grid_data=>new_grid_data( element = drop_down_figure ).
ui_container->add_child( drop_down_figure ).
I need to put this dropDown inside trasparent container that was just created.
I can get reference to the container this way:
tr_cont = ui_container->get_child( index = 1 ).
return type of the above code is cl_wd_uielement.
I do not see any methods of this type that allow me to put dropDown inside this element.
Do I need to cast it to cl_wd_uielement_container type first? If so how is casting done?
Thank you.Hi Georrgy,
Casting is done using "?=".
For ex:
DATA: THE_TABLE_CELL_EDITOR type ref to CL_WD_DROPDOWN_BY_KEY,
THE_TABLE_CELL_EDITOR ?= wd_table_column->GET_TABLE_CELL_EDITOR( ).
Here I am getting a table cell editor which can be of any type say dropdown, Link to Action etc and since I need dropdown I am casting it using "?=".
Regards,
Srini. -
Dynamic creation of clusters elements
hi,
i need to create elements in cluster dynamiccaly.is it possible.my problem is i need to read the xml file and i need to create the cluster element based on the attribute
in this xml
<cluster>
<element 1/>
<element 2/>
<cluster/>
In this case the cluster should have two element
<cluster>
<element 1/>
<element 2/>
<element 3/>
<cluster/>
In this case the cluster should have 3 element is it possible to change the cluster dynamically bt reading the xml.If you don't know about clusters and arrays it's a VERY bad idea to even look at scripting. That's jsut going to get you into a lot of trouble. LabVIEW scripting is not supported by NI, and so any code you create will be on your own.
As noted before, if the element types are all the same, use an array.
To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free. -
Hi,
I want to create a tabstrip dynamically.The tabstrip should have 3 tabs, and in each of the tabs i want to put some UI elements like a label, input field, dropdown, tables.........etc.
Im able to create the tabstrip and add tabs to it dynamically.
I've even created the UI elements which i wanted to put in the tabs.............But im not able to proceed as i dont know how to add the UI elements to the tabs.......
Can anyone tell me how to add UI elements to a tab in a tabstrip?
Regards,
Padmalatha.K
Points will be rewarded.Hi,
Following code will help you to understand the dynamic creation and adding them
//Tabstrip
IWDTabStrip tabStrip = view.createElement(IWDTabStrip.class);
//Tab
IWDTab tab = view.createElement(IWDTab.class);
//Input Field
IWDInputField inputField = view.createElement(IWDInputField.class);
//Adding inputfield to tab
tab.setContent(inputField);
//Adding tab to tabstrip
tabStrip.addTab(tab);
//Finally add this tabstip to either your root container or some other container.
Regards
Ayyapparaj -
Dynamic Creation of UI in adobe forms??
Hi Experts,
I need to create a dynamic interactive form and dynamic UI elements in the interactive form.
As per my requirement I need to display a pdf and I will be getting values from the RFC's. I need to show the form segments and the UI elements only when there's a data from the RFC else not. I am unable to understand whether this requirement needs generation of the UI elements dynamically or I can do it statically as well.
The form thus generated will be having data from the RFC which based on the data quantity may exceed to n number of pages.
In case it needs dynamic creation can you suggest me please how to achive it in interactive forms?
Helpful answers will be appreciated.
Warm Regards,
GauravHi,
subForm1:-
Flow content
Allow page breaks
Place: following previous-----> This means when you are repeating the subform the previous one should be followed.
Say you have a table and have 3 columns in it.
After 1st column is completed, the next column should come with 1st comun
After: Continue filling parent--->Continously fill the data with the parent element
Repeat sub form min count is 1 : Minimum of 1 line item will be printed
Height: Expand to fit is true.: If the field height is increased it automatically expands.
For help in Adobe Press F1 or Goto Help--> Adobe Designer Help in Adobe Designer
After installing Adobe Designer, goto the specific folder
C:\Program Files\Adobe\Designer 8.0\EN you can get sample documents.
For help press F1 after opening designer.
Sub Form1: Content--> Flowed, Flow direction --> Top to bottom
Binding --> Check the checkbox Repeat Subform for each data item
Subform 2: Content --> Positioned, No pagination No binding settings changes needed.
Hey i forgot to mention the Header Subform where you create all these subforms should be flowed.
Try it once like this and lte us know
Edited by: Sankar Narayana on Oct 3, 2008 5:06 PM -
Dynamic Creation of Buttons and Actions HELP
Hi there,
I have got a problem (or maybe even two) with the dynamic Creation of buttons. The code below creates the buttons.
My main problem is, that the parameter created for the button's action isn't propagated to the assigned event handler. I get a null, though the name of the parameter in the event handler and the name of the parameter added to the action are the same.
Could it also be that I'm always using the same action? I.e. does wdThis.wdGetAddElementAction() always return the same action instance? If yes, how can I create individual actions for each button?
Any help is appreciated!
Cheers,
Heiko
" for(int i=rootContainer.getChildren().length; i<wdContext.nodeFeature().size();i++)
IPrivateVCT_Feature.IFeatureElement featureElement = wdContext.nodeFeature().getFeatureElementAt(i);
IWDTray featureTray = (IWDTray) view.createElement(IWDTray.class, featureElement.getName());
IWDCaption header = (IWDCaption) view.createElement(IWDCaption.class, featureElement.getName()+"_Header");
header.setText(featureElement.getName());
featureTray.setHeader(header);
featureTray.setExpanded(false);
rootContainer.addChild(featureTray);
IWDButton button = (IWDButton) view.createElement(IWDButton.class, featureElement.getName()+"_Button_AddElement");
IWDAction actionAddElement = wdThis.wdGetAddElementAction();
actionAddElement.getActionParameters().addParameter("featureIndex", new Integer(i).toString());
button.setOnAction(actionAddElement);
button.setText("Add Element");
featureTray.addChild(button);Hi Heiko,
You have done everything correctly....except for 1 line
in the code...
Replace the following line in your code:
actionAddElement.getActionParameters().addParameter("featureIndex", new Integer(i).toString());
Replace the above line with this code:
button.mappingOfOnAction().addParameter("featureIndex",i);
Actually in your code, you are not associating the parameter with the button...
Note that addParameter(...) comes with two signatures: addParameter(String param, String value) and addParameter(String param, int value). You can use any of them based on yuor need.
Hope it helps,
Thanks and Regards,
Vishnu Prasad Hegde -
Hi friends,
Is there a way to create dynamic creation forms in ADF,in jdev 10.3.3?
By this I mean--I need to populate a table in my DB and on my page I have an add button,
now at each click of add button,a new creation form should be displayed on the page one below the other.
finally there would be a Save button that would save all my entries to the table.
I searched a lot for the same...Please do help if anybody has any ideas..
Thnks in Advance..c ya
kavitha
Edited by: user6403440 on May 5, 2009 2:22 AMHi,
well, the easiest would be to create an updateable table and add new rows. If you need a form then you can use af:forEach or af:iterator with the table binding to render input form elements (more like a custom table rendering). However, its quite a bit of development that is required for this.
Frank -
Creation of PL Element without it being a cost element
Hi
I have to asign two PL elements in T code 0KEK for transfer of material between two profit centers. The two elements should not be <b>cost elements</b> but they should be PL Elements to be used only in PCA.
We have to create PL elements through FS00. But the system automatically creates a new cost element when i create a GL as a PL nature. Pls let me know how to create a PL element without it being a cost element.
Regards
Sanil BhandariHi Sanil
IN OB13
Controlling integration tab
select : Manual creation of cost element and create GL accts.
Hope this works
Best Regards
Ashish Jain -
Automatic creation of cost elements
Dear All,
The automtic creation of cost elements functionality is not working for some GL accounts in production. When new GL accounts are created, the same are not created as cost elements. All the standard settings viz 'selection of automatic creation' in controlling area configuration, creation of number ranges in OKB2 etc are in place. We posted in OSS and they are not able to find reasons why this is happening.
Has anyone faced a situation like this? Please post your valuable thoughts and share your inputs. We currently have a log created by user on this and pending for quite sometime.
Thanks in advance
VenkateshHi,
Yes. We do face problem like this often. We wriggle out by updating through manually when we are very nearer to go-live date. Otherwise, we can create an abap program and meet the deficiency.
Trust this helps much!
Cheers! -
Automatic creation of WBES element using front end application
Hi,
i am looking at developing a front end tool where user will provide the required data and project name/wbes lement in the request. upon approval from project manager, sytem must creation requird WBE element in the requested project automatically. there will be multiple requests supplied to create wbes lements under the existing projects.
for Eg. assume that there is a project AB11.00001
i have already have one 4th level wbes element like displayed below:
AB11.00001
AB11.00001.01
AB11.00001.01.01
AB11.00001.01.01.01
AB11.00001.01.01.02
AB11.00001.01.01.03
now i would like to add new 3rd level and 4th level for above project as mentioned below:
AB11.00001
AB11.00001.01
AB11.00001.01.01
AB11.00001.01.01.01
AB11.00001.01.01.02
AB11.00001.01.01.03
AB11.00001.01.02
AB11.00001.01.02.01
AB11.00001.01.02.02
AB11.00001.01.02.03
AB11.00001.01.03
AB11.00001.01.03.01
AB11.00001.01.03.02
AB11.00001.01.03.03
this must be done either using bapi or any other programme, i tried with bapi, but not able to solve, pls help me with best way of executing this auto application rather creating manually one by one using CJ20N. i am very sure we have finest ABAP'rs in this forum who will build this programme..
thanks
naveen lewis
Edited by: naveennl on Aug 16, 2010 11:39 AMHi Rifaee,
appplogies for misunderstanding..
i want only the clues how i can execute this using some of the available SAP functionalities.. ofcourse finest ABAP'rs only think out of the box to solve this and rest will usually answer it as not feasible.
Edited by: naveennl on Aug 16, 2010 11:51 AM -
Issue in BAPI_PS_PRECOMMIT in mass creation of WBS Elements
Hi,
I am facing a issue with BAPI_PS_PRECOMMIT.
we have the following WBS Hierarchy:
S - Proj, (level1)
S-XXX WBS Element (level2)
S-XXX-001 WBS Element (level3)
I have created a program for mass creation of WBS elements creation
which uses the following BAPI's
BAPI_PS_INITIALIZATION
BAPI_BUS2054_CREATE_MULTI
BAPI_PS_PRECOMMIT
BAPI_TRANSACTION_COMMIT
The proj: 'S' and the level2 WBS element: 'S-XXX' already exist in the system.
When I run the program for delta load, so as to create the following level3 WBS elements:
S-XXX-001
S-XXX-002
S-XXX-003
The system is throwing the following errors at the BAPI_PS_PRECOMMIT:
1. Final Check of the project definition and WBS elements: Error
2. Validation unsuccessful
Pls help me on this.
Thanks,
DeepakCheck the WBS elements doesn't exist already in your system.
Here is what I coded some days back for deletion of Network Activities, most of the things are same.
You are doing for WBS element.
* Call to initialization BAPI Before Delete
CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
* Call to Network Activity Deletion BAPI
CALL FUNCTION 'BAPI_BUS2002_ACT_DELETE_MULTI'
EXPORTING
i_number = t_bapi_activity-network
TABLES
it_delete_activity = l_t_del_vornr
et_return = l_t_bapiret2.
DELETE l_t_bapiret2 WHERE type <> 'E'.
READ TABLE l_t_bapiret2 INDEX 1.
IF sy-subrc EQ 0. "If error in Deletion
MOVE: f_idoc_contrl-docnum TO t_idoc_status-docnum,
l_t_bapiret2-type TO t_idoc_status-msgty,
'CNIF_PI' TO t_idoc_status-msgid,
l_t_bapiret2-number TO t_idoc_status-msgno,
l_t_bapiret2-message TO t_idoc_status-msgv1.
MOVE c_idoc_status_error TO t_idoc_status-status.
APPEND t_idoc_status.
ROLLBACK WORK.
EXIT.
ELSE. "If Delete is successful COMMIT
* Call to PreCOMMIT BAPI
CALL FUNCTION 'BAPI_PS_PRECOMMIT'
TABLES
ET_RETURN = l_t_bapiret3.
* Call COMMIT BAPI
* CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
The other solution is use BAPI_PROJECT_MAINTAIN. -
Manual/Autometic creation of cost elements in chart of accounts field
Dear Friends,
While creation of Chart of accounts (OB13) under Controlling Integratiion tab
thers is two options are there.
1 manual creation of cost elements
2 autometic creation of cost elements.
While creation of cost elements if we select
(MANUAL CREATION OF COST ELEMENTS) what will happen???
(AUTOMETIC CREATION OF COST ELEMENTS) what will happen?
What is the main difference between about two fields?
Thanks in advance,
MallikaHi,
MANUAL CREATION OF COST ELEMENTS - Cost elements maintained manually. A push button is available for
this purpose, with which you can go directly to the related cost
element.
AUTOMETIC CREATION OF COST ELEMENTS - Cost elements maintained automatically. When you save a new G/L
account, the related cost element is automatically created. A prerequisite is that a default value for the cost element category
has been set up for this cost element. If no default value is found, the system will not create a cost element.
You can make default settings via :
Cost Element accounting --> master data --> cost element --> automatic creation of primary and secondaru cost element --> make default settings
Dhara. -
Question regarding creation of xml-elements with numerical values
When i create xml-documents from xml stored in the database (xmltype table based on an xml-schema), i find that numerical values which were stored as 0.395 (with the "." as the decimal separator) are retrieved as .395.
Is it possible to apply a format mask so that the numerical value is retrieved as 0.395?
thanks, Bart
N.b. Note that i select a complete xml-fragment. So my problem seems related to the storage or retreival of 'schredded' XML. I do not use SQL/XML-functions with relational data, in which case i know how to apply a format mask.I don't use XSLT, i just query the XML-documents stored in an XMLType column with a simple SQL-statement.
I have posted a simple example over here Re: Is it possible to influence the creation of empty elements? -
Creation of cost element or not for GBB-VAX,GBB-INV and UMB
Dear Experts,
I have few doubt regarding creation of cost element. Whether i will create Cost element or not.
1) GBB-VAX - used in PGI(Vl02n)We have costing based COPA .whether we will create cost element or not.If i will create cost element then need to be bydefault in okb9 with PSG tick.
2) GBB-INV- Used for Material taging(MI01,MI04,MI07)whether we will create cost element or not.If i will create cost element then what will be my cost object and how i will charge from my product costing.
3) UMB- is used whenever standard price is changed. Shall i create cost element for the same
If yes hen what will be my cost object and how i will charge from my product costing.
Request you to help me on the same.
regards
RR1) GBB-VAX - No, Goods Issue for sales order with no assignment object and hence without Cost Element
2) GBB-INV- Yes to post expenditure/income from inventory differences
3) UMB- Yes
Regards
KS -
Hi,
I am working on special project of Automation of all utility billing and housing system for a big company in SAP.
For that I have to create 26 tables and obviously I am creating a lot of dataelements.
Now the problem is my quality dept says that I should use the inbuilt data elements and refrain from creating new ones. In this case the field label is not matching my field. He says that who is going to see the table and says that you can change the field description in reports as you like. Is it justified.
I can see that there are more than 500 standard datalements created for a char field of length 4 by SAP. but none of the description matches my field description. if the case is of reducing the load then does sap recommend not to create z data elements.
Can we create dataelement just for the sake of field label and what is the other purpose of a dataelement if not
How much load will be generated by creating a dataelement.
kindly give some insight into the need to create dataelements.Hi!
If your Quality people are that much particular about creation of data elements, there is one way to solve this problem. Use standard data elements.
I know here you will get a doubt that after creating a maintenance generator you will not be able to see the description whatever you want in SM30. For this follow the below procedure.
While creating maintenance generator you will give the function group name right, go to SE80 -> and give the function group name there -> double click on the screen number of maintenance -> click on element list tab -> click on 'Texts/I/O templates' tab -> now against the field names under 'Text or I/O Field' column remove the value '+____________' and type the field description there -> repeat the procedure for all the fields -> now save, check and activate the screen as well as function group.
Now if you go to SM30, you can see the field description for every field.
This is somewhat time consuming, but it may help you.
Reward points, if useful.
Regards,
Venkat.
Maybe you are looking for
-
How do I add multiple email addresses for a contact to a group?
(I'm a recent convert from eMailer to Outlook Express, to Entourage, and finally to Mail.app) I'm trying to set up a group in Address Book that includes multiple email addresses from a given card. These are folks that want me to include, for example,
-
I have just set up Icloud and backed up files to it. I have not been able to log in. I get the message 'Apple ID is valid but is not an Icloud account. I have the same User ID for Icloud and Apple but different passwords. Neither combinations work
-
2 1/2 hours onto iDVD?
I am using Final Cut Pro 4 and have a 2 1/2 hour movie that I need to fit onto iDVD. I tried compressing the file with Compresor, but iDVD dosn't recognize compressed files. What can I do to fit this movie onto iDVD? Is there a specific export settin
-
Issue during Depreciation Below Zero Calcualtion
Dear All, I have configured for depreciation below calculation with a separate depreciation area. There is no depreciation calculated till the end of useful life. It is workign fine, but issue is that if an asset's useful life is expiring in between
-
SDB tree view in SAP ERP 4.7
Hello I have the view for my symptoms and solutions in Solution Database in tcode IS02. Is there any way to display this hierarchy in tree? any tcode? Regards Radek