‎2007 Jul 31 10:01 AM
Hi,
I am working on a bdc program where i want to upload anumerical value 1.293,00 .
i have used ' REPLACE ',' WITH space INTO v_wrbtr.
condense v_wrbtr no-gaps.
in the program.But in the o/p when i try to process the session i am getting 1,29300 value and when i try to process it it is giving error as 'enter numeric value'.
can any one tell me how to solve this?
‎2007 Jul 31 10:44 AM
hi,
1. first convert the currecny to Character value using any of the below FM.
HRCM_STRING_TO_AMOUNT_CONVERT
or
PSSV_TEXT_INTO_FIELD_CURRENCY2. then use the below logic.
data: l_amnt(100) type c.
l_amnt = '1,234,567,89'.
replace all occurrences of ', ' in l_amnt with '.'.
write : l_amnt.Regards
Reshma
‎2007 Jul 31 10:04 AM
Hi,
Declare the variable as string or character where you want to store the decimal value . and try to save it.
i hope it works.
Regards,
Srinivas
‎2007 Jul 31 10:08 AM
Hi
Check for the decimal notation by going the path
System->UserProfile->Own data
and modify the way u want the decimal notation
Regards
Sandhya
‎2007 Jul 31 10:22 AM
Hi Sandhya,
None of the decimal notations are working for this .Is there any other method to solve this?
Regards,
Hema
‎2007 Jul 31 10:44 AM
hi,
1. first convert the currecny to Character value using any of the below FM.
HRCM_STRING_TO_AMOUNT_CONVERT
or
PSSV_TEXT_INTO_FIELD_CURRENCY2. then use the below logic.
data: l_amnt(100) type c.
l_amnt = '1,234,567,89'.
replace all occurrences of ', ' in l_amnt with '.'.
write : l_amnt.Regards
Reshma
‎2007 Jul 31 2:24 PM
Hi,
Could u pls give an example how to use these function modules?
It would be very helpful to me if u could help me.
Regards,
Hema
‎2007 Jul 31 11:02 AM
Hi,
try not using the replace and condense statements. What message do you get?
Regards,
Alexandros.
‎2007 Aug 01 1:30 AM
Hi Hema,
I think this is a currency conversion problem. I hope following code will solve your problem.
If wrbtr contains 1.293,00, then v_wrbtr will contain the final value.
DATA : v_wrbtr(16) TYPE c.
WRITE wrbtr TO v_wrbtr CURRENCY bkpf-waers.
Reward points if the answer is helpful.
Regards,
Mukul