on 11-27-2006 1:03 PM
Hi SDN,
I was working on a web-dynpro application where I has to display a table control.
Here I am listing my Requirement.
1) A table with 7 columns are to be displayed.
2) 5 of the columns are Drop down list where 3 of the 5 drop downs have dependency of the pervious drop down selection.
3)other 2 columns are input box.
4)The list for the drop downs come from a bapi.
5)the user is to be allowed as many rows he can
6)when he clicks save button the values are to be stored using table of another bapi
Hi all, I have posted this earlier but no solution for this please help me in resolving this.
Thanks in advance.
Regards,
Sai krishna.
Hi ,
Can anybody tell me how to apply a dropdown list to a table column where where each row can be selected to a diferent value in the dropdown.
I have created the thing . but the prob is that every time i select a value , all the other rows a also selected to the same value..
Regrds,
Rajitha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
your story with table and dropdown list sounds strange. But you may have made a mistake with contex binding.
You should bind context node coordinality 0..n to table parameter dataSource, then creating columns (columnand its editor) you should bind context attributes lying within the node to appropriate column editor. Discussing drop downs we should detect wjich type we need to have. If you wonna have texts choose DropDownByKey type.
If you still have issue with table could you please provide somehow your implemented solution?
A tiny mistake can have awful consequences. Please be focused
Best Regards,
Anton
Hi Sai,
I have better solution, I will explain solution for your design and then I will explain new design.
<b>Solution to your problem</b>
How many values each drop down contains? If its not large, execute all drop downs in the beginning of the application and store them in HashMap with dependency key and value as the list of populated values.
- Create a top Node
<b>1) A table with 7 columns are to be displayed.</b>
Create 5 Value Nodes with simple type attributes under your topnode. Set singleton property for each of the node to false. And attach them to the Drop Downs. Populate the parent drop down and non dependent drop downs in the begining itself.
<b>2) 5 of the columns are Drop down list where 3 of the 5 drop downs have dependency of the pervious drop down selection.</b>
Attach onSelect events and based on the current selection of the values, check your pre populated HashMap and fill the node with new values.
<b>3)other 2 columns are input box.</b>
This is normal, create two nodes with simple types under Top Node.
<b>4)The list for the drop downs come from a bapi.</b>
As mentioned previously all these values are pre populated. so you need not to call the BAPI for each request.
<b>5)the user is to be allowed as many rows he can</b>
Provide Add,Delete buttons which dynamically creates rows which means your context elements.
<b>6)when he clicks save button the values are to be stored using table of another bapi</b>
Read the values from nodes and send it to other BAPI.
<b>New Design</b>
As per your requirement create a form with 5 drop downs and 2 input fields( for dependency you can use the logic mentioned in the previous design). Provide Add,Delete and Update Buttons under the form. And also create a Result table with 7 columns with simple attribute types. Once user enters some values in the form and clicks on Add button then add a new value to the Bottom result table which doesn't have any drop downs. When user needs to update any row on selection of the row populate the values back to the form, then user clicks on update button. Same logic applies to delete also.
Regards
Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhilash,
As you said new design, I created a new window and a view in it.
I added a button on the current view, on click I thought of poping up a new window.
But There is a null pointer exception arosed, I did the entire thing with reference of the example one. but i could'nt find where the error is here is the code i have for that.
IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("Witness_Window");
IWDWindow window = wdComponentAPI.getWindowManager().createWindow(windowInfo,true);
window.setWindowPosition(150,150);
window.open();
wdContext.currentWindowElement().setWindowInstance(window);//here is where I am getting null pointer exception.
how ever I need to display a table control with out any buttons like add, update and delete.
Thanks & regards,
Sai krishna.
Why you want to create a new window? With in the same View on top area create a form in a Container(TransparentContainer or Group) and Add,Delete and Update buttons. In the Down area create the table and under that submit button which insets data in to R/3.
For NullPointerException, what is the context type your using?
Regards
Abhilash
Hi Lohitha,
Sorry for the late reply,
I created a node named window, and a attribute of type IWDWindow in the custom controller, and mapped the same to the view controller.
Still I am Getting the same error as
com.sap.tc.webdynpro.services.exceptions.InvalidUrlRuntimeException.
and If we could open the window, on save option how to create element to the model node of the caller window and add the entries.
because When ever I am trying to create a element to the model node in the view controller it says "element created with out reference ....".
Regards,
Sai krishna.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.