on 04-15-2009 7:30 AM
Hi There,
Trying to use if_fpm_message_manager->report_bapiret2_message to focus on the attribute with the message.
Seem to have struck an issue, getting short dumps. Seems to have something to do with the if_wd_context_element i am passing - null reference to element->node->controller in IF_WD_MESSAGE_MANAGER~REPORT_ATTRIBUTE_T100_MESSAGE
data: lo_node_general_data TYPE REF TO if_wd_context_node,
lo_el_general_data TYPE REF TO if_wd_context_element.
"Read general data element
lo_node_general_data = wd_context->get_child_node( name = wd_this->wdctx_general_data ).
lo_el_general_data = lo_node_general_data->get_element( ).
"function call returning bapirettab
LOOP AT lt_return ASSIGNING <fs_return>.
TRY.
lv_field = <fs_return>-field.
wd_this->mr_fpm_message_manager->report_bapiret2_message(
EXPORTING
is_bapiret2 = <fs_return>
io_component = wd_this
io_element = lo_el_general_data
iv_attribute_name = lv_field
).
ENDTRY.
ENDIF.
ENDLOOP.
Any help would be much appreciated
Cheers
JSP
Pl post the error log. from ST22
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you sure that lo_el_general_data is not initial? That would seem to be the likely cause of the error. You have no if checks to see if the object call returns null. Set a breakpoint to see if you are passing in a null object reference to begin with.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas et al,
Thanks for responses, this was baffeling me as the report_bapiret2 was working in other areas.
Are you sure that lo_el_general_data is not initial? Yes
What happened was after reporting the messages and before the message got reported I
lo_nd_general_data->invalidate( ).
this was the problem
cheers
John P
Hi,
If you have N number of elements then you need to pass the index value also to get that element.
If you have only one element then the below statement works fine.
lo_el_general_data = lo_node_general_data->get_element( ).
Before proceeding further with LOOP check if element is initial or not.
if lo_el_general_data is not initial.
loop at...............
endloop.
endif.
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 |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.