on 08-08-2005 10:54 PM
Hi,
I have a BSP page that basically displays the data in an ABAP Internal table in my web page. Its a simple loop and display.
One of the fields is an Amount field and needs to be displayed in the format : 123,454,452.89 . But in my web report its displaying with the comma as: 123454452.89
How can i make it to display with a comma?
Raj
<% Loop at it_result into wa_result.%>
<tr>
<td> <%= wa_result-VAL_TYPE %> </td>
<td> <%= wa_result-CONTROL_RULE%> </td>
<td> <%= wa_result-CONTROL_AMOUNT%> </td>
<td> <%= wa_result-COMPARE_RULE%> </td>
<td> <%= wa_result-COMPARE_AMOUNT %> </td>
<td> <%= wa_result-DIFFERENCE %> </td>
</tr>
<%
Endloop.
%>
Try:
<% page->to_string( wa_result-COMPARE_AMOUNT ). %>
I'm doing that from memory, but I'm fairly sure the to_string is in the page object.
This will use the user's current number format to output the amount.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thomas I am getting this message.
Statement "PAGE->TO_STRING(WA_RESULT-CONTROL_AMOUNT)" is not defined.
Apart from the below 2 statments I did not define anything else in the layout of my bsp page.
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
I am a bw developer and am trying to display an abap report along with my other bw web reports here.
Pls suggest.
Raj
It compiles fine:
<% page->to_string( wa_results-control_amount ). %>
the spacing is important.
Perhaps you should try to display your table using the TableView element instead. It is <htmlb:tableView>. It will take care of all inner formmating for you and give you a much nicer looking display.
User | Count |
---|---|
76 | |
10 | |
9 | |
9 | |
6 | |
5 | |
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.