07-04-2007 8:26 AM
Hi Experts
wa_char of type char length 255. Now by some program i am getting 10,000.00 in wa_char.
I had to pass it to a vairable wa_curr of currency type of length 15.
I tried to firs pass to numc type variabl or P type variable then to pass it to wa_curr but ...everytime dump is coming for mismatch....
I think problem is with the comma and dot(10,000.00)..but cant abel to remove it.
Please help.
i will award points to every helpful answer.
thanks.
07-04-2007 8:57 AM
Hello Saurabh,
As far as i have understood,you need to pass a value to a currency field right?.
Try passing the value to a string field and then to a currency field.
If this doesnt work,can you please make ur question clear?
Regards,
Reema.
07-04-2007 8:33 AM
Comma separator or decimals are user specific settings.
Please use :
Get the user settings
SELECT SINGLE DCPFM
FROM USR01
INTO L_F_DCPFM WHERE BNAME = SY-UNAME.
IF NOT <YOUR_CURRENCY_FIELD> IS INITIAL.
CASE L_F_DCPFM.
WHEN 'Y' OR ' '.
REPLACE '.' WITH ',' INTO <YOUR_CURRENCY_FIELD>.
ENDCASE.
ENDIF.
Please revert if any further help.
Enjoy.
Regards,
A.Singh
07-04-2007 8:45 AM
Hi,
You declare the variable in this formate
DATA: WA_CHAR(30).
IF HELPFULL REWARD
07-04-2007 8:52 AM
consider this program, i hope u'll understand the logic
data:
wa_char(255),
wa_amount type dmbtr,
wa_temp type dmbtr.
wa_amount = 10000.
wa_char = wa_amount.
write wa_char.
condense wa_char.
wa_temp = wa_char.
write wa_temp.
07-04-2007 8:57 AM
Hello Saurabh,
As far as i have understood,you need to pass a value to a currency field right?.
Try passing the value to a string field and then to a currency field.
If this doesnt work,can you please make ur question clear?
Regards,
Reema.
07-04-2007 9:05 AM
Please try this
data: w_curr_temp type char15.
wa_curr
write: wa_curr to w_curr_temp currency 'USD'.
it can be USD or EUR.....etc.i.e document currency