Function to know Decimals Currency
I want to some function to know decimals currency, or format an input with a specific currency format.
e.g.
input 1234,5678 and USD
output 1234,56 or 1234,57
Thanks and Regards,
Sebastian
Hi,
Following are FM with respect to Currency,
CONVERT_TO_FOREIGN_CURRENCY Convert local currency to foreign currency.
CONVERT_TO_LOCAL_CURRENCY Convert from foreign currency to local currency
CONVERT_AMOUNT_TO_CURRENCY Convert an amount from a currency to another (exchange rate taken from database tables)
CONVERT_CURRENCY_BY_RATE Convert an amount from a currency to another, according to the passed exchange rate
BAPI_CURRENCY_CONV_TO_EXTERNAL Conversion of Currency Amounts into External Data Format
BAPI_CURRENCY_CONV_TO_INTERNAL Conversion of Currency Amounts into Internal Data Format
Thanks & regards,
Shreemohan
Similar Messages
-
Normalization function & number of decimals
While using the normalization function within Q. Designer to calculate share of markets, I can't seem to be able to set the number of decimals. It sets it automatically to 3 numbers after the comma...
I've tried to make reference to it in a new formula, scaling factor, dimension free, etc..
Is it normal?
A.Hi Alex,
Seems like it's the original format in BEx, we can't change the number of decimals. It's like the currency code which is always displayed next to the numbers.
Maybe what you can do, it's to change the format in excel or create a workbook.
Hope this helps.
Cheers,
Mona -
Function Module to convert currency
Hi all,
I need to convert all currency to 'EURO'.Could you please anybody help me in this regard.whather is there any function module?.
Regards.
Reddy Prasad.HI,
Please try this .
FWOS_CURRENCY_DECIMALS_READ :All the currency amounts are stored in SAP tables as CURR(n,2) (the same as DEC(n,2)). So before any arithmetic operation value should be adjusted using the real decimals number for the given currency (stored in TCURX).
Conversion Rates by type and date are stored in TCURR (+factors). Standard type is M. Date is stored in inverted format (the most recent date has the numerically smallest value). ABAP code to convert dates:
convert date p_date into inverted-date w_date.
convert inverted-date w_date into date p_date.
CONVERT_TO_LOCAL_CURRENCY :the only difference between CONVERT_TO_LOCAL_CURRENCY and CONVERT_TO_FOREIGN_CURRENCY seems to be the following:
Foreign currency is TCURR-FCURR (From Currency)
Local Currency is TCURR-TCURR (To Currency)
So result will be slightly different for the both functions (two rates stored in the TCURR: e.g. JPY->USD rate is 0.00880, USD->JPY rate is 122.00000). Better to use CONVERT_TO_LOCAL_CURRENCY, because multiplication is more exact operation than division.
CONVERT_TO_FOREIGN_CURRENCY :Both conversion functions can return also selected rate and factors
reward all helpfull answers,
regards .
Jay -
Function for post foreign currency valuation (F-05)
Hi,
I need a function module, BAPI, method or any other way, that help me to post a FI document (including all associated documents), as if we were working on the transaction F-05.
We really need to do postings affecting only the strong/hard currency with a more efficient method of updating than the batch-input.
Any help is welcome.
Thanks in advance.
Best regards,
Mayra.Dear Srinivas,
You're right, it works!!!... at this time the functional area are testing the proposal, however, I see another issue, and is as follows:
The table below shows some differences which I have to resolve remaining identical, have any suggestions on this?.
FI DOCUMENT
PART
TABLE-FIELD
TX. F-05
TX. SE37: BAPI_ACC_DOCUMENT_POST
HEADER
BKPF-WWERT
NO VALUE
WITH VALUE: POSTING DATE
HEADER
BKPF-KURSF
NO VALUE
WITH VALUE: EXCHANGE RATE
LINE ITEM
BSEG-VALUT
NO VALUE
WITH VALUE: REGISTRY DATE
|LINE ITEM | BSEG-HWMET | WITH VALUE: "E" | NO VALUE |
Thanks again!!!
Best regards,
Mayra. -
Function o know the value of nth column of a query
Hi,
I want to create a function where the input will be some sql statement (select statement) and the output will be the the value of 2nd column(or say nth column) knowing only column position (say 2 or 3 or n)
I know this is possible through DBMS_SQL but do not know how.
Please let me know how to do this.
Regards
SurendraI'm not sure to understand as well, but you could read the following doc, especially the example 8 which seems to be close of what you want to do :
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sql.htm#i997238
Nicolas. -
Function module to convert currency to USD
Hi All,
I need the function module to convert the currency to USD and the mandatory fields to be passed to the function module.
Thanks & Regards
Sureshhi,
Working With LSMW:
Use TCODE LSMW
Objects of LSMW:
Project ID with max of 10 char to Name the data transfer project.
Subproject Used as further structuring attribute.
Object ID with max of 10 Characters, to name the Business object .
Project can have multiple sub projects and subprojects can have multiple objects.
Project documentation displays any documentation maintained for individual pop ups and processing steps
User Guide: Clicking on Enter leads to interactive user guide which displays the Project name, sub project name and object to be created.
Object type and import techniques:
Standard Batch / Direct input.
Batch Input Recording
o If no standard programs available
o To reduce number of target fields.
o Only for fixed screen sequence.
BAPI
IDOC
o Settings and preparations needed for each project
Preparations for IDOC inbound processing:
Choose settings -> IDOC inbound processing in LSMW
Set up File port for file transfer, create port using WE21.
Additionally set up RFC port for submitting data packages directly to function module IDoc_Inbound_Asynchronous, without creating a file during data conversion.
Setup partner type (SAP recommended US) using WE44.
Maintain partner number using WE20.
Activate IDOC inbound processing.
Verify workflow customizing.
Steps in creating LSMW Project:
1) Maintain attributes choose the import method.
2)Maintain source structure/s with or without hierarchical relations. (Header, Detail)
3) Maintain source fields for the source structures. Possible field types C,N,X, date, amount and packed filed with decimal places.
Fields can be maintained individually or in table form or copy from other sources using upload from a text file
4) Maintain relationship between source and target structures.
5) Maintain Field mapping and conversion rules
For each Target field the following information is displayed:
o Field description
o Assigned source fields (if any)
o Rule type (fixed value, translation etc.)
o Coding.
o Some fields are preset by the system & are marked with Default setting.
6) Maintain Fixed values, translations, user defined routines Here reusable rules can be processed like assigning fixed values, translation definition etc.
6) Specify Files
o Legacy data location on PC / application server
o File for read data ( extension .lsm.read)
o File for converted data (extension .lsm.conv)
7) Assign Files to defined source structures
8) Read data Can process all the data or part of data by specifying from / to transaction numbers.
9) Display read data To verify the input data being read
10) Convert Data Data conversion happens here, if data conversion program is not up to date, it gets regenerated automatically.
11) Display converted data To verify the converted data
Import Data Based on the object type selected
Standard Batch input or Recording
o Generate Batch input session
o Run Batch input session
Standard Direct input session
o Direct input program or direct input transaction is called
BAPI / IDOC Technique:
IDOC creation
o Information packages from the converted data are stored on R/3 Database.
o system assigns a number to every IDOC.
o The file of converted data is deleted.
IDOC processing
o IDOCS created are posted to the corresponding application program.
o Application program checks data and posts in the application database.
Finally Transport LSMW Projects:
R/3 Transport system
o Extras ->Create change request
o Change request can be exported/imported using CTS
Export Project
o Select / Deselect part / entire project & export to another R/3 system
Import Project
o Exported mapping / rules can be imported through PC file
o Existing Project data gets overwritten
o Prevent overwriting by using
Import under different name
for more information follow this link.
http://help.sap.com/saphelp_nw04s/helpdata/en/87/f3ae74e68111d1b3ff006094b944c8/content.htm -
Function to get the currency from the user profile
Hi everyone,
Is there a funciton module that returns a currency using user's countryHi Ella,
Check out the below Function Module.
CONVERT_COUNTRY_CURRENCY
Thanks,
Chidanand -
Diplay Functional,Reporting and Local currency
Hi,
I've a requirement to display Transactions in functional,Reporting as well as in Local currency.Do I need to setup Oracle 11i Env in MRC for that?If so how to get the transactions displayed in Local cuirrency ?Do I need to Covert them or I've to create new set of books for the same like we create one for reporting currency?
This requirement is for 11.5.10.2 as well as R12
Thanks,
Mahender
Edited by: user518071 on Jul 30, 2010 6:20 AMHi
You need to do the following
In 11i
1. You need to set up Reporting Set of Books to get the transactions and reports in Reporting currency for Local Currency, Functional Currency.
2. If your Functional Currency is USD, Reporting Currency is EUR and Local Currency is AED, then you need to set Main SOB in USD and Reporting SOB in EUR and AED.
In R12
1. You can set Reporting currency if you need the transactions and reports in Reporting currency provided Chart of Accounts, Calendar and Convention is same.
If your Functional Currency is USD, Reporting Currency is EUR and Local Currency is AED, then you need to set Main SOB in USD and Reporting SOB in EUR and AED.
2. If the requirement is not only currency but you need for a different Calendar or COA or Accounting convention, then you need to set a Secondary Ledger
Hope this helps
Regards
Sivakumar -
Is there any tables or function modules for getting currency units.
Hi,
I am working in smartforms.My requirement is I want to print the russian currency.
For example if there is 100,25 .I want to get 100 rub 25 kop ( kopecks) like paises for INR.
Thanks,
Saravanakumar V.Hi
Try to use this code
Write a FM like ZSPELL_AMOUNT
IMPORTING
*" REFERENCE(AMOUNT) TYPE BF_RWBTR
*" REFERENCE(IND) TYPE CHAR1 DEFAULT 'X'
*" EXPORTING
*" REFERENCE(WORD) TYPE IN_WORDS
TABLES: spell.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
language = 'R'
currency = 'RUB'
amount = amount
IMPORTING
in_words = spell.
CONCATENATE spell-word spell-decword INTO word SEPARATED BY space.
ELSE.
data: l_word1(255).
data: l_word2(255).
CLEAR:L_WORD1,L_WORD2.
split spell-word at 'Py'into l_word1 l_word2.
WORD = L_WORD1.
ENDIF.
ENDFUNCTION.
thank You
Surya -
C call function without knowing parameters
I need to write a function that is given a function pointer, and a list of types (integers that represent a type). I can obtain the values to pass to the function pointer, but am wondering how to call it. This needs to happen at run time and i dont know how many arguments i will have. e.g.
void call_function(void (*func)(),int types[],void *args[]){
int i;
for(i=0;types[i]!=0;i++){
// Add this argument
// call the function with the argumentsI just found passing a function pointer was the best way to do something interesting with my WM.
I had a function that selected and called a window tiling function.
But when I started adding multimonitor support, I needed a function that did a few housekeeping bits, then tiled each monitor. It was ugly and repetative until I had the first function pass a pointer to the tiling funtion to the monitor function. The monitor function loops through monitors and calls whichever function it was passed.
But back OT. I may have misread the first time. Are you writing just the calling function, or are you also writing the function that is being passed as a function pointer? If you are only doing the former, you cannot do this. You must call a function with the correct number of arguments - unless it was declared as a variadic function. If you are writing that function to - then see va_args, and you can do this.
In either case - this may be a good place for some inline assembly. May being the operative word there - I do a good bit of C, and have dabbled in assembly, but I've never really combined the two. But as I understand it, you should be able to push your arguments to the stack, then call the function. This is how arguments are passed afterall. -
Function module RFC_READ_RABLE and currency fields
I am using RFC_READ_TABLE to access table BSEG on a remote system. My problem is retrieving field PSWBT which is a currency field. The value is returned as 20202020203.43 and overwrites part of the next field too. The value should be 4,083.33
Does anyone have any experence with currency fields in this situation and can offer any advice?
Thanks & regards.Hi everyone,
Thank you for your help. I have now resolved the issue.
Yes I was using table FIELDS. Wim was correct that I also needed to use field PSWSL but this alone did not solve the problem. I had to define the currency field PSWBT as char 13. When the field was retrieved using RFC_READ_TABLE, I condensed the field and then moved it back to a currency field. As follows:
TYPES : BEGIN OF ty_accdoc,
pswbt(13),
pswsl type pswsl,
END OF ty_accdoc.
DATA : wa_accdoc TYPE ty_accdoc,
i_accdoc TYPE TABLE OF ty_accdoc.
DATA : wa-pswbt TYPE pswbt.
wa_fields-fieldname = 'PSWBT'. APPEND wa_fields TO i_fields.
wa_fields-fieldname = 'PSWSL'. APPEND wa_fields TO i_fields.
u2026u2026u2026 Call function u2018RFC_READ_TABLEu2019u2026u2026u2026u2026
CONDENSE wa_accdoc-pswbt NO-GAPS.
wa-pswbt = wa_accdoc2-pswbt.
Kind regards,
Alison -
Passing enums to functions without knowing the specific enum type
My application needs the function invocation feature by using reflection mechanism. The function parameters are restricted to string, int, float and enums. I am facing problems with enums.
Is there a way to invoke the function by passing specific enum type as parameter to the function.
For eg:
public void doProcess(int i, COLOR.RED){
I should be able to invoke the above function using reflections. How dynamic casting to COLOR can be done is the question here?The application takes XML file as an input. This file has processing instructions. The processing instruction provides data about the class name, function name and parameters specifications like
Classname_FunctionName("String param", 123, COLOR.RED)
The application should invoke the corresponding library function by passing these parameters after assessing the correct types. -
Hi Experts,
I want to know the function module to convert currency in words
for example
24.05 INR as 24 rupees 5 paisa
others wise please tell me the tables in which currency data stored.....for example INR - Rupee , paise....
Regards,
Siva.Hi
TABLES SPELL.
DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
DATA : PAMOUNT LIKE SPELL-NUMBER VALUE '123'.
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.
Or
DATA AMT_IN_NUM LIKE PC207-BETRG.
DATA AMT_IN_WORDS(100) TYPE c.
PARAMETERS: AMOUNT LIKE AMT_IN_NUM.
CALL FUNCTION 'HR_IN_CHG_INR_WRDS'
EXPORTING
amt_in_num = AMOUNT
IMPORTING
AMT_IN_WORDS = AMT_IN_WORDS
EXCEPTIONS
DATA_TYPE_MISMATCH = 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.
WRITE AMT_IN_WORDS.
With Regards
Nikunj Shah -
How to use Special Characters in CONCAT function or another form with Xquer
Hello everyone
I'm using PS3 OEPE within message flow (proxy)and I'm using Xquery.
I'm using the CONCAT function, but this does not allow me to concatenate special characters not allowed, for example:
I want to concatenate these strings:
String1 = “<get-person><id-person&;gt;”
String2 = “123”
String3 = “</id-person&;gt; </get-person>”
I want to represent characters regex. It means no XML characters
Someone knows some way, any function that allows me to concatenate in OSB these values with Xquery?
Edited by: chromosoma on Sep 5, 2012 5:59 PMHi,
It seems to me you're doing things in the most complicated way possible...
Firstly, you should use codepoints-to-string not the reverse... Secondly, the function work with decimals, not hexa
http://www.xqueryfunctions.com/xq/fn_codepoints-to-string.html
http://www.xqueryfunctions.com/xq/fn_string-to-codepoints.html
This works...
concat(codepoints-to-string(38),'lt',codepoints-to-string(59),'get-person')But this also works... Note that I've inserted a space between the & and the lt so the forum formatting can show it...
let
$String1 := "& lt;get-person& gt;& lt;id-person& gt;",
$String2 := "123",
$String3 := "& lt;/id-person& gt;& lt;/get-person& gt;"
return
concat($String1,$String2,$String3)And, finally this also works... So what's the reason for escaping < and > with &lt and &gt; and why codepoints?
let
$String1 := "<get-person><id-person>",
$String2 := "123",
$String3 := "</id-person></get-person>"
return
concat($String1,$String2,$String3)Cheers,
Vlad -
Foreign currency Payment using foreign currency bank account
Hi,
We have the following requirement:
Functional currency : GBP
Bank Account :USD
Need to make payments in CAD
Since the bank account is not in functional currency we are unable to make that multi currency payment enabled. Users do not want to create a functional currency bank account.
Now how to overcome this situation ?Hi, I am referring to paying foreign currency (ap payments) using non functional currency bank accounts. Are you referring to payment or receipts in foreign currency ?
Please refer the in 11i ap guide
1. pg 2-104
"Dening Multiple Currency Bank Accounts
A multiple currency bank account is an account that accepts payments in more than one currency.
If you define a multiple currency bank account for payments, the currency of the bank account must be the same as your functional currency."
2. Payment Formats pg 2-140
" When you define a bank account, you can only allow payment of multiple currency invoices if the bank account currency is your functional currency."
These 2 states that you can pay suppliers in foreign currency only if the bank acct currency through which you are paying is same as functional currency. But my bank account currency is different from functional currency.
Since you say you are doing , I am quite interested to find out more.Can you please let me know your currency setups on the bank and payment format.
Thanks
Maybe you are looking for
-
Where can I find the .exe file?
I'm looking for the .exe file of Acrobat Reader, under which directory can I find it and what is the exact file name?
-
Why do I get a totally blank PDF file whenever I try to convert any (Microsoft Office Home and Student 2010, Version: 14.0.6029.1000) Word document file containing either Mangal Fonts (Hindi) and Tunga Fonts (Kannada) into a PDF file (by using Adobe
-
After updating ios I'm unable to connect with safari, server unavailable what do I do now?
-
Safari 3 (Leopard), Proxy and CPANEL access = crash
Just downright strange.. I host a few sites on a shared linux server with cpanel/whm as the site management platform... Updated to Leopard and now if I access the cpanel through a proxy server, Safari Crashes.. If I access the same sites without goin
-
Problems after Upgrading Sunopsis V3 in ODI
Hello, I have upgraded my old Sunopsis V3 in ODI following the documentation. It was quite easy but a few problems appear now. 1/ When I have tryed to update interfaces, procedures or other objects, a message appears and told me that this object have