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

Report Development

Former Member
0 Likes
634

Hi abapers,

i want write join condition between two tables (AQGDBBG & AQLQCAT)

can you give me sample coding.

Table AQGDBBG -SAP Query: User Groups

Field NUM - SAP Query (S): Name of a user group

Field BGCNAM - SAP Query (S): Name of user

Table AQLQCAT - SAP Query: Query Catalog

Field NUM -SAP Query (S): Name of a user group

Field QNUM - SAP Query (S): Query name

Thanks in advance.

Regards

Rajendren.P

4 REPLIES 4
Read only

Former Member
0 Likes
592

Hi rajendren,

select a~num

a~bgcnam

b~qnum

INTO TABLE itab

from AQGDBBG as a

join AQLQCAT as b

on bnum eq anum

Read only

Former Member
0 Likes
592

select anum abgcnam b~qnum into table itab

from aqgdbbg as a inner join aqlacat as b

on anum = bnum.

Read only

Former Member
0 Likes
592

Joined tables are used in a select statement to combine data from two or more tables that share one or more columns. With Open SQL you can use inner join and left outer join.

Syntax

')'.

If the join is a left outer join the following additional restrictions apply to the search condition:

· The search condition must contain comparison predicates only

· Comparison predicates can only be combined by use of AND

· Each comparison predicate can compare two columns, where the two columns must be from the respective tables that are to be joined. If the left hand side of the join is itself a join, the column reference must not be from a outer table (where outer table is the right table of a left outer join). The comparison predicate can also compare one column reference from a table on the right-hand side of the join with a constant value.

Examples

This graphic is explained in the accompanying text

SELECT employee_name, manager_name

FROM employees AS e JOIN managers AS m

ON e.manager_id = m.manager_id

The INNER JOIN. This query produces a list of all employees that have a manager along with their respective managers. Here, the FROM clause contains an inner join of two tables.

This graphic is explained in the accompanying text

SELECT employee_name, manager_name

FROM employees AS e LEFT OUTER JOIN managers AS m

ON e.manager_id = m.manager_id

The LEFT OUTER JOIN. This query produces a list of all employees along with their respective managers. If an employee does not have a manager, the manager’s name is NULL. Here, the FROM clause contains an left outer join of two tables.

Hope this clarified your doubt.

Read only

Former Member
0 Likes
592

Joined tables are used in a select statement to combine data from two or more tables that share one or more columns. With Open SQL you can use inner join and left outer join.

Syntax

The INNER JOIN. This query produces a list of all employees that have a manager along with their respective managers. Here, the FROM clause contains an inner join of two tables.

This graphic is explained in the accompanying text

SELECT employee_name, manager_name

FROM employees AS e LEFT OUTER JOIN managers AS m

ON e.manager_id = m.manager_id

The LEFT OUTER JOIN. This query produces a list of all employees along with their respective managers. If an employee does not have a manager, the manager’s name is NULL. Here, the FROM clause contains an left outer join of two tables.

Hope this clarified your doubt.