cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying table column value

Former Member
0 Kudos

Hello All,

I have a table whose values are getting populated by the function module from r/3. There is one column where the data type is BigDecimal e.g. 23.5. Now we want to display this value as $23.50 instead on just 23.5.

Please let me know how this can be done.

This is the SAP provided application ess/ben and the table is in the view DetailCostCreditView

Regards,

Vibha Singhal

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Create a value node (cardinality-> 1:1 ) and then edit the column value as follows:

wdThis.wdGetContext().valuenodeoftable().getChildNode("newvaluenodecreated",i).getCurrentElement().setAttributeValue("columnvaluetobeedited","$"+ wdContext.valuenodeoftable().getvaluenodeoftableElementAt(i).getcolumnvaluetobeedited());

Regards,

Vibha Singhal

Former Member
0 Kudos

Hi ,

I am also looking for the same solution were you able to find the solution for this its kind of urgent for me

Former Member
0 Kudos

Hi,

Pl go through this Blog

/people/valery.silaev/blog/2005/11/29/800format-your-way

Regards

Ayyapparaj

Former Member
0 Kudos

If you already have the code for ESS in NWDS, then look for the place where the table is populated, BAPI/ RFC call etc. run a loop for the node associated with the table and change the amount values format like this.

CURRENCY.format(wdContext.node<Name>().get<Name>ElementAt(i).get<fieldName>);

where currency is defined in the general section like this

final DecimalFormat CURRENCY = new DecimalFormat("###,###,###,###,##.##");