Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

write statement - currency

Former Member
0 Likes
3,387

Subject changed by moderator to something more meaningful. Please take care in future

Hi,

I want to write the currency using the write statement.. but i am getting the error for the same:

"Use addition CURRENCY when outputting LW_AMOUNT

Use auxiliary field when outputting with MESSAGE"

my statement is :

write : lw_amount.

where lw_amount is type curr having a reference key attached to it..

kindly help me..

Edited by: Matt on Dec 22, 2008 11:01 AM

8 REPLIES 8
Read only

Former Member
0 Likes
1,831

>

> Hi,

> I want to write the currency using the write statement.. but i am getting the error for the same:

>

> "Use addition CURRENCY when outputting LW_AMOUNT

> Use auxiliary field when outputting with MESSAGE"

>

> my statement is :

> write : lw_amount.

>

> where lw_amount is type curr having a reference key attached to it..

>

> kindly help me..

Ur question itself has the answer, marked by me in red.

A simple F1 on write statement wud have given u the solution.

Sap has provided really intensive documantation with examples so try to make use of it.

use as write: lw_amount currency <ur currency key>.

кu03B1ятu03B9к

Edited by: kartik tarla on Dec 22, 2008 3:26 PM

Read only

0 Likes
1,831

and wat if in case i don know wat currency it will be..

Read only

0 Likes
1,831

Well if u want to print u need to know its key,

from where r u getting ur amount, in the same structure or table u'll be getting key of type waers.

кu03B1ятu03B9к

Read only

0 Likes
1,831

hi,

If u r displaying a list, then just move that amount to other field (of type p decimals 2), u can avoid that

error...

in above case i think u r going to print amount and currency.. if that is not the requirement and has to display only amount with out that error... u can use TYPE P.

Rgds.,

subash

Read only

h_senden2
Active Contributor
0 Likes
1,831

use transaction ABAPDOCU and go to Keywords : type WRITE.

Search for the CURRENCY addition

regards

Hans

Read only

abdul_hakim
Active Contributor
0 Likes
1,831

Hi

YOur statement should be framed as below.

WRITE amount CURRENCY 'EUR'.

Cheers,

Hakim

Read only

piyush_mathur
Active Participant
0 Likes
1,831

Hi Neha,

I tried to print one Currency field but did nt get any error.

Below code i tried at my end.

data : w_bet01 like pa0008-bet01.

w_bet01 = 100.

write w_bet01.

Regards,

Piyush

Read only

Former Member
0 Likes
1,831

hi,

WRITE: I_TAB-MENGE UNIT 'EKPO-MENGE'

Try using lw_amount-field UNIT 'USD'.

there will be currency field with amount in any table

thanks