How to display currency values in indian format
hi all,
When I am displaying Currency values as output , those are displaying in U.S. format (ie.1,234,000.00) , But I need to display those in Indian Rupee format (i.e 12,34,000.00).
Plz any one can help me that how to display this
thank you,
regards
Hanuma
Hi Hanuma kumar, please try this code.
REPORT ZAMOUNT_CONVERSION.
DATA : RESULT1(20).
PARAMETERS : NUM TYPE P DECIMALS 2.
DATA : num2 type STRING.
DATA : col_amt(20) type n,"15
col_b type i,
num_1(20) type C,"15
Length type i.
num_1 = num.
write : 'default format :',num.
uline.
skip.
IF ( num >= 999999999 ).
write num_1 using edit mask 'RR__,__,__,__,______' to col_amt.
CONDENSE col_amt.
length = STRLEN( col_amt ).
if length = 16.
REPLACE first OCCURRENCE OF ',' in col_amt with space.
write :/'amount indian format:',col_amt.
else.
write :/'amount indian format:',col_amt.
endif.
ELSEIF NUM < 999999999 AND NUM >= 9999999.
write num_1 using edit mask 'RR__,__,__,______' to col_amt.
condense col_amt .
length = STRLEN( COL_AMT ).
if length = 13.
REPLACE first OCCURRENCE OF ',' in col_amt with space.
write :/'amount indian format:',col_amt.
else.
write :/'amount indian format:',col_amt.
endif.
ELSEIF NUM < 9999999 AND NUM >= 99999.
write num_1 using edit mask 'RR__,__,______' to col_amt.
condense col_amt .
length = STRLEN( COL_AMT ).
write :/'amount indian format:',col_amt.
ELSEIF NUM < 99999.
data : dumy(10) type c.
dumy = num .
CONDENSE dumy.
length = STRLEN( dumy ).
if length <= 6.
write :/'amount indian format:',num.
else.
write num_1 using edit mask 'RR__,______' to col_amt.
write :/'amount indian format:',col_amt.
endif.
ENDIF.
uline.
Similar Messages
-
How to fix iframe issue that displays XML values instead of formatted XML in IE11
The following sub.jsp file shows the formatted XML properly as expected when is opened directly:
<% response.setContentType("text/xml"); %>
<book>
<chapter1>chapter 1</chapter1>
<chapter2>chapter 2</chapter2>
</book>
IE11 shows the result as below which are colored and can be collapsed or un-collapsed:
<book><chapter1>chapter 1</chapter1><chapter2>chapter 2</chapter2></book>
But if the sub.jsp is opened in an iframe from the below main.html, it only shows the values of the XML in the iframe:
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<iframe src="sub.jsp"></iframe>
</body>
</html>
The iframe shows only the XML values, i.e., chapter 1 chapter 2 in IE11. This issue does not happen in IE8.
I appreciate to your if you know how to address this issue.
Regards, AmirThe following sub.jsp file shows the formatted XML properly as expected when is opened directly:
<% response.setContentType("text/xml"); %>
<book>
<chapter1>chapter 1</chapter1>
<chapter2>chapter 2</chapter2>
</book>
IE11 shows the result as below which are colored and can be collapsed or un-collapsed:
<book><chapter1>chapter 1</chapter1><chapter2>chapter 2</chapter2></book>
But if the sub.jsp is opened in an iframe from the below main.html, it only shows the values of the XML in the iframe:
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<iframe src="sub.jsp"></iframe>
</body>
</html>
The iframe shows only the XML values, i.e., chapter 1 chapter 2 in IE11. This issue does not happen in IE8.
I appreciate to your if you know how to address this issue.
This issue is also posted at below link:
https://social.msdn.microsoft.com/Forums/en-US/5b0692b4-d312-4797-9089-42c1029ac059/how-to-fix-iframe-issue-that-displays-xml-values-instead-of-formatted-xml-in-ie11?forum=iewebdevelopment
Regards, Amir -
How to display the value of a column in a chart at the top of each column
How to display the value of each column in a chart at the top of each column?
Like this?
Done using chart Inspector.
For details, see Chapter 7, Creating Charts from Numerical Data in the Numbers '09 User Guide. The guide may be downloaded via the Help menu in Numbers.
Regards,
Barry -
How to display 7 values of single field in row wise.
hi,
how to display 7 values of single field in row wise.
thankx in advance.hi ,
do it like this :
1 Place ur UI element in tranparent container with Layout as Row Data and Layout Data as Row Head Data
2 Ur first UI , which contains the first value as Row Head Data ,
3 Others as Row Data
u can do it with Matrix Data as well
if u want to give space , u can use HORIZONTAL GUTTER and set its width to medium / large / Xlarge
also there is a UI element "INVISIBLE ELEMENT" ,
1 u can use this UI element to provide space between ur other UI elements in the view
2 u can insert a text element as well , and in the Text property of the element press ALT + 0160.
u can give the space bw UIs as desired.
regards,
amit -
How to display filter values in analyzer
Hi expert,
I want to add filter into analyzer, above data table, I insert a few rows, and add text to hold filters, but after quit from design mode, inserted rows for filters dispear, and its spaces are taken by data table. could you please tell how to display filter values .
Many Thanks,It is looking like you are saving them as workbooks. It will be possible to maintain fliters if you save with the filters given by workbook properties, not by manual feeding.
let us know with clear expectation if you are not clear with it. -
How to display negative values in a screen field of a screen
Hi All,
Please let me know how to display negative values in a screen field of a screen.
thanksHi Kishore,
You can do this method. In the screen , create a text field of CHAR instead fo creating an INT4 field.
I have created a field of CHAR of name say TEXT.
In the main program,
declare a variable of the same name ie. TEXT.
data: TEXT(5) TYPE C.
In PBO, just assign the negative values.
It will work.Since there is automatic conversion between character and integer data types, it will work for positive values as well.
Regards,
Sylendra. -
Module Pool to Display the Values in Matrix Format
Hi Experts,
I have one requirement which as follows,
In Module pool program i need to display the Values in Matrix format i.e,
Row = Color
Column = Size
Can you Please Help me out.
Thanks n Advance.
Logucreate your internal table dynamically (with number of columns corresponding to number of sizes)
this is done easily with class CL_ALV_TABLE_CREATE method CREATE_DYNAMIC_TABLE
then use the internal table for ALV output -
How to display the values in JSpinner in format day:HH:mm
Hi All,
I want to know how can I display the values inside a JSpinner in the format day:HH:mm. Here the value of 'day' can be anything say from 0 to 365 and HH stand for hour and mm stands for minutes.
I tried to implement it using
mSpinner.setEditor(new JSpinner.DateEditor(mSpinner, "DD:HH:mm"));
but here the values of day was not proper. Please let me know if there is any standard format or how can I configure my own editor.
Thanks,
Rohit.Hi,
It worked well for 112 as 112 comes under April month.. i.e. it will work properly for the range 91 to 120 as the current month is April and if we start counting from january 01 then for April month , the number of day will fall under range 91 to 120.
See, it will allow you to change the values beyond the limit (i.e. less than 91 or more than 120) but the real problem is that I used this spinner in the table and when I will try to save the value of spinner , then if the value of day in beyond the limit 91 to 120 then it will automatically changing in the range between 91 to 120.
I tried to use format DD:HH:mm ...... do I need to use any other format..
Hi All,
I want to know how can I display the values inside
de a JSpinner in the format day:HH:mm. Here thevalue
of 'day' can be anything say from 0 to 365 and HH
stand for hour and mm stands for minutes.
I tried to implement it using
mSpinner.setEditor(newJSpinner.DateEditor(mSpinner,
, "DD:HH:mm"));
but here the values of day was not proper. Define "not proper". I just tried it and it displayed
day 112 for today which seems correct. -
How to display decimal values (8.00, 8.01, 8.10)
Can you please tell me anyone how to display the decimal values.
Ex: amount number(5,2)
inserted the table value 300.00
when I am select the value using it has to display as the same 300.00.
Thanks,
RameshI suggest you read oracle documentation about TO_CHAR function and number format models.
SQL> select to_char(0.00, '99990.99') from dual ;
TO_CHAR(0
0.00
1 row selected.
SQL> select to_char(99.78, '99990.99') from dual ;
TO_CHAR(9
99.78
1 row selected.
SQL> -
How to display positive value with a trailing plus sign
I want to display positive value with a trailing plus sign and negative value with a trailing minus sign. How can I do it? Is there any character in custom format for this? I don't want to convert number to text and use case statement because I need two decimal places and thousands separator.
Okay, try this...
You will need to do a "UNION ALL" of three queries, one for positive values, one for zero values, and one for negative values.
In the "negative values" query, do the following:
1) Add a filter on the measure for values "less than 0"
(This will ensure all values are negative.)
2) In the Data Format tab, select "Custom" and type in #,##0.00-
(This will add the trailing negative sign.)
3) In the Edit Formula tab, add the absolute value function, ABS(insert measure here)
(This will take get rid of the default leading negative sign.)
For the "positive values" query, modify the above as follows:
1) Change the filter to "greater than 0"
2) In the Data format, change the custom format to #,##0.00+
Step 3 is not needed since all values are positive.
For the "zero values" query, just add a filter "equal to zero." -
How to display the values stored in the database in the combobox on load?
I am develping one application where in
I wanted to display the values in the combobox which I am taking from the database and in the same form passing that value in same form after selecting it,My program is running fine for the first time but next time it is giving me NullPointerException.
So can anyone tell me please how I should develop the this application to avoid this exception?
Thank You
PraddyThanx a lot for showing interest in answering my query.I am pasting my code for ur reference.Please try to reply ASAP.
Thank You,
Praddy.
CODE:
======
<html>
<head>
<script language="javascript">
function submitthisform(thisForm)
thisForm.submit();
</script>
</head>
<body>
<form method=post name=samepgm>
Select City: <select name=city onChange='submitthisform(samepgm)'><br><br><br>
<option value=''></option>
<option value='All'>All</option>
<%@ page language="java" import="java.sql.*" %>
<%
String scity = request.getParameter("city");
System.out.println(scity);
Connection con = null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:property","","");
Statement st = con.createStatement();
ResultSet rs1 = st.executeQuery("select distinct hcity from housefinance");
while(rs1.next())
//String ohname = rs1.getString("hname");
String ocity = rs1.getString("hcity");
//out.println(ohname +"<br>");
out.println(ocity +"<br>");
%>
<br><br><br><option value='<%=ocity%>'><%=ocity%></option><br>
<% }
rs1.close();
if(scity.equals("All"))
ResultSet rs2 = st.executeQuery("select * from housefinance");
while(rs2.next())
String ohname = rs2.getString("hname");
String ohadd1 = rs2.getString("hadd1");
//String ohadd2 = rs2.getString("hadd2");
String ohcity = rs2.getString("hcity");
String ohpcode = rs2.getString("hpcode");
String ohtelno = rs2.getString("htelno");
String ohfaxno = rs2.getString("hfaxno");
String ohemail = rs2.getString("hemail");
String ohmobile = rs2.getString("hmobile");
%>
<pre>
<tr>
<td><p>Company : <%=ohname%> </p></td>
<td><p>Address : <%=ohadd1%></p></td>
<td><p>City : <%=ohcity%> </p></td>
<td><p>Pin : <%=ohpcode%></p></td>
<td><p>Telphone : <%=ohtelno%></p></td>
<td><p>Fax No: : <%=ohfaxno%></p></td>
<td><p>Email : <%=ohemail%></p></td>
<td><p>Mobile No. : <%=ohmobile%></p></td>
</tr>
</pre>
<%
else
ResultSet rs = st.executeQuery("select * from housefinance where hcity like '%"+scity+"%'");
while(rs.next())
String ohname = rs.getString("hname");
String ohadd1 = rs.getString("hadd1");
//String ohadd2 = rs.getString("hadd2");
String ohcity = rs.getString("hcity");
String ohpcode = rs.getString("hpcode");
String ohtelno = rs.getString("htelno");
String ohfaxno = rs.getString("hfaxno");
String ohemail = rs.getString("hemail");
String ohmobile = rs.getString("hmobile");
%>
<tr>
<td><p>Company : <%=ohname%> </p></td>
<td><p>Address : <%=ohadd1%></p></td>
<td><p>City : <%=ohcity%> </p></td>
<td><p>Pin : <%=ohpcode%></p></td>
<td><p>Telphone : <%=ohtelno%></p></td>
<td><p>Fax No: : <%=ohfaxno%></p></td>
<td><p>Email : <%=ohemail%></p></td>
<td><p>Mobile No. : <%=ohmobile%></p></td>
</tr>
<hr>
<% }
%>
</select>
</form>
</body>
</html> -
How to display(binding) values in the table from more than one node?
Hi,
I have two nodes (TRIPS & AMOUNTS)in the context. How to bind these values into the table control?
When i bind second one, first one is getting replaced.Hi Mog,
Of course it is possible to create a table from attributes of more than one node, and in some cases this is still necessary, but you have to do this the hard (manual) way.
If you have a table control, have a look at the properties and the elements belonging to it.
First of all, there is the property "dataSource", which binds to a multiple node (let's name it TableRootNode). This means that for each element of THIS node, one row is created. In each row the data of exactly one element of this TableRootNode is displayed.
Then you have columns in this table. Inside of the columns there is a header and an editor. The editor is the interesting part.
Normally the primary property of this editor is bound to an attribute of the TableRootNode. Then everything works as expected. If it binds to an attribute of a subnode (SUB) of TableRootNode, then in row i the data of the subnode of the i-th element of TableRootNode is displayed. There is no need for SUB to be a multiple node, but it must not be a singleton.
If you bind a property of the editor to an attribute, which does not lie in the subtree of TableRootNode, then you will see the same value in each row.
Now it depends on the structure of your context. Take the node, which is relevant for the change in each row (I assume it is TRIPS) and bind the table to the node as you are used to. Then for each additional column, you have to create a new column in the tree, create a new header element with a title and a new editor (e.g. textview or inputfield) and then bind the right property of the editor to the corresponding attribute in node AMOUNTS).
If these 2 nodes do not have parent-child-relationship, the tip to create a new node, which consists of the attributes of both nodes is the only solution.
Ciao, Regina -
How to display F4 values in one field based on other field selection
Hi All,
How to hide a UI element (i.e Link to action) highlited for Normal User and display the same to super user.
Component Name : /SAPSRM/WDC_DODC_SC_GAF_C
2.Can i know how to display the entries in supplier field based on Product category selection.
Right now all the entries are getting displayed in the supplier field.
I want to display only entries based on Product category.
Search Help Name : BBP_BUPA_CLL_PARTNER
Component Name : /SAPSRM/WDC_DODC_SC_I_LIM
How to enhance the web dynpro component with the filtered values.
Regards,
Krish.Hi Ashvin,
Thanks for the document. In the search help there is a standard FM which is getting executed.
Can i enhance that FM or should i copy and edit.
BBP_F4IF_SHLP_EXIT_CLL_PARTNER
If i creata a Z FM and make changes how to pass that values to my standard Component View UI Element.
If not then suggest me some alternative.
Regards,
Krish -
How to display field value only once in REUSE_ALV_GRID_DISPLAY
hi experts,
i am using REUSE_ALV_GRID_DISPLAY, for alv outpur display.but i want one of the field in output ,not to display the value which is of same, it have to be displayed only once, I mean i have a number which contains multiple line items corresponding, here i want to display the field value only once when it is repeating , for the same header number, how can i achieve itHi,
check the sample code,
REPORT Z_ALV.
Database table declaration
TABLES:
sflight.
Typepool declaration
TYPE-POOLS:
slis.
Selection screen elements
SELECTION-SCREEN BEGIN OF BLOCK blk_1 WITH FRAME TITLE text-000.
SELECT-OPTIONS:
s_carrid FOR sflight-carrid.
SELECTION-SCREEN END OF BLOCK blk_1.
Field string to hold sflight data
DATA:
BEGIN OF fs_sflight ,
carrid TYPE sflight-carrid, " Carrier Id
connid TYPE sflight-connid, " Connection No
fldate TYPE sflight-fldate, " Flight date
seatsmax TYPE sflight-seatsmax, " Maximum seats
seatsocc TYPE sflight-seatsocc, " Occupied seats
END OF fs_sflight.
Internal table to hold sflight data
DATA:
t_sflight LIKE
STANDARD TABLE
OF fs_sflight .
Work variables
DATA:
t_fieldcat TYPE slis_t_fieldcat_alv,
fs_fieldcat LIKE
LINE OF t_fieldcat.
*START-OF-SELECTION
START-OF-SELECTION.
PERFORM get_data_sflight. " Getting data for display
PERFORM create_field_cat. " Create field catalog
PERFORM alv_display.
*& Form create_field_cat
Subroutine to create field catalog
There is no interface paramete
FORM create_field_cat .
PERFORM fill_fieldcat USING 'Carrier Id' 'CARRID' '2'.
PERFORM fill_fieldcat USING 'Connection No' 'CONNID' '1'.
PERFORM fill_fieldcat USING 'Flight Date' 'FLDATE' '3'.
PERFORM fill_fieldcat USING 'Maxm.Seats' 'SEATSMAX' '4'.
PERFORM fill_fieldcat USING 'Seats Occ' 'SEATSOCC' '5'.
ENDFORM. "create_field_cat
*& Form fill_fieldcat
Subroutine to fill data to field column
-->p_seltext Column label
-->p_fieldname Fieldname of database table
-->p_col_pos Column position
FORM fill_fieldcat USING
p_seltext LIKE fs_fieldcat-seltext_m
p_fieldname LIKE fs_fieldcat-fieldname
p_col_pos LIKE fs_fieldcat-col_pos.
fs_fieldcat-seltext_m = p_seltext.
fs_fieldcat-fieldname = p_fieldname.
fs_fieldcat-col_pos = p_col_pos.
APPEND fs_fieldcat TO t_fieldcat.
CLEAR fs_fieldcat.
ENDFORM. " fill_fieldcat
*& Form get_data_sflight
Subroutine to fetch data from database table
There is no interface parameter
FORM get_data_sflight .
SELECT carrid
connid
fldate
seatsmax
seatsocc
FROM sflight
INTO TABLE t_sflight
WHERE carrid IN s_carrid.
ENDFORM. " get_data_sflight
*& Form alv_display
Subroutine for ALV display
There is no interface parameter
FORM alv_display .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_fieldcat = t_fieldcat
TABLES
t_outtab = t_sflight
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " alv_display
End of code -
How To Display Minus value in SAP SCript
Hello Guys.
I am working on a Script. My Problem is that For a fields BSAD-DMBTR.
I have to show this fields value as minus or plus as per condition with fields
<b>bsad-shkzg</b>. In my Internal table it's update as minus but when I am calling Write form with loop. the value is not display with minus sign.
How can I display value with minus sign in SAP script.
Regards
Swati,,Hello Guys..
Thanks for Reply. But I am doing that thing already. My Internal table is updated with minus value. My Problem is not That.
let's suppose.
itab-name = 'xyz'.
itab-value = 100.
append itab.
itab-name = 'xyz1'.
itab-value = -1 * 100.
append itab.
loop at itab.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'LINE'
function = 'SET'
type = 'BODY'
window = 'MAIN'
EXCEPTIONS
element = 1
function = 2
type = 3
unopened = 4
unstarted = 5
window = 6
bad_pageformat_for_print = 7
spool_error = 8
codepage = 9
OTHERS = 10.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
endloop.
Now when value is printed in SAP Script both value is display as plus .I want to display secound value as minus.
Please reply it's urgent.
Thanks
Swati....
Maybe you are looking for
-
How do i transfer itunes to a new pc?
How do I transfer iTunes to a new pc? All of my music files are on an external drive.
-
My 27" late 2013 iMac crashes over and over again
My wife and I bought identical iMacs (3.5 GHz Intel Core i7, 32 GB 1600MHz DDR3, NVIDIA GeForce GTX 775M 2048 MB) in December. Both are up to date on OS X Mavericks. It crashes while I am using it, it crashes on its own if I leave it on overnight. S
-
This should be simple, but it's not responding. I've checked it dozens of times. I have the CSS and HTML in the same folder. I go to the index.html tab and go to "link CSS." I navigate to the css file but what shows up in the "File/URL" window is
-
Hi All, I have created a list in ALV format ,now i want to interact with the list in alv and i want to catch the two fields from the record not one field, how it can be possible. example in my record vbeln kunnr posnr ...........etc when i interac
-
Hi All, I have a problem and I need some help. My plant A is REM. The Finished Goods material "XXX" recieves the requirment from the Customer as on Schedule line. Now the backward scheduling is done based on delivery date in schedule lines. The requi