Hi Everyone,
I am facing an issue when ever i am writing a WRITE TO statement. my requirement is as follows.
4563 JPY will be stored in the database table BSEG as 45.63. But when this values is displayed on the screen (like FB03), system will internally convert back and display 4,563 JPY. in one of my subroutine of the program while populating the output amount value(WRBTR) is being fetched from BSEG table and moved to output internal table based on currency(PSWSL).
WRITE wa_bseg-wrbtr TO wa_output-amount CURRENCY wa_bseg=pswsl.
the WRITE TO statement with CURRENCY is being written so that the system will internally convert back and shown in proper format in FB03.
after PPV reclassification, the amount 324 JPY is posted as 3 under one GL account. I need to implement the same WRITE TO CURRENCY to display in proper format. i tried to write in as follow.
WRITE wa_bseg-wrbtr TO wa_currentamount-amt_doccur CURRENCY wa_bseg-pswsl.
but it is throwing an error saying amt_doccur should be of type I,C,N
details of field amt_doccur(data type : DEC, no of char: 23, decimal:4, total length: 30) where as details of field wa_bseg-wrbtr is (data type: CURR, no of char:13, decimal : 2 total length : 16). how to avoid this error. or is there any function module which can convert the data type from CURR to DEC.
Kindly suggest some solution.
Thanks & Regards
PRN