cancel
Showing results for 
Search instead for 
Did you mean: 

How to set value for table lines in web dynpro ?

Former Member
0 Kudos

Hi experts,

I'm new in webdynpro. My requirement is to set value to the second line when user press expand on first line.

In method ONACTIONLOAD_CHILDREN , I use  get_static_attributes_table to get the current table records and change return table value .

Then i user bind_table to pass table to the screen.

It works fine for first time i press expand and collaps, but when i expand it again it throw out a dump 'OBJECTS_OBJREF_NOT_ASSIGNED'.

Could any one please help to solve that?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

harsha_jalakam
Active Contributor
0 Kudos

Hi Eric,

Please check the dumps at ST22 and get the source code extract, the exact line where you are facing the error, may be that might help you.

I suspect while opening again the lead selection might have been disabled it is throwing the dump at get_static_attributes_table.Please set initialize lead selection check and check.

Regards,

Harsha

Former Member
0 Kudos

Hi Harsha,

Thanks for your reply,I've check the dump details and it display like this:

Information on where terminated

    Termination occurred in the ABAP program "CL_WDR_CONTEXT_ELEMENT========CP" -

     in "IF_WD_CONTEXT_ELEMENT~SET_ATTRIBUTE".

    The main program was "SAPMHTTP ".

    In the source code you have the termination point in line 40

    of the (Include) program "CL_WDR_CONTEXT_ELEMENT========CM007".

    The termination is caused because exception "CX_SY_REF_IS_INITIAL" occurred in

    procedure "IF_WD_CONTEXT_ELEMENT~SET_ATTRIBUTE" "(METHOD)", but it was neither

     handled locally nor declared

    in the RAISING clause of its signature.

    The procedure is in program "CL_WDR_CONTEXT_ELEMENT========CP "; its source

     code begins in line

    1 of the (Include program "CL_WDR_CONTEXT_ELEMENT========CM007 ".

First time i debug it work fine but the next time it dump with same import values.  And it even did not reach the logic i add when i expand it again.

I'm not sure why it happen.

My code in ONACTIONLOAD_CHILDREN is like this.

*navigate from <CONTEXT> to <ITEM_DATA> via lead selection
  lo_nd_item_data = wd_context->path_get_node( path =
  `COMP_CONTEXT.ITEM_DATA` ).
*get element via lead selection
  lo_el_item_data = lo_nd_item_data->get_element( ).
*get all declared attributes
  lo_nd_item_data->get_static_attributes_table(
    IMPORTING
      table = lt_item_data ).
  LOOP AT lt_item_data INTO ls_item_data.
    IF sy-tabix = 2.
      ls_item_data-description = 'TEST'.
      MODIFY lt_item_data FROM ls_item_data TRANSPORTING description.
    ENDIF.
  ENDLOOP.

    lo_nd_item_data->bind_table( new_items = lt_item_data
    set_initial_elements = abap_true ).

    lo_nd_item_data->set_lead_selection_index( 1 ).

First line was set selected but still got dump.

Could you please help to check this ?

Thanks & Regards

Eric Li

harsha_jalakam
Active Contributor
0 Kudos

Hi Eric,

Seems like the dump is at a different place. At ST22 , try checking out the Source Code Extract, which will give you the piece of code where the exactly the program was aborted. Double click on it will take you to the source code, where you can verify it either by keeping the break point above that or by inspection.

Regards,

Harsha

ramakrishnappa
Active Contributor
0 Kudos

Hi Eric,

I suggest you to read only the context element of  2nd line and modify the same rather re-binding whole table data back.

Also, place an EXTERNAL break point at source code where dump occurred in ST22 and try again.

Now, second time you will be able reach the break point where dump occurs. In debugging window, use the tab "STANDARD" and you can see call stack. Open the method of your component from that call stack and you would be able to figure out the point of exception and also cause for the issue.

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Hi Rama,

Thanks for your help.

I follow your suggestion and get/set single line with index. It works fine.

Thanks again.

Eric Li

Former Member
0 Kudos

Hi Harsha,

Thanks for your help. I tried to follow the step when debugging. Still it dump in set_attribute with same parameter value.

Now i try to use get_static_attributes and set_static_attributes with index. It works fine.

Thanks again.

Eric Li

Answers (0)