cancel
Showing results for 
Search instead for 
Did you mean: 

Convert currency to character in smartforms.

Former Member
0 Kudos

Hi Friends,

I need one solution.

I have 5 currency fields and i wanna print these currencies fields into character format in SMARTFORMS.

How can we do it.

Plz reply me as soon as possible.

Thanks & Regards,

Swapnika

Accepted Solutions (0)

Answers (8)

Answers (8)

Former Member
0 Kudos

hey had u tried my code?

is ur problem solved?

Former Member
0 Kudos

create code lines

and

use like this.

WRITE v_curr to v_char CURRENCY <currency key>

Former Member
0 Kudos

hi swapnika,

u need to print amount in words. is this ur requiremnet?

if s then TAKE A LOOK OF following code.

DATA : W_AMOUNT TYPE PC207-BETRG ,

W_DUTY TYPE IN_WORDS.

MOVE reguh-rwbtr TO W_AMOUNT.

CALL FUNCTION 'HR_IN_CHG_INR_WRDS'

EXPORTING

amt_in_num = W_AMOUNT

IMPORTING

amt_in_words = W_DUTY.

REPLACE 'RUPEES' WITH '' INTO W_DUTY.

REPLACE 'ONLY' WITH '' INTO W_DUTY.

IF WANTMORE HELP LET M KNW..

Former Member
0 Kudos

Hi,

you have to build in some abap logic.

Use Function module

HR_IN_CHG_INR_WRDS

I didn't understand your exact requirements. I hope this is what you need.

If not let me know. There are made a lot of FM for these questions.

Gr., Frank

Former Member
0 Kudos

hi ,

Fist go to the domains of the five fields( i guess in your case all are same), to find out the output length.

then declare a character variables with the respective lengths. then use the write to statement.

In the form you can apply the formatting options to these character variables to have the desired

output.

Regards,

Jayaram

Former Member
0 Kudos

Please clarify whether the character format means amount in words .

Former Member
0 Kudos

HEY TAKE A LOOK OF THIS EX.

DATA : LV_TOT LIKE REGUD-SWNET -


( CHAR 18).

MOVE REGUH-RWBTR TO LV_TOT

WHERE REGUH-RWBTR IS CURR AND LV_TOT IS CHAR 18.

WRITE:

LV_TOT TO REGUD-SWNET CURRENCY REGUH-WAERS.

HOPE THIS WILL HELP.

Former Member
0 Kudos

Hi Swapnika,

One possible solution is to create program lines and then pass the currency fields into some variables of character type and then try to print the character variables.

I hope this woud be helpful.