‎2006 Aug 09 4:01 PM
Hi Friends,
In my selection I need to restrict one field to only four values. I think I should use at selection-screen value request. but idoono how to use it I mean donno how to give possible input values.
plz help me
‎2006 Aug 09 4:03 PM
hi do like this:
data : p_matnr like mara-matnr.
data : begin of itab occurs 0,
matnr like mara-matnr,
end of itab.
select matnr
into table itab
from mara up to 4 rows.
if sy-subrc = 0.
sort itab by matnr.
endif.
<b>at selection-screen on value-request for p_matnr.</b>
call function <b>'F4IF_INT_TABLE_VALUE_REQUEST'</b>
exporting
retfield = 'MATNR'
dynprofield = p_matnr
tables
value_tab = itab.
‎2006 Aug 09 4:03 PM
hi do like this:
data : p_matnr like mara-matnr.
data : begin of itab occurs 0,
matnr like mara-matnr,
end of itab.
select matnr
into table itab
from mara up to 4 rows.
if sy-subrc = 0.
sort itab by matnr.
endif.
<b>at selection-screen on value-request for p_matnr.</b>
call function <b>'F4IF_INT_TABLE_VALUE_REQUEST'</b>
exporting
retfield = 'MATNR'
dynprofield = p_matnr
tables
value_tab = itab.
‎2006 Aug 09 4:08 PM
hi radhika,
DATA: L_RETFIELD TYPE DFIES-FIELDNAME.
DATA: T_FIELD like DFIES occurs 0 with header line,
T_RETURN like DDSHRETVAL occurs 0 with header line.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = L_RETFIELD
TABLES
VALUE_TAB = t_values
FIELD_TAB = t_Field
RETURN_TAB = t_return
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
check this thread...
hope this helps,
do reward if it helps,
priya.
Message was edited by: Priya
‎2006 Aug 09 4:10 PM
Check this program, you can populate some default values, they will come as LIST BOX. user can choose from them
check this link
TYPE-POOLS : VRM.
DATA: param TYPE vrm_id,
values TYPE vrm_values,
value LIKE LINE OF values.
selection-screen begin of line.
SELECTION-SCREEN COMMENT 3(10) TEXT-001.
PARAMETERS: p_name(5) AS LISTBOX VISIBLE LENGTH 10.
selection-screen end of line.
AT SELECTION-SCREEN OUTPUT.
param = 'P_NAME'.
value-key = '1'.
value-text = 'JOHN'.
APPEND value TO values.
value-key = '2'.
value-text = 'PETER'.
APPEND value TO values.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING id = param
values = values.
REFRESH VALUES.
START-OF-SELECTION.
WRITE 😕 'HELLO world'.
regards
srikanth
Message was edited by: Srikanth Kidambi
‎2006 Aug 09 4:11 PM
Have a look at the demo program DEMO_DROPDOWN_LIST_BOX.
Get the 4 valid values instead of the select statements in the demo example.
regards,
Ravi
‎2006 Aug 09 4:14 PM
Hi Radhika,
chk this link:
http://www.sapgenie.com/abap/tips_and_tricks.htm
http://fuller.mit.edu/tech/search_helps.ppt#272,20,Programming in screens
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbaa5435c111d1829f0000e829fbfe/content.htm
regards,
keerthi.
Message was edited by: keerthi kiran varanasi
Message was edited by: keerthi kiran varanasi
‎2011 Oct 06 6:49 PM