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 list box..

Former Member
0 Likes
557

hi all,

In my selection screen program i have designed a list box.when i select a detail from the list box corresponding details of the value should be diaplayed in the input field.without pressing the enter key.i want to fetch the details...

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
522

You have to use FM 'DYNP_VALUES_READ'

4 REPLIES 4
Read only

Former Member
0 Likes
523

You have to use FM 'DYNP_VALUES_READ'

Read only

Former Member
0 Likes
522

Hi,

Check this link..

Read only

Former Member
0 Likes
522

Hi

Mention an user command for the listbox and using at selection screen event write the correspondiong logic for your requirement.

PARAMETERS p_carrid TYPE spfli-carrid

AS LISTBOX VISIBLE LENGTH 20

USER-COMMAND onli

DEFAULT 'LH'.

PARAMETERS p_carrid TYPE spfli-carrid

AS LISTBOX VISIBLE LENGTH 20

USER-COMMAND onli

DEFAULT 'LH'.

AT SELECTION-SCREEN.

IF sy-ucomm = 'ONLI'.

MESSAGE p_carrid TYPE 'I'.

ENDIF.

START-OF-SELECTION.

.....

Thanks,

Rakesh.

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
522

Hi,

Refer code:-



TABLES : Y_MOVIE.

TYPE-POOLS: VRM.

TYPES : BEGIN OF MOVIE,
        YR LIKE Y_MOVIE-YR,
        CATEGORY LIKE Y_MOVIE-CATEGORY,
        WINNER LIKE Y_MOVIE-WINNER,
        NOTES LIKE Y_MOVIE-NOTES,
        END OF MOVIE.

DATA: NAME TYPE VRM_ID,
      LIST TYPE VRM_VALUES,
      VALUE LIKE LINE OF LIST,
      MOVIETAB TYPE STANDARD TABLE OF MOVIE INITIAL SIZE 10 WITH HEADER LINE.

PARAMETERS: CATEGORY(10) AS LISTBOX VISIBLE LENGTH 10.

AT SELECTION-SCREEN.
  IF CATEGORY EQ ''.
    MESSAGE E006.
  ENDIF.

AT SELECTION-SCREEN OUTPUT.

  NAME = 'CATEGORY'.

  VALUE-KEY = 'PIC'.
  VALUE-TEXT = 'PIC'.
  APPEND VALUE TO LIST.

  VALUE-KEY = 'MAL'.
  VALUE-TEXT = 'MAL'.
  APPEND VALUE TO LIST.

  VALUE-KEY = 'FEM'.
  VALUE-TEXT = 'FEM'.
  APPEND VALUE TO LIST.

  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      ID     = NAME
      VALUES = LIST.

START-OF-SELECTION.

  WRITE : / 'Category Selected :', CATEGORY.

  ULINE.

  SELECT *
  FROM Y_MOVIE INTO CORRESPONDING FIELDS OF TABLE MOVIETAB
  WHERE CATEGORY = CATEGORY.

END-OF-SELECTION.

  WRITE : /1 'Year', 6 'Category', 16 'Winner', 50 'Notes'.
  ULINE.

  LOOP AT MOVIETAB.

    WRITE : /1 MOVIETAB-YR, 8 MOVIETAB-CATEGORY, 16 MOVIETAB-WINNER, 50 MOVIETAB-NOTES.
    ULINE.

  ENDLOOP.

  IF SY-SUBRC <> 0.
    MESSAGE I005.
  ENDIF.

Use FM DYNP_VALUE_READ to read the value w/o pressing enter.

Hope this helps you.

Regards,

Tarun