cancel
Showing results for 
Search instead for 
Did you mean: 

OBJECTS_OBJREF_NOT_ASSIGNED_NO

Former Member
0 Kudos

Hello Experts,

Request you to kindly help me to avoid the dump due to exception 'CX_SY_REF_IS_INITIAL'

Error analysis

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not

caught in procedure "WDDOAPPLICATIONSTATECHANGE" "(METHOD)", nor was it propagated by a

RAISING clause.

Since the caller of the procedure could not have anticipated that the exception would occur, the current program is terminated.

The reason for the exception is:

You attempted to use a 'NULL' object reference (points to 'nothing') access a component.

An object reference must point to an object (an instance of a class) before it can be used to access components.

Either the reference was never set or it was set to 'NULL' using the CLEAR statement.

Here is my code where the dump occurs.

DATA lo_controller TYPE REF TO if_wd_component.

DATA lo_message_manager TYPE REF TO if_wd_message_manager.

TRY.

lo_controller ?= wd_this->wd_get_api( ).

CATCH cx_sy_move_cast_error.

ENDTRY.

>>>> DUMP Occurs at this point >>>>CALL METHOD lo_controller->get_message_manager

RECEIVING

message_manager = lo_message_manager.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Experts,

>

> Request you to kindly help me to avoid the dump due to exception 'CX_SY_REF_IS_INITIAL'

>

> Error analysis

> An exception occurred that is explained in detail below.

> The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not

> caught in procedure "WDDOAPPLICATIONSTATECHANGE" "(METHOD)", nor was it propagated by a

> RAISING clause.

> Since the caller of the procedure could not have anticipated that the exception would occur, the current program is terminated.

> The reason for the exception is:

> You attempted to use a 'NULL' object reference (points to 'nothing') access a component.

> An object reference must point to an object (an instance of a class) before it can be used to access components.

> Either the reference was never set or it was set to 'NULL' using the CLEAR statement.

>

> Here is my code where the dump occurs.

>

> DATA lo_controller TYPE REF TO if_wd_component.

> DATA lo_message_manager TYPE REF TO if_wd_message_manager.

>

> TRY.

> lo_controller ?= wd_this->wd_get_api( ).

> CATCH cx_sy_move_cast_error.

> ENDTRY.

>

> >>>> DUMP Occurs at this point >>>>CALL METHOD lo_controller->get_message_manager

> RECEIVING

> message_manager = lo_message_manager.

are you sure that the call method is called after the try..catch block.

Seems that lo_controller is initial.

You could build a if ..endif construct around like shown below to avoid runtime exception.

if lo_controller is bound.

CALL METHOD lo_controller->get_message_manager

RECEIVING

message_manager = lo_message_manager

endif.

Former Member
0 Kudos

Hello Baskaran,

Thanks for your reply.

I have overcomed the dump caused due to the exception. However a new problem araises causing the navigation not resuming to the default view. Also note that, WDA is integrated with the portal.

Details:

On the left hand side(LHS) navigation, we have two nodes - VAW and New Vendor Appln. When i click on VAW, i have four tabs - My appln, My Apvl, Vendor Creation and search.

When i click on any tab other than first tab and go to New Vendor Appln(LHS) and again return to the VAW(LHS), it has to return to first tab by default. But it is showing the last clicked tab.

Also note that, WDA is integrated with the portal.

Thanks,

Ganesh.

Former Member
0 Kudos

Hi ,

Seems to me that you are struggling with suspend and resume functionality. If my assumption is correct then in the portal environment providing suspend and resume plugs in wda would be enough to realize this.

It is complex such a way that you explained. Try to go back to the design table and re think about your approach.

vineetrrakesh
Explorer
0 Kudos

Hi,

You should check your design but i think you still have a chance to fix it.

In your view you would be having a Tabstrip UI element, Bind the property "Selected Tab" to a Node/ Attribute (of type Char20).

Now in your Window you can put some code in method "HANDLE_DEFAULT" to reset the above mentioned Node/ Atribute with the first Tab. This method will get called everytime you try to access your applications UI.

But as suggested by Bhaskaran, you can check your design also. Choice is yours!

Hope this will be of any help for you.

Regards

Vineet

Former Member
0 Kudos

DATA lo_controller TYPE REF TO if_wd_controller.

Please change your declaration.