Application Development and Automation 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: 
Read only

selection screen

Former Member
0 Likes
555

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
516

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.

5 REPLIES 5
Read only

Former Member
0 Likes
517

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.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
516

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

Read only

Former Member
0 Likes
516

Try FM G_POPUP_FOR_ENTERING_VALUES.

Rob

Read only

Former Member
0 Likes
516

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.

Read only

0 Likes
516

Is there any way of making those fields mandatory.