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

Catching error Dynpro_field_conversion to avoid dump....

Former Member
0 Likes
1,215

Hello Giris,

I have a custom dialog program with some fields on screen. Now when user enters the custom dialog program, the program reads data from custom table and populates the data in those fields.

There are instances when the data in the custom table is bad data (incrrect datatypes). So program gives Dynpro_field_conversion error dump. I don't want this dump to happen but program to catch this error and populate the screen fields with no values.

How can I catch Dynpro_field_conversion error and avoid dump ?

Regards,

TS.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
971

HI T S,

At the INITIALIZATION or Screen Events section, use TRY CATCH ENDTRY Block  to catch the error dump, and send a custom message.

5 REPLIES 5
Read only

Former Member
0 Likes
971

When you say bad data is the values with negative sign?

Read only

Former Member
0 Likes
972

HI T S,

At the INITIALIZATION or Screen Events section, use TRY CATCH ENDTRY Block  to catch the error dump, and send a custom message.

Read only

0 Likes
971

But whats the system exception that I can use between TRY CATCH ENDTRY during screen initialization so that I can give custom message for DYNPRO_FIELD_CONVERSIOn error.

Read only

0 Likes
971

The exact exception is the one on the dump error, or, you can catch the root exception.

TRY

   " your code

CATCH cx_root.

   " your error message

ENDTRY.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
971

The elegant way is to map the screen field types with db field types.