06-26-2008 1:12 PM
Hi friends,
adding a new field to the search help exit. How does it work ?
Thanks in advace
Ilhan
06-26-2008 2:35 PM
Hi,
never change record_tab by yourself. This may cause wrong allignments. Use functions F4UT* instead.
For more information read documentation of F4UT_PARAMETER_RESULTS_PUT and have a look at the example SAPBC_GLOBAL_F4_SFLIGHT.
Kind regards,
HP
06-26-2008 2:17 PM
The search help exit allows you to modify functionality of search help. If you add a new field to the
parameter list that is not contained on the selection method you can manually populate it within the search
help exit.
This would be performed within the u2018STEP DISPu2019 section. Once within this section all search help
data has been retrieved and is stored in table RECORD_TAB (record_tab-string) as one long string value.
Therefore you need to read table SHLP in-order to locate position of value within string.
Example:
To find position of personnel number (PERNR) within elemenory search
help M_PREMN you would use the following code:
Loop at record_tab.
read table shlp-fielddescr into wa_shlp
with key tabname = 'M_PREMN'
fieldname = 'PERNR'.
You could then use this information in the following way, for
example, to find a persons organisation unit:
select orgeh endda
up to 1 rows
from pa0001
into (ld_orgeh,ld_endda)
where pernr eq record_tab-string+wa_shlp-offset(8)
u201Cpernr length is 8
order by endda descending.
endselect.
select single orgtx
from t527x
into ld_orgtxt
where orgeh eq ld_orgeh and
sprsl eq sy-langu and
( endda ge sy-datum and
begda le sy-datum ).
If you have added a new field to the end of the parameters list
the next step is to populate it by adding this data to the end of
the record_tab string:
concatenate record_tab-string ld_orgtxt into record_tab-string.
modify record_tab.
endloop.
06-26-2008 2:25 PM
06-26-2008 2:29 PM
hiiii
refer to following link
http://www.synactive.com/docu_e/doc_inputfield.html
http://www.sapdev.co.uk/dictionary/shelp/shelp_exit.htm
regards
twinkal
06-26-2008 2:32 PM
Create a elementary search help and append the search help using "APPEND SEARCH HELP" option.
Open the search help and press "F5" to add the new elementary search help.
06-26-2008 2:35 PM
Hi,
never change record_tab by yourself. This may cause wrong allignments. Use functions F4UT* instead.
For more information read documentation of F4UT_PARAMETER_RESULTS_PUT and have a look at the example SAPBC_GLOBAL_F4_SFLIGHT.
Kind regards,
HP