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: 

Search Help: generated field

former_member587969
Discoverer
0 Kudos

Hello,

I'm working on ECC 6.0. I have a custom table with 5 fields, one of them is key. Basically, something like this:

FIELD K1 ==> KEY
FIELD F1
FIELD F2
FIELD F3
FIELD F4

I need a search help that shows all fields of this table, plus an extra dynamic field with a concatenation of values of field F1-F4.

Basically something like this:

K1	F1	F2	F3	F4	DYNAMIC FIELD
--	--	--	--	--	-------------
1	A1	A2	A3	A4	A1-A2-A3-A4
2	G1	G2	G3	G4	G1-G2-G3-G4
3	H1	H2	H3	H4	H1-H2-H3-H4

Table is maintained by user using transaction SM30 and he will maintain only fields K1 and F1-F4. I don't mind how dynamic field is flled, but it must be done without any user action.

The problem is that I have no idea about how to do it...

Anyone can help me?

Thank you and best regard

gdec

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor

In the search-help definition, add your field (with some data-element) in the parameter list.

Create and attach a search help-exit FM, in this FM, when callcontrol-step is 'DISP', so just before standard display of selected data, read correct data with FM F4UT_PARAMETER_VALUE_GET for each required field, modify the returned internal table results_tab (concatenate fields) and update it with FM F4UT_PARAMETER_RESULTS_PUT, don't change the callcontrol-step, so SAP will then call the standard display.

Hint: Perform a where-used search on the FM and copy source code of a standard exit.

3 REPLIES 3

nomssi
Active Contributor

you can implement a search help exit with the additional field or create a CDS view.

JNN

raymond_giuseppi
Active Contributor

In the search-help definition, add your field (with some data-element) in the parameter list.

Create and attach a search help-exit FM, in this FM, when callcontrol-step is 'DISP', so just before standard display of selected data, read correct data with FM F4UT_PARAMETER_VALUE_GET for each required field, modify the returned internal table results_tab (concatenate fields) and update it with FM F4UT_PARAMETER_RESULTS_PUT, don't change the callcontrol-step, so SAP will then call the standard display.

Hint: Perform a where-used search on the FM and copy source code of a standard exit.

former_member587969
Discoverer
0 Kudos

Thank you.

I already tried to do what you suggested, but I couldn't manage because of a stupid mistake.

I tried to add my DYNAMIC FIELD in search help, but I had an error when activating because I don't specify any function module in search help exit.

Of course I wanted to add it later, but first I wanted to solve that error. Stupid idea: as the error is solved exactly by adding the exit.

Thank you again!

gdec