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: 

Database view with complex join

Former Member
0 Kudos

Hi everybody,

I need a help about next case:

I have a view ZLFA1 which lists vendors. Also, I have a view ZCONT which lists some documents for vendors.

Now I need to add ZCONT in ZLFA1 and connect them via LIFNR field, so ZLFA1 should list only vendors which exist in ZCONT. But since there are more than one record in ZCONT for particular vendor, I am getting more than one record in ZLFA1 for particular vendor and I should get only one.

In other words, I need a condition like:

WHERE ZLFA1-LIFNR EXISTS IN (SELECT DISTINCT LIFNR FROM ZCONT).....

Is it possible to do via transaction SE11, and if not, how can I do it?

Thank you in advance.

1 REPLY 1

karthikeyan_p3
Contributor
0 Kudos

Hi Natasa,

It is not possible to achieve the scenario what you have mentioned in Database view.

You can problematically achieve this by calling the FM VIEW_MAINTENANCE_CALL.

Get the distinct data from ZCONT & then populate the values in the internal table gt_seltab .

Create Selection Screen for SAP Table Maintenance View (SM30) - SAPHub

Thanks,

Karthikeyan