‎2013 Oct 31 7:41 AM
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
*try.
* CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
* EXPORTING
* INPUT = LV_RAMNO
* IMPORTING
* OUTPUT = LV_VBELN.
*CATCH cx_root.
*ENDTRY.
‎2013 Oct 31 9:15 AM
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
‎2013 Oct 31 9:30 AM
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
‎2013 Oct 31 9:49 AM
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
‎2013 Oct 31 9:54 AM
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
‎2013 Oct 31 10:00 AM
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
‎2013 Oct 31 11:35 AM
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