2006 Sep 06 11:25 PM
Hi group,
I have one parameter on the selection screen,I need to add search help,can any body help me how to add the searh help to the parameter.
Hi group,
I have one parameter on the selection screen,I need to add search help,can any body help me how to add the searh help to the parameter.
2006 Sep 06 11:42 PM
this is one way of doing it for a cost center parameter..
parameters: p_kostl type kostl matchcode object kost.
~Suresh
2006 Sep 07 12:02 AM
hi,
if you are using matchcode, search your machcode in table dd20l!
yours michael
2006 Sep 06 11:46 PM
Hi Swabap,
Do this way for search help.
======================================================
tables: sflight.
DATA: BEGIN OF itab OCCURS 0,
carrid like sflight-carrid,
connid like sflight-connid,
fldate like sflight-fldate,
END OF itab.
DATA it_return LIKE ddshretval OCCURS 0 WITH HEADER LINE.
parameter: p_carrid like sflight-carrid.
initialization.
at selection-screen on value-request for p_carrid.
SELECT * FROM sflight INTO CORRESPONDING FIELDS OF
table itab WHERE carrid eq p_carrid.
SORT itab BY carrid.
CLEAR itab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CARRID'
window_title = 'Flight details'
value_org = 'S'
TABLES
value_tab = itab
return_tab = it_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc = 0.
CLEAR itab.
READ TABLE it_return INDEX 1.
itab-carrid = it_return-fieldval.
READ TABLE itab WITH KEY carrid = itab-carrid.
if sy-subrc eq 0.
write: / 'CARRID:', itab-carrid.
write: / 'CONNID:' , itab-connid.
write: / 'FLDATE:' , itab-fldate.
endif.
ENDIF.
REFRESH itab. CLEAR: itab.
======================================================
Regards,
Vivek
2006 Sep 07 4:41 AM
The below code may help u.
parameters: p_bukrs type t001-bukrs,
p_butxt type t001-butxt,
p_ort01 type t001-ort01,
p_land1 type t001-land1.
data: dynfields type table of dynpread with header line.
data: return type table of ddshretval with header line.
at selection-screen on value-request for p_bukrs.
call function 'F4IF_FIELD_VALUE_REQUEST'
exporting
tabname = 'T001'
fieldname = 'BUKRS'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'P_BUKRS'
tables
return_tab = return
exceptions
field_not_found = 1
no_help_for_field = 2
inconsistent_help = 3
no_values_found = 4
others = 5.
read table return with key fieldname = 'P_BUKRS'.
Add it back to the dynpro.
dynfields-fieldname = return-retfield.
dynfields-fieldvalue = return-fieldval.
append dynfields.
Get the company code from db and add to dynpro
data: xt001 type t001.
clear xt001.
select single * into xt001
from t001
where bukrs = return-fieldval.
dynfields-fieldname = 'P_BUTXT'.
dynfields-fieldvalue = xt001-butxt.
append dynfields.
dynfields-fieldname = 'P_ORT01'.
dynfields-fieldvalue = xt001-ort01.
append dynfields.
dynfields-fieldname = 'P_LAND1'.
dynfields-fieldvalue = xt001-land1.
append dynfields.
Update the dynpro values.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
tables
dynpfields = dynfields
exceptions
others = 8.
start-of-selection.
regards
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |