天天看点

ABAP 740的新语法 - 使用BO association的方式进行内表连接操作

ABAP Mesh is also a new feature in 740. Let’s use an example to demonstrate how it works:

I have defined two types for developers and managers. developer type has a field manager which points to his manager, while manager type does not have any reference to his managing employee.

I also use the new grammar – inline data declaration to fill developer and manager table. So far nothing special.

Now I define one ABAP mesh t_team with two component managers and developers. With association ‘my_employee’, I connect the internal table managers to developers, so that I could easily find all developers of a given manager. The association ‘my_manager’ just enables the connection in opposite direction: find out the manager of a given developer.

ABAP 740的新语法 - 使用BO association的方式进行内表连接操作

You can compare how I find Jerry’s manager and find all developers whose manager are Thomas using new ABAP mesh and the traditional way.

ABAP 740的新语法 - 使用BO association的方式进行内表连接操作

The result are exactly the same.

ABAP 740的新语法 - 使用BO association的方式进行内表连接操作

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

ABAP 740的新语法 - 使用BO association的方式进行内表连接操作