cancel
Showing results for 
Search instead for 
Did you mean: 

Display message raised at the user exit level in Web dynpro screen

sahai
Contributor
0 Kudos

Hi Experts,

in a requirement, the message raised at the user exit level has to be displayed at floor plan screen.

Any guidance to this will be appreciated.

Thanks and Regards,

Shitanshu Sahai

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi Shantanu,

If you want this as WD specific development , you can write the code on   Post exit  of CHECK_BEFORE_SAVE method in LO_OIF_MAIN_COMP  (Component Controller ). You can raise your message as a pop-up and based on user selection you can set the EV_REJECTED = 'X'.

  

         DATA: LO_MODEL              TYPE REF TO CL_LO_OIF_MODEL.

         LO_MODEL = CL_LO_OIF_MODEL=>GET_MODEL( ).

         LO_MODEL->OPEN_POPUP( 'OUTPUT' ).

         EV_REJECTED = 'X'.

ThX,

Hari

sahai
Contributor
0 Kudos

Hi,

The user exit is in MV45AFZZ, while debugging I found that once the user clicks on the save button on the floor plan manager the control reaches this program and after that the control again reaches to the process_event of the component LO_OIF_MAIN_COMP.

The requirement is to have a information message if certain condition is met both at the sap GUI and Web UI(NWBC) now for the sap gui the user exit is in place and the information message is getting raised.

the problem is how can i get this information message raised in the web ui, the control reaches the logic written in the user exit and comes back to the process event. So can i write something in the user exit to have a information message(POPup ) in web UI or some other way i have to follow.

Thanks and Regards,

Shitanshu Sahai

Former Member
0 Kudos

Hi shitanshu,

If I understand correctly your issue, I've faced exactly the same.

This is how I solved it.

I've created an enhancement in the form USEREXIT_SAVE_DOCUMENT_PREPARE, and after the checks, if an error occurred, just do the following:


    if call_activity = gc_activity_lord.

      " we're coming from LORD API (e.g. FPM screens)

      " so there is no dynpro processing, and we have to

      " raise the message to the LORD message handler

      message id ls_error_msg-id type ls_error_msg-type number ls_error_msg-number.

      message_collect_lord.

      return.

    endif.

Please note that this will probably only work if you're using Lean Order API (CL_LORD class) as a model (CL_LO_OIF_MODEL) in your FPM application.

The macro message_collect_lord is standard, so I guess it exists in your system too.

Good luck.

sahai
Contributor
0 Kudos

Thanks Thomas,

This works but the message are getting displayed like a warning message. In my case i need them as a pop up message and based on the user click it should proceed or not.Even though am passing 'I' as message type it gets displayed as warning

Former Member
0 Kudos

Hi Shitanshu,

I've just tested on my system here, and the message is correctly displayed as an error message.

Thus I don't know why you don't have the same result.

I hope you'll find a way... Good luck!

former_member184741
Active Contributor
0 Kudos

hi,

not sure if this works. if your user exit is getting calles inside the FPM applicaiton  try this

get instance of fpm  using  lo_fpm = cl_fpm_factory=>get_instance( ).

get reference to message manager using  lo_msg = lo_fpm->mo_message_manager

use method REPORT_MESSAGE of lo_msg

thanks,

sankar

sahai
Contributor
0 Kudos

Hi,

Thanks for the information but the message is not raised in fpm. Its raised in backend sap system and have to show the message at fpm screen,

Thanks and Regards,

Shitanshu Sahai

former_member184741
Active Contributor
0 Kudos

I think you should explain your scenario in more detail

- where is the FPM applicaiton running

- where is your user exit

etc.,