Application Development and Automation 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: 
Read only

Returning multiple columns from a Search Help Hit List

Former Member
0 Likes
3,067

Hi All,

I have a typical requirement for a Search Help. Actually, I have created a custom elementary search help for Customer Name and the hit list shows me Customer last Name, First Name, City , State , etc. My requirement is, when I select any of the row in the hit list, it should fill 3 columns of the screen field.

Eg. In my Screen, I have 3 fields - Name, City, Street. Suppose I have created a search help on Customer Name - when I select any row of the hit list of the search help, it should also populate the City and Street of the screen along with the name.

I have created my own Search help exit function module and also a custom view as the selection , and I tried with appending the shlp-INTERFACE table with different screen fields. But it did not work.

And another requirement is , I need to concatenate 2 columns of the hit list and show it back to one of the screen fields.

Eg: First Name and Last Name needs to be concatenated while displaying in the Name field.

Can anyone help me out with these? Really appreciate.

Hi All,

I have a typical requirement for a Search Help. Actually, I have created a custom elementary search help for Customer Name and the hit list shows me Customer last Name, First Name, City , State , etc. My requirement is, when I select any of the row in the hit list, it should fill 3 columns of the screen field.

Eg. In my Screen, I have 3 fields - Name, City, Street. Suppose I have created a search help on Customer Name - when I select any row of the hit list of the search help, it should also populate the City and Street of the screen along with the name.

I have created my own Search help exit function module and also a custom view as the selection , and I tried with appending the shlp-INTERFACE table with different screen fields. But it did not work.

And another requirement is , I need to concatenate 2 columns of the hit list and show it back to one of the screen fields.

Eg: First Name and Last Name needs to be concatenated while displaying in the Name field.

Can anyone help me out with these? Really appreciate.

4 REPLIES 4
Read only

anusurbab
Explorer
0 Likes
1,332

Hi,

In your search help, set those 3 fields as export parameters. If you have same data type, system automatically proposes the link otherwise, you can set them manually while assigning search help.

Read only

Former Member
0 Likes
1,332

Hi,

For yor second requirement, make a internal table with the 2 fields that need to be concatenated.

select those fields from database table into this internal table.

move this internal table to record_tab table.

This will be helpful & solve your 2nd requirement.

Regards,

Mehreen

Read only

0 Likes
1,332

hi

here is how I solved it.

first create custom view that will find all requred data.

in my case it was

tables :

ADRCITYT

ADRCITY

ADRPCDCITY

T005S

T005U

joins :

ADRCITY CLIENT = ADRCITYT CLIENT

ADRCITY COUNTRY = ADRCITYT COUNTRY

ADRCITY CITY_CODE = ADRCITYT CITY_CODE

ADRCITY CLIENT = ADRPCDCITY CLIENT

ADRCITY COUNTRY = ADRPCDCITY COUNTRY

ADRCITY CITY_CODE = ADRPCDCITY CITY_CODE

T005S MANDT = ADRCITY CLIENT

T005S BLAND = ADRCITY REGION

T005S MANDT = T005U MANDT

T005S LAND1 = T005U LAND1

T005S BLAND = T005U BLAND

and finaly searh help


ORT01	3	3	PAD_ORT01
CITY_CODE	0	2	CITY_CODE
PSTLZ	1	1	PSTLZ_HR
STATE	4	4	REGIO
BEZEI	5	5	BEZEI20
COUNTRY	0	6	LAND1
LANGU	0	7	LANGU

Read only

Former Member
0 Likes
1,332

Hi Friend,

if your development is a Module Pool then in the screen painter double click on the field you can see the attrubute's tab there search help option is there you hav to mention the search help you have created so that it will supply the data to the screen field.

basically your screen field does not have the f4 help generation ,becuase you are not using the standard table field which has search help generated , because the screen field is local in the program ,so in the screen painter you have supply the search help .

Please see this standard help link:[http://help.sap.com/saphelp_nw70/helpdata/en/63/1b70c2c32111d1950600a0c929b3c3/frameset.htm]

for the 2 querly you have to write search help exit , for concadenating the firstname & last name to one field before populating to screen.

Regards,

Regards