cancel
Showing results for 
Search instead for 
Did you mean: 

Show Message in FITE_EXPENSES

former_member215786
Participant
0 Kudos

Dear Experts

I have the following requeriment.

In the application FITE_EXPENSES if the employee not select a row, when the user press the button "Lanzar" the system display a message of type Error and not allow continue.

http://www.freeimagehosting.net/newuploads/gul2y.jpg

How can solve this requirement?

Thanks in advance

Regards

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

As per my understanding from the image you have posted you are just using the TABLE UI element and not ALV. You can achieve your requirement in this way.

On the action of the button "LANZAR " you can read the node from the context you used for the table binding ( make sure that the node used for the table has the Lead Selection unchecked) then after reading the node just check if the context element is filled , it would be filled only if there is a row selected in the table. If not the context element would return initial then in that condition you can write a message that would be displayed to the user.

Below is the code to handle:

   DATA lo_nd_tab TYPE REF TO if_wd_context_node.
   DATA lo_el_tab TYPE REF TO if_wd_context_element.
   DATA ls_tab TYPE wd_this->element_tab.

    lo_nd_tab = wd_context->get_child_node( name = wd_this->wdctx_tab ).
    lo_el_tab = lo_nd_tab->get_element( ).

   IF lo_el_tab IS INITIAL.
   **  Message to be displayed to the user
     EXIT.
   ENDIF.

This is the way you can handle your requirement.

Thanks

Phani Kumar

former_member215786
Participant
0 Kudos
FITE_EXPENSES
FITV_FPM
FPM_WINDOW
LAYOUT_VIEW
FITV_FPM_EXPENSES

The component WD is FITV_FPM.

FITE_VC_PRESELECTION, not have the button "Lanzar",

My question is: FITV_FPM is used in other applications?

former_member211591
Contributor
0 Kudos

Hi,

would you like this solution?

Just call action of "lanzar" in the onSelect or onLeadSelect event of the table. Thus when selecting a row action of "lanzar" will be called. This is a one-click usage unlike selecting row and clicking lanzar (two clicks).

With this solution you have just one click for lanzar-action and no need for an error message (you could also remove button lanzar).

Regards

ismail

former_member215786
Participant
0 Kudos

I need show to user a message.

If the user not select a row , when press the button "Lanzar" the system not allow follow.

Regards

Regards

former_member211591
Contributor
0 Kudos

Try this:

method ONACTIONLANZAR .

   DATA lo_nd_XXX TYPE REF TO if_wd_context_node.
   DATA lt_table TYPE wd_this->Elements_table.

   lo_nd_XXX = wd_context->path_get_node( path = `yourpath to your node the table is bound to` ).



   data lt_selected_elements type WDR_CONTEXT_ELEMENT_SET.
  
   lt_selected_elements = lo_nd_xxx->GET_SELECTED_ELEMENTS( ).

   if lt_selected_elements is not initial.

          "execute Lanzar

   else.

          "Message Please select a row

   endif.

endmethod ONACTIONLANZAR.

regards