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

Input help

Former Member
0 Likes
585

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
557

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.

6 REPLIES 6
Read only

Former Member
0 Likes
558

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.

Read only

Former Member
0 Likes
557

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

Read only

Former Member
0 Likes
557

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

Read only

Former Member
0 Likes
557

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

Read only

Former Member
0 Likes
557

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

Read only

Former Member
0 Likes
557

sf