Currency field to be displayed with commas and asterisks(formatting)
I have a field REGUH-RWBTR in my sap script code. I need to have the currency displayed with commas. And also if the digits are less, then left pad it with asterisks for remaining spaces.
For eg, If the Digit is 12345678912.23 (max value), it should print as 12345,678,912.23.
And If the digit is 12345.89, it should print as ******12,345.89
Please help me to solve this problem.Its urgent.
Thanks,
Sandeep.
Hello,
You can use the WRITE using EDIT MASK.
USING { {NO EDIT MASK}|{EDIT MASK mask} }
Effect
This addition overrides a conversion routine defined through reference to the ABAP Dictionary. The addition NO EDIT MASK only switches off the execution of an assigned conversion routine. The addition EDIT MASK calls either another conversion routine or defines an edit mask. For mask, a data object of the same name is expected.
In order to call an arbitrary conversion routine CONV, mask must contain two equals signs, followed directly by the name of the conversion routine: "==CONV". During output, the content of dobj is passed to the function module CONVERSION_EXIT_CONV_OUTPUT, converted there, and then the result is displayed. If the function module is not found, an exception that can be handled is triggered (as of Release 6.10). The statement DESCRIBE FIELD contains an addition in order to fill mask accordingly.
If the output length is specified explicitly with len, the conversion routine is executed for the specified length; otherwise for the implicit output length. If * or ** is specified for the output length, the appropriate rules are used for the converted result.
If the first two characters in mask are not equals signs, the content is interpreted as an edit mask in which some characters have a particular meaning. The WRITE statement does not then output the content of dobj directly, but the character string in mask as follows:
If the first two characters in mask are "LL" or "RR ", these are not output, They control whether the edit mask is left-justified or right-justified. If the first two characters are other characters, the edit mask is left-justified.
All "_" characters are replaced from the left (in the case of "LL") or from the right (in the case of "RR") with characters for character-type types or numbers for the types p or i from dobj. In the case of fields of type c, closing blanks are ignored. Data objects of type f or x are converted into type c before editing. Superfluous characters "_" in mask are replaced by blanks. Characters from dobj for which there are no characters "_" in mask are not displayed.
If dobj is of type i or p, the first character from the left "V" in mask is replaced with "-" in the case of a negative number and by blank in the case of a positive number.
All the other characters of the edit mask are displayed unchanged.
If no output length is specified, the implicit output length of dobj is used. If len is specified for the output length, the value of len is used. If * is specified for the output length, exactly that length that is required for the list display is set. If, in Unicode systems, characters of the edit mask are replaced by characters that take up more than one column on the list, the output length is increased accordingly and the output is filled with blanks in the list buffer. If ** is specified for the output length, double the length of the edit mask mask is used.
If other formatting options are specified concurrently for an edit mask, these are used first and then the special characters in the edit mask are replaced by the interim result. The date masks date_mask are an exception to this. If these are specified, the edit mask is ignored.
Notes
In Unicode systems, you must remember that a character "_"in the edit mask does not necessarily correspond to a column in the list display since the space required in the display depends on the character to be replaced.
The minus sign for a negative number is not displayed if no edit character "V" is specified. The decimal separator of a packed number with decimal places must be specified at the required position in the edit mask.
Example
Edited output of time duration. In the first output, the function module CONVERSION_EXIT_DURA_OUTPUT is executed. This converts the duration specified in seconds into minutes. In the second output, the edit mask is output according to the above rules. However, the underscore characters "_" are replaced by the characters from time.
DATA: dura TYPE i,
time TYPE t VALUE '080000'.
dura = sy-uzeit - time.
time = dura.
WRITE /(30) dura USING EDIT MASK '==SDURA'.
WRITE /(30) time USING EDIT MASK
'RRThe duration is __:__:__'.
Regards,
Similar Messages
-
How can I concatenate a currency field (eg: 12.25) with numeric values
Hi,
I ma working in ECC6.0.
How can I concatenate a currency field (eg: 12.25) with numeric and character values into a variable.
I want to concatenate 12.25 with "+" and "0".
Regard,
DivyaHi,
I ma working in ECC6.0.
How can I concatenate a currency field (eg: 12.25) with numeric and character values into a variable.
I want to concatenate 12.25 with "+" and "0".
Regard,
Divya
==================================
data: l_string type string.
move l_curr_field to l_string.
condense l_string no-gaps. "if needed
concatenate l_string '+' '0' into l_string.
now your l_string will have all the values. -
Need output with commas and decimals.
Hi All,
I want to print this below no using write statement with commas and decimals .
123,45,67,890.12
Note :
It must be declared in parameters and it is currency value
and my output must also be like this
123,45,67,890.12
Can any one suggest me what to or send me some sample program for this,
(points will be rewarded)
Thanking you
vinoth.rquote:
Originally posted by:
The ScareCrow
You should redesign your db to have another table
This table should have the asset id and the category id (I
call this a bridging table)
The category column would then be removed from the asset
table.
You then do a join on the tables to gain the category
description.
But to fix your problem with the existing structure
Your query
<cfquery name="qIndex" datasource="#appDSN#">
SELECT Asset.Reference, Asset.AssetName, Asset.Category
FROM Asset
WHERE Category LIKE '%#URL.Category#%'
</cfquery>
<cfoutput query="qIndex">
<cfset catids = ValueList(qIndex.category])>
<cfquery name="qCat" datasource="#appDSN#">
Select Category_Name
From categories
Where Category_ID IN (#catids#)
</cfquery>
#qIndex.Reference#<br />
#qIndex.AssetName#<br />
<cfloop query="qCat">
#qCat.Category#<br>
</cfloop>
</cfoutput>
Ken
Ken, Thanks. It's really close, but all of the repeating
records are taking the Category output from the first record in the
set and repeating it...e.g. if the first record is "Mouse,
Keyboards, Trackballs", all of the subsequent records show the
same.
Also should "ValueList(qIndex.category])", have been
"ValueList(qIndex.category)"?
If there's not a way to do this using the current db, i'll
try using a bridging table.
thanks.
paul -
Hello,
I have a problem with comma and point in a double-digit.
I use a english driver for HM8142. When I get the values then I only get
int-digits. How can I change "Use comma as separator" . I tried to change
the option in LabVIEW.
I changed it, then I got the window. "To change, restart the programm". I
have done this. But when I have a look at the option, it is not changed.
What can I do?
I am not the admin on the computer.
MartinHi Martin,
you do not have to change any system settings neither in LabVIEW nor in your windows.
All instrument drivers should use a point as decimal separator. You can overwrite the decimal point handling in the string functions "Scan from string" and "Format into string".
Make a right click on the function and use "Edit Scan String". In the dialog open the ring under "Selected operation", the last entry allows you to set the character for the decimal separator. This separator will be used for all the following floating point numbers.
From your name and problem I think you are located in central europe. I do not have a german version of LV so I cannot tell you how the elements are named in german.
Waldemar
Waldemar
Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions -
How to connect my Mac Air 13" to my Philips display with DVI and VGA ports?
How to connect my Mac Air 13" to my Philips display with DVI and VGA ports?
Use a DVI to micro-DVI adapter if you're on an original MacBook Air, and a Mini DisplayPort adapter for a newer one.
(119682) -
MOVED: Multiple Displays with AGP and ON-Board
This topic has been moved to AMD SocketA based board.
Multiple Displays with AGP and ON-BoardGlen i just wanted to test try something new.
I want to know if there are anything i should know about my board?
Do you think the KM4M-V is a good board to have? -
Formatting a number element with commas and decimals.
I have a dataset with numbers. I already set the column type to "number".
I want to format the number data with commas and decimals. I found a way to add decimals, but I'm still very confused how to do commas and to combine that with the decimal formatting.
Also, how do I apply that to a repeat region in my spry region?
Any help would be appreciated. Thank you very much.I found this on one of the forum questions.
Excel dont preserve the trailing zeros.
try opening the xcel and type 5.0000 and tab out, it wont preserve the trailing zeros after decimal.
try finding out how to disable the option in excel. if you do that, you will see what you send out from the report.
But you can try to convert the number into a text by trying to append a space at the beginning. See if that would work.
Thanks
Swarna -
PO output with XML and PDF format
Hi All,
I need PO output with XML and PDF format. when I give print it shld go to vendor with xml and pdf format through mail. please kindly guide me on this .
Thanks in advance
JKhi,
try this code to get in pdf form
REPORT zsuresh_test.
Variable declarations
DATA:
w_form_name TYPE tdsfname VALUE 'ZSURESH_TEST',
w_fmodule TYPE rs38l_fnam,
w_cparam TYPE ssfctrlop,
w_outoptions TYPE ssfcompop,
W_bin_filesize TYPE i, " Binary File Size
w_FILE_NAME type string,
w_File_path type string,
w_FULL_PATH type string.
Internal tables declaration
Internal table to hold the OTF data
DATA:
t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
Internal table to hold OTF data recd from the SMARTFORM
t_otf_from_fm TYPE ssfcrescl,
Internal table to hold the data from the FM CONVERT_OTF
T_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE.
This function module call is used to retrieve the name of the Function
module generated when the SMARTFORM is activated
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = w_form_name
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = w_fmodule
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Calling the SMARTFORM using the function module retrieved above
GET_OTF parameter in the CONTROL_PARAMETERS is set to get the OTF
format of the output
w_cparam-no_dialog = 'X'.
w_cparam-preview = space. " Suppressing the dialog box
" for print preview
w_cparam-getotf = 'X'.
Printer name to be used is provided in the export parameter
OUTPUT_OPTIONS
w_outoptions-tddest = 'LP01'.
CALL FUNCTION w_fmodule
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = w_cparam
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = w_outoptions
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
job_output_info = t_otf_from_fm
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
t_otf[] = t_otf_from_fm-otfdata[].
Function Module CONVERT_OTF is used to convert the OTF format to PDF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = W_bin_filesize
BIN_FILE =
TABLES
otf = T_OTF
lines = T_pdf_tab
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
To display File SAVE dialog window
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
WINDOW_TITLE =
DEFAULT_EXTENSION =
DEFAULT_FILE_NAME =
FILE_FILTER =
INITIAL_DIRECTORY =
WITH_ENCODING =
PROMPT_ON_OVERWRITE = 'X'
CHANGING
filename = w_FILE_NAME
path = w_FILE_PATH
fullpath = w_FULL_PATH
USER_ACTION =
FILE_ENCODING =
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_bin_filesize
filename = w_FULL_PATH
FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
tables
data_tab = T_pdf_tab
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
reward points if useful,
siri -
Restricting input to integers, display with comma separators
I'm using Acrobat 8 on a Macintosh. My question is very similar to the previous one about truncation. I have a small array that adds and subtracts fields, and sums them to totals. The following scripts restrict the data entry exclusively to numbers, but my problem is that it doesn't display my fields in Acrobat with comma separators, e.g., 123,456. Is there a better way of doing this, or is it just a matter of adjusting the formatting script?
Using a custom script under Format:
Custom Format script:
event.value = "(" + eventvalue +")";
Custom Keystroke Script:
event.rc = /^[0-9]*$/.test
(event.change);
Bill LomaxI'm not aware of any cultures that allow multiple consecutive separators, and of course "en-US" certainly doesn't. I think you answer is just that TryParse isn't as smart as you would like it to be.
If you know how many digits there are after the decimal point, you could use ToString to convert the decimal back to a string and verify that it is the same as the original string. For example, if the string has a currency symbol, thousands separators and
two decimal places, you could use the following:
Dim result As Decimal
Decimal.TryParse(Me.tbxkWhCost.Text, System.Globalization.NumberStyles.AllowThousands _
Or Globalization.NumberStyles.AllowDecimalPoint Or Globalization.NumberStyles.AllowCurrencySymbol, Nothing, result)
If result.ToString("C2") = Me.tbxkWhCost.Text Then
'String is good
Else
'String is bad
End If
I realise that this doesn't work if you don't know what format the number will be in. -
Year values are displaying with comma ex: 2,013
Hi,
We are Using OBIEE 11.1.1.7.0 , In the time dimension hierarchy, the year values are displaying in the reports with comma separator i,e., 2,013
I want to remove the Comma in the year value of hierarchy.
Could you please help me anyone to achieve this.
Thanks,
Babu.unset the set the comma separator for thousand using column properties->Data format and then save it for system wide.
if helps mark
~ http://cool-bi.com -
20" Cinema display with USB and firewire ports not working
I have a new 20" display and was wondering why my USB and fire wire ports at the back are not working. I have an external drive that is powered hooked up to the fire wire port and a no powered piano keyboard to a usb port.
Any help pleaseVerify that the display’s USB and FireWire cables are firmly plugged in to the
computer. Do they show in your profiler?
Try different ports in the computer.
Verify that your computer ports are working with other known problem free device. -
Multiple Displays with AGP and ON-Board
Is it possible to do multiple displays with an AGP and OnBoard videocards?
If yes, please inform me how to activate it eg. jumper setting or bios settings.
If no explain exactly why not.
My apologies. The board is a KM4M-VGlen i just wanted to test try something new.
I want to know if there are anything i should know about my board?
Do you think the KM4M-V is a good board to have? -
Fields suppressed when posting with FB01 and special gl-indicator
Hello everybody,
I have the following problem:
I'm trying to make a vendor open item posting with transaction code 'FB01' and a special G/L-Indicator. Although the field status group of posting key and target reconciliation account is set all to optional, some fields which should be populated are suppressed, such as ZLSPR or ZBD3T.
Does anybody know what the reason for this is?
Thank you in advance!
Regards,
BHello,
If the posting keys and reconciliation account's field status variants are maintained correctly, then you should also check if you are using any screen / transaction variants
I am completely not sure about this, but you can check this. I hope this helps.
Best regards,
Suresh Jayanthi. -
hi,
i am using Mac book pro with non retina display with latest software yosemitte. When I on the Mac it is taking much time to on the mac / to get main screen. Please suggest us if any option to make it fastThere are several things that could make the computer run slower than expected
or slower than previously experienced from time to time; if a new system was
installed into a computer with slowness and other issues, that may compound the
problem since an upgrade to an OS X is not necessarily a remedy for old trouble.
If the issue may be a performance concern, there are cause and effect reasons
behind computer functionality. And if the computer was super quick, then after
an upgrade to a newer OS X, super slow, there could be several things going on.
The software previously working in the computer may not be correct for a newest
operating system; or the computer hard disk drive may be getting too full of content
that has no relation to the function of the device. Not enough unused storage space
or capacity can contribute to an overall slowness. And this also would relate to the
computer's use of resources. More installed chip RAM can help a computer run
better, and if you have extensive saved content in the computer you made, get an
externally enclosed hard drive and see about how to go & move that accumulation
off the computer's limited space so it could run better.
•Mac Performance Guide - thesafemac:
http://www.thesafemac.com/mpg/
•Tech Guides - in addition to the above - from thesafemac:
http://www.thesafemac.com/tech-guides/
There may also be adware or other kinds of malware inadvertently installed in your
computer; so that is something else to consider, find & remove. Note info in guides.
You could use the Activity Monitor in the Utilities folder (see Go in Finder menu) to
see if there are applications or processes running extensively that could point to
some waste of system resources. If there is something actually using anything at all
out of the ordinary. These kinds of things are hard to judge - if you aren't familiar.
So, anyway, hopefully you can get some ideas from the above site pages to help.
Good luck & happy computing! -
Confusion with Commit and Create Operations
Hi:
I'm using JDeveloper 10.1.3.4. I created an ADF Table that I want to use for data entry and modification. I also added Commit and Create operations as command buttons. Here's the behavior I'm seeing when I run the page:
1. When I click on Create a blank record appears but no record is created in the database. This seems appropriate.
2. When I enter data and click Commit, two records are created in the database: one with the data I entered and a blank record. This is problematic.
Can anyone suggest a reason why I get 2 records during the Commit-button action? Also, is there a correct way to create this data-entry table?
Thanks.Hello,
Try using the createInsert operation instead of create.
Both these operations only create a new row on the midtier, NOT in the database, which is intended.
because adding the row right away to the database removed any use for the midtier in general
cereate only creates a row in the midtier, it does not cimmit anything to the database and will not do so unless any value in that row is altered.
createInsert create a row on the midtier and marks it so that the next commit will save this row to the database no matter if no values are changed.
It doesnt explain why you got two records though, which is something different, maybe you clicked twice or called create twice?
-Anton
Maybe you are looking for
-
Does a replacement charger run the risk of killing power supply
I have an ibook g4 and i just had to buy a new battery but it won't charge...the old one wasn't charging at all, and the new one won't either...i had to buy a replacement charger a few years ago, then about 4 months after that the computer stopped wo
-
CFID & CFTOKEN added to URL by CF
CF automatically appends CFID & CFTOKEN to the URL when using <div <span with id = a variable. They are not appended when a constant is used. I do not want these to be displayed unless I append them myself. Is this a CF bug, or can I change my code s
-
Apple should make transfer for iPhone 4 users to iPhone 5c
Old users can get for free iPhone 5c. Apple have many iPhone 5c models but they are not famous and now you get it?
-
Black color link change to something else
How can I replace the black link to some other link color from the process chains between the Start and the Load data objects? When I use the black links, I would get an error message to say that there are too many processes and not enough background
-
Syncing troubleshooting. please help
my original itunes account was on my laptop that has recently crashed. I went to sync my ipad with another laptop in the house and it transferred all the music off. How do I get the music back onto my ipad. Will this affect my apps too that I had d