Application Development 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: 

how to display a popup window

Former Member
0 Kudos

i have a requirement ,i need to display a window asking user wether to continue or exit before displaying the list can any one help me in doing this.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Here is the code which MAY help you

data : p_ans type c,

parameters like spar occurs 0 with header line.

call function 'POPUP_TO_CONFIRM'

exporting

titlebar = 'Confirm'

diagnose_object = 'Z1087_TEXT'

text_question = 'Material is already created in Budget, Do you want to Edit'

text_button_1 = 'CONTINUE'

icon_button_1 = 'ICON_OKAY'

text_button_2 = 'EXIT'

icon_button_2 = 'ICON_CANCEL'

default_button = '1'

display_cancel_button = 'X'

start_column = 25

start_row = 6

importing

answer = p_ans

tables

parameter = parameters

exceptions

text_not_found = 1

others = 2.

if p_ans = '1'.

WRITE THE PART OF CODE WHICH WILL HANDLE THE FURTHER PROCESS

else.

endif.

10 REPLIES 10

Former Member
0 Kudos

Hi,

Goto SE37 give popupconfirm . You can find wide range of popups.

Ex: POPUP_TO_CONFIRM

Thanks & Regards,

Navneeth K.

Former Member
0 Kudos

Example:

POPUP_TO_CONFIRM_LOSS_OF_DATA

POPUP_TO_CONFIRM_STEP

POPUP_TO_CONFIRM_WITH_MESSAGE

Former Member
0 Kudos

Hi Anjali,

Use function module POPUP_TO_CONFIRM.

Regards,

Dhanunjaya Reddy.

former_member188685
Active Contributor
0 Kudos

you can use Function POPUP_TO_CONFIRM

ps: search before post and no credits required for this

Read the rules of engagement if you are new to SCN and follow the rules.

Former Member
0 Kudos

Here is the code which MAY help you

data : p_ans type c,

parameters like spar occurs 0 with header line.

call function 'POPUP_TO_CONFIRM'

exporting

titlebar = 'Confirm'

diagnose_object = 'Z1087_TEXT'

text_question = 'Material is already created in Budget, Do you want to Edit'

text_button_1 = 'CONTINUE'

icon_button_1 = 'ICON_OKAY'

text_button_2 = 'EXIT'

icon_button_2 = 'ICON_CANCEL'

default_button = '1'

display_cancel_button = 'X'

start_column = 25

start_row = 6

importing

answer = p_ans

tables

parameter = parameters

exceptions

text_not_found = 1

others = 2.

if p_ans = '1'.

WRITE THE PART OF CODE WHICH WILL HANDLE THE FURTHER PROCESS

else.

endif.

0 Kudos

If user selects 'NO' then the cursor should go to sap standard main menu. can u help me in doing this

0 Kudos

hi,

use the below command to serve your purpose.

call transaction 'SESSION_MANAGER'.

if you want to popup a message befor leaving to main screen with any info then do as below.

MESSAGE A001(ZID) with 'LEAVING TO MAIN SCREEN' .

Regards,

Murthy.

Former Member
0 Kudos

Hello anjali b ,

Best you go for module pool programming to create the window.

just before displaying call the screen with syntax.

CALL SCREEN 100 STARTING AT 50 7 ENDING AT 110 11.

create the screen in the module pool by double clicking on the CALL Screen 100.

MODULE y_f_user_command_0100 INPUT.

MOVE: sy-ucomm TO y_v_ok.

CASE y_v_ok.

*If we select log button generating the error message

WHEN 'LOG'.

PERFORM y_f_get_log_output.

ENDCASE.

ENDMODULE. " USER_COMMAND_0100 INPUT

Capture the SY-UCOMM when he press the button then display the list.

write the code in the that perform.

Regards,

Santosh Marupally

Former Member
0 Kudos

Hi Anjali,

I am enlisting te following FM for pop-ups.

Have a look,which one suits your requirement.

These are FM,which are used for pop up window,with some message on it.

-


POPUP_TO_CONFIRM_STEP

Create a dialog box in which you make a question whether the user wishes to perform the step.

POPUP_TO_CONFIRM_WITH_MESSAGE

Create a dialog box in which you inform the user about a specific decision point during an action.

POPUP_TO_CONFIRM_WITH_VALUE

Create a dialog box in which you make a question whether the user wishes to perform a processing step with a particular object.

POPUP_TO_DECIDE

Provide user with several choices as radio buttons

POPUP_TO_DECIDE_WITH_MESSAGE

Create a dialog box in which you inform the user about a specific decision point via a diagnosis text.

POPUP_TO_DISPLAY_TEXT

Create a dialog box in which you display a two line message

POPUP_TO_SELECT_MONTH

Popup to choose a month

POPUP_WITH_TABLE_DISPLAY

Provide a display of a table for user to select one, with the value of the table line returned when selected

Hope it May Help u.

Regards,

Prashant

Former Member
0 Kudos

Hi Anjali,

After you call the pop up screen then

if sy-subrc = 0 .

call transaction 'SESSION_MANAGER'.

endif.

Regards,

Rachel