on 06-27-2008 11:43 AM
Hi All,
I have created a dynamic table and bounded the bapinode to the editor.
editor.bindText(nodename.fieldname);
I need to manipulate the particular column values. I need to round down the decimal values. How to change the particular column values?
I have written the following code:
if(fieldName.equalsIgnoreCase("Gross")){
IPrivateView.IbapiNode bapiNode = wdContext.nodename();
for(int i=0;i<wdContext.bapinode().size();i++){
IPrivateView.IbapiElement bapiElem=bapiNode.getbapiElementAt(i);
bapiElem.setGross(bapiElem.getGross.divide(2,"" );//divide is for setting the scale for decimal values
editor = (IWDTextView)view.createElement(IWDTextView.class, null);
editor.bindText(tablenode.gross);
column.destroyTableCellEditor();
column.setTableCellEditor(editor);
}
}
Where am I doing wrong?
Pls suggest . Its very urgent.
Hope I am clear with my problem.
Regards,
Subashini
please go through [blog: Formatting RFC values|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/6045] [original link is broken] [original link is broken] [original link is broken];. Hope this will help
nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil,
I do not want to create a value node separately. I need to change the bapi node values and bind it to my table editor. I tried with link to action for the particular column and it is reflecting perfectly. The problem is with this decimal format column which I am unable to bind it to my table editor. Please suggest.
Regards,
Subashini.
why don't you try the code I posted above? you can by the way reduce the code inside wdDoModifyView() too!!
I think it is not possible to add attribute to a model node. if we want to add attributes, we will create value node inside model node.
again plz try the above code and let me status
nikhil
try commenting the code posted here and paste this code in the
init()
IWDAttributeInfo grossinfo = wdContext.bapinode().getNodeInof().getAttribute("Gross");
grossinfo..getModifiableSimpleType().setFieldLabel("#####.##");
let me know the status
nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil,
I can able to format the bapi values. The problem is I could not set those formatted values in the table say gross column.
Because my editor is bounded with bapinode. Hence I am using destroytablecelleditor which destroys the particular column and build the new column. But the formatted values are not getting displayed. This is my issue.
Regards,
Subashini
sorry for the wrong code
IWDAttributeInfo grossinfo = wdContext.bapinode().getNodeInof().getAttribute("Gross");
grossinfo.getModifiableSimpleType().setFormat("#####.##");
you can't edit a binded table. try the above code is one option and let me now how it works.
Another way is you can create a value node inside Bapi node and you can have a calculated attribute which is on your spec.
nikhil
Edited by: Nikhil ßos on Jun 27, 2008 4:34 PM
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.