‎2007 Jun 12 6:16 AM
hi all im making a block on the selection screen in which i want to select an integer only 1 or 2 so that i can use it for my reference in the prog. how can i do it. like at the user end i want to provide the user with only two option.
can you help me out in generating a f4 help
‎2007 Jun 12 6:20 AM
data : NAME type VRM_ID,
LIST type VRM_VALUES,
VALUE like line of LIST.
at selection-screen output.
VALUE-KEY = '1'.
VALUE-TEXT = 'One'.
append VALUE to LIST.
VALUE-KEY = '2'.
VALUE-TEXT = 'Two'.
append VALUE to LIST.
call function 'VRM_SET_VALUES'
exporting
ID = NAME
VALUES = LIST.
clear LIST.Regards
Gopi
‎2007 Jun 12 6:18 AM
create a domain in SE11 of char 1.
give the fixed value 1 and 2 in the values tab of the domain .
in selection screen
parameters : p_char type domainname value check
‎2007 Jun 12 6:20 AM
data : NAME type VRM_ID,
LIST type VRM_VALUES,
VALUE like line of LIST.
at selection-screen output.
VALUE-KEY = '1'.
VALUE-TEXT = 'One'.
append VALUE to LIST.
VALUE-KEY = '2'.
VALUE-TEXT = 'Two'.
append VALUE to LIST.
call function 'VRM_SET_VALUES'
exporting
ID = NAME
VALUES = LIST.
clear LIST.Regards
Gopi
‎2007 Jun 12 7:13 AM
thanks gopi
what is name and list in the exporting parameter.
how to attach this to the function module to the selection screen parameter.
‎2007 Jun 12 6:20 AM
Hi,
For that u can make a drop down list,
use type-pools :vrm for that.
regards,
sudha.
‎2007 Jun 12 6:21 AM
‎2007 Jun 12 6:23 AM
Hi,
You can provide the LIST BOX..using the function module VRM_SET_VALUES.
Ex..
TYPE-POOLS: vrm.
DATA: ivrm_values TYPE vrm_values.
DATA: xvrm_values LIKE LINE OF ivrm_values.
DATA: name TYPE vrm_id.
PARAMETERS: p_INT AS LISTBOX VISIBLE LENGTH 10.
INITIALIZATION.
name = 'P_INT'.
xvrm_values-key = '1'.
xvrm_values-text = 'First value'.
APPEND xvrm_values TO ivrm_values.
xvrm_values-key = '2'.
xvrm_values-text = 'Second value'.
APPEND xvrm_values TO ivrm_values.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = ivrm_values.
Also Check the demo program
DEMO_DYNPRO_DROPDOWN_LISTBOX
Thanks,
Naren
‎2007 Jun 12 6:29 AM
Hi Madhvi,
Create a domain using SE11 and in 'Value Range' tab fill '1' and '2'. Name it as YD1.
Create a data element and use 'YD1' as its domain. Name it as YDE1.
In your program you can use this code:
PARAMETER p_test TYPE yde1 AS LISTBOX VISIBLE LENGTH 30 OBLIGATORY.
Hope this will help you..
‎2007 Jun 12 6:31 AM
see the sample code
SELECT connid cityfrom cityto deptime
FROM spfli
INTO CORRESPONDING FIELDS OF wa_spfli
WHERE carrid = demof4help-carrier2.
value-key = wa_spfli-connid.
CONCATENATE value-text
wa_spfli-cityfrom
wa_spfli-cityto
INTO value-text SEPARATED BY space.
APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.girish