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

Screen programming and OO ALV

Former Member
0 Likes
620

Hi,

I have a selection screen in my program - 1000.

Then when pressing F8 I display an ALV report based on class CL_SALV_TABLE

with the seleced records.

In this report I have added a push-button for updating the displayed records.

Now, when I press this button I want to go back to the selection screen

(so it will show) and then the code should continue and my pop-up should appear.

This doesn't happen. I have tried various options to make this happen.

The closest solution is within the code below, but the pop-up will not trigger

until I do like back in the selection screen.

Can anyone please help me?

Regards,

/Fredrik.

Code:

=====

CLASS lcl_handle_events DEFINITION.

PUBLIC SECTION.

METHODS:

on_user_command FOR EVENT added_function OF cl_salv_events

IMPORTING e_salv_function.

ENDCLASS. "lcl_handle_events DEFINITION

CLASS lcl_handle_events IMPLEMENTATION.

METHOD on_user_command.

PERFORM handle_user_command USING e_salv_function.

ENDMETHOD. "on_user_command

ENDCLASS. "lcl_handle_events IMPLEMENTATION

FORM handle_user_command USING u_salv_function.

  • Handle own user commands

CASE u_salv_function.

WHEN 'UPDATE'.

TP_UPDATE = C_TRUE. "Indicator for Action Update

CALL SELECTION-SCREEN '1000'. "Display the Selection Screen

SET SCREEN 0. "Activate End-of Selection

ENDCASE.

ENDFORM. " HANDLE_USER_COMMAND

START-OF-SELECTION.

  • Get data

END-OF-SELECTION.

PERFORM display_report.

*>>> I want the code to continue here after the display of the selection screen

SET SCREEN 0. "Activate End-of Selection

CHECK TP_UPDATE = C_TRUE.

  • Confirm run actions

CALL FUNCTION 'POPUP_TO_CONFIRM'

...

  • Run Actions if answer is yes

  • Print/Save Error/Update log

  • End-of Program *

4 REPLIES 4
Read only

Sandra_Rossi
Active Contributor
0 Likes
576

I don't understand what you want to do. If you call the selection screen, it will be displayed. It's only when you leave it that the program continues. All this is normal. Do you want to display the popup when you click EXECUTE on the selection screen? I'd appreciate if you could explain again in other words.

Read only

0 Likes
576

Hi,

Actually all I want is that from the ALV report when I press the update button I will return to the selection screen

(with the screen shown) and then the popup will appear.

When I just do leave screen and set screen to 0 the popup will come, but the background screen will be empty.

I want the background screen to be my selection screen.

Read only

0 Likes
576

thank you, I understand. This is really unusual to do that, and cannot be done easily, probably.

If you never saw a program act like that, I recommend you to do it as usual (popup on the current screen, which is the ALV in your case).

You may try to find a workaround (like using aRFC with wait, so that the popup is displayed as new amodal screen, at the "same time" the selection screen is displayed), but it's not sure that all GUI technologies will render it always correctly (for example, the amodal screen might not be put in the foreground or might be hidden behind the selection screen window)

Read only

0 Likes
576

Ok, I see. It sounds too time consuming to work on a solution for this.

I will work on the ALV-popup instead.

Thank you very much