Application Development 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: 

Function modules

Former Member
0 Kudos

Hi ,

Could any one telme what the below fms do with an example :

CONVERSION_EXIT_ALPHA_INPUT

CONVERT_DATE_TO_EXTERNAL

CONVERT_DATE_TO_INTERNAL

CONVERSION_EXIT_MATN1_INPUT

CONVERSION_EXIT_AENNR_INPUT

Your answers would be rewarded with points if helpful..

Thanks in advance,

Vishwanath.

3 REPLIES 3

Former Member
0 Kudos

Hi

used for conversting using field conversion

CONVERSION_EXIT_ALPHA_INPUT

CONVERSION_EXIT_ALPHA_outPUT

These are used for converting the fields from their internal format to external or vice versa

CONVERT_DATE_TO_EXTERNAL

CONVERT_DATE_TO_INTERNAL

for example data is stored in SAP YYYYMMDD

where as we enter as DD.MM.YYYY so the two are used for that

similarly most of the fields in SAP have conversion routines/exits

like if MATNR is 18 char field if we wants it full 18 char when its value is just 8 char we may use that

similar thing with other fields

CONVERSION_EXIT_MATN1_INPUT

CONVERSION_EXIT_AENNR_INPUT

Regards

Anji

Former Member
0 Kudos

Hi,

CONVERSION_EXIT_ALPHA_INPUT - Put leading zeroes for the given input. Check the FM documentation for details.

CONVERT_DATE_TO_EXTERNAL - Converts the date from internal format (YYYYMMDD) to the user settings format. (Like MM/DD/YYYY)

CONVERT_DATE_TO_INTERNAL - Converts the date from external format (Like MM/DD/YYYY) to the internal format (YYYYMMDD).

CONVERSION_EXIT_MATN1_INPUT - Converts the material number according to the settings in SPRO.

CONVERSION_EXIT_AENNR_INPUT - Not sure about this.

Thanks

Naren

Former Member
0 Kudos

Hi

FU <b>CONVERSION_EXIT_ALPHA_INPUT</b> 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.

<b>CONVERT_DATE_TO_EXTERNAL</b>Conversion: Internal to external date (like screen conversion)

CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'

  • EXPORTING

  • DATE_INTERNAL = SY-DATUM

  • IMPORTING

  • DATE_EXTERNAL =

  • EXCEPTIONS

  • DATE_INTERNAL_IS_INVALID = 1

  • OTHERS = 2

.

<b>CONVERT_DATE_TO_INTERNAL</b>Konvertierung: externes in internes Datum (entspricht der Dynprokonvert.)

CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'

EXPORTING

date_external = gwa_input-sdate

ACCEPT_INITIAL_DATE =

IMPORTING

date_internal = lv_sdate

EXCEPTIONS

date_external_is_invalid = 1

OTHERS = 2.

<b>CONVERSION_EXIT_MATN1_INPUT</b>Function Module for Material Number Conversion (INPUT)

CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'

EXPORTING

input = NO

IMPORTING

OUTPUT = matnr.

<b>CONVERSION_EXIT_AENNR_INPUT</b>Conversion exit Engineering Change Mgmt

call function 'CONVERSION_EXIT_AENNR_INPUT'

exporting

input = change_no

importing

output = akt_aennr.