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

conversion exit alpha

Former Member
0 Likes
1,153

HI all i have to covert into nternal format as below.




Fields	Internal format	AUFK-WAERS
USER4	8.00	                       INR


Fields	External format	AUFK-WAERS
ZUSER4	800.00	                         INR

how can i do it?

i used conversion_exit_alpha_input but program is dumping.

Regards,

Oorvi

6 REPLIES 6
Read only

Former Member
0 Likes
925

Hi,

Use the WRITE-TO statement.

WRITE var1 to var2

currency AUFK-WAERS.

This should work,

Regards,

Subramanian

Read only

0 Likes
925

hi Oorvi,

try with SHIFT RIGHT by num places statement. where num should be type i.

SHIFT 'yourtext' BY 2 PLACES.

Hope this will help.

Thanks

Tanmaya

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
925

what about multiplying by 100.

Read only

Former Member
0 Likes
925

Hi,

Check this system settings in t-code SU01 --> Default tab --> here you change field Decimal Notation to X 1234567.89

Regards,

Amit Y

Read only

RaymondGiuseppi
Active Contributor
0 Likes
925

Try BAPI_CURRENCY_CONV_TO_INTERNAL.

  MOVE AUFK-ZZUSER4 TO I_AMOUNT_EXT.
  MOVE AUFK-WAERS TO I_SAP_CODE_EXT.
  CALL FUNCTION 'BAPI_CURRENCY_CONV_TO_INTERNAL'
       EXPORTING
            CURRENCY             = I_SAP_CODE_EXT
            AMOUNT_EXTERNAL      = I_AMOUNT_EXT
            MAX_NUMBER_OF_DIGITS = 15
       IMPORTING
            AMOUNT_INTERNAL      = E_AMOUNT_SAP
            RETURN               = L_BAPIRETURN.
  * check RETURN
  MOVE E_AMOUNT_SAP TO AUFK-USER4.

If that don't work, what is the exact definition of ZZUSER4 field.

Regards,

Raymond

Read only

Former Member
0 Likes
925

As per my understanding , nothing is required in your case. as the currency key will adjust this representation of currency.

So, may be the internal and external format are diff but when you will use in your program , you will get the exact value of currency that was entered.System will automatically take care of this conversion.