cancel
Showing results for 
Search instead for 
Did you mean: 

Yet another Popup to confirm in FPM

matteo_montalto
Contributor
0 Kudos

Hi all gurus, please forgive me as I'm quite a newbie on the argument.

Shortly; in SRM 7.0 there's a button that allows the user to create a copy of a document. Our desiderata is to show an intermediate popup to confirm ("Are you sure? bla bla ") with two buttons (yes/no) so that:

- pressing "Yes", execution should continue flawlessy with the same action_id ("COPY");

- pressing "no" makes the execution stop (stop processing the event).

Some details:

- buttons are in the view CNR_VIEW, in component FPM_OIF_COMPONENT.

- I found an interesting guide and some references to the use of the method NEEDS_CONFIRMATION offered by the interface IF_FPM_UI_BUILDING_BLOCK:

[http://sapdiary.com/index.php?option=com_content&view=article&id=24147:sap-network-blog-fpm-pop-up-s&catid=81:data-services&Itemid=81|http://sapdiary.com/index.php?option=com_content&view=article&id=24147:sap-network-blog-fpm-pop-up-s&catid=81:data-services&Itemid=81]

However, it seems IF_FPM_UI_BUILDING_BLOCK is not implemented by standard in this wd as there's no method "NEEDS_CONFIRMATION". Moreover, it seems that adding IF_FPM_UI_BUILDING_BLOCK as implemented interface in FPM_OIF_COMPONENT is kinda a standard modification.

EDIT:

Found that IF_FPM_UI_BUILDING_BLOCK is implemented by FPM_IDR_COMPONENT which is used by FPM_OIF_COMPONENT. So I guess there's no standard modification required. Anyway, it's not clear to me how could I use NEEDS_CONFIRMATION method for my purpose. I guess I have to implement a specific code for the method, however I don't have NEEDS_CONFIRMATION as listed method in my FPM_OIF_COMPONENT -> CNR_VIEW .

Am I missing something on the argument?

We had successfully implemented some code via post-exit on the method ONACTIONBUTTON_PRESSED to execute specific operations on the basis of the action_id associated to the event. However we're looking for the smartest/simplest way to get a confirmation popup in case of document copy as there are some advices user should be aware of and require specific confirmation.

Thanks for your help!

M.

Edited by: Matteo Montalto on Mar 5, 2012 12:12 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

matteo_montalto
Contributor
0 Kudos

Updated news... I created an enhancement in order to create an override exit on the (empty) NEEDS_CONFIRMATION method in this way:

method _OVR_4P1MIBVG0W2FOCPBT4103PHT2 . "Exit of NEEDS_CONFIRMATION (in ZR7_FPM_IDR_COMPCTRL )

 DATA :  lo_instance type ref to cl_fpm_confirmation_request,
         lt_popup_text TYPE STRING_TABLE,
         ls_popup_text TYPE STRING.

  CASE io_event->MV_EVENT_ID.
    WHEN 'COPY'.
      CLEAR : lt_popup_text[], ls_popup_text.
      ls_popup_text = 'Are you sure?'.
      APPEND ls_popup_text to lt_popup_text.
    CREATE OBJECT lo_instance
        EXPORTING
          it_confirmation_text = lt_popup_text.
      eo_confirmation_request = lo_instance.

    WHEN OTHERS.
  ENDCASE.
endmethod.

I thought it would automagically do the job, but that doesn't; whatever I press (Yes/no), the result is still the same (the document is copied and a new one is generated). Also, the popup appears on top of the already copied document... is this correct? Should the system rollback in case of "No" press?

Any idea/suggestion/documentation on how to do it?

Thanks

Edited by: Matteo Montalto on Mar 5, 2012 12:49 PM

Former Member
0 Kudos

I have the same problem, Do you have any solution for it?

thanks,

Érica

matteo_montalto
Contributor
0 Kudos

Hello Érica,

sorry for the late... I solved the task by means of a solution which works, even though it's quite complex and probably, not the only possible approach at the problem.


Check out the following Sankar's blog (he helped me a lot on the task):

http://scn.sap.com/community/web-dynpro-abap/floorplan-manager/blog/2013/01/20/srm7--include-custom-...