Functions with multiple tables as their output
Function F IMPORTING VALUE(NAME) TYPE C EXPORTING VALUE(GENDER) TYPE C TABLES POSITIONS STRUCTURE S_POSN OPTIONS STRUCTURE S_OPTN S_POSN is defined as before and S_OPTN is defined as: GRANTDATE TYPE D NUMBER TYPE I
Suppose that the data from Positions is as before, and the Options table looks like:
|
GrantDate |
Number |
|---|---|
|
4/4/93 |
1000 |
|
5/6/97 |
15300 |
When the function is called, the result will be a table called "F" that contains:
|
Name |
Gender |
Positions.Title |
Positions. StartDate |
Options. GrantDate |
Options. Number |
|---|---|---|---|---|---|
|
Tom |
M |
Mail Clerk |
1/1/93 |
4/4/93 |
1000 |
|
Tom |
M |
Manager, Mail |
3/4/95 |
4/4/93 |
1000 |
|
Tom |
M |
VP, Mail |
7/12/98 |
4/4/93 |
1000 |
|
Tom |
M |
Mail Clerk |
1/1/93 |
5/6/97 |
15300 |
|
Tom |
M |
Manager, Mail |
3/4/95 |
5/6/97 |
15300 |
|
Tom |
M |
VP, Mail |
7/12/98 |
5/6/97 |
15300 |