cancel
Showing results for 
Search instead for 
Did you mean: 

Error parameter in view

former_member210563
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184578
Active Contributor
0 Kudos

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

former_member210563
Participant
0 Kudos

Hi,

Thanks for your reply. In ST22, I am told that an unexpected exception was caught. The name is something like CV_XXX_BAD_ARGS.

This is a bit strange.

Peter

former_member184578
Active Contributor
0 Kudos

Hi,

Seems a mismatch in your method parameters! Can you paste the screen shots of your method signatures and code snippet!

Regards,

Kiran

former_member210563
Participant
0 Kudos

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

former_member184578
Active Contributor
0 Kudos

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

former_member210563
Participant
0 Kudos

See attached

former_member184578
Active Contributor
0 Kudos

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

former_member210563
Participant
0 Kudos

Hi,

Thanks but it is all there already.

Peter

former_member184578
Active Contributor
0 Kudos

Hi,

Strange then! I hope that the message initialization(provided code) is not inside an IF condition!!

Please keep a beak point near the call method of message manager( at line 2363) and check whether lo_message_manager is initialized or not.

Regards,

Kiran

former_member210563
Participant
0 Kudos

Hi,

I will debug then and I intend to find it.

Thanks a lot !

Peter

0 Kudos

Hi Peter,

            two methods are in the same view or different? if they are on the same view how you are passing the value for ERROR in CHECK_DATA method.

ramakrishnappa
Active Contributor
0 Kudos

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