Iconet Services Ltd - SAP ABAP / SAPScript Consultant

Home Page
Company Profile
Search Internet for SAP Information
Subscribe to SAP R3 Mailing list
Sample ABAP Programs
ABAP How to
General Purpose layout set

USE NEW POPUP_TO_CONFIRM FM

This uses a text dialogue created in SE61 to fill the display box.

1.SE61

2. SETTINGS - Text in Dialogue

3. Create ZDIALOGUE

4. Parameters from program to be included in text are defined as &w_field1& etc

5. Code:-

DATA: titlebar TYPE string VALUE 'Title'.

* table to pass parameters to dialogu text

DATA: para TYPE spar,

t_paras TYPE TABLE OF spar,

* answer

l_ans(1).

* set parameter values

para_param = 'w_field1'.

para_value = w_field.

APPEND para TO t_para.

para_param = 'w_field2'.

para_value = w_field2.

APPEND para TO t_para.

CALL FUNCTION 'POPUP_TO_CONFIRM'

EXPORTING

titlebar = titlebar

diagnose_object = 'ZDIALOGUE'

text_question = 'Do you want to save?'

text_button_1 = 'Yes'(001)

* ICON_BUTTON_1 = ' '

text_button_2 = 'No'(002)

* ICON_BUTTON_2 = ' '

* DEFAULT_BUTTON = '1'

* DISPLAY_CANCEL_BUTTON = 'X'

* USERDEFINED_F1_HELP = ' '

* START_COLUMN = 25

* START_ROW = 6

* POPUP_TYPE =

IMPORTING

answer = l_ans

TABLES

parameter =

* EXCEPTIONS

* TEXT_NOT_FOUND = 1

* OTHERS = 2

.

IF sy-subrc <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

* 2= No

IF l_ans = '2'.

RAISE no_changes_allowed.

ENDIF.

------------------------------------------------------------

Title

------------------------------------------------------------

Material Entered Substitute Material

11111111 22222222

DO YOU WANT TO SAVE?

|YES | NO | CANCEL |

Back to How To list