Remove 0's in a amount field
Hi,
Suggest abap statment tht can be used to remove leadin 0's from an amount(currency) field.
For eg if my amount contans 0000987.00$ it should be displayed as 987.00$ as output.
Answers will be rewarded.
Pls Help!!!
- Rohan
Hi Rohan,
try these FM:
CONVERSION_EXIT_ALPHA_INPUT
CONVERSION_EXIT_ALPHA_OUTPUT
or move to a char field and then remove zeroes by the foll code:
SHIFT <fieldname> LEFT DELETING LEADING '0'.
or write the below piece of code:
data: a(10) type c,
b(10) type n,
b = 300.
a = b.
write:/ b,
/ a.
output
0000000300
300
Regards,
Sunil
Similar Messages
-
How to supress sign after the amount field
Hi All,
How to suppress the sign after the amount field is it using only no-sign or any other ways are there for doing that?
Regards
MaheshHi,
Please use the Variable type BSEG-DMBTR, which does not support any sign. <REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 20, 2008 2:07 PM -
Hourly rate entered in the amount field of IT0008 calculate wrongly in RT
Hi All,
Hourly rate 9.52 entered in the amount field of IT0008. The system calculate /250 salary summary as 9.52 in the Result Table RT.
Kindly advise on what to configure so that it will calculate correct basic salary in RT.
Regards
Vince9.52 is the RTE in Infotype 008
Generally , amount will be maintained and that amount will be divided with number of hours and you will get Salary per day
in your case maintain RTE as 9.52 in IT08
and in PCR x013... for Grouping 3 Specification 5....... instead of RTE=TSDIVP maintain RTE*TSDIVP and remove DIVID ARR and check the out put once -
How can we remove the following zeros from quantity field ?
Hi All.
how can we remove the following zeros from quantity field while populating ALV by using FM REUSE_ALV_GRID_DISPLAY ?
eg:getting output zqty = 2.000
but i need zqty = 2.
help me to reslove this issue.
Regards.
jayHi,
While populating the field catlog do the following thing to avoid zeros.
wa_fieldcat-tabname = 'I_OUTPUT'. " Curr
wa_fieldcat-fieldname = 'FWAER'.
wa_fieldcat-seltext_l = text-023.
wa_fieldcat-no_zero = 'X'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Thanks,
Khushbu. -
User defined function to check the NULL and 0.00 value in a Amount field
Hi Experts,
I have one scenario in which i have amount field in Data type.
I have to create one UDF which will do the following thing.
1. If the amount field is Null it should throw an exception in mapping.
2.If the amount field is 0.00 it should throw an exception in mapping.
3. For all other cases it should pass the amount value to the target.
Can anyone provide me the code For this UDF.
Thanks in advance.Hi,
You can add this logic to the UDF. Here var1 is the input string.
java.math.BigDecimal b=new java.math.BigDecimal(var1);
if(b.compareTo(new java.math.BigDecimal("0.00"))<=0)
//write your logic for values less equal to zero
One small request, if you think your question has been answered, properly and correctly, could you please kindly if possible close down this thread. It helps people who look for solutions to similar problem.
regards
Anupam -
DIsplaying WRBTR (AMOUNT FIELD)WITHOUT DECIMAL PLACES
Dear all,
I am facing a problem in displaying amount field in alv report. I have two currency keys (US dollar and Japan yen). if it is japan yen I should not have to show decimal places and if it is US dollar I should show decimal places.
How can I do it in a alv report if I have only one output amount field?
thanks
Ranjan.Hi chittaramjan,
1. use this kind of funda (just copy paste in new program)
Important things
a) one extra field in internal table
declared in the same exact fashion
waers LIKE tcurc-waers,
b) Populate this field
c) REST THE System will take care
(based upon country settings)
2.
REPORT abc.
TYPE-POOLS : slis.
DATA : alvfc TYPE slis_t_fieldcat_alv.
DATA : BEGIN OF itab OCCURS 0,
f1 LIKE P0008-BET01,
waers LIKE tcurc-waers,
END OF itab.
START-OF-SELECTION.
itab-f1 = '-4.15'.
itab-waers = 'KRW'.
APPEND itab.
itab-f1 = '4.68'.
itab-waers = 'GBP'.
APPEND itab.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ITAB'
i_inclname = sy-repid
CHANGING
ct_fieldcat = alvfc.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = alvfc
TABLES
t_outtab = itab
EXCEPTIONS
OTHERS = 2.
regards,
amit m -
Error in Report: Next to amount field i could see 'ERROR' word in report
Guys,
Problem in Report: Next to amount field i could see 'ERROR' word in report
Eg: Invoice Amount : "1200ERROR" it should be like "$1200".
Pls help where do i need to check.
ThanksAjeet wrote :
Hi,
It can heppens if all the records getting aggregated in the report are of different currencies and not belonging to one currency.
Do a currency conversion for the key figures and make them all with same currency.
See if the records in the cube for the selection which you have given in the report gives you records with different currency and if it is true then as above said.
Thanks
AJeet
Are you sure ???
The mixed unit values will be displayed as * (by default unless its changed).
ERR comes if unit is not maintained. -
Length of amount field in New GL at the document entry
Hi,
1) At present I am working on ECC 6, EhP 4 with New GL Activated & Old GL "Not deactivated" (i.e deactivate update of Classic General Ledger GLT0 not done).
2) The total table (FAGLFLEXT) & Line item table (FAGLFLEXA) field in new GL has amount field length as 23 digit.
3) When I am trying to enter any FI Document in SAP, using transaction code F-02 or FB60 etc, the length of amount field is coming as 13 digit. I am not able to enter higher value
Question:-
a) Is the above issue due to "non-deactivation" of "Old GL"? As per my understanding, it is not, but wanted your opinion.
b) Is there any configuration which needs to be done to increase the length of the amount field at transaction level?
Thanking you in advance
Santosh Agarwala) Is the above issue due to "non-deactivation" of "Old GL"? As per my understanding, it is not, but wanted your opinion.
No, it is not.
b) Is there any configuration which needs to be done to increase the length of the amount field at transaction level?
No, there isn't. The field length that is appearing during document entry is really dictated by the data type of fields such as DMBTR, WRBTR in table BSEG; which is CURR (13,2). Although the GL view (FAGLFLEX* tables) have longer length, the limitation in entry view (BSEG, etc.) stays as 13,2. -
How to maintain the amount field format after GUI_DOWNLOAD
Hi everyone.
I have this problem on my object.
The format of field ERFMG in table AUFM is 3.921,569.
After I SELECT it INTO an internal table it becomes like this 3921.569
I would display this internal table in ALV and its ok. Its format is 3.921,569 The format is also not changed when I download it into an excel file using LIST -> EXPORT -> LOCAL FILE -> SPREADSHEET.
However my program should automatically download to local if the user tick a checkbox in the selection-screen. It will use function module GUI_DOWNLOAD. When this is used, the format of ERFMG changes to 3921.569 again, since it is using my declared internal table.
How will I use GUI_DOWNLOAD without changing the format of amount fields like ERFMG? What are my other options to do this?
The Decimal Notation in my User Profile is already set to 1.234.567,89
Thank you in advance.Hi Cris,
To get the output in the user format for the decimals, try the following code.
data: wg_dec(7) type p decimals 2.
data: wg_dcp type usr01-dcpfm.
data: wg_dec_str(10) type c.
wg_dec = '111135.67'.
select single dcpfm from usr01
into wg_dcp
where bname = sy-uname.
move wg_dec to wg_dec_str.
if wg_dcp ne 'X'.
replace all occurrences of '.' in wg_dec_str with ',' .
endif .
write:/ wg_dec, wg_dec_str.
I dont feel there is any other option where you can change the decimals format as per the user profile.
While giving the output of decimal values in a list, the system automatically displays it in the profile set by the user.
This code will help you to set the decimal value as '.' or ',' as per the user profile.
Note: It wont add the unit separator for hundreds and thousands. Again you have to do that manually.
Hope this proves of some help to you.
Regards,
Pulkit -
How to roll up Amount field upto Input Criteria Posting period
Hi All,
I have a requirement to create a FI Budget report where the User will give the Posting Period as the input criteria, and based on the entered Posting period, 2 amount fields, "Original Budget" & "Current Month" need to get derived by looking at another amount field called actual, by rolling up the Amounts up to the entered Posting period.
For example, the user gives input as Posting period = 06, which is December because Fiscal year starts from July here. And my Cube has an amount field "Actual" which displays amount for each posting period. Therefore when posting period = 06, then the "Actual" amount value for months July (PP = 01) through December (PP = 06) should be rolled up i.e added and displayed in the "Original Budget field". The Current month should only display the amount for the input criteria month.
How can I do that, any suggestions please?
Thanks!!Hi Sam,
Is there any way i could do it without the SAP Exit? If yes, how? If no, can u specify in the document you sent, which code i could use as reference for my requirement?
Thanks -
Error when displaying amount field in HTMLB Tableview
Hi all,
I am displaying some 'X' table in HTMLB Tableview and it has one amount field.But reference(currency) field of that amount field is in other table . I know it gives the error.
Please tell me there is any other way to resolve this problem with out adding reference(currency)field in the same table?
Thanks and Regards ,
Harikrishna .Hi Hari,
But reference(currency) field of that amount field is in other table . I know it gives the error.
It will not give any error , you can use the currency key field of other table or structure .
Alternatively you can use predifined type DEC instaed of CURR .
Regards,
Anubhav -
Amount field is not populating properly
Expert's,
Here is an issue where one of the amount field not populating properly.For some opportunities the amount field will be just displyed as'0' but for some opprtunities the amount field is displaying as'$0'.The data we are pulling is from CRM.
Thanks in advance.
vasu.Hi,
looks like extenstion of your last thread
did you already have a look in data in cube?just to make sure,try to display cube's data using List cube transaction .Take this amount field,corresponding Currency Key,and you rmost impotant characteristics...and check whether all records are having entry in 'currency' column? -
DOWN PAYMENT AMOUNT FIELD NEEDS TO BE NOT MODIFIABLE IN PAYMENT REQUEST
Hi
In SAP, when Down Payment is called through Payment Request, the "amount" field will be changeable mode.
My client requirement is that, the amount field should be in "not modifiable" status.
Is there anyway that we can do this...using EXIT or something....
Thanks in advance...
Srikanth MHi,
system will not allow to change the Vendor line item.
F-47 Down pyamnet request 10000
f-48 you need to select the above request
and enter the 10000 in bank gl line.
you cannot change the vendor line while f-48.
i hope will clearify your issue.
reg
Mmadhu M -
Hi;
I've already made a Z for payment check and works fine, but we have notice something when preview the checks in the spool, some checks in the amount (in numbers) field "*****999,999.99" sometimes it´s moves like this:
1) example "......******999,999.99"
2) example ".............******99,999.99"
3) example "....******999.99"
and so....
in DEV we made a lot of test printing in paper the payment check an worked fine, but the problem is in QAS.
How can i get that the amount doesn´t move in the sapscript...?
Thanks on advance,
David Fúnez
Tegucigalpa, Honduras
Edited by: David Funez on Feb 23, 2012 9:27 PM
Edited by: David Funez on Feb 23, 2012 9:27 PMHi David,
create a SIGN aligned tab for that amount field. The tab is nothing but the position in the form from where the printing of that particular field should start.
This should solve your problem.
Please revert if you still face any problems.
Regards,
Praveenkumar T. -
How to deactivate withholding tax base amount field
Dear Experts,
My in client is using the extended withholding tax with setting Define Formulas for calculating withholding tax, my client feel that the tax base amount field is open and user may accidentally input the wrong amount there thus can anyone tell me how to deactivate this tax base amount field?
thank youDear,
Go into Withholding tax type under SPRO>Financial Accounting Global Settings>Withholding Tax>Extended Withholding Tax>Calculation>Withholding Tax Type.
While maintaining the Withholding Tax type you have selected "W/tax base manual" under the control data. Just don't select that option then your requirement will be met.
There are other options also like Manual W/tax amt. which you might want to go for.
Regards,
Chintan Joshi.
Maybe you are looking for
-
How do I reboot into mac mode from the windows 7 startup on mac
Firstly please don't judge me coz I know I've screwed up and learned my lesson but I downloaded a windows 7 torrent file, burned that to disk, set a disc partition on my mac thought the bootcamp and then installed windows but now whenever I turn my m
-
Firefox 3.6.19 will not load; instead, keeps endlessly downoading.
I have a 21.5 iMac (late 2010 model), running OS 10.6.6 It has 800 gigs of free space, 12 gigs RAM I am presently running Firefox 3.6.16 I have been trying to download your lastest updates for weeks, maybe months now, but have given up each because t
-
Reading File Using JCA File Adapter
Hi , I have used Jdeveloper to create File Adapter Service using synchronous Read operation to read .csv file from statically defined physical path, then generated Business Service using eclipse while importing jca, xsd and wsdl generated in Jdevelop
-
I can log in, but everything seems to be reset to "factory"
I can't seem to find this problem detailed anywhere, so here goes: My Intel Mac mini running 10.5 froze up tonight, so I had to do a hard shut-down. When it restarted, the machine is in a state that was (is) very bizarre. It recognizes my user name,
-
Dear all, I am trying to create a form with an option to strike through either one the words "Yes" or "NO" as shown below". I cannot find anyway to do so, but I do see some forms download from the internet can do it. Please help. Q1. Are you a xxxx?.