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: 

Howto access TABLES type parameter within function module

CedrikKern
Employee
Employee
0 Kudos

Dear all,

I try to define a callback function for a BAL message with message parameters. It seems to me that the message parameters appended to the message become passed to the callback function as a TABLES function parameter. Thus I tried to define a function module with a TABLES parameter in the function module's interface. This is not possible because this feature seems to be obsolete ( I get a warning: 'TABLES parameters are obsolete! Message no. FL069 Diagnosis...'). I located the position where the function module call is done:

CALL FUNCTION I_S_PARAMS-CALLBACK-USEREXITF
               TABLES
                 I_T_PARAMS            = L_T_SPAR
               EXCEPTIONS
                 OTHERS                = 0.

How can I access the table passed there within my function module?

I already tried to create a changing parameter with the same name and type and a header line in the function module but this does not work for me.

Thanks and kind regards,

...Cedrik

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

U need to create a TYPE TABLE by SE11 and then create an export or changing parameter based on this table.

So by SE11:

A) Create a structure with all fields included in your varaible L_T_SPAR

B) Create a type table based on the structure above;

C) Use this type in your fm to define the changing or export parameter.

Max

6 REPLIES 6

former_member1245113
Active Contributor
0 Kudos

Hi ,

within the exporting parameters use a table type parameter.

create a table type using SE11.

hope this will serve your purpose.

Regards

Ramchander Rao.K

Former Member
0 Kudos

Hi

U need to create a TYPE TABLE by SE11 and then create an export or changing parameter based on this table.

So by SE11:

A) Create a structure with all fields included in your varaible L_T_SPAR

B) Create a type table based on the structure above;

C) Use this type in your fm to define the changing or export parameter.

Max

0 Kudos

Hi,

thanks for your quick answers I tried what you suggested but this leads to a short dump:

Runtime Errors CALL_FUNCTION_PARM_MISSING Except. CX_SY_DYN_CALL_PARAM_MISSING .... Error analysis An exception occurred that is explained in detail below. The exception, which is assigned to class 'CX_SY_DYN_CALL_PARAM_MISSING', was not caught in procedure "PARAMETERS_SHOW" "(FORM)", nor was it propagated by a RAISING clause. Since the caller of the procedure could not have anticipated that the exception would occur, the current program is terminated. The reason for the exception is: When calling the function module "TPM_TRAC_INC_CALLBACK_READ", one of the parameters needed according to the interface description was not specified. This parameter was "I_T_PARAMS".

The Changing Parameter of my Callback function module is also called I_T_PARAMS and has the same table structure fields as L_T_SPAR.

0 Kudos

Hi

Where is this call?

CALL FUNCTION I_S_PARAMS-CALLBACK-USEREXITF

TABLES

I_T_PARAMS = L_T_SPAR

EXCEPTIONS

OTHERS = 0.

Is it in a std report or custom one?

If the call is a std report u need to create a fm having the same parameter used here, so u need to create a fm with a table parameter like L_T_SPAR although the table parameter is obsolete.

Max

0 Kudos

Hi,

if there is no other way but to ignore this warning I will do this.

Thank you for your help and kind regards,

Cedrik

Former Member
0 Kudos

>

> I get a warning: 'TABLES parameters are obsolete! Message no. FL069 Diagnosis..

But i think this can be ignored as its just a warning, you can create a table parameter.

Regards

Karthik D