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

facing wrong type error

Former Member
0 Likes
276

Hi, by using the following class, I am not getting the value in ls_record. throughing the exception..

can anyone tell me, what is the wrong here?

DATA: ls_record TYPE p5139.

DATA:ls_activity TYPE rcf_s_list_activities_x.

ls_activity-activity = gs_activity_list-activity .

IF gs_activity_list-act_type = '2010'.

TRY.

CALL METHOD ls_activity-activity->get_record

EXPORTING

p_db_image = lv_bool

IMPORTING

record = ls_record.

CATCH cx_hrrcf_infotype_operation .

ENDTRY.

1 REPLY 1
Read only

matt
Active Contributor
0 Likes
255

Use

DATA: lo_ecx TYPE REF TO cx_hrrcf_infotype_operation.
...
CATCH cx_hrrcf_infotype_operation INTO lo_exc.

The exception object contains many attributes that you can look at to find the exact cause of the failure. E.g. MESSAGE_CLASS and MESSAGE_NUMBER

matt