‎2007 Sep 21 7:24 AM
HAI EXPERTS,
my requirement is to use this FM CONVERSION_EXIT_ALPHA_INPUT for conversion of input fields.
i have around 6 fields to convert each with different length , i want to use this FM only once to convert all the 6 fields.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = tablename-fieldname "this part alone i need to input all the fields dynamically
IMPORTING
output = tablename-fieldname. "this part alone i need to input all the fields dynamically
i have to change the input and output names in the fm dynamically.
i need to call this fm in a perform and then change....
can anyone help me on this......
‎2007 Sep 21 7:29 AM
Hi,
Call this FM within a Subroutine.
PERFORM subname changing fieldname.
FORM subname CHANGING fieldname
CALL FUNCTION.
ENDFORM.
using this u can just cal the MF multiple times just replacing the field name in the PERFORM statement.
REWARDS IF HELPFUL!!
‎2007 Sep 21 7:32 AM
hi Basvaraj
what to give for fieldname...
what to give in the input and output in the FM.
thanks
regds
‎2007 Sep 21 7:40 AM
hii
call the perform inside a loop and
pass the value to a temp variable.
pass that temp variable to fm,
clear the variable.
do the same thing again in next loop pass
reward if helpful
vivekanand
‎2007 Sep 21 7:41 AM
‎2007 Sep 21 7:43 AM
OK.. for the fieldname... give the names of the 6 fields u want to change.. like:
PERFORM subname CHANGING field1.
PERFORM subname CHANGING field2.
PERFORM subname CHANGING field3. and so on.
Again give the name that u use within FORM
if you have used
FORM subname CHANGING field.
CALL FUNCTION
IMPORTING
input = field
EXPORTING
output = field.
ENDFORM.
this should work.
REWARDS IF HELPFUL!!
‎2007 Sep 21 7:44 AM
Don't worry about the field length. This is totally based on the declaration of the field. The FM checks for the field type and based on that type it works on the field. So you don't have to worry about the field length.
REWARDS IF HELPFUL!!
‎2007 Sep 21 7:49 AM
u can use a fieldsymbol and try assigning it the required fiedl when needed.
do 6 times.
case sy-index.
when 1.
assign field1 to <fs>.
when 2.
assign field2 to <fs>.
when 3.
assign field3 to <fs>.
when 4.
assign field4 to <fs>.
when 5.
assign field5 to <fs>.
when 6.
assign field6 to <fs>.
endcase.
CALL FUNCTION
IMPORTING
input = <fs>.
EXPORTING
output = field.
endo.
‎2007 Sep 21 7:43 AM
HI,
Perform input_change changing Input1 .
perform input_change changing input2 .
.
.
.
The form statement will be
form input_change changing val1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = VAl1
IMPORTING
output = VAl2.
clear val1.
move val2 to val1.
endform.
Thanks,CS Reddy.
**Please Reward if helpful.
‎2007 Sep 21 7:46 AM
Hi,
declare the fileds as character fields and u can pass like this
perform sub_conversion using field
form sub_conversion field type c
call function 'CONVERSION_EXIT_ALPHA_INPUT'.
IMPORTING
INPUT = field
EXPORTING
OUTPUT = field
endform.
Regards,
Nagaraj