Amount formatting based on Currency Key
Hi,
I want to format the amount field on the basis of the currency key.
for eg.
Chile has the no of decimal places set as 0
so for Chile, the amount 800.00 should display as 800
Similarly for Mexico, the no of decimal places is set as 2.
so for Mexico, the amount 800.00 should display as 800.00.
I am using the follwoing statement
WRITE im_amount TO v_amount
CURRENCY im_waers
DECIMALS v_dec_places.
where v_amount is type char20 and im_amount is type netwr.
This is working correctly for Mexico but fails for Chile.
Please share your comments on this.
Thanks in Advance,
Binu
The following write statement gives the perfect result.
WRITE v_amount TO v_fmt_amt
decimals v_dec_places
no-grouping
left-justified.
I was not getting the result on using both the currency as well as Decimals addition. The desired result is obtained on only using the Decimals addition.
And I used the FM, 'G_DECIMAL_PLACES_GET' to get the decimals for the respective currency key.
Thanks a lot for your response.
Regards
Binu
Similar Messages
-
Amount conversion based on currency
Hi
I have a requirement for converting amount into words based on given currency.
I have tried doing this using function module spell_amount, but it is not working.
Points will be rewarded to the helpful answers.
Its very urgent.
Regards
Haritha.Hi haritha,
REPORT ZSPELL.
TABLES SPELL.
DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
DATA : PAMOUNT LIKE SPELL-NUMBER VALUE '1234510'.
SY-TITLE = 'SPELLING NUMBER'.
PERFORM SPELL_AMOUNT USING PAMOUNT 'USD'.
WRITE: 'NUMBERS', T_SPELL-WORD, 'DECIMALS ', T_SPELL-DECWORD.
FORM SPELL_AMOUNT USING PWRBTR PWAERS.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = PAMOUNT
CURRENCY = PWAERS
FILLER = SPACE
LANGUAGE = 'E'
IMPORTING
IN_WORDS = T_SPELL
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
ENDFORM. " SPELL_AMOUNT -
Salary amount conversion based on Currency - LDB
Experts,
I am using LDB PNP in my report and it fetches salary data of an employee. But the problem is in table the amount is shown as 1,000.000 ( three decimal places as for currency EGP), but the same displays as 10,000.00 from LDB. How can this be solved ?Hi,
Please use any of these FMs
HRVE_GET_BASIC_SALARY
HR_ECM_ANNUALSALARY_GET
HRCM_EMPLOYEE_PERIOD_SALARY
HRWPC_RFC_CP_SALARY_GET
Regards,
Peter -
Currency key for amount of zero
I load an ODS and have an amount assoociated to 0currency. When the amount is zero, the currency key is not loaded into ods even though there is a key in source?
Check the update rules for the object as well as the start routine for any restriction on Zero amount.
Hope this helps.
Bhargava -
Display amount in ALV Grid with different Decimal Places based on Currency
HI Experts,
Working with ALV Report i have one Amount field NETWR which is having Length 15 and Decimal Places 2.
we have two different types of currency's AED and KWD and AED having 2 decimal Places and KWD having 3 decimal places.
im using FM: REUSE_ALV_GRID_DISPLAY for Display. value storing in Table was like this
AED---22.56
KWD---225.65
i need to display values like AED : 22.56HI Experts,
Working with ALV Report i have one Amount field NETWR which is having Length 15 and Decimal Places 2. we have two different types of currency's AED and KWD and AED having 2 decimal Places and KWD having 3 decimal places.
im using FM: REUSE_ALV_GRID_DISPLAY for Display. value storing in Table was like this
AED---22.56
KWD---225.65 (converting this value to 22.565 using BAPI_CURRENCY_GETDECIMALS according to currency in my Report)
i need to display values like AED : 22.56
KWD---22.565 but here field is NETWR with 2 decimal.
Need to Display amount in ALV Grid with different Decimal Places based on Currency
Regards,
Dileep Kumar Reddy -
How to set the Date and Currency Formats Based on Country
Hi Friends,
I am designing the one Global Form it will use for all countries.
in that Form i want to print the date and currnecy Formats based on country.
Like
For US i want print the date and Currency Like This.
Date - MM/DD/YYYY
Curremcy - XX,XXX,XX.XX
For DE i want print the date and Currency Like This.
Date - DD.MM.YYYY
Curremcy - XX.XXX.XX,XX
Please suggest how i can control these things through Java Script or Formcalc....Hi Nitin,
thanks For ur reply,
i tried with this solution,
But it is displaying the default Format like bellow formats.
For short - mm/dd/yy
For Medium - mmm dd , yyyy
For Long - thursday ,mmm dd , yyyy
it was prinitng in above mentioned format,
but here i want to print my own format for USA like MM/DD/YYYY. -
As I re installed OS after formatting, I've lost the registration details of FCS 6 X. Based on serial key(bar code key), can I retrieve my registration details?
Ask this question in FCP Studio forum.
-
Addition of Amounts Based on Currency's
Hi all,
I have in an internal table 1) Amounts,
2) Currency,
3) Debit(s)/Credit(h) indicator as three fields.
According to my requirement, i have to add up all the amounts which are credit of a perticular Currency also add up debit amounts of that currency.
For example if i have dollars,pounds and Rupees as entries
Amount Currency debit/credit
400 USD s
100 USD s
30 GBP s
200 USD h
10 GBP s
3000 INR s
20 GBP h
2000 INR s
1500 INR h
my result should be----> USD = (400+100) - 200 -
> 300 USD.
GBP = (30+10) - 20 -
> 20 GBP.
INR = (3000+2000)-1500 -
>3500 INR.
Basically we are adding up all the 's' types induvisually & 'd' types induvisually for each curency and
final out put is [total of s types] - [total of d types] for each currency.
Plz Suggest me a sloution and if posible plz send in a pseudocode.
THANKS IN ADVANCE.
Reddy.Hi Pami,
Pseudocode
Loop at itab into wa.
if indicator= h
multiply amount by -1.
endif.
endloop.
sort itab by currency.
loop at itab into wa.
case wa-currency.
when'USD'
usd_tot = usd_tot + wa-amount.
when 'GBP'
gbp_tot = gbp_tot + wa-amount.
similarily for all currencies.
endcase
endloop.
<b>Reward points, if helpful.</b>
Regards,
Atin -
Hi ,
I have a ALV report in which i have to display amounts based on the currency keys
if it is a zero decimal i should display decimal values where as for decimal i should display decimal values.
how do i set the fiedcatalog for multiple currency keys.
afield-fieldname = 'TSLVT1'.
afield-no_zero = ' '.
afield-reptext_ddic = 'Main G/L Bal.'.
afield-outputlen = 15.
afield-just = 'R'.
afield-currency = l_WAERS.
afield-cfieldname = l_WAERS.
ADD 1 TO l_column.
afield-col_pos = l_column.
APPEND afield TO t_fieldcat.
here how do i set l_waers as the l_waers key will keep changing for every amount .hi,
If i put decimals_out = 2 . it uneccsaarly adding two zero for all the currencies which i wrong. as there are amount with zero decimal values also
mt internal table has a field TSLVT. which will hold many values. and each value shoudl print based on the the currecy.
suppose if it is USD u need to print with decimal points
if it KRW we need to print with out decimals. -
Get transactional currency total based on currency type
hi,
i have created a custom report related to fi which is working fine.
but now the issue is in that report we r having a transaction currency field WRBTR.the users want to calculate totals based on currency.
for example my output is
tran curr curr type
500 inr
600 inr
400 inr
200 usd
500 usd
400 usd
so now the totals shld be calculated based on currncy wise.
i.e we need to get 2 lines in total
1500 inr
1100 usd
Any suggestions in this issue will be helpful.Hi,
Try to fill Field cataloue in the following manner .
then it will summ automatically based on Currency.
lfs_fieldcat-fieldname = 'AMOUNT'.
lfs_fieldcat-tabname = text-022.
lfs_fieldcat-CFIELDNAME = 'CURRENCY'.
lfs_fieldcat-col_pos = '1'.
APPEND lfs_fieldcat TO t_fieldcat.
lfs_fieldcat-fieldname = 'CURRENCY'.
lfs_fieldcat-tabname = text-022.
lfs_fieldcat-col_pos = '2'.
APPEND lfs_fieldcat TO t_fieldcat.
Regards.
Eshwar. -
Currency key for Conversions using NODIM
Hello Experts,
I have question related to Currency key.
I have below mentioned scenario -
My Report output looks something like this
Doc No|Doc Value| 500 |USD |
so KF value and currency key(USD) are in seperate fields(column in Bex Report)
I seperated them by doing NODIM on KF and including the Currency key in Report.
The problem arise when I do currency conversion.
So on the initial Selection screen I gave user an option to run by different currency, so when he select lets say CAD.
The KF does get converted from USD to CAD but my currency key still remains a USD, whereas I would like to show that one based on what user entered on initial Selection screen(which would be CAD in this case).
I have searched forum for this but couldn't find proper solution.
Any guidance is appreciated. Thanks in advance.
Regards,
DNPHi friend
If you are working on UAE, the country grouping have to use is 99.
Check with your FI guy that he had assigned the currency AED to your company code. You can view this in table V_T001.
When you define the personel area, do give country as AE in table T500P
You can default your currency as per pays Scale type and Pay scale area in table V_T510F_B selecting country grouping 99.
I hope this will resolve your problem.
Regards
Santhosh.S -
Message no. M8584 ''Enter a currency key'' in MIRO
Hi Gurus,
Infact I am facing a warning message while doing MIRO. Just after inputing MIRO header like Doc date, Posting date, Reference and lastly amount field when I press the enter, I get the above cited warning error. Can you please tell me how to remove this warning error message.
Thanks
BABAHI,
It sounds like your system is operating according to design. System behaviour changed with note 982645.
The message always comes if you enter header data into miro BEFORE entering PO number and hitting ENTER. It comes even then if you enter header data and PO but press ENTER only afterwards! This is because the check of existence of currency key in the coding happens before the determination of the currency key from the PO. At the time the data are not determined from the PO, the system cannot know whether there will be a PO entry as in MIRO you can post also without a PO reference.
To eliminate the message is to enter the PO first then all other relevant data.
To get rid of this behaviour please implement SAP Note 1001420. This note just deletes new coding.
Please assign points if it useful.
Regards
Ravinagh Boni -
I have created a ZTABLE- having amount field and currency/qunatity field as WAERS and tcurc as reference table.
Created a structure where i created zwaers as field and currency and quantity fields as ZWAERS and my structure name as reference table--it worked
Now the problem is
When I loading into DSO- I have mapped amount to 0amount and Zwaers to 0currency- i also had the transforations for DSO and CUbe
When I tirgger DTP, I am unable to load the data
When I checked in the error stact " keyfigure <> 0 not allowd for unit" and my currency field is blank in the Cube.
I also tried in making the currency key as constant USD which didnt worked
Please help me out with thishi,
Check the unit associated with the amount field, either it is bringing incorrect value or no value. If amount field is filled and no unit value is coming in the unit field it would give an error like yours. Assign constant to the unit field and then load.
regards,
Arvind, -
Page-based localization currency not working in crystal report.
Hi,
I was trying to test out the page-based localization. [https://boc.sdn.sap.com/node/8501|https://boc.sdn.sap.com/node/8501]. All is well datetime, numeric formatting but the currency symbol is not changing. It always get the symbol in the regional settings.
(1) How do i fix this?
(2) Is there any efficient way to customize the symbol in crystal programatically?
-kreiA good place to start is with the basics.
See the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement]
Step 2 Asking Your Question; Provide Enough Information
From the help file link you provided, I assume you are using CR 2008, but please confirm.
Also, let me know the following:
1) Version of .NET used
2) What CR Service Pack(s) have been applied
3) Is this happening on your development system, or after you deploy the project?
4) What is the OS this is happening on?
5) What is the specific currency symbol you are seeing the issue with?
6) Do you see the issue with any other currency symbols?
Ludek -
Hi friends,
I am facing problem with date and currency format while uploading data through BDC.
Plz. tell me how to handle the problems related to Date and amount format.
Thanks in AdvanceDear Punit,
This is a common problem, when carrying out BDC.
For example, while recording you met with the 2 fields --> MSEG-DMBTR (Curr) and MSEG-MENGE(Quantity).
Go to SE11 --> MSEG --> Search for DMBTR --> Double click on the Data Element i.e. DMBTR --> Double Click on the domain WERTZ --> You can see under the block Output Characteristics : Output Length = 16.
While declaring the TYPES Structure, make it CHAR(16).
Similarly for MENGE --> Data Element : MENGE_D --> Domain : MENGE13 --> Output Length = 17.
Make it CHAR(17).
For Date field ---> CHAR(10).
Consider this technique as the Rule-of-Thumb while doing BDC.
Regards,
Abir
Don't forget to award points *
Maybe you are looking for
-
SharePoint 2010 Site Web Analytics - Top Pages report not showing complete data
Hi, I have a custom page in a team site which takes list ID as an argument and shows the relevant data e.g. ../Dashboards/View%20Briefing.aspx?BriefingID=1078 ../Dashboards/View%20Briefing.aspx?BriefingID=1079 etc When i look at the Top Pages report
-
How do i add an event to the calendar of my ipad?
Just purchased a new IPAD, 1st time user. How do i add an event to the calendar of my ipad? i do not have a "+" symbol.
-
How can I change the format when I convert pdf to excel? My document transfers but
everything is in one column. This prevents me from sorting any of the data. Can you help?
-
ITunes' Skip Count only works with some of my iPods
iTunes does not count songs skipped on my 1st generation Nano, 2nd generation Nano, or iPhone. It does count songs skipped during play on my computer or from my 1st generation Shuffle. When I took my 1st generation Nano to the Apple Store they got iT
-
HOW TO INTEGRATE BPEL PROCESS MANAGER(10.1.3.3) WITH ACTIVEDIRECTORY
Hi, I have successfully integrated BPM of version 10.1.3.1.0 with Active Directory.When i tried the same procedure for the latest version it didnt work.Please guide me in this issue. Regards Srinivas