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

dROP dOWN LIST

Former Member
0 Likes
1,031

Can any one tell me the code for drop down list program?

below is the code i am doing sometthing wrong .i am not getting the desired drop down list?


data: itab like kna1 occurs 1 with header line.

parameters: jtab like kna1-kunnr.

at selection-screen on value-request for  jtab.
select kunnr from kna1 into corresponding fields of table itab.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
  EXPORTING
*   DDIC_STRUCTURE         = ' '
    RETFIELD               = 'JTAB'
*   PVALKEY                = ' '
*   DYNPPROG               = ' '
*   DYNPNR                 = ' '
*   DYNPROFIELD            = ' '
*   STEPL                  = 0
*   WINDOW_TITLE           =
*   VALUE                  = ' '
   VALUE_ORG              = 'C'
*   MULTIPLE_CHOICE        = ' '
*   DISPLAY                = ' '
*   CALLBACK_PROGRAM       = ' '
*   CALLBACK_FORM          = ' '
*   MARK_TAB               =
* IMPORTING
*   USER_RESET             =
  TABLES
    VALUE_TAB              = ITAB
*   FIELD_TAB              =
*   RETURN_TAB             =
*   DYNPFLD_MAPPING        =
* EXCEPTIONS
*   PARAMETER_ERROR        = 1
*   NO_VALUES_FOUND        = 2
*   OTHERS                 = 3
          .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
996

Hi ,

This code will not give you a drop down , but a popup window.

Regards

Arun

10 REPLIES 10
Read only

Former Member
0 Likes
997

Hi ,

This code will not give you a drop down , but a popup window.

Regards

Arun

Read only

0 Likes
996

.

Read only

0 Likes
996

So kindly give me the code which will give me the desired output

Read only

0 Likes
996

Try This Code:-

PARAMETERS: p_carrid TYPE spfli-carrid

AS LISTBOX VISIBLE LENGTH 20

DEFAULT 'LH'.

It will display A drop Down Box.

Read only

Former Member
0 Likes
996

hi check the simple coding for this ,

TYPE-POOLS: VRM.

DATA: NAME TYPE VRM_ID,

LIST TYPE VRM_VALUES,

VALUE LIKE LINE OF LIST.

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

AT SELECTION-SCREEN OUTPUT.

NAME = 'PS_PARM'.

VALUE-KEY = '1'.

VALUE-TEXT = 'LINE 1'.

APPEND VALUE TO LIST.

VALUE-KEY = '2'.

VALUE-TEXT = 'LINE 2'.

APPEND VALUE TO LIST.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

ID = NAME

VALUES = LIST.

START-OF-SELECTION.

WRITE: / 'PARAMETER:', PS_PARM.

regards,

venkat.

Read only

Former Member
0 Likes
996

Hei

If you are asking for the drop down of a field.

In SE51 for the attributes of that field you have an option to selct it as Drop down. Please check that. It has two options. assign the appropriate one.

Plz check

thanks

Edited by: Alchemi on Mar 11, 2008 9:25 AM

Read only

0 Likes
996

No it is not for se51 it is just fro report program and f4if-int_valeu _request function moduleis mentioned in the Functional specification.So iam waiting for the code which i can use thsi fm for listbox.

Read only

0 Likes
996

If you are trying specifically for KNA1-KUNNR, this code will do what you ask.


Tables: kna1.

parameters: kunnr like kna1-kunnr.

Read only

0 Likes
996

HAI FRIENDS WHERE IS THE CODE U HAVE WRITTEN I AM UNABLE TO SEE

Read only

Former Member
0 Likes
996

hi ,

check this demo program for this DEMO_DYNPRO_DROPDOWN_LISTBOX

regards,

venkat.