cancel
Showing results for 
Search instead for 
Did you mean: 

Assistance class not instantiated in the component controller of an ABAP WD

Former Member
0 Kudos

I have a very weird problem when trying to launch an ABAP webdynpro I get a short dump, looking into it the assitance class does not get instantiated properly so it falls over. It used to work, but I don't think I have substantially changed anything with the assitance class just on the layout, although something must have changed.

In the constructor of the component controller it trys to cast (I think that is the correct term) the assistance class from the compoent controller as below, Me->f_Alter_Ego->assistance_class is initial so that fails, it then tries to create the assistance class and falls over on create object Me->f_Assist.

try.

Me->f_Assist ?= Me->f_Alter_Ego->assistance_class.

catch cx_sy_move_cast_error. "#EC NO_HANDLER

endtry.

if not Me->f_Assist is bound.

create object Me->f_Assist.

endif.

Extract from the short dump below.

What happened?

Error in the ABAP Application Program

The current ABAP program "/1BCWDY/4LYS0NWZ8L8ENKKA93YQ==CP" had to be

terminated because it has

come across a statement that unfortunately cannot be executed.

The following syntax error occurred in program

"ZCL_WD_USER_MAINT=============CP " in include

"ZCL_WD_USER_MAINT=============CM004 " in

line 7:

"You can only use "class=>method" with static methods."

" "

" "

" "

Other ABAP web dynpros in our system are fine.

I have tried the obvious stuff like removing the assitance class from the WD component and putting it back in again.

There is obviously somehting I am missing can anyone point me in the right direction or has experienced this before?

Thanks,

Tim

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I think the error message pretty much tells the whole story. I'm assuming that ZCL_WD_USER_MAINT is your assistance class. It has a syntax error in it. You will need to correct the syntax error that is listed.

Former Member
0 Kudos

Thanks Thomas,

I could not see the wood for the trees on that one, I had syntax checked the assitance class ZCL_WD_USER_MAINT, however, that error would have been raised at runtime.

Anyway all sorted now.

Cheers,

Tim

Answers (0)