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: 

Conversion Exit

Former Member
0 Kudos

Hi All,

We have come across an issue that a conversion exit is not working for field LENUM in table LEIN.

can u please suggest the SAP note if any or any solution for the same.

thanks and regrds

2 REPLIES 2

Former Member
0 Kudos

Hi Sunny Suren Chilievru,

It's working.

I tested like this.


DATA : V_CHAR20     TYPE CHAR20 VALUE '1234567890'.

  CALL FUNCTION 'CONVERSION_EXIT_LENUM_INPUT'
    EXPORTING
      INPUT                 = V_CHAR20
    IMPORTING
      OUTPUT                = V_CHAR20
    EXCEPTIONS
      CHECK_FAILED          = 1
      NOT_NUMERIC           = 2
      T344_GET_FAILED       = 3
      WRONG_LENGTH          = 4
      OTHERS                = 5.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  WRITE : /10 'Return value is', V_CHAR20.

  CALL FUNCTION 'CONVERSION_EXIT_LENUM_OUTPUT'
    EXPORTING
      INPUT                 = V_CHAR20
    IMPORTING
      OUTPUT                = V_CHAR20
    EXCEPTIONS
      T344_GET_FAILED       = 1
      OTHERS                = 2.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  WRITE : /10 'Return value is', V_CHAR20.

I got the output as follows;


  Return value is 00000000001234567890
  Return value is 1234567890

It prefixes ZEROs and removes LEADING ZEROs.

Regards,

R.Nagarajan.

0 Kudos

did u test this is ECC 6.0 version??