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

Creating Drop Down list using selection screen

Former Member
0 Likes
360

Hi,

I want to create a drop down list using selection screen for my report. I want give three static values for that list box. How can I do that?

Thanking you in advance.

Regards,

Eswar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
330

hi

try goin thru this post

hope it answers u query

2 REPLIES 2
Read only

Former Member
0 Likes
331

hi

try goin thru this post

hope it answers u query

Read only

Former Member
0 Likes
330

you can use the functionality, Instead a specific screen you have to code for selection screen. For that you can code in:

at selection-screen for value request event....

REPORT demo_dropdown_list_box.

*&---------------------------------------------------------------------*
*& Global Declarations                                                 *
*&---------------------------------------------------------------------*

* Screen Interfaces

TABLES sdyn_conn.
DATA   ok_code TYPE sy-ucomm.

* Global data

TYPES: BEGIN OF type_carrid,
         carrid type spfli-carrid,
         carrname type scarr-carrname,
       END OF type_carrid.

DATA itab_carrid TYPE STANDARD TABLE OF type_carrid.


*&---------------------------------------------------------------------*
*& Processing Blocks called by the Runtime Environment                 *
*&---------------------------------------------------------------------*

* Event Block START-OF-SELECTION

START-OF-SELECTION.
  CALL SCREEN 100.

* Dialog Module PBO

MODULE status_0100 OUTPUT.
  SET PF-STATUS 'SCREEN_100'.
ENDMODULE.

* Dialog Modules PAI

MODULE cancel INPUT.
  LEAVE PROGRAM.
ENDMODULE.

*

MODULE user_command_0100 INPUT.
  CASE ok_code.
    WHEN 'SELECTED'.
      MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
  ENDCASE.
ENDMODULE.

* Dialog Module POV

MODULE create_dropdown_box INPUT.

  SELECT carrid carrname
                FROM scarr
                INTO CORRESPONDING FIELDS OF TABLE itab_carrid.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
       EXPORTING
            retfield        = 'CARRID'
            value_org       = 'S'
       TABLES
            value_tab       = itab_carrid
       EXCEPTIONS
            parameter_error = 1
            no_values_found = 2
            OTHERS          = 3.
  IF sy-subrc <> 0.
    ...
  ENDIF.

ENDMODULE.