2013 Feb 04 7:28 AM
Hi experts,
I have created a report which has 3 input parameters
PARAMETERS: p_cid TYPE zdrcityid,
p_cname TYPE zdrcityname,
p_ccode TYPE zdrcitycode.
I have provided elementary search help(ZSHCITY) for p_cid using the module as shown below
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'ZDRCITY'
fieldname = 'ID'
SEARCHHELP = 'ZSHCITY'
* SHLPPARAM = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_CID'
* STEPL = 0
* VALUE = ' '
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* SUPPRESS_RECORDLIST = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* CALLBACK_METHOD =
* SELECTION_SCREEN = ' '
* IMPORTING
* USER_RESET =
TABLES
RETURN_TAB = li_ddshretval
* EXCEPTIONS
* FIELD_NOT_FOUND = 1
* NO_HELP_FOR_FIELD = 2
* INCONSISTENT_HELP = 3
* NO_VALUES_FOUND = 4
* OTHERS = 5
.
I the reset fields i.e p_cname and p_ccode to be filled automatically when the user selects value from the search help on F4.
Please help with this problem...
2013 Feb 04 7:51 AM
Satish,
for an update of concomitant parameters by a search help, you proceed as follows:
Now, in your report, define
parameters: p_cid type zzcitydata-cityid,
p_cname type zzcitydata-cityname,
p_ccode type zzcitydata-citycode.
That's it. The system will automatically provide an F4 help for p_cid, and after selecting a city, the concomitant fields p_cname and p_ccode will be filled automatically. No extra code necessary in your report.
Regards,
Rüdiger
2013 Feb 04 7:34 AM
Hi Satish D R,
Use AT SELECTION SCREEN OUTPUT for ur issue...
For example...
AT SELECTION-SCREEN OUTPUT.
select single zdrcityname zdrcitycode
from table zdrcity
into (pc_name, pc_code)
where id = p_cid.
This will satisfy ur requirement...
Reward points if helpful
2013 Feb 04 7:51 AM
Satish,
for an update of concomitant parameters by a search help, you proceed as follows:
Now, in your report, define
parameters: p_cid type zzcitydata-cityid,
p_cname type zzcitydata-cityname,
p_ccode type zzcitydata-citycode.
That's it. The system will automatically provide an F4 help for p_cid, and after selecting a city, the concomitant fields p_cname and p_ccode will be filled automatically. No extra code necessary in your report.
Regards,
Rüdiger
2013 Feb 04 8:50 AM
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'ID'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_ID'
value_org = 'S'
tables
value_tab = lt_dep "Table for Primary Selection
dynpfld_mapping = lt_fields "Table containing field that are to be auto filled
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
Here lt_fields is of type dselc. Then add the fields you want to auto-fill.