cancel
Showing results for 
Search instead for 
Did you mean: 

Access via 'NULL' object reference not possible

Former Member
0 Kudos

Hi,

I have created a simple web dynpro program which add and remove records,

I am also planning on using FPM_OIF_COMPONENT to configure my program, however I wanted to test my code (Actions & methods) by creating a web dynpro application and this is the error I'm getting every time I am trying to login. it didn't work even with a blank view embedded to my window.

you help is highly appreciated.

Thanks

sap/bc/webdynpro/sap/ztest was not called due to an error.

Note

The following error text was processed in the system LR1 : Access via 'NULL' object reference not possible.

The error occurred on the application server and in the work process 0 .

The termination type was: RABAX_STATE

The ABAP call stack was:

Method: PREPARE_NAVIGATION of program /1BCWDY/W626HUHUS4NGX9SADQSK==CP

Method: MODIFY_VIEW_ASSEMBLY of program /1BCWDY/W626HUHUS4NGX9SADQSK==CP

Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/W626HUHUS4NGX9SADQSK==CP

Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP

Method: FIRE_EVENT of program CL_WDR_COMPONENT==============CP

Method: IFWDR_INTERNAL_API~RAISE_EVENT of program SAPLWDR_RG_PROXY_FACTORY

Method: IF_COMPONENTCONTROLLER~FIRE_PREPARE_NAVIGATION_EVT of program /1BCWDY/W626HUHUS4NGX9SADQSK==CP

Method: WDDOBEFORENAVIGATION of program /1BCWDY/W626HUHUS4NGX9SADQSK==CP

Method: IF_WDR_COMPONENT_DELEGATE~WD_DO_BEFORE_NAVIGATION of program /1BCWDY/W626HUHUS4NGX9SADQSK==CP

Method: DO_BEFORE_NAVIGATION of program CL_WDR_DELEGATING_COMPONENT===CP

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Step1: Analyse the code in st22.

Step2: Delete get lead selection and all declared attributes from your code. Just read the node.

Step3: change the cordinality to 0..1 (if there is no records exists, empty screen will show instead of dump)

I hope it solves your problem.

Best Regards

Ravi

Answers (4)

Answers (4)

Former Member
0 Kudos

thanks Ravi Golla, i had a similar error with another action, I changed the cordinality to 0-1

and so far its working fine.

Former Member
0 Kudos

Thanks Prashant, that was really helpful

what i did though is that I generated the popup box through the wizard code and it worked just fine.

uday_gubbala2
Active Contributor
0 Kudos

Hi Abdul,

Try going to ST22 and check from where exactly this error is being triggered. It would help you pinpoint the problematic source more quickly. Check the "What Happened" & "Error Analysis" & "How to correct the error" sections.

Regards,

Uday

Former Member
0 Kudos

Appears to be NULL pointer exception.

This types of error occur in situations like

DATA:

node_utility TYPE REF TO if_wd_context_node,

elem_utility TYPE REF TO if_wd_context_element,

stru_utility TYPE if_v_podetails=>element_utility .

  • navigate from <CONTEXT> to <UTILITY> via lead selection

node_utility = wd_context->get_child_node( name = if_v_podetails=>wdctx_utility ).

  • get element via lead selection

elem_utility = node_utility->get_element( ).

elem_utility end up being NULL

-below statement will give the kind of error----

  • get all declared attributes

elem_utility->get_static_attributes(

IMPORTING

static_attributes = stru_utility ).

so thoroughly check this. Also check if CARDINALITY of the NODE is set 1...N .

Greetings

Prashant