Skip to Content

Need to have pop up window in selection screen and capture the user action.

Hello Friends,

I have a requirement, that need to show a pop up window after execution, and to get the action from user using a Push button.

I create a selection screen and a sub screen as window.

After user execute from the selection screen, I am popping up this window.

Window contains some input values to be entered and push button to identify the user action.

I try to capture the user action using sy-ucomm, but it does not hold any value when user press the button.

How to overcome this issue.

Here is the definition of the window.

  • Pop Up Window for getting values

SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW TITLE title .

PARAMETER : p_vdate LIKE t9aa01-validfrom,

p_dcggt LIKE t9aa01-hkont,

p_dcgst1 LIKE t9aa01-hkont,

p_dcgst2 LIKE t9aa01-hkont,

p_na LIKE t9aa01-hkont.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 20.

SELECTION-SCREEN PUSHBUTTON 2(10) text-001 USER-COMMAND SVE.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF SCREEN 500.

Cheers,

Senthil

Edited by: Senthil on Jan 7, 2008 11:03 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • Posted on Jan 07, 2008 at 10:05 AM

    Hi senthil,

    Make sure that you declared the OK_CODE for the screen(pop-up window) in the element list.hope this will solve the issue.

    regards

    shibu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2008 at 11:11 AM

    Hi,

    Try using the below code.

    data : w_var type string.

    CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'

    EXPORTING

    DEFAULTOPTION = 'Y'

    textline1 = 'test '

    • TEXTLINE2 = ' '

    titel = 'check'

    • START_COLUMN = 25

    • START_ROW = 6

    • CANCEL_DISPLAY = 'X'

    IMPORTING

    ANSWER = w_var.

    .

    if w_var = 'J'.

    else.

    endif.

    Comments : J indicates Yes and N indicates No

    Regards,

    Jeswanth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2008 at 11:18 AM

    Hi Senthil,

    Use FM ''POPUP_TO_CONFIRM''.

    U will get the result.

    If it is usefull pls do reward pts.

    Regards

    Srimanta

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2008 at 11:27 AM

    Hi,

    PLease refer SAP standard demo program.

    DEMO_SEL_SCREEN_PUSHBUTTON

    Thanks,

    Sri.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2008 at 11:31 AM

    Hi,

    You can also use POPUP_TO_CONFIRM_DATA_LOSS

    to get a pop up window.

    Regards

    Praba

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2008 at 12:06 PM

    Hi senthil,

    Use FM 'K_KKB_POPUP_RADIO3'.

    CALL FUNCTION ''K_KKB_POPUP_RADIO3'

    IMPORTING

    VALUE(I_TITLE) = 'ur title'

    VALUE(I_TEXT1) = 'user i/p'

    VALUE(I_TEXT2) = 'user i/p'

    VALUE(I_DEFAULT) = 'user i/p'

    EXPORTING

    VALUE(I_RESULT) = ' value'

    *" EXCEPTIONS

    *" CANCEL

    u vl get the value here like if u select first option then value

    case value.

    would be '1'

    when 1.

    processing code.....

    when 2.

    processing code..

    endcase.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2008 at 12:11 PM

    Hi senthil,

    Use FM 'K_KKB_POPUP_RADIO3'.

    CALL FUNCTION ''K_KKB_POPUP_RADIO3'

    IMPORTING

    VALUE(I_TITLE) = 'ur title'

    VALUE(I_TEXT1) = 'user i/p'

    VALUE(I_TEXT2) = 'user i/p'

    VALUE(I_DEFAULT) = 'user i/p'

    EXPORTING

    VALUE(I_RESULT) = ' value'

    *" EXCEPTIONS

    *" CANCEL

    u vl get the value here like if u select first option then value

    would be '1'.

    CASE value.

    WHEN 1.

    processing code.....

    WHEN 2.

    processing code..

    ENDCASE.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 05:03 AM

    Dont use subscreens.

    Call a dialog screen using:

    Call screen '100' starting at 5 5ending at 15, 15.

    Draw the layout in se51 and capture sy-ucomm.

    Regards,

    Nishant

    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.