2008 Oct 27 1:47 PM
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
2008 Oct 27 2:42 PM
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.
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
2008 Oct 27 1:49 PM
yes, you can show your own values, using the at selection-screen on value-request event.
2008 Oct 27 2:22 PM
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 ?
2008 Oct 27 2:29 PM
> 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.
2008 Oct 27 2:31 PM
I want to show 2 filds in the F4 Help.
Field1 = Status53
Field2 = IDoc processed
F4 Help:
53 IDoc Processed
2008 Oct 27 2:34 PM
2008 Oct 27 2:41 PM
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.
2008 Oct 27 2:24 PM
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
2008 Oct 27 2:42 PM
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.
2008 Oct 27 2:51 PM
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.
2008 Oct 27 2:58 PM
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.
2008 Oct 27 3:03 PM