Alpha statement using function module in SAP ABAP (7.4+).
Refer- Alpha without function module
* CONVERSION_EXIT_ALPHA_INPUT is used to add the leading zero's.
* CONVERSION _EXIT_ALPHA_OUTPUT is used to remove the leading zero's.
Report
REPORT zab_rp_alpha_fm.
DATA: lv_var1(10) TYPE c VALUE '12345',
lv_var2(10) TYPE c VALUE '0000012345'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lv_var1
IMPORTING
output = lv_var1.
WRITE: lv_var1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = lv_var2
IMPORTING
output = lv_var2.
WRITE:/ lv_var2.
Output
******************************Thank You***************************
Comments
Post a Comment