SAP Tables

POPUP_TO_CONFIRM SAP Function module - Standard Dialog Popup




POPUP_TO_CONFIRMis a standard SAP function module available within R/3 SAPsystems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import/export parameters, exceptions etc as well as any documentation contributions specific to the object. See here to view full function module documentation and code listing, simply by entering the name POPUP_TO_CONFIRM into the relevant SAP transaction such as SE37 or SE80.

Contribute (Add Comments)
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name POPUP_TO_CONFIRM or its description.


Pattern for FM POPUP_TO_CONFIRM - POPUP TO CONFIRM
Associated Function Group: SPO1
Released Date: 27.11.1996
CALL FUNCTION 'POPUP_TO_CONFIRM' "Standard Dialog Popup
  EXPORTING
*   titlebar = SPACE            "               Title of dialog box
*   diagnose_object = SPACE     " dokhl-object  Diagnosis text (maintain via SE61)
    text_question =             "               Question text in dialog box
*   text_button_1 = 'Ja'(001)   "               Text on the first pushbutton
*   icon_button_1 = SPACE       " icon-name     Icon on first pushbutton
*   text_button_2 = 'Nein'(002)  "              Text on the second pushbutton
*   icon_button_2 = SPACE       " icon-name     Icon on second pushbutton
*   default_button = '1'        "               Cursor position
*   display_cancel_button = 'X'  "              Button for displaying cancel pushbutton
*   userdefined_f1_help = SPACE  " dokhl-object  User-Defined F1 Help
*   start_column = 25           " sy-cucol      Column in which the POPUP begins
*   start_row = 6               " sy-curow      Line in which the POPUP begins
*   popup_type =                " icon-name     Icon type
*   iv_quickinfo_button_1 = SPACE  " text132    Quick Info on First Pushbutton
*   iv_quickinfo_button_2 = SPACE  " text132    Quick Info on Second Pushbutton
  IMPORTING
    answer =                    "               Return values: '1', '2', 'A'
* TABLES
*   parameter =                 " spar          Text transfer table for parameter in text
  EXCEPTIONS
    TEXT_NOT_FOUND = 1          "               Diagnosis text not found
    .  "  POPUP_TO_CONFIRM

ABAP code example for Function Module POPUP_TO_CONFIRM

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the latest in-line data declaration syntax but I have included an abap code snipet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).
DATA:
ld_answer   TYPE STRING,
it_parameter   TYPE STANDARD TABLE OF SPAR,"tables param
wa_parameter LIKE LINE OF it_parameter  .

DATA(ld_titlebar) = 'some text here'.

SELECT single OBJECT
FROM DOKHL
INTO @DATA(ld_diagnose_object).

DATA(ld_text_question) = 'some text here'.
DATA(ld_text_button_1) = 'some text here'.

SELECT single NAME
FROM ICON
INTO @DATA(ld_icon_button_1).

DATA(ld_text_button_2) = 'some text here'.

SELECT single NAME
FROM ICON
INTO @DATA(ld_icon_button_2).

DATA(ld_default_button) = 'some text here'.
DATA(ld_display_cancel_button) = 'some text here'.

SELECT single OBJECT
FROM DOKHL
INTO @DATA(ld_userdefined_f1_help).

DATA(ld_start_column) = 123 .
DATA(ld_start_row) = 123 .

SELECT single NAME
FROM ICON
INTO @DATA(ld_popup_type).

DATA(ld_iv_quickinfo_button_1) = 'Check type of data required'.
DATA(ld_iv_quickinfo_button_2) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_parameter to it_parameter.. CALL FUNCTION 'POPUP_TO_CONFIRM' EXPORTING * titlebar = ld_titlebar * diagnose_object = ld_diagnose_object text_question = ld_text_question * text_button_1 = ld_text_button_1 * icon_button_1 = ld_icon_button_1 * text_button_2 = ld_text_button_2 * icon_button_2 = ld_icon_button_2 * default_button = ld_default_button * display_cancel_button = ld_display_cancel_button * userdefined_f1_help = ld_userdefined_f1_help * start_column = ld_start_column * start_row = ld_start_row * popup_type = ld_popup_type * iv_quickinfo_button_1 = ld_iv_quickinfo_button_1 * iv_quickinfo_button_2 = ld_iv_quickinfo_button_2 IMPORTING answer = ld_answer * TABLES * parameter = it_parameter EXCEPTIONS TEXT_NOT_FOUND = 1 . " POPUP_TO_CONFIRM
IF SY-SUBRC EQ 0.   "All OK ELSEIF SY-SUBRC EQ 1. "Exception   "Add code for exception here ENDIF.

ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
ld_answer TYPE STRING ,
ld_titlebar TYPE STRING ,
it_parameter TYPE STANDARD TABLE OF SPAR ,
wa_parameter LIKE LINE OF it_parameter,
ld_diagnose_object TYPE DOKHL-OBJECT ,
ld_text_question TYPE STRING ,
ld_text_button_1 TYPE STRING ,
ld_icon_button_1 TYPE ICON-NAME ,
ld_text_button_2 TYPE STRING ,
ld_icon_button_2 TYPE ICON-NAME ,
ld_default_button TYPE STRING ,
ld_display_cancel_button TYPE STRING ,
ld_userdefined_f1_help TYPE DOKHL-OBJECT ,
ld_start_column TYPE SY-CUCOL ,
ld_start_row TYPE SY-CUROW ,
ld_popup_type TYPE ICON-NAME ,
ld_iv_quickinfo_button_1 TYPE TEXT132 ,
ld_iv_quickinfo_button_2 TYPE TEXT132 .

ld_answer = 'some text here'.
ld_titlebar = 'some text here'.

"populate fields of struture and append to itab
append wa_parameter to it_parameter.

SELECT single OBJECT
FROM DOKHL
INTO ld_diagnose_object.

ld_text_question = 'some text here'.
ld_text_button_1 = 'some text here'.

SELECT single NAME
FROM ICON
INTO ld_icon_button_1.

ld_text_button_2 = 'some text here'.

SELECT single NAME
FROM ICON
INTO ld_icon_button_2.

ld_default_button = 'some text here'.
ld_display_cancel_button = 'some text here'.

SELECT single OBJECT
FROM DOKHL
INTO ld_userdefined_f1_help.

ld_start_column = 123 .
ld_start_row = 123 .

SELECT single NAME
FROM ICON
INTO ld_popup_type.

ld_iv_quickinfo_button_1 = 'Check type of data required'.
ld_iv_quickinfo_button_2 = 'Check type of data required'..

SAP Documentation for FM POPUP_TO_CONFIRM


The new POPUP_TO_CONFIRM includes the functions of the previous POPUP_TO_CONFIRM_..... . The transfer of diagnosis and question texts ...See here for full SAP fm documentation