on 10-21-2014 6:45 PM
Hi,
I have 2 methods in my WD.
The first one I have called CHECK_DATA and it contains an export parameter named ERROR of the datatype CHAR1.
This method is called within my method = CREATE_REC.
In this method I also have a parameter called error = char1. When I call CHECK_DATA I use the IMPORTING error and fill the error parameter in CREATE_REC.
It compiles, but when I run it, I get an error 500 that tells me that the error parameter contains an invalid value.
Why do I get an invalid value for error parameter ?
/Peter
Hi,
That shouldn't be the case! I hope the error in create_rec is an exporting parameter with same time as mentioned by you. Have you check the value returned by check_data method?
Please keep a break point at the check_data method call and see the returning value. Also check the source of error in ST22.
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
ST22 gives us this info:
Access using a 'ZERO' object reference is not possible.
An exception has occurred which is assigned to class = CX_SY_REF_IS_INITIAL and was not caught in the procedure.
CHECK_DATA nor was it propagated by a RAISING clause.
Sorry but I am not allowed to copy and paste from the system due to security.
Peter
Hi,
It says that object was not initialized. Might be when reading an attribute in method check_data from context node, the node was not initialized!!
In ST22, you can check the Source code that points to the line which cause the short dump. I cannot give conclusions based on the exception wtihout source code.
Please check the Source Code in ST22, which points the error line.
hope this helps,
Regards,
Kiran
Hi,
It shows that the message manager lo_message_manager is initial. write the below code to get the message manager instance.
DATA lo_api_controller TYPE REF TO if_wd_controller.
DATA lo_message_manager TYPE REF TO if_wd_message_manager.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager.
hope this helps,
Regards,
Kiran
Hi Peter,
I suspect, your code to get the message manager reference into lo_message_manager object, is put inside some condition but in this case, that condition is not met and hence LO_MESSAGE_MANAGER object reference is NULL.
If so, please put the code to get message manager reference outside the condition.
Also, before calling any method of an object, its better to check if its filled or not
if lo_message_manager is bound.
" Your code goes here
endif.
Hope this helps you.
Regards,
Rama
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.