cancel
Showing results for 
Search instead for 
Did you mean: 

Access via 'NULL' object reference not possible.

Former Member
0 Kudos

Hi all,

i am displaying data in table.so i changed the cardanility to 0..n.....after changing i am getting below error:

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

And also i am trying to bind table for that i am using wizard....when i am readind that node and selecting table operation.I am not getting that bind statement for table

Thanks

Kiran

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi,

check if u r reading the context node properly via code wizard(Control+F7) to which ur table UI is binded.. other wise it will lead to 'Null' exception ..

regards,

Amit

Former Member
0 Kudos

Hello Amit,

I checked all is fine.when i changed cardinality to 1..n...then its not going in dump.

Thanks

Kiran

Former Member
0 Kudos

Hi Kiran,

When you mention the cardinality 0..n for a context node, that means the context node will have minimum 0 elements and any number of elements at the runtime. So when you read context node using the web dynpro wizard and if you havent filled the context node beforehand, that context node will not have any elements. So if you try to get lead selected element and try to do some operation on that without checking for null, you will get a runtime exception.

When you specify 1..n as the cardinality, web dynpro framework will create one element by default if you havent filled the node.

So trying to get lead selected element and doing something with that will not cause any exception/dump.

Hope you get it now! If you still have doubts, please post the code and explain what you are tyring to achieve.

Best Regards,

Srilatha

Former Member
0 Kudos

Thanks Srilatha....i changed the cardinality to 1..n....now can you help me out for this issue...I am new in coding as well as in WD.Don't know how to loop it

Below is the select statement.Here i am getting values for ls_class_overview-CLASS

but for ls_class_overview-CLINT.....i am getting 0000000.

Scenerio : when i give input as CLASS and enter then description(KSCHL) will come and at the same time another table will get display with all characterstics(ATBEZ) and value (ATWRT) corresponding to i/p CLASS

Below is the select statement.Here i am getting values for ls_class_overview-CLASS

but for ls_class_overview-CLINT.....i am getting 0000000.I only getting Description(KSCHL)

read table lt_class_overview into ls_class_overview index 1.

select single s~KSCHL

into corresponding fields of ls_class_overview

from ( SWOR AS s INNER JOIN KLAH AS k

ON sCLINT = kCLINT

AND k~CLASS = ls_class_overview-CLASS ).

select single ATBEZ from CABNT

into corresponding fields of ls_class_overview

where ATINN = ls_class_overview-CLINT.

select single ATWRT from CAWN

into corresponding fields of ls_class_overview

where ATINN = ls_class_overview-CLINT.

APPEND ls_class_overview to lt_class_overview.

lo_nd_class_overview->bind_table( lt_class_overview )

Former Member
0 Kudos

Hi Kiran,

Did you see the database table entries in SE16??

I would suggest you to see the data in the Database table SWOR with one of the values of field CLASS you have in the context node. Check if CLINT is 0000000 in that data.

Incase DB has data like that, then its the expected output right?

Thanks,

Srilatha