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: 

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

senthil_kumar29
Participant
0 Kudos

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

11 REPLIES 11

former_member667836
Active Participant
0 Kudos

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

0 Kudos

Hi,

Thank for your reply.

Ho can I declare OK_CODE in element list for the pop up window. sorry I am not clear about that.

Cheers,

Senthil

0 Kudos

Hi,

Please refer to DEMO_SEL_SCREEN_PUSHBUTTON.

In this program everything is clearly mentioned.

Thanks,

Sri.

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Senthil,

Use FM ''POPUP_TO_CONFIRM''.

U will get the result.

If it is usefull pls do reward pts.

Regards

Srimanta

Former Member
0 Kudos

Hi,

PLease refer SAP standard demo program.

DEMO_SEL_SCREEN_PUSHBUTTON

Thanks,

Sri.

Former Member
0 Kudos

Hi,

You can also use POPUP_TO_CONFIRM_DATA_LOSS

to get a pop up window.

Regards

Praba

Former Member
0 Kudos

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.

0 Kudos

Hi,

I am getting a value in the pop up window from the user.

These functions don't have options to accommodate input field as well as Push button. That why I am using pop up screen window.

Cheers,

Senthil

Former Member
0 Kudos

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.

Former Member
0 Kudos

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