Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a new field to the search help exit

Former Member
0 Kudos

Hi friends,

adding a new field to the search help exit. How does it work ?

Thanks in advace

Ilhan

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

5 REPLIES 5

Former Member
0 Kudos

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.

former_member188685
Active Contributor

Former Member

former_member212653
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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