Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV Grid Warning Message

Former Member
0 Likes
950

Hello Experts,

I'm using the FM: 'REUSE_ALV_GRID_DISPLAY' to create a report but one of the requirement is to display an warning message when the user click on the back button since I don't a screen that I can use the PAI to handle this, is there any other approach to complete this task, any help will be very appreaciated, thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
745

Norman,

In your report program your need use the module that handle the button press by user.

I.E.

MODULE USER_COMMAND_0100 INPUT.

case sy-ucomm.

when 'BACK'. " When the user press back button, you can send a warning message

set screen 0.

when 'EXIT'.

leave program.

when 'CANCEL'.

leave program.

endcase.

clear sy-ucomm.

ENDMODULE. " USER_COMMAND_0100 INPUT

Regards,

4 REPLIES 4
Read only

Former Member
0 Likes
745

You can call FM POPUP_TO_CONFIRM when pressing the back button.

Regards,

Nilesh.

Read only

0 Likes
745

But how do I know when user clicked the BACK button?

Read only

0 Likes
745

You can check the ok code in the user command routine of your ALV. The PAI is not necessary always.

Pass the routine name to the importing parameter I_CALLBACK_USER_COMMAND.

Regards,

Nilesh.

Read only

Former Member
0 Likes
746

Norman,

In your report program your need use the module that handle the button press by user.

I.E.

MODULE USER_COMMAND_0100 INPUT.

case sy-ucomm.

when 'BACK'. " When the user press back button, you can send a warning message

set screen 0.

when 'EXIT'.

leave program.

when 'CANCEL'.

leave program.

endcase.

clear sy-ucomm.

ENDMODULE. " USER_COMMAND_0100 INPUT

Regards,