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: 

Search help from 2 tables

Former Member
0 Kudos
2,391

Hello Experts,

I have two Z tables. The structure of first table is : Plant, Inspection type and template. The structure of second table is Language and template.

Now I want to create a search help in which I have 4 fields for selection : Plant, Inspection type, Language and template.

The export parameter should be Template.

I have created 2 Elementary search helps for two tables and one collective search help having both these elementary search help. But the problem is that the parameters from two tables are coming in two different tabs and I want it on a single tab.

Can anyone please help me to solve the issue.

Thanks & Best regards

Ankur Gupta

1 ACCEPTED SOLUTION

former_member196651
Contributor
0 Kudos
1,028

Hai Ankur,

First you create a view based on the 2 tables with fields you want. Then you create an Elementary Search help with that view as selection method. I think this will solve your problem.

Thanks & regards,

Abijith

5 REPLIES 5

former_member196651
Contributor
0 Kudos
1,029

Hai Ankur,

First you create a view based on the 2 tables with fields you want. Then you create an Elementary Search help with that view as selection method. I think this will solve your problem.

Thanks & regards,

Abijith

0 Kudos
1,028

Hello Abhijit,

Thanks for your reply. I have a query. Can it be done using Help view also?

What the difference between the two?

Thanks & Best regards

Ankur Gupta

0 Kudos
1,028

Hi,

The selection method of a search help is either a table or a view. If you have to select data from several tables for the search help, you should generally use a database view as selection method. However, a database view always implements an inner join. If you need a view with outer join for the data selection, you have to use a help view as selection method.

All the tables included in a help view must be linked with foreign keys. Only foreign keys that have certain attributes can be used here. The first table to be inserted in the help view is called the primary table of the help view. The tables added to this primary table with foreign keys are called secondary tables.

Regards/Ali


0 Kudos
1,028

Hello Ankur,

I hope that your tables have a foreign key relationship. The selection method can be either a database view or a help view. If you want records to be selected based on Inner Join use Database View. If want records based on Outer Join use Help view.

You can get more info from the following link:

http://help.sap.com/saphelp_47x200/helpdata/en/4f/991f82446d11d189700000e8322d00/frameset.htm

Thanks & Regards,

Abijith

0 Kudos
1,028

Hello Abijith,

What if the tables don't have a foriegn key relationship.