Thursday, January 11, 2018

Something about conversion exits

I recently need to create a new conversion exit to perform additional data formatting on data that were given to my program on input. I learned few interesting things while working on it.

First of all the conversion exit can’t be just one. Is it is input/output type of thing a system forces you to create two function modules. One for input conversion and other one for output. There is function module called RS_CONVEXIT_EXISTS which existence of the two. Conversion exits can only be used in the ABAP code as long the two exits. If only one exists system will throw error message that conversion exits doesn’t exist.

Secondly there is a fixed naming conversion belonging to the names of the conversion exits. The input one must be called like: 'CONVERSION_EXIT_<>_INPUT' and output one 'CONVERSION_EXIT_<>_OUTPUT'. Prefix ('CONVERSION_EXIT_') and postfix ('_INPUT' and '_OUTPUT') must be given to the function module that will be performing the conversion.

Thirdly all the conversion exits are stored in table FUNCNAME among the rest of the function modules.

Fourthly to get a list of all of the existing conversion exits the module called 

Fifthly name that you insert after the prefix and before the postfix can have up to 5 characters. E.g. CONVERSION_EXIT_MADJ1_INPUT.

Sixthly the conversion exits can be used in BW to populate a date for infoobjects. E.g. in case you need to prefill certain value as a constant while data is being loaded to PSA.

No comments: