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

Selection Screen: change F4 Help values

Former Member
0 Likes
2,375

HI,

i using a selection screen with:

parameters: pstat like edidc-status obligatory.

is it possible to midify the entries in the case the user is performing the F4 help ?

example: i want to show the values beginning with "5*" only (in the F4 help screen)

Edited by: Gordon Breuer on Oct 27, 2008 2:48 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,592

you can try some thing like this,,

data: begin of t_status occurs 0,
         status type edids-status
         STATXT type edids-statxt,
        end of t_status.
at selection-screen on value-request for p_status.
"populate the the table.
"call the function,
  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
    retfield               = 'STATUS'
    dynpprog               = sy-repid
    dynpnr                 = sy-dynnr
    dynprofield            = 'P_STATUS'
    tables
    value_tab              = t_status
    RETURN_TAB             = t_return
   exceptions
     parameter_error        = 1
     no_values_found        = 2
     others                 = 3
            .
if t_return is not initial.
 read table t_retun index 1.
 if sy-subrc eq 0.
  p_status = t_return-fieldval.
 endif.

endif.

11 REPLIES 11
Read only

Former Member
0 Likes
1,592

yes, you can show your own values, using the at selection-screen on value-request event.

Read only

0 Likes
1,592

great, that´s it.

Im using

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = field_tab-fieldname

tables

value_tab = value_tab

field_tab = field_tab

return_tab = return_tab

exceptions

parameter_error = 1

no_values_found = 2

others = 3.

to add new values to F4 help .

How can i add a Second Field ?

Read only

0 Likes
1,592

> to add new values to F4 help .

> How can i add a Second Field ?

you mean text field...? you can populate the table what ever you want with how many ever fields (status and status text) and send the table to the function .

call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'STATUS' "assume you have a field called status inside your internal table
tables
value_tab = value_tab
field_tab = field_tab
return_tab = return_tab
exceptions
parameter_error = 1
no_values_found = 2
others = 3.

Read only

0 Likes
1,592

I want to show 2 filds in the F4 Help.

Field1 = Status53

Field2 = IDoc processed

F4 Help:

53 IDoc Processed

Read only

0 Likes
1,592

Just fill VALUE_TAB with these two fields.

Regards

Read only

0 Likes
1,592

it looks like that. But it´s not working

field_tab-fieldname = 'STATUS'.

field_tab-tabname = 'TEDS2'.

append field_tab.

value_tab-stat = '53'.

value_tab-desc = 'processed'.

append value_tab.

value_tab-stat = '51'.

value_tab-desc = 'not processed'.

append value_tab.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = field_tab-fieldname

tables

value_tab = value_tab

field_tab = field_tab

return_tab = return_tab

exceptions

parameter_error = 1

no_values_found = 2

others = 3.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,592

Yes you can, in the AT SELECTION-SCREEN ON VALUE-REQUEST you may

- Fill an internal table and use [F4IF_INT_TABLE_VALUE_REQUEST|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=f4if_int_table_value_request&adv=false&sortby=cm_rnd_rankvalue#]

- use the [F4IF_FIELD_VALUE_REQUEST|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=f4if_field_value_request&adv=false&sortby=cm_rnd_rankvalue#] and use the callback_program and callback_form to filter the data to display. (This one is longer to program, but user get the whole search-helps linked to the field)

If you use another field to restrict the search, read it with [DYNP_VALUES_READ |https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=dynp_values_read+&adv=false&sortby=cm_rnd_rankvalue#]as the POV/ON VALUE-REQUEST is executed before the PAI, and any change made by user is not yet accessible.

Regards

Read only

Former Member
0 Likes
1,593

you can try some thing like this,,

data: begin of t_status occurs 0,
         status type edids-status
         STATXT type edids-statxt,
        end of t_status.
at selection-screen on value-request for p_status.
"populate the the table.
"call the function,
  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
    retfield               = 'STATUS'
    dynpprog               = sy-repid
    dynpnr                 = sy-dynnr
    dynprofield            = 'P_STATUS'
    tables
    value_tab              = t_status
    RETURN_TAB             = t_return
   exceptions
     parameter_error        = 1
     no_values_found        = 2
     others                 = 3
            .
if t_return is not initial.
 read table t_retun index 1.
 if sy-subrc eq 0.
  p_status = t_return-fieldval.
 endif.

endif.

Read only

0 Likes
1,592

Now, it´s working but without any entries.

at selection-screen on value-request for p_status.

data: begin of value_tab occurs 0,

status type edids-status,

STATXT type edids-statxt,

end of value_tab.

data : return_tab like ddshretval occurs 0 with header line.

data : x type string.

refresh value_tab[].

refresh return_tab[].

value_tab-status = '53'.

value_tab-statxt = 'processed'.

append value_tab.

value_tab-status = '51'.

value_tab-statxt = 'not processed'.

append value_tab.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = 'STATUS'

  • dynpprog = sy-repid

  • dynpnr = sy-dynnr

dynprofield = 'P_STATUS'

tables

value_tab = value_tab

RETURN_TAB = return_tab

exceptions

parameter_error = 1

no_values_found = 2

others = 3

.

if sy-subrc eq 0.

p_status = return_tab-fieldval.

endif.

Read only

0 Likes
1,592

change the code with this and see.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'STATUS'
VALUE_ORG = 'S'  "important parameter you missed
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_STATUS'
tables
value_tab = value_tab
RETURN_TAB = return_tab
exceptions
parameter_error = 1
no_values_found = 2
others = 3
.
if sy-subrc eq 0.
p_status = return_tab-fieldval.
endif.

Read only

0 Likes
1,592

Vijay,

Thanks for your help.

What is the use of VALUE_ORG ?