Application Development and Automation 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: 
Read only

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT

Former Member
0 Likes
7,947

Hello all,

we see this conversion

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT

almost everywhere in SAP

where we convert Kunnr or other data types....

This is a C function call!!!

And its not a catchable exception:)

İs it really worth to use this one?

İs it better to write your own

My question goes what are the statements in ABAP that can not be catched by exception handling?

*try.

*    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

*      EXPORTING

*        INPUT  = LV_RAMNO

*      IMPORTING

*        OUTPUT = LV_VBELN.

*CATCH cx_root.

*ENDTRY.

6 REPLIES 6
Read only

Former Member
0 Likes
5,229

Hi,

in ABAP keyword docu you can find catchable and non-catchable exceptions for the keywords.

Look for example at keyword docu for OPEN DATASET.

Regards,

Klaus

Read only

0 Likes
5,229

Hi Klaus

Thank you

Yes yes in the documentation its states either its catchable or non-catchable

I start to think that the non-catchable ones are the old code or

C function calls or operating system calls

But is not it dangerous to have a code you cant catch?

Theres nothing worse then presenting dump to users

Read only

0 Likes
5,229

Hi Solen,

I don't think the non-catchable exceptions are older but heavier, so there might be no way to catch them because of theit importance.

Regards,

Klaus

Read only

0 Likes
5,229

Hi Solen,

we never had trouble with FM and C module CONVERSION_EXIT_ALPHA_INPUT in our systems.

I think it's a C module, because it is called tons of time a day and I think it's much faster than an ABAP solution.

Regards,

Klaus

Read only

0 Likes
5,229

hi Solen

To this function, there also are some general exception can be catch, like CX_SY_DYN_CALL_ILLEGAL_TYPE. this function will never raise other specical

exception, so SAP didn`t set 'EXCEPTION' parameter.

DATA: input TYPE i ,
          output TYPE c LENGTH 25.

START-OF-SELECTION.
  input = 5.
  TRY.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = input
        IMPORTING
          output = output.
    CATCH cx_sy_dyn_call_illegal_type.
      WRITE: 'wrong type'.
      EXIT.
  ENDTRY.

holp it works for you.

Regards,

Archer

Read only

0 Likes
5,229

Hi Dengyong

Thats a great knowledge

Thanks for that

My dump was due to this:

try the code below

DATA: INPUT TYPE NEWKO ,

           OUTPUT TYPE VBELN.

  INPUT = 'FC/1233/123'.

   TRY.

       CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

         EXPORTING

           INPUT  = INPUT

         IMPORTING

           OUTPUT = OUTPUT.

     CATCH CX_SY_DYN_CALL_ILLEGAL_TYPE.

       WRITE: 'wrong type'.

       EXIT.

   ENDTRY.

THis gives a dump field too short dump

but if you change the value to

FC/123 only

it works!!!

i tried to catch this one