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: 

Calling Function Module Issue

Former Member
0 Kudos
96

I am writing a new FM and calling a FM within it. I get a short dump once the CALL FUNCTION.... is executed. The error I received is this:

<i>

In the function module interface, you can specify only

fields of a specific type and length under "T_ACCNAM".

Although the currently specified field

"ACC_NAM" is the correct type, its length is incorrect.</i>

T_ACCNAM is a table in the function module being called. I have ACC_NAM set up in my FM to contain the exact same fields as the T_ACCNAM.

ACC_NAM is declaired as follows:

data: begin of acc_nam occurs 0,

spras like t171t-spras,

bzirk like t171t-bzirk,

bztxt like t171t-bztxt,

end of acc_nam.

I don't understand what this error means and how to correct it. Please help.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
69

Hi danielle,

1. U are calling a fm (inside ur fm),

and passing the parameter T_ACCNAM.

2. Instead of declaraing using BEGIN OF,

just see the FM (which u are calling),

and see the Tab of TABLES.

This table must be declared using LIKE/TYPE of that kind,

so that there is no incosistency.

regards,

amit m.

6 REPLIES 6

Former Member
0 Kudos
69

well STOP doing tables with headerlines and your Problems will stop.

besides headerlines are obsolete anyway.

0 Kudos
69

How else should I declare it? I tried doing it various ways and the sytax was incorrect.

0 Kudos
69

Hi,

Use

TYPES: begin of acc_nam,

spras like t171t-spras,

bzirk like t171t-bzirk,

bztxt like t171t-bztxt,

end of acc_nam.

DATA: IT_ACC_NAM TYPE TABLE OF ACC_NAM,

WA_ACC_NAME TYPE ACC_NAM.

PASS IT_ACC_NAM.

Regards,

Sesh

0 Kudos
69

HI,

Yours is a table with headerline. so if you pass ACC_NAM this will only pass the Workarea not the internal table you need Pass ACC_NAM[].

Alternatively you can use

TYPES: begin of acc_nam,

spras like t171t-spras,

bzirk like t171t-bzirk,

bztxt like t171t-bztxt,

end of acc_nam.

DATA: IT_ACC_NAM TYPE TABLE OF ACC_NAM,

WA_ACC_NAME TYPE ACC_NAM.

PASS IT_ACC_NAM.

Regards,

Sesh

Former Member
0 Kudos
70

Hi danielle,

1. U are calling a fm (inside ur fm),

and passing the parameter T_ACCNAM.

2. Instead of declaraing using BEGIN OF,

just see the FM (which u are calling),

and see the Tab of TABLES.

This table must be declared using LIKE/TYPE of that kind,

so that there is no incosistency.

regards,

amit m.

former_member404244
Active Contributor
0 Kudos
69

Hi,

Declare like this..

DATA: IT_ACC_NAM TYPE STANDARD TABLE OF ACC_NAM,

WA_ACC_NAME TYPE ACC_NAM.

Regards,

Nagaraj