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_INPUT'

Former Member
0 Likes
666

Hi

w_gr_wt_total value is 55,192.900

i want to change to 55.192,900

i am using like this it giving error

w_gr_wt_total = w_gr_wt_total * 100.

IF w_gr_wt_total <> 0.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = w_gr_wt_total

IMPORTING

OUTPUT = w_gr_wt_total

.

plz suggest

2 REPLIES 2
Read only

Former Member
0 Likes
421

Hi Chari,

For this use WRITE

WRITE w_gr_wt_total TO <anyothervariable>

Regards,

Atish

Read only

Former Member
0 Likes
421

Hi

use in this way

REPORT zvcrconversionroutines .

PARAMETERS v_matnr LIKE mara-matnr MATCHCODE OBJECT zmara .

START-OF-SELECTION.

SELECT SINGLE matnr FROM mara INTO v_matnr

WHERE matnr EQ v_matnr.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = v_matnr

IMPORTING

output = v_matnr

.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

input = v_matnr

IMPORTING

output = v_matnr

.

IF sy-subrc EQ 0.

WRITE :/1 v_matnr.

ELSE.

WRITE: /2 'invilad material'.

ENDIF.

reward for use ful points

FU CONVERSION_EXIT_ALPHA_INPUT Conversion exit ALPHA, external->internal

ALPHA conversion is used especially with account numbers. During conversion from the external to the internal format, the system checks to see if input in the INPUT field is purely numeric, that is, if this input consists only of numbers, possibly with spaces before and after them. If this is the case, then the number string is inserted right- justified in the display field OUTPUT and all spaces to the left of the value are filled with zeroes ('0'). If the input is not purely numeric, it is inserted in the display field from left to right and all extra spaces are filled with blanks.

Example:

(Input field and output field are both eight characters in length)

1. '1234 ' --> '00001234'

2. 'ABCD ' --> 'ABCD '

3. ' 1234 ' --> '00001234'

Conversion from the internal to the external format (function module CONVERSION_EXIT_ALPHA_OUTPUT) is undertaken in exactly the opposite manner.

Parameters

INPUT

OUTPUT