cancel
Showing results for 
Search instead for 
Did you mean: 

Raise an event from do_prepare_output

Former Member
0 Kudos

Hi All,

I have a requirement where I need to raise an event after having defaulted a value in a dropdownlist field.

I'm working on component BT120H_CPL/NewComplEF.

Here I have to default a value in the field REFOBJECTTYPE (context node NEWCOMPL). This is not a problem, I actually managed to write my logic in the do_prepare_output.

My problem is that upon selecting a value for this field the event ONREFOBJECTTYPE is executed, unfortunately if I default a value the server_event 'select' is not triggered and the sub-screen ExtRefItemEL is not called.

Do you know how to push/simulate an event from do_prepare_output in order to call the sub-screen immediately?

Thanks in advance

Paolo

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Paolo, I have the same problem. How did you solve it?

Thanks!

former_member202474
Contributor
0 Kudos

Hi Elina,

                 If you want to call the event handler method while defaulting a value in DO_PREPARE_OUTPUT method, please do the following.

After defaulting the value , call the method like  call method me->ENH_ON...

Hope this helps.

Regards,

Ruby.

Former Member
0 Kudos

Hi Elina,

Actually I did not solve it.

The problem is that at the point of DO_PREPARE_OUTPUT you don't have all data to raise an event.

The point is: default a value is not the same as select a value, therefore you should simulate a 'selection' of your value, this will then trigger the event as in the normal flow.

Regards,

Paolo

former_member182350
Active Contributor
0 Kudos

Hey Paolo, Try by raise event statement in Do_prepare_output method as event handler method available in IMPL class.

Former Member
0 Kudos

Ciao Arjun,

Thanks a lot for your quick reply.

In the above image the event I would simulate in do_prepare_output.

Could you please help a bit more by suggesting how can I force the event necessary to succesfully execute the sub-screen call?

Thanks a lot!

Paolo

Former Member
0 Kudos

Hi Paolo,

You can call the event handler ONREFOBJECTTYPE

from do_prepare-output by calling

   CALL METHOD me->eh_ONREFOBJECTTYPE

*  EXPORTING
*    htmlb_event    =
*    htmlb_event_ex =   .

please try and tel me know.

Regards,

Taity

Former Member
0 Kudos

Hi Taity,

I was thinking the same but my problem is to have the htmlb_event an htmlb_event_ex empty at the time I'm executing the do_prepare_output.

How could I fill these structures properly?

Thanks

Paolo

Former Member
0 Kudos

Hi Paolo,

These structures are optional.

My question is ,are you going to code anything inside the method
ONREFOBJECTTYPE depending on any value which is coming from any of these two structures ?

Please reply.

with regards,

Taity

Former Member
0 Kudos

Ciao Taity,

No, actually method ONREFOBJECTTYPE looks fine as it is.

My problem is the following: method ONREFOBJECTTYPE trigger the ob plugs to another view. this trigger is called when I 'select' a value in the Dropdown List.

As long as I'm defaulting the value in do_prepare_output, the 'select' action from the dropdown list is not triggered.

I'm looking to simulate this action to be able to call the subview.

Thanks

Paolo