‎2008 Mar 11 2:14 PM
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.
‎2008 Mar 11 2:20 PM
Hi ,
This code will not give you a drop down , but a popup window.
Regards
Arun
‎2008 Mar 11 2:20 PM
Hi ,
This code will not give you a drop down , but a popup window.
Regards
Arun
‎2008 Mar 11 2:22 PM
‎2008 Mar 11 2:22 PM
So kindly give me the code which will give me the desired output
‎2008 Mar 11 2:31 PM
Try This Code:-
PARAMETERS: p_carrid TYPE spfli-carrid
AS LISTBOX VISIBLE LENGTH 20
DEFAULT 'LH'.
It will display A drop Down Box.
‎2008 Mar 11 2:23 PM
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.
‎2008 Mar 11 2:24 PM
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
‎2008 Mar 11 2:29 PM
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.
‎2008 Mar 11 2:33 PM
If you are trying specifically for KNA1-KUNNR, this code will do what you ask.
Tables: kna1.
parameters: kunnr like kna1-kunnr.
‎2008 Mar 11 2:35 PM
HAI FRIENDS WHERE IS THE CODE U HAVE WRITTEN I AM UNABLE TO SEE
‎2008 Mar 11 2:46 PM
hi ,
check this demo program for this DEMO_DYNPRO_DROPDOWN_LISTBOX
regards,
venkat.