SAP Virtual/Onsite Trainings

Document Categories:

What's New?


Sample Specs

What's Hot?

Web Dynpro for ABAP Tutorials 

Join the Mailing List
Enter name and email address below:
Subscribe  Unsubscribe 

Implement Message management in FPM

By Rakesh Dhudipala


Below document explains,how to display messages in FPM  


ABAP objects,ABAP WebDynpro  

Step by step Procedure:  

Go to SE80 and create Webdynpro Called as ZTEST_MESSAGE.

Go to Implemented interfaces and implement IF_UI_FPM_BUILDING_BLOCK interface.

Go to component controller and create context called CUST as node and KUNNR attribute.  

Go to MAIN View context and Map the component controller context to View controller context.

Go to layout and create input field (Customer number).

Go to Component controller attributes tab add the below attributes.

Go to Component controller WDINIT method and write the below logic

method WDDOINIT .
*  Get the reference to the IF_FPM interface.
  wd_this->mr_fpm = cl_fpm_factory=>get_instance( ).

*  Get the reference to the FPM message manager interface.
  wd_this->mr_fpm_message_manager = wd_this->mr_fpm->mo_message_manager.

Go to PROCESS_EVENT and add the below logic

    DATA lo_nd_cust TYPE REF TO if_wd_context_node.
    DATA lo_el_cust TYPE REF TO if_wd_context_element.
    DATA lv_cust TYPE kna1-kunnr.
IF io_event->mv_event_id = if_fpm_constants=>gc_event-check.
*   navigate from <CONTEXT> to <CUST> via lead selection
    lo_nd_cust = wd_context->get_child_node( name = wd_this->wdctx_cust ).

*   get element via lead selection
    lo_el_cust = lo_nd_cust->get_element( ).
*     get single attribute
          name =  `KUNNR`
          value = lv_cust ).
 IF lv_cust IS INITIAL.
 CALL METHOD wd_this->mr_fpm_message_manager->REPORT_MESSAGE
      IV_MESSAGE_TEXT              = 'Please Enter customer number'
      IO_COMPONENT                 = wd_this
*      IV_SEVERITY                  = GC_SEVERITY_ERROR
*      IV_PARAMETERS                =
*      IR_MESSAGE_USER_DATA         =
*      IV_MESSAGE_INDEX             =
*      IO_ELEMENT                   =
*      IV_ATTRIBUTE_NAME            =
*      IO_CONTROLLER                =



Click here to continue...

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image