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

Issue with Help View

Former Member
0 Likes
878

Hi All,

I have implemented a Search help with HELP view. As per the documentation a HELP view implements outer join; but somehow it doesnt.

In our scenario we have 3 tables mara, t1 and t2, where mara is primary table.

mara-mandt = t1-mandt, mara-matnr = t1-matnr

mara-mandt = t2-mandt, mara-matnr = t2-matnr

The view somehow does an outjoin of mara with both tables t1 and t2. But, t1 and t2 are linked by inner join.

I want all 3 tables i.e. mara, t1 and t2 to be OUTER JOINED.

How should I achieve this ?

Regards,

Ashish

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
833
5 REPLIES 5
Read only

Former Member
0 Likes
834
Read only

0 Likes
833

Thanks Sumana for the reply,

But, somehow my problem still persists.

I am still searching for why an INNER JOIN is performed between SECONDARY tables?

Regards,

Ashish

Read only

0 Likes
833

Hello,

I had trouble with this issue, too.

I came to the following analysis:

If you create a help view, a program is generated with a % prefix. So if you create a help view "ZTEST" then you have a program "%ZTEST" generated, that you can display in SE38.

The help view displays all records found with an outer join, if there are no selections (filled where clauses) on the secondary tables. As soon as you select a value from a field of a secondary table on the search help input screen, then the logic in the generated program switches to an inner join.

The result is, that a record, that may be displayed in the full list (or in the first 500 hits), is gone when you specifically select that record through fields of the secondary tables.

Here's a sample from the generated program:


  LOOP AT KEYRANGE_TAB WHERE
             TABNAME = 'ZTABLE02' AND
             FIELDNAME = 'ZFIELD02'.
    CHECK KEYRANGE_TAB-OPTION <> 'CP' OR KEYRANGE_TAB-LOW <> '*'.
    MOVE-CORRESPONDING KEYRANGE_TAB TO T001ZFIELD02__________R.
    APPEND T001ZFIELD02__________R.
    IF 'ZTABLE02' NE 'ZTABLE01'.
      INNER_JOIN = 'X'.
    ENDIF.
  ENDLOOP.

SAP itself solves the problem by implementing search help exits in case they need outer join's, see for example F4IF_SHLP_EXIT_AGR_NAME.

Let me know if this brings some light into the help view issues. Actually I cannot explain why it is the way it is ...

Best regards,

Stefan Kozlowski

Read only

0 Likes
833

Hi Stefan,

That was definitely helpful. The behaviour is exactly as per what you have specified in the post.

We could solve the error by implementing a Search help exit. In this exit, we implemented the code to filter out results based on the criteria(search fields for secondary tables) in search help input screen.

But, I still feel this should have been taken care by the standard. what say ?

Regards,

Ashish

Read only

0 Likes
833

Hi,

yes, I think too, that this should be standard and be generated with SE11.

The Quick Viewer can handle the outer joins, too. I don't know if it is a big issue to update the code generator for the help view interface.

And the current documentation should highlight the constraints you have here, and not just say that a help view is an outer join.

Greetings,

Stefan