on 09-09-2009 4:24 AM
Hi all,
In my application, I need to update selection screen according to user input, like update dropdown list. Therefore, I write my coding at view event WDDOMODIFYVIEW to ensure my method UpdateScreen is called at every roundtrip. Everything runs OK except when I click sign/option and choose any sign of selection option following dump occurs:
The following error text was processed in the system ICX : Access via 'NULL' object reference not possible.
The error occurred on the application server pwdf4646_ICX_12 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: IF_WD_CONTEXT_ELEMENT~SET_ATTRIBUTE of program CL_WDR_CONTEXT_ELEMENT========CP
Method: SET_SIGN of program CL_WDR_SELECT_OPTIONS=========CP
Method: ON_SIGN_OPTION_LEAVE of program CL_WDR_SELECT_OPTIONS=========CP
Method: ONACTIONON_ENTRY_SELECTED of program /1BCWDY/ALMK9CLI947HVDFYUZV5==CP
Method: ONACTIONON_ENTRY_SELECTED of program /1BCWDY/ALMK9CLI947HVDFYUZV5==CP
Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/ALMK9CLI947HVDFYUZV5==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
It losts ref since I call if_wd_select_options~upd_selection_field before choosing sign. If user clicks sign/option, there's no need to update selection screen because no user input changes. But how can I judge this?
Please let me comment more since no attachment can be uploaded. Following are key steps I do:
1) Build selection screen of two select options with this:
lr_range = lr_selopt->create_range_table( i_typename = 'CRMT_PROCESS_TYPE' ).
lr_selopt->add_selection_field(
i_id = 'ACT_PROCTYPE'
it_result = lr_range
i_description = 'Transaction Type'
).
lr_range = lr_selopt->create_range_table( i_typename = 'CRMT_ACTIVITY_CATEGORY' ).
lr_selopt->add_selection_field(
i_id = 'ACT_CAT'
it_result = lr_range
i_value_help_structure_field = 'CATEGORY'
).
2) At method WDDOMODIFYVIEW, I update the description for example:
lr_range = lr_selopt->create_range_table( i_typename = 'CRMT_PROCESS_TYPE' ).
lr_selopt->upd_selection_field(
i_id = 'ACT_PROCTYPE'
it_result = lr_range
i_description = 'New Transaction Type'
).
Then, if I click the sign button before select option and choose a sign, it gets dump.
I know the calling of upd_selection_field interferes something, but I have to update screen in order to complying with user input.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
When ever yuo create select option keep it in global and use it in modifyview.
I guess lr_selopt in modifyview has no refrenece right.
Im creating in DOINIT of view and storing it global.
wd_this->m_wd_select_options = wd_this->wd_cpifc_so( ).
wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen(
).
MODIFYVIEW-
CALL METHOD WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD
EXPORTING
I_ID = 'BEGDA'
RECEIVING
RT_RANGE_TABLE = lt_data.
Regards,
Lekha.
Edited by: Lekha on Sep 9, 2009 8:44 PM
Hi,
Have you checked in ST22 for the cause of NULL reference.
when you create Select options, then keep the reference in global variable and use it in the MODIFYVIEW.
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.