cancel
Showing results for 
Search instead for 
Did you mean: 

Error after bind_table in wddomodifyview

raj_kamal2
Discoverer
0 Kudos

Hi,

we have a requirement where we need to enhance the table view of repsonse and awards for RFx. We are able to add a new column in the table view by addiing the new column in the structure and context.

WD Component - /SAPSRM/WDC_AODC_BEV_ACT, View - V_BID_ACTIVITY

Then We added additional column in the view layout and binding is also done. In the wddomodifyview post exit we are able to get table data and after modification of that table we are using bind_table method to bind the modified table to the node. Till this everything is working fine. But after that when the user select a row from the new view he gets a short dump.

Any clue, how it can be handled in the post exit of wddomodifyview.

UNCAUGHT_EXCEPTION

Invalid index 0 when setting lead selection; context node: COMPONENTCONTROLLER.1.COMP_CONTEXT.1.BID_ACTIVITY

Method: IF_WD_CONTEXT_NODE~SET_LEAD_SELECTION of program CL_WDR_CONTEXT_NODE_VAL=======CP

Method: /SAPSRM/IF_CH_WD_SET_FACADE~SET_LEAD_SELECTION_SET_KEY of program /SAPSRM/CL_CH_WD_SET_FACADE===CP

Method: /SAPSRM/IF_CLL_DODM_BEV_A~CHANGE_LEAD_SELECTION of program /SAPSRM/CL_CH_WD_DODM_BEV_A===CP

Method: ONACTIONCHANGE_LEAD_SELECT of program /1BCWDY/1LGJOB2SGXBV5GLJ9GNX==CP

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

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

Method: IF_WDR_ACTION~FIRE of program CL_WDR_ACTION=================CP

Method: DO_HANDLE_ACTION_EVENT of program CL_WDR_WINDOW_PHASE_MODEL=====CP

Method: PROCESS_REQUEST of program CL_WDR_WINDOW_PHASE_MODEL=====CP

Method: PROCESS_REQUEST of program CL_WDR_WINDOW=================CP

Thanks.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Try to check the below

1. Check if thers is any method implemented while selecting the row.

2. If the node that has existence in different views / controller, try to remap the same in all

3. Check if the supply function exists for the node

Let us know the result / update on this issue

Former Member
0 Kudos

Hi.

Did you find a solution to this problem?

I am right now having the exact same problem, seems that the error is due to that the "table" in the context has child notes, and when bind_table is called, it blanks the data containing the lead selection (index and table).

Everything works fine, as long as I do not bind the table to the context - not really a viable solution

Thanks in advance.

Per Hjorth Christiansen

saravanan_narayanan
Active Contributor
0 Kudos

bind_table( ) method will invalidate the entrire node. So if want to change the values you should not use bind_table( ) method

instead you can use IF_WD_CONTEXT_NODE->SET_STATIC_ATTRIBUTES() method to set the modified value for each line item by passing the index and modified values.

Former Member
0 Kudos

Are you setting the lead_selection_index any where ?. Seems to be that zero is passed to the importing parameter index which causes the error.

raj_kamal2
Discoverer
0 Kudos

Hi Senthivel,

I have not changed any lead selection. All I have written inside the post exit is -

METHOD pst4lzywaaxldygc8mizx4ouh8aa . "Exit of WDDOMODIFYVIEW (in ZRFX_RESP_ADD_COLUMN_TER_STAT )

DATA lo_nd_bid_activity TYPE REF TO if_wd_context_node.

DATA : lt_bid_activity TYPE wd_this->elements_bid_activity,

ls_header TYPE bbp_pds_quot_header_d.

FIELD-SYMBOLS : <fs_bid_activity> LIKE LINE OF lt_bid_activity.

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

lo_nd_bid_activity = wd_context->path_get_node( path = `COMP_CONTEXT.BID_ACTIVITY` ).

lo_nd_bid_activity->get_static_attributes_table( IMPORTING table = lt_bid_activity ).

LOOP AT lt_bid_activity ASSIGNING <fs_bid_activity>.

CALL FUNCTION 'BBP_PD_QUOT_GETDETAIL'

EXPORTING

i_guid = <fs_bid_activity>-quotation_guid

IMPORTING

e_header = ls_header.

<fs_bid_activity>-zzter_stat = ls_header-zzter_stat.

ENDLOOP.

lo_nd_bid_activity->bind_table(

new_items = lt_bid_activity

set_initial_elements = abap_true ).

  • index = index ).

ENDMETHOD.

Thanks.

Former Member
0 Kudos

I see it in the dump error occurs.

Method: /SAPSRM/IF_CH_WD_SET_FACADE~SET_LEAD_SELECTION_SET_KEY of program /SAPSRM/CL_CH_WD_SET_FACADE

It is called when the lead selection is changed. You have to analyse your application to see if you have missed something .

If the application is working correctly with out your enhancement then there is a gap in your analysis and implementation.

Best way is to spend time in debugging to find out why the index is 0.

Former Member
0 Kudos

Hi

Select the lead selection checkbox in context node.

Regards

Kuldeep