Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Remove error messages from BOPF

Former Member
0 Likes
2,832

Hi,

I have an object that have TYPE REF TO /bobf/if_frw_message.

I got all messages in this object, but I need to remove some of them before show it to user.

the criteria to remove message is message class name and messasge id.

could you please tell me proper way to deal with it?

thanks in advance

Hi,

I have an object that have TYPE REF TO /bobf/if_frw_message.

I got all messages in this object, but I need to remove some of them before show it to user.

the criteria to remove message is message class name and messasge id.

could you please tell me proper way to deal with it?

thanks in advance

4 REPLIES 4
Read only

former_member190794
Active Participant
0 Likes
2,040

Hello Andy,

if the result should also be a BOPF message object, you can try it that way:

Best regards

Tilmann

data(lo_new_message_object) = /bobf/cl_frw_factory=>get_message( ).
lo_old_message_object->get_messages( importing et_message = data(lt_message) ).

loop at lt_message into data(ls_message).
if 1 = 2.
   continue.
endif.
lo_new_message_object->add_cm( ls_message-message ).
endloop.

Read only

Former Member
0 Likes
2,040

Hi Andy,

I'd recommend to remove the in the UI-layer (if you use FBI a view exit).

Cheers,

Oliver

Read only

0 Likes
2,040

Hello Oliver,

can this Interface method ADAPT_MESSAGES also be used with FIORI UIs? I think it is only relevant for WebDynpro. Correct???

Cheers

Christof

Read only

0 Likes
2,040

Hi Christof,

correct, the interface pictured is from the FBI layer.

For UI5, the Data Provider Class (precisely the extension) is likely to be on the same stack-layer compared to FBI.

But in this case, you'd have to implement the wrapper which offers an adapt_messages yourself.

Cheers,

Oliver