cancel
Showing results for 
Search instead for 
Did you mean: 

Currency dependent amount fields

Former Member
0 Kudos

Hi,

Is there any way in Interactive forms (ISR), by which we can control the format of the amount as per the currency selected.

For example, decimals are not allowed in cae of Japan and Poland unlike other countries.

At R/3 side, this can be done for an amount field with reference to a currency.

In SFP at the interface level, there is a currency/ Quantity option. can this be used in any way for the Interactive forms?

Thanks and Regards,

anto.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Anto,

You can use following code for displaying currency in correct format,

SELECT SINGLE *

INTO ls_tcurx

FROM tcurx

WHERE currkey = cur_key.

IF sy-subrc NE 0.

lv_currdec = 2.

ELSE.

lv_currdec = ls_tcurx-currdec.

ENDIF.

lv_ansal = lv_ansal * 10 ** ( 2 - lv_currdec ).

Hope this will solve your problem.

Message was edited by:

Amit

Answers (1)

Answers (1)

Former Member
0 Kudos

HI Antony,

1. For dynamic format, you can use Format command in formcalc.

2. for fixed format give display pattern.

Thanks and Regards,

Pavan Meda

Former Member
0 Kudos

Hi,

The requirement is - The user is entering the value and depening on the pre-selected currency, the value gets formated and the corresponding error message needs to be generated (if the user entry is in the wrong format).

If there is any standard script, please share. so that the amount field will get formatted correctly as per the currency seleted at run time.

I can't use display pattern here for sure.

Kindly help.

Thanks and Regards,

Anto.