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,214

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
970

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
970

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

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.

Read only

0 Likes
970

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
970

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
970

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