Skip to Content

Selection popup for print preview in SAP SRM 7

Hello gurus,

I'm facing a task for a desired specification on SRM 7.0.

On Purchase Order and Contracts WD views, there's a button called "Print Preview" which triggers a smartform-generated function module.

In our scenario, a specific BADi implementation contains the logic that selects the specific smartform that will be triggered.

Now, the desiderata is as follows:

- for CERTAIN DOCUMENTS, e.g. the ones which refer to a specific organization, we should generate a selection popup in which the user can choose which type of smartform has to be triggered. This event (the selection popup) should be triggered by the pressure of the "Print Preview" button.

So far, lots of doubts... I hope someone could give an hint on the task:

- since "Print Preview" is a button that belongs to the WD "FPM_OIF_COMPONENT" (view CNR_VIEW), first of all, how can I check for condition on the document to determine whether the popup should be triggered or not? In other words: how can I check @FPM level data of the underlying document?

- what's the easiest way to trigger a popup after the button has been pressed?

I've seen that *any* button on FPM_OIF_COMPONENT triggers the method "ONACTIONBUTTON_PRESSED"; should I enhance the method by creating a pre-exit which checks against doc's data and eventually triggers a popup?

- How can I then propagate user's selection to the underlying layer? As far as I've seen, Smartform determination is performed AFTER the button has been pressed, so ... does the solution sketched above make sense, or there's another spot in which is useful to introduce my custom routines?

Thanks to anyone which would give me hints or suggestions on the task.

Kind regards,

M.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 13, 2012 at 10:25 PM

    You should NOT modify or enhance the FPM standard components. Please spend some time reading the document Julia recommended and you will save yourself a LOT of time later.

    For any FPM application there is a "master controlling WDA component" that you could enhance. This is NOT the FPM_OIF_COMPONENT/FPM_GAP_COMPONENT/FPM_OVP_COMPONENT.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member L0rd TH

      Happy New Year to you too. Please note that the PROCESS_EVENT is called for every single event in the event queue for every single UIBB involved in the process. Now, having said that, you might cancel one event, but that does not mean other events in the event queue won't be called. In addition to marking the event as canceled, I believe you need to fill the return result as OK (meaning that you already handled that event). If you leave the return result field blank, the system will assume it is still not handled and could process it further.

  • Posted on Dec 13, 2012 at 11:56 AM

    Hi Matteo,

    I recommend our FPM starter kit for you which helps to understand the basic concepts of FPM:

    There it is also described how to react when an FPM event is raised (e.g. when a button of the global toolbar has been pressed). Do not enhance the method as described above.

    If you read our cookbook and search for PROCESS_EVENT, you will get a clear answer.

    Best regards,

    Julia

    Add a comment
    10|10000 characters needed characters exceeded

    • Hello Julia,

      I'm trying to understand the eventing concept from the cookbook, in particular as you suggested for what concerns the PROCESS_EVENT.

      I found that method in the COMPONENTCONTROLLER of each WD Component which is used by the application (say, each WD Comp./view which is used as UIBB for the application, as we can see from the screenshot of the Component Configurator: https://dl.dropbox.com/u/26770376/Capture.PNG ).

      That's because every WD Component involved in the process implements IF_FPM_UI_BUILDING_BLOCK.

      As you noticed I don't know almost anything of FPM (and find that cookbook quite difficult 🤪), but an idea could be: I could enhance the PROCESS_EVENT method of the specific COMPONENTCONTROLLER of any WD component in order to code my logic. True that?

      The problem is that the standard SRM 7 application /SAPSRM/WDA_L_FPM_OIF has a lot of WD component, so the above approach seems not 'smart', as I should replicate the code on every COMPONENTCONTROLLER -> process_event method for each WD Component.

      There should be a single process_event method used by all the WD Component involved, so that my modifications should be coded once and adopted by the entire application.

      Am I on the right path?

  • Posted on Jan 07, 2013 at 05:45 AM

    PLease check mail...Replied through mail, few documents on FPM for your reference.

    I would recommend you to spend some time on FPM & WD Concepts to avoid any future issues because of enhancements in Standard applications.

    FPM Concept is so awesome, and the best part is events wherein you can perform any custom plug-ins into standard appplications just by simply creating a Custom/Delegated Component Configuration, Introducing your own Custom UIBB for your custom process specific enhancements.

    Please check the documents.

    Thanks & Regards

    Tushar S

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.