01-07-2008 9:39 AM
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
01-07-2008 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
01-07-2008 11:37 AM
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
01-07-2008 11:40 AM
Hi,
Please refer to DEMO_SEL_SCREEN_PUSHBUTTON.
In this program everything is clearly mentioned.
Thanks,
Sri.
01-07-2008 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
01-07-2008 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
01-07-2008 11:27 AM
Hi,
PLease refer SAP standard demo program.
DEMO_SEL_SCREEN_PUSHBUTTON
Thanks,
Sri.
01-07-2008 11:31 AM
Hi,
You can also use POPUP_TO_CONFIRM_DATA_LOSS
to get a pop up window.
Regards
Praba
01-07-2008 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.
01-08-2008 4:59 AM
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
01-07-2008 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.
01-08-2008 5: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