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

Where to set up a TYPE-POOL Declaration in a Function Group ?

former_member560074
Participant
0 Likes
2,886

Hi,

I ve got a Function Group.

I set up a Function Module in the Function Group.

I must use TABLES I_T_SELECT TYPE SBIWA_T_SELECT.

I get the error:

"

Type pool SBIWA has not been declared

Message no. FL031

Diagnosis

You used a type from type pool & in the interface of a function module.

Procedure

For the program to be syntactically correct, you must

declare the type pool in the global data declaration of the

function group using the 'TYPE-POOLS: &.' statement.

"

Where / How do I set up a Type Pool in the global data declaration of the

function group ?

Where / what is the global data Declaration of the Function Group ?

Thank You

Best Wishes

Martin

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,300

Hello Martin,

First off:

TABLES I_T_SELECT TYPE SBIWA_T_SELECT.

Correct me if I'm mistaken here, but tables is expecting a name of a DDIC structure. It is then creating a work area using that structure.

If you have to declare an internal table, the correct code would be:

DATA i_t_select TYPE TABLE OF sbiwa_t_select.

Or:

TABLES sbiwa_t_select.

Regarding your questions:

A global data declaration of a function group is just what it says, a point where you can declare your data usable for the whole function group.

This is usually an Include.

That said, you can fix your issue by creating an Include in your function group.

Within that include you have to write:

TYPE-POOLS: pool1, pool2, pool3.

or, in case you only have one type pool:

TYPE-POOLsbiwa

After creating the include, you have to point your function module to that file.

INCLUDE include_name.

Kind regards,

Michael

Hi,

I ve got a Function Group.

I set up a Function Module in the Function Group.

I must use TABLES I_T_SELECT TYPE SBIWA_T_SELECT.

I get the error:

"

Type pool SBIWA has not been declared

Message no. FL031

Diagnosis

You used a type from type pool & in the interface of a function module.

Procedure

For the program to be syntactically correct, you must

declare the type pool in the global data declaration of the

function group using the 'TYPE-POOLS: &.' statement.

"

Where / How do I set up a Type Pool in the global data declaration of the

function group ?

Where / what is the global data Declaration of the Function Group ?

Thank You

Best Wishes

Martin

1 REPLY 1
Read only

Former Member
0 Likes
1,301

Hello Martin,

First off:

TABLES I_T_SELECT TYPE SBIWA_T_SELECT.

Correct me if I'm mistaken here, but tables is expecting a name of a DDIC structure. It is then creating a work area using that structure.

If you have to declare an internal table, the correct code would be:

DATA i_t_select TYPE TABLE OF sbiwa_t_select.

Or:

TABLES sbiwa_t_select.

Regarding your questions:

A global data declaration of a function group is just what it says, a point where you can declare your data usable for the whole function group.

This is usually an Include.

That said, you can fix your issue by creating an Include in your function group.

Within that include you have to write:

TYPE-POOLS: pool1, pool2, pool3.

or, in case you only have one type pool:

TYPE-POOLsbiwa

After creating the include, you have to point your function module to that file.

INCLUDE include_name.

Kind regards,

Michael