cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding FPM Identification region

Former Member
0 Kudos

Hi Experts

I have a problem in FPM

I have to provide a link in the Identification Region and on click on that link , a popup will open and in which if i change the value that value should reflect in the Identification region.

Please tell me is it possible , if yes how?...

thanks in advance.

Regards

Kuldeep

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

The IF_FPM_IDR has a method called SET_ACTION_LINK. That should allow you to add your FPM based action to the IDR. When you add yoru display items to the IDR, they are bound to the context. Therefore you need only update the values in the context during your action for the change to reflect in the existing IDR area.

Here is an example for building the IDR area:

"We will need the message manager to report messages on the success or failure of DB updates.
  wd_this->mr_fpm  = cl_fpm_factory=>get_instance( ).
  wd_this->mr_message_manager = wd_this->mr_fpm->mo_message_manager.
  wd_this->mr_idr ?= wd_this->mr_fpm->get_service( cl_fpm_service_manager=>gc_key_idr ).

  data: lt_items_val type if_fpm_idr=>t_items_val,
        ls_item_val type if_fpm_idr=>s_items_val,
        lt_items_ref type if_fpm_idr=>t_items_ref,
        ls_item_ref type if_fpm_idr=>s_items_ref,
        lo_context type ref to if_wd_context,
        lo_exc type ref to cx_fpm_idr,                      "#EC NEEDED
        lv_text    type string.

* append a dynamic item to the IDR
  lv_text = wd_assist->read_field_desc( `SDEMO_SO_ID` ).
  ls_item_ref-label_name = lv_text.
  ls_item_ref-label_tooltip = lv_text.
  ls_item_ref-value_path = 'SALES_ORDER.-1.SO_ID'.
  ls_item_ref-value_tooltip = lv_text.
  ls_item_ref-show_unit = abap_true.
  append ls_item_ref to lt_items_ref.

* append a dynamic item to the IDR
  lv_text = wd_assist->read_field_desc( `SDEMO_TTL_NET_AMOUNT` ).
  ls_item_ref-label_name = lv_text.
  ls_item_ref-label_tooltip = lv_text.
  ls_item_ref-value_path = 'SALES_ORDER.-1.TTL_NET_AMOUNT'.
  ls_item_ref-value_tooltip = lv_text.
  ls_item_ref-show_unit = abap_true.
  append ls_item_ref to lt_items_ref.

  lo_context = wd_context->get_context( ).
  try.
      wd_this->mr_idr->add_item_group_by_ref( io_root_node = lo_context
                                           it_items = lt_items_ref ).
    catch cx_fpm_idr into lo_exc.
      data lv_dump_text type string.
      lv_dump_text = wd_assist->if_wd_component_assistance~get_text( '010' ).
      wd_this->mr_fpm->mo_message_manager->raise_exception( lv_dump_text ).
  endtry.