2009 Feb 13 6:09 AM
Hello Experts,
I want F4 help on more than 2 field in my selection-screen.I want that value appear in second F4 help
corresponds to the value entered by user in first F4 help.
It is working fine when user enter one value in first field,but when he enters more than one input in multiple selection for first field, it is taking last input & shows in second F4 help corresponding to last input.
I want F4 help as in standard table, suppose in table t001l ,if user enter 2 plant & press F4 help for st. loc,it will show oonly those st.loc corresponds to those 2 plant.
And also i want to disable field so that can forced user to select from F4 help ,
Aastha
Hello Experts,
I want F4 help on more than 2 field in my selection-screen.I want that value appear in second F4 help
corresponds to the value entered by user in first F4 help.
It is working fine when user enter one value in first field,but when he enters more than one input in multiple selection for first field, it is taking last input & shows in second F4 help corresponding to last input.
I want F4 help as in standard table, suppose in table t001l ,if user enter 2 plant & press F4 help for st. loc,it will show oonly those st.loc corresponds to those 2 plant.
And also i want to disable field so that can forced user to select from F4 help ,
Aastha
2009 Feb 13 6:12 AM
Hi,
Use At selection-screen for value-request for bukrs.
PARAMETERS: Bukrs TYPE spfli-carrid,
name1 TYPE spfli-carrid.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR name1.
CALL SCREEN 100 STARTING AT 10 5
ENDING AT 50 10.
MODULE value_list OUTPUT.
SUPPRESS DIALOG.
LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
SET PF-STATUS space.
NEW-PAGE NO-TITLE.
select single bukrs from <Databasetable> into <ITAB>-BUkrs
where name1 = name1.
Write : / Itab-bukrs.
hide bukrs.
Endselect.
ENDMODULE.
AT LINE-SELECTION.
CHECK NOT name1 IS INITIAL.
LEAVE TO SCREEN 0.This will resolve the issue
regards
gurpreet:)
2009 Feb 13 6:18 AM
Hello Gurpreet,
I want it in report not module proramming.
form Create_F4_Help_WERKS.
refresh values1.
select werks name1
into corresponding fields of table values1
from t001w.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'WERKS'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'S_WERKS'
value_org = 'S'
*multiple_choice = 'X'
display = 'F'
tables
value_tab = values1
return_tab = return.
refresh dynfields.
read table return with key fieldname =
'T001W-WERKS'.
dynfields-fieldname = return-retfield.
dynfields-fieldvalue = return-fieldval.
append dynfields.
clear dynfields.
endform.
2009 Feb 13 6:34 AM
Hi,
The code is for Reports only:
Just a bit of Module pool Concept is used to call the Additional Screen on F4.
If your are using function Module it will effect the Performance of your program.
When ever you call function Module the memory of Function Group is also loaded.
The codes are implemented by me in many reports .
copy the Code into an editor it will work.:)
Thanks,
Gurpreet
2009 Feb 13 6:13 AM
F4IF_INT_TABLE_VALUE_REQUES
use this fonction module .. then you get that functionality ..
2009 Feb 13 6:17 AM
hi,
u can apply search help in following manner:
if the requirement is:
There are 2parameters in selection screen. For e.g. matnr and werks.
If I am giving matnr then respect to that matnr i should get only those plant in F4 help.
Solution:
AT SELECTION-SCREEN ON VALUE-REQUEST FOR werks.
select the werks based on plant in internal.table
use f.m
F4IF_INT_TABLE_VALUE_REQUEST.
and pass the i.tab here in
tables
value_t = i.tabOr
Follow the psudo code below.
Note: it_matnr has only single field MATNR.
**--- Return table to handle selected field in F4 help ---**
data: it_return like ddshretval occurs 0 with header line.
parameters: p_matnr type marc-matnr,
p_werks type marc-werks.
at selection-screen on value-request for p_repnam.
select matnr
from marc
into table it_matnr
where werks eq p_werks.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'OBJ_NAME'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
callback_program = sy-cprog
tables
value_tab = it_matnr
return_tab = it_return
exceptions
parameter_error = 1
no_values_found = 2.
if sy-subrc eq 0.
loop at it_return.
clear p_repnam.
p_repnam = it_return-fieldval.
endloop.
endif.hope it will help you
regards
rahul
2009 Feb 13 6:43 AM
Hello Rahul,
My req is not for two parameters, i want that if user put more than one input in multiple selection then in second F4 help it will filter accordingly
2009 Feb 13 6:19 AM
Hi Aastha,
Refer this code for F4 help of one field depends on other field:-
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
2009 Feb 13 6:27 AM
The FM 'DYNP_VALUES_READ' fetches the value entered in the field 'Legreg'. then fetch the corresponding values for 'lictyp' from database table based on the 'legreg' into an
internal table and pass it to the FM 'F4IF_INT_TABLE_VALUE_REQUEST'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'GEART'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'WA_TC-LICTYP'
value_org = 'S'
TABLES
value_tab = t_lictyp.
Now the f4 help values for the field 'lictyp' will be filtered based on the value entered in 'legreg'.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |