cancel
Showing results for 
Search instead for 
Did you mean: 

"Skip" a selection view

matteo_montalto
Contributor
0 Kudos

Hi gurus,

a simple requirement about a standard process flow: an user has to select a value to create a document.

The view shows a table of possible values (the first one is selected by default), then an FPM button "Continue" leads to the creation of the document.

Now; we have to restrict available values as only one of them could be used. This is a straightforward task as it's sufficient to "filter" the option table so that only one entry will be available.

Now, to further increase usability, I'd like to code something like:

"if the option table contains just an item, then don't show the view but simply continue to the next view"

This should be merely equivalent to say, as the user selection is mandatory but it's pre-defined, then skip the selection phase and go directly with the available option to the next screen.

There's a standard method in the view, it's called INIT_VIEW ; in this method the available values are retrieved and binded to the table.

Here I made an enhancement to restrict the values to just one.

Then I tried to implement a "skip" view solution; given the fact that the "Continue" FPM button triggers the action START_RFX_OIF of the view, I tried as follows:

* trying to start automatically

   DATA: options_num TYPE i.

   DESCRIBE TABLE lt_table_rfq LINES options_num.

   IF options_num EQ 1. "just one option available

* the following code has been copied by the standard -

* that's what happen when the CONTINUE button is pressed


     DATA : lo_event TYPE REF TO cl_wd_custom_event.

     CREATE OBJECT lo_event

       EXPORTING

         name       = 'START_RFX_OIF'.

     wd_this->onactionstart_rfx_oif(

       wdevent lo_event

       ).

   ENDIF.

But that doesn't work, as after that call, the rendering methods for the view (WDDOMODIFYVIEW) is processed and the view is shown.

What am I missing? Is there any easy way, under certain assumptions, to force the automatic selection and skip the selection view?

Thanks for your support

Accepted Solutions (0)

Answers (1)

Answers (1)

matteo_montalto
Contributor
0 Kudos

Bump... anyone has sugggestions for this task?
Thanks in advance.

amy_king
Active Contributor
0 Kudos

Hi Matteo,

I don't use FPM so this may not be a relevant suggestion, but is it possible to fire an outbound plug from the view in order to trigger navigation to the next view? It sounds like the current enhancement isn't telling the phase model to move on to the next view.

It's also possible that INIT_VIEW isn't the right place in the phase model to force navigation to a different view. Maybe manually triggering the START_RFX_OIF event would work if it happened before reaching the current view (before INIT_VIEW) or later in the phase model, e.g., in WDDOMODIFYVIEW.

Cheers,

Amy

matteo_montalto
Contributor
0 Kudos

Hi Amy,

you're probably right, but I don't understand why, as I trigger the same exact method which is triggered by the "continue" button. And for what concerns the START_RFX_OIF... I trigger it in a WDDOMODIFYVIEW post-exit.

Thanks again for your help,

M.