on 11-24-2005 4:14 AM
What I am doing:
<b>1.</b>
I have a SELECT-OPTIONS
so_stat FOR tj30t-txt04
on my sel screen and I am calling the F4 help on
AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_stat-low.
event which is rightly calling
F4IF_INT_TABLE_VALUE_REQUEST
function module and showing the desired F4 help.
<b>2.</b>
multiple_choice = 'X' is showing me check box against each entries in my F4 help.
<b>When I am selecting desired entries,</b>
It is populating
return_tab
table with all the entries I have selected. But its <b>not</b> filling up the range of so_stat.
So is it my resp to fill up the so_stat.
Hi,
Check out this..........
**************************
data: begin of t_itab occurs 0,
pernr like zfdmr_records-pernr,
end of t_itab.
DATA: t_return like ddshretval occurs 0 with header line.
**----
*at selection-screen on value-request for s_pernr-low.
**----
perform get_values changing s_pernr-low.
*
**----
*at selection-screen on value-request for s_pernr-high.
**----
perform get_values changing s_pernr-high.
&----
*& Form get_values
&----
text
----
-->P_S_PERNR_LOW text
----
FORM get_values CHANGING P_S_PERNR.
refresh t_itab.
clear t_return.
select pernr from zfdmr_records into table t_itab.
delete adjacent duplicates from t_itab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'PERNR'
PVALKEY = ' '
DYNPPROG = sy-cprog
DYNPNR = sy-dynnr
DYNPROFIELD = 'ZFDMR_RECORDS-PERNR'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = 'F'
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
TABLES
VALUE_TAB = t_itab
FIELD_TAB =
RETURN_TAB = t_return
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*************
I think here you need to define SELECT-OPTION with NO INTERVALS.
*******
describe table t_return lines LINE.
loop at t_return.
READ TABLE t_return INDEX 1.
p_s_pernr-low = t_return-fieldval.
p_s_pernr-sign = 'I'.
p_s_pernr-option = 'EQ'.
append p_s_pernr.
clear p_s_pernr.
endloop.
********************
ENDFORM. " get_values
I hope this will solve your issue.
Thanks.
If your issue is solved give points and close the thread.
Message was edited by: Deepak333 k
Message was edited by: Deepak333 k
Message was edited by: Deepak333 k
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Flora,
run the following code. i think this is what you r looking for.
plz reward points if it helps you,
REPORT zanid_test4 MESSAGE-ID zz.
*
tables: mara.
select-options s_matkl for mara-matkl.
at selection-screen on value-request for s_matkl-low.
perform get_value_F4.
&----
*& Form get_value_F4
&----
form get_value_F4.
DATA: BEGIN OF lt_itab2 OCCURS 0,
matnr like mara-matkl,
END OF lt_itab2.
data: begin of lt_selected occurs 0.
include structure DDSHRETVAL.
data end of lt_selected.
select matnr from mara into corresponding
fields of table lt_itab2.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'S_MATNR'
PVALKEY = ' '
dynpprog = SY-CPROG
dynpnr = '1000'
dynprofield = 'C'
STEPL = 0
window_title = 'SELECT'
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = 'X'
DISPLAY = 'F'
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
TABLES
value_tab = lt_ITAB2
RETURN_TAB = lt_selected.
loop at lt_selected.
s_matkl-low = lt_selected-FIELDVAL.
append s_matkl.
endloop.
endform. " get_value_F4
Message was edited by: Anid
Hi,
Just try this.If you select F4 in multiple options of select-options,it will work.
tables kna1.
data:
begin of t_values occurs 2,
value like kna1-begru,
end of t_values,
t_return like ddshretval occurs 0 with header line.
select-options s_begru for kna1-begru.
at selection-screen on value-request for s_begru-low.
refresh t_values.
t_values = 'PAR*'.
append t_values.
t_values = 'UGG'.
append t_values.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'BEGRU'
value_org = 'S'
MULTIPLE_CHOICE = 'X'
tables
value_tab = t_values
return_tab = t_return
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc = 0.
loop at t_return.
s_begru-low = t_return-fieldval.
s_begru-sign = 'I'.
s_begru-option = 'EQ'.
append s_begru.
endloop.
endif.
at selection-screen output.
sort s_begru by low high.
delete adjacent duplicates from s_begru.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.