‎2006 Nov 02 7:03 PM
I have a parameter customer number ,for a particular value of a customer a window has to pop up asking the user to enter zip code and region.I know that i have to use at selection-screen output for that but what is the exact statement for getting the pop up window with those two parameters.
‎2006 Nov 02 7:21 PM
At selection screen output will be used here
In that you can call
call function 'POPUP_GET_VALUES'
go through this function module it will explain how to get popup values.. you can use any number of parameters in it.
Prince.
‎2006 Nov 02 7:21 PM
At selection screen output will be used here
In that you can call
call function 'POPUP_GET_VALUES'
go through this function module it will explain how to get popup values.. you can use any number of parameters in it.
Prince.
‎2006 Nov 02 7:23 PM
Check this sample program.
report zrich_0001 .
data: ivals type table of sval with header line.
data: p_pstlz type kna1-pstlz,
p_regio type kna1-regio.
parameters: p_kunnr type kna1-kunnr.
at selection-screen.
ivals-tabname = 'KNA1'.
ivals-fieldname = 'PSTLZ'.
append ivals.
ivals-tabname = 'KNA1'.
ivals-fieldname = 'REGIO'.
append ivals.
call function 'POPUP_GET_VALUES'
exporting
* NO_VALUE_CHECK = ' '
popup_title = 'Enter Zip and Region'
* START_COLUMN = '5'
* START_ROW = '5'
* IMPORTING
* RETURNCODE =
tables
fields = ivals
exceptions
error_in_fields = 1
others = 2
.
read table ivals with key fieldname = 'PSTLZ'.
if sy-subrc = 0.
p_pstlz = ivals-value.
endif.
read table ivals with key fieldname = 'REGIO'.
if sy-subrc = 0.
p_regio = ivals-value.
endif.
start-of-selection.
write:/ p_kunnr, p_pstlz, p_regio.
Regards,
Rich Heilman
‎2006 Nov 02 7:23 PM
‎2006 Nov 02 7:27 PM
Hi Priyanka,
POPUP_GET_VALUES is definitely the required FM to display a popup with required set of input the user needs to enter.
Just check this code.
This will popup a dialog window with CARRID and CONNID values , which you can change to suit your requirements.
REPORT ZSHAIL_1 .
data: itab type table of sval with header line.
itab-tabname = 'SFLIGHT'.
itab-fieldname = 'CARRID'.
append itab.
clear itab.
itab-tabname = 'SFLIGHT'.
itab-fieldname = 'CONNID'.
append itab.
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
NO_VALUE_CHECK = ' '
popup_title = 'hello'
START_COLUMN = '5'
START_ROW = '5'
IMPORTING
RETURNCODE =
tables
fields = itab[]
EXCEPTIONS
ERROR_IN_FIELDS = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hope your query is solved.
<b>Award points if found useful.</b>
Regards,
SP.
‎2006 Nov 02 7:52 PM