How to display NEGATIVE sign on the left side of a number in SMARTFORMS
Hi,
In smartforms I'm trying to print some negative values, but the negative sign is displayed on the right hand side of the number.
How can I display the '-' sign on the left hand side of a number. I tried the logic &value(<), it works well in sap scripts. Why is it not working in smartforms ?
Eg : I'm getting the output as 126.75 -
I want : - 126.75
see this wiki which gives details for restrictions of formatting options (I guess you didn't declare the variable correctly, i.e. with the right data element): http://wiki.sdn.sap.com/wiki/display/ABAP/SAPscript#SAPscript-WhatarethevarioustextformattingoptionsinSAPscript%3F
Similar Messages
-
How to display Success Message on the Left side of Screen
I am displaying a Process Success Message after the ApplyMRU process, *#MRU_COUNT# row(s) updated*. By default, this message is displayed at the center of the screen. I would like to display this message at the left hand side of the screen.
I am using APEX 4.0; Theme Sand - 10. I have tried changing the alignment for the success message position in the Page Template – One Level Tabs, HTML Body section. But I am not having any luck.
Does anyone know how to change/override the default position for the success message?
ThanksAndy,
I tried what you suggested and the success message is still being displayed in the center of the page.
I went to Template --> Page --> One Level Tabs. In the Header, I put the following lines before the </head>
<style type="text/css">
.t10messages {text-align:left;}
</style>
</head>
<body #ONLOAD#>
#FORM_OPEN#
I do not have any other custom CSS. Just strictly using Theme 10 - Sand
Any ideas on what else could be the reason?
Thanks,
DP
Sorry for the delayed response - out for holidays. -
Move negative sign (minus) to left side of value in gui_download
Hi,
While downloading data using gui_download I want to bring the negative sign to the left side of the value. Is this possible?
Regrads,
MadhuHi,
Use FM
CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
Regards.
Eshwar. -
How to keep a label at the left side of a JScrollPane
Hi all
I am essentially trying to make a text block that doesn't move as the scrollpane scrolls (horizontally in my case)
Here's my code trying to do this simply using Graphics.drawString (not compilable - tell me if you need something that compiles):
g.setFont(getTaskFont());
g.setColor(getTaskLabelForeground());
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
JScrollPane sp = ComponentUtilities.getJScrollPaneAncester(this);
for (int i = 0; i < tasks.size() - 1; i++) {
Task t = tasks.get(i + 1);
FontMetrics fm = g.getFontMetrics();
int y = i * (rowHeight + rowSpace) + fm.getAscent() + (rowHeight - fm.getHeight()) / 2;
int strlen = fm.stringWidth(t.getName().toUpperCase());
int start = getXLocationForTime(t.getStart());
int end = getXLocationForTime(t.getFinish());
int len = end - start;
int x = 0;
//System.out.println("task: " + t.getName());
if (strlen < len) {
x = Math.min(end + 5, Math.max(start + 3, sp.getHorizontalScrollBar().getValue()));
else {
x = end + 5;
g.drawString(t.getName().toUpperCase(), x, y);
}Here's my code trying to do this using a JLabel
JScrollPane sp = ComponentUtilities.getJScrollPaneAncester(this);
int y = i * (rowHeight + rowSpace); //+ fm.getAscent() + (rowHeight - fm.getHeight()) / 2;
int strlen = fm.stringWidth(t.getName().toUpperCase());
int start = getXLocationForTime(t.getStart());
int end = getXLocationForTime(t.getFinish());
int len = end - start;
int x = 0;
//System.out.println("task: " + t.getName());
if (strlen < len) {
x = Math.min(end + 5, Math.max(start + 3, sp.getHorizontalScrollBar().getValue()));
else {
x = end + 5;
floaters.setLocation(x, y + (rowHeight - fm.getHeight()) / 4);
floaters[i].repaint();
Both [i]almost work, but the scrolling is not smooth (blinks back & forth). It seemed like a double buffering problem, but when I added code to paint first to an image and then to screen the issue remained.
I also tried adding labels to the JLayeredPane popup layer, but I this solution is problematic also, as labels start drawing all over the place. Plus, I'd rather not have to keep track of the labels and be repositioning them in the first place.
Any advice on this is sincerely appreciated.
Thanks!
-Tom
Anyone know how to fix this?Darryl Burke wrote:
a label at the left side of a JScrollPaneI take it <tt>setRowHeader</tt> / <tt>setRowHeaderView</tt> don't do what you want?
dbThat's a very helpful suggestion, and I think would solve the problem as stated, however in reading your answer I see now that I didn't state my problem well, and that what I am trying to do is much more complex than I originally thought it was.
Thanks tho, you have helped me gain clarity in what I am trying to do. -
'-' minus sign on the left side of the value
Hi all,
My requirement is to put the minus sign appearing the amount field
on the left hand side instead of right as it appears in the database fields.
Is there any direct functionality for the same instaed of using concatenation .use an edit mask
edit: Didn't read well. Where are you trying to put the sign? a database table? ALV? others?
TYPE-POOLS: SLIS.
types: begin of this_Type,
one type p,
two type p,
end of this_Type.
data itab type table of this_type with header line.
data: field_cat type sLIS_T_FIELDCAT_ALV,
wa_fcat like line of field_cat.
itab-one = '-1'.
itab-two = '-2'.
append itab.
wa_fcat-fieldname = 'ONE'.
wa_fcat-edit_mask = 'V_______'.
append wa_fcat to field_cat.
wa_fcat-fieldname = 'TWO'.
wa_fcat-edit_mask = 'V_______'.
append wa_fcat to field_cat.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE = ' '
* I_CALLBACK_PROGRAM = ' '
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* I_STRUCTURE_NAME =
* IS_LAYOUT =
IT_FIELDCAT = field_cat
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = itab
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
IF sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Edited by: Ramiro Escamilla on Jan 8, 2009 11:49 AM -
Without any difficulty, I can have the items in the Bookmarks Toolbar in any order I like. However, the Bookmarks Button is on the extreme right and I would like it on the left - how can I move it to the extreme left side?
Go to toolbar customize and change "Show:" to Icons and Text so that you can see the existing/default Bookmarks button, then drag it from its current position over to the far left, than change "Show:" back to Icons only.
-
How to shift Negative sign from Right to left
Hi friends,
please tell me How to shift Negative sign from Right to left for quan data type i am getting on right side but i want to display it on left exactly preceding my output number display.hi yogesh
check this function module..
<u><i><b>CLOI_PUT_SIGN_IN_FRONT</b></i></u>
this will move the negative sign from the left hand side of a number, to the right hand side of the number. Note that The result will be left justified (like all character fields), not right justifed as numbers normally are.
chck this example..
data: a1 type i value 56 ,
a2 type i value 60,
res type i.
res = a1 - a2.
data: res1(10).
res1 = res.
CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
CHANGING
VALUE = res1
write res1.
I<u><i><b>MPORTANT</b></i></u>
You can use this FM CLOI_PUT_SIGN_IN_FRONT.
But you need to declare the amount field as char.
Or you can code like this
data int type i.
data char(10).
int = -4.
int = int * -1.
write int to char.
concatenate '-' char into char.
reward if useful..
Message was edited by:
navjot sharma -
How to display the number with negative sign in the front in ALV.
most important, this ALV is also can totalize.
can someone give me some suggestion?
thanks
jisuweni hope you want a negative sign before a char but holding some number. then that case
loop at itab.
concatenate itab-char '-' into itab-char.
modify itab.
endloop.
and you can display in ALV with negative sign...
Totalling you need to Specify
DO_SUM = 'X' while populating fieldcatalog...
If subtotals then you have to Build sort table and based on that you can proceed./.
examples are there you can find inn SLIS package..
vijay. -
I like the bookmarks on the left side of the screen. I don't want to be navigating through a tree of all of my various bookmarks. How can I display all of my bookmarks along the left side of my browser window like earlier versions of Firefox?
View > Sidebar > Bookmarks (Ctrl+B)
Press F10 or tap the Alt key to bring up the "Menu Bar" temporarily if the Menu Bar is hidden.
*https://support.mozilla.com/kb/how-do-i-use-bookmarks -
I previous versions you could have all of your bookmarks displayed down the left side of the page (I cannot recall the technical term for this). With this version when I open bookmarks I get something called the library which looks like what I want but it's in it's own window which is not the way that it was in previous versions. How do I set up Firefox so that my page had my bookmarks always displayed. I do not like the toolbar option.
You can make the Bookmarks visible in the sidebar via View > Sidebar > Bookmarks or the Ctrl+B keyboard shortcut.
Press F10 or tap the Alt key to bring up the "Menu Bar" temporarily if the Menu Bar is hidden. -
How do you get the bookmarks list permanently displayed on the left side of the screen?
I somehow managed to get the bookmarks permanently open and displayed in a vertical column on the left side of the screen. I accidentally closed it and cannot get it to display again. How do you manage to get the bookmark list permanently open and displayed again? Thank you.
Hello exoticdoc2, see if the next [https://addons.mozilla.org/en-us/firefox/addon/all-in-one-sidebar/ All-in-One Sidebar add-on] it is useful for you, it is more than a sidebar bookmarks toolbar.
thank you -
The screen displayed on the instructions for home sharing described as being found on the left side of iTunes isn't visible on the new iTunes page?? Where do i find that screen i.e., how do I fine the home sharing icon on the new iTunes page?
ontthe top menu
View > Show sidebar
Then the computers for home sharing show up under the Shared section -
What is to be done for gettting the sign to the left of the figure?.
Hi,
what is to be done for gettting the sign to the left of the figure?.
Example:
On normal reports if there is a negative sign ie negative value
then the sign appears like "123-" to display it as "-123"
what needs to be done?
I want this on a report
using a WRITE statement.
Its urgent for me .
Thanks,
Satya,Hi,
Use the FM CLOI_PUT_SIGN_IN_FRONT.
The amount field cannot be directly passed to this FM.
For example, If v_amount is the amount field. First move this value to a character field say lc_amount using
write v_amount to lc_amount.
Pass the lc_amount field to the FM CLOI_PUT_SIGN_IN_FRONT.
If your system does not have the FM CLOI_PUT_SIGN_IN_FRONT,
then use the below code
DATA: lc_text(1) TYPE C.
SEARCH lc_amount FOR '-'.
IF SY-SUBRC = 0 AND SY-FDPOS <> 0.
SPLIT VALUE AT '-' INTO lc_amount lc_text.
CONDENSE lc_amount.
CONCATENATE '-' lc_amount INTO lc_amount.
ELSE.
CONDENSE lc_amount.
ENDIF.
Reward points if found helpful.
Thanks,
Balaji -
Safari icon Pops up on the left side of the dock, how to turn it off
I'm constantly getting this icon popping up on the left side of my Dock on my iMac at work.
When clicking the Safari icon, it will open a webpage where one of my colleges is working on.
How can I turn it off because it constantly shifts the icons on my dock to the right and when it
disappears after about 3 second everything moves again to the left. This is happening about
a couple of times a minute and it drives me crazy.You and your colleague are both signed in to the same Apple ID account, and both using Handoff. One should sign out and sign in with a different ID.
-
How to display -ve sign before amount in ALV grid
Hi,
I want to display -ve numbers in an ALV grid. But the sign always appear at the end of the number. Is there any option with which I can display -ve sign before the number.
Regards,
DeeptiHi,
<b>You can refer to below threads:</b>
ALV - negative sign in the front
Prefix Negative sign in type P field in an ALV report
Or
USe Function Module <b>CLOI_PUT_SIGN_IN_FRONT</b>, may be this works in your case.
<b>Reward if helpful</b>
Rgds
Maybe you are looking for
-
Successor of CALL DIALOG statement?
Hi Experts, We used to have a statement called CALL DIALOG in previous versions which was helpful in the following ways: 1.Calling a dialog program(module pool) from another program. 2.Data Traffic between two programs. 3.Both program work in Same LU
-
Reports Staff movements from one org unit to another org unit
Dear experts, Is there any standard reports to get staff movements from one org unit to another units. Thanks in advance
-
iPhoto09 v 8.1.2 Double clicking on thumbnail results in glimpse of photo before changing to ! with a black background. No photo, no slideshow. (Preferences set to magnify with double click)
-
Hello, How capacity is influencing the product costing.Are there any configuration required for it. Thx in advance
-
Smatrform and processing class
Hi, I'm New to SAP CRM. My requirement is to send a the activity transaction details to a customer as a PDF in the smartforms. Here we can execute the action using a Smartform or Method call. How to go about it. How can we know the processing class f