Skip to Content
author's profile photo Former Member
Former Member

POPUP_TO_CONFIRM

Hi Guys,

I am using FM POPUP_TO_CONFIRM, if i click on the button NO ( answer = 2 ), then i have to display a status message and the controll should be on the same screen.

I am making use of the LEAVE SCREEN statement. But its going to short dump.

Can any one provide me a suitable solution for the above scenario ?

Thanks in advance.😊

Praveen

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

15 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 30, 2013 at 08:19 AM

    Hi praveen,

    Try with

    Set screen <screen_number>.

    leave screen.

    Thanks & regards,
    Shyja

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 30, 2013 at 08:20 AM

    Hi,

    could give the dump name ?

    regards

    Fred

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 30, 2013 at 08:21 AM

    I suppose you called the FM in the PAI of a dynpro, so LEAVE SCREEN will end the current screen and calls the subsequent screen (dynpro attribute) if you didn not use SET SCREN statement - which does not seem coherent with your requirement - "screen 1 -> screen 2 -> popup -> screen 1" ?

    What is written in the dump (ST22)

    Regards,

    Raymod

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 30, 2013 at 08:25 AM

    Hi,

    Try to display the status message display like I

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 30, 2013 at 08:25 AM

    Hi Praveen,

    I have used the same function module but I did not get any short dump.

    CALL FUNCTION 'POPUP_TO_CONFIRM'

    EXPORTING

    TITLEBAR = L_TEXT2

    * DIAGNOSE_OBJECT = ' '

    TEXT_QUESTION = L_TEXT1

    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 =

    * IV_QUICKINFO_BUTTON_1 = ' '

    * IV_QUICKINFO_BUTTON_2 = ' '

    IMPORTING

    ANSWER = L_ANSWER.

    IF L_ANSWER EQ '2'.

    MESSAGE E000(ZMESSAGES) WITH 'ENDEAVOUR'.

    ENDIF.

    May be the variable you passed are with different data types than FM expected.

    Thanks & Regards,

    Vijay

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 30, 2013 at 08:28 AM

    Hi Praveen,

    Share you dump screen...

    Please check are you using like this or not

    CALL FUNCTION 'POPUP_TO_CONFIRM'

    EXPORTING

    titlebar = 'Test Message'

    text_question = 'Can I save'

    text_button_1 = 'Yes'

    text_button_2 = 'No'

    default_button = '2'

    display_cancel_button = ''

    IMPORTING

    answer = yanswer

    EXCEPTIONS

    text_not_found = 1

    OTHERS = 2.

    CASE yanswer.

    WHEN '1'.

    * Process further checks

    WHEN '2'.

    SET SCREEN 0.

    LEAVE TO SCREEN 9001.

    WHEN OTHERS.

    ENDCASE.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 30, 2013 at 08:39 AM

    HI Praveen ,

    I Guess that the error message you would have written as type 'E' in user exit which could show a dump. Change that to Type "I".

    code like this for cancel Button click:

    ELSEIF v_n EQ '2'.

    MESSAGE 'Hi' TYPE 'I' . "DISPLAY LIKE 'S'.

    ENDIF.

    After the message the control will be in the same screen.

    Regards,

    Sivaganesh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 30, 2013 at 08:42 AM

    Try with

    LEAVE TO SCREEN 0.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 30, 2013 at 08:47 AM

    Hi Praveen ,

    "I am using FM POPUP_TO_CONFIRM, if i click on the button NO ( answer = 2 ), then i have to display a status message and the controll should be on the same screen."

    From your requirement, i am assuming that you need to display the status of the NO button press and you need to stay on the same screen (if u called FM from 9000 ,After showing the status you need to stay at the screen 9000 itself)

    CALL FUNCTION 'POPUP_TO_CONFIRM'

    ------------------------------------------------------- "your own parameters

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

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

    IMPORTING

    answer = vanswer .

    CASE vanswer.

    WHEN '1'.

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

    WHEN '2'.

    message S000 . "Your status message . (No need to use any call transaction or leave to screen )

    WHEN OTHERS.

    Make sure that vanswer is of the type char01

    ENDCASE.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 30, 2013 at 08:55 AM

    Hi,

    Try like this..

    DATA : reply TYPE c.

    CALL FUNCTION 'POPUP_TO_CONFIRM'

    EXPORTING

    * TITLEBAR = ' '

    * DIAGNOSE_OBJECT = ' '

    text_question = 'Enter your choice?'

    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 =

    * IV_QUICKINFO_BUTTON_1 = ' '

    * IV_QUICKINFO_BUTTON_2 = ' '

    IMPORTING

    ANSWER = reply

    * TABLES

    * PARAMETER =

    * EXCEPTIONS

    * TEXT_NOT_FOUND = 1

    * OTHERS = 2

    .

    if reply ne 0.

    MESSAGE 'Hello..' TYPE 'I'.

    ENDIF.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.