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: 

Popup witth: question, table and YES/NO buttons

Former Member
0 Kudos
1,659

Hi there. Maybe You have encountered such a popup window in which I could display informations:

1) Question text, sth like... "You hadn't saved Your changes. Do You wish to save them now?"

2) list of changes (list contains 1-10 items), sth like ...

- change 1

- change 2

- change 3 ...

3) YES/NO button to decide if user wants to save or not

At this moment I'm thinking of creating a Z-FModule... but of course I'd prefere to use standard Greetings. P.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
461

Check out this FM

BM_POPUP_TO_CONFIRM_EXIT

8 REPLIES 8

former_member555112
Active Contributor
0 Kudos
461

Hi,

All these options are available with the standad FM POPUP_TO_CONFIRM.

Please read the documentation on the same.

The relevant exampples can be found in report RSSPO120.

Regards,

Ankur Parab

Former Member
0 Kudos
462

Check out this FM

BM_POPUP_TO_CONFIRM_EXIT

0 Kudos
461

Try This:


DATA: ANSWER(150),
          VA_ANS.


 ANSWER = 'You hadnt saved Your changes. Do You wish to save them now?'.

      CALL FUNCTION 'POPUP_TO_CONFIRM'
        EXPORTING
          TITLEBAR              = 'Changes'
          TEXT_QUESTION         = ANSWER
          TEXT_BUTTON_1         = 'YES'
          ICON_BUTTON_1         = 'ICON_OKAY'
          TEXT_BUTTON_2         = 'NO'
          ICON_BUTTON_2         = 'ICON_CANCEL'
          DEFAULT_BUTTON        = '2'
          DISPLAY_CANCEL_BUTTON = ''
          IV_QUICKINFO_BUTTON_1 = 'YES'
          IV_QUICKINFO_BUTTON_2 = 'NO'
        IMPORTING
          ANSWER                = VA_ANS.

      IF VA_ANS = '1'.
       ...

        STOP.

      ELSEIF VA_ANS = '2'.
       
        ...
        STOP.

      ENDIF.

Regards.

Angelo Abbascia.

Former Member
0 Kudos
461

Hi Piotr,

Try this:


DATA: choice TYPE char64,
      l_list TYPE TABLE OF LISTE,
      l_str  TYPE LISTE.

l_str-zeile = 'Test 1..'  .
append l_str to l_list.
l_str-zeile = 'Test 2..'  .
append l_str to l_list.

      CALL FUNCTION 'POPUP_WITH_TABLE'
           EXPORTING
                ENDPOS_COL   = 70
                ENDPOS_ROW   = 10
                STARTPOS_COL = 6
                STARTPOS_ROW = 10
                TITLETEXT    = 'Title'
           IMPORTING
                CHOICE       = choice
           TABLES
                VALUETAB     = l_list
           EXCEPTIONS
                BREAK_OFF    = 1
                OTHERS       = 2.

George

Former Member
0 Kudos
461

Hi,

Try using the following function module that could possibly serve your purpose.

data: ans(1) type C.

CALL FUNCTION 'POPUP_TO_CONFIRM'

EXPORTING

TITLEBAR = 'Confirm Data Loss'

  • DIAGNOSE_OBJECT = ' '

TEXT_QUESTION = 'Do you want to save your data?'

  • TEXT_BUTTON_1 = 'Ja'(001)

  • ICON_BUTTON_1 = ' '

  • TEXT_BUTTON_2 = 'Nein'(002)

  • ICON_BUTTON_2 = ' '

  • DEFAULT_BUTTON = '1'

  • DISPLAY_CANCEL_BUTTON = 'X'

  • USERDEFINED_F1_HELP = ' '

  • START_COLUMN = 25

  • START_ROW = 6

  • POPUP_TYPE =

  • IV_QUICKINFO_BUTTON_1 = ' '

  • IV_QUICKINFO_BUTTON_2 = ' '

IMPORTING

ANSWER = ans

  • TABLES

  • PARAMETER =

EXCEPTIONS

TEXT_NOT_FOUND = 1

OTHERS = 2.

case ans.

when '1'.

PERFORM SAVE_DATA.

LEAVE PROGRAM.

WHEN '2'.

LEAVE PROGRAM.

WHEN 'A'.

MESSAGE s000(su) WITH 'Action cancelled by the user'.

ENDCASE.

.

IF SY-SUBRC <> 0.

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

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

ENDIF.

Former Member
0 Kudos
461

hi

try this FM

data : wk_answer.

call function 'POPUP_TO_CONFIRM_STEP'

exporting

defaultoption = 'Y'

textline1 = 'Do you wish to exit'(004)

textline2 = 'Confirm?'(005)

titel = 'Exit Processing'(006)

start_column = 25

start_row = 6

cancel_display = 'X'

importing

answer = wk_answer.

case wk_answer.

when 'J'.

leave program.

endcase.

Regards

Former Member
0 Kudos
461

hi,

try this

call function 'POPUP_TO_CONFIRM'

exporting

  • TITLEBAR = ' '

  • DIAGNOSE_OBJECT = ' '

text_question = l_question

TEXT_BUTTON_1 = 'YES'

  • ICON_BUTTON_1 = ' '

TEXT_BUTTON_2 = 'NO'

  • ICON_BUTTON_2 = ' '

  • DEFAULT_BUTTON = '1'

  • DISPLAY_CANCEL_BUTTON = 'X'

  • USERDEFINED_F1_HELP = ' '

  • START_COLUMN = 25

  • START_ROW = 6

  • POPUP_TYPE =

importing

answer = l_answer

  • TABLES

  • PARAMETER =

  • EXCEPTIONS

  • TEXT_NOT_FOUND = 1

  • OTHERS = 2

.

if ( l_answer = '1' ).

      • write code for saving data

exit.

elseif ( l_answer = '2' ).

exit.

endif.

Hope this solves

0 Kudos
461

Finally I copied POPUP_TO_CONFIRM to ZPOPUP_TO_CONFIRM and did modifications to fit my requirements.

Thanks for tips! Greetings.