2007 Jul 12 1:35 PM
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.
2007 Jul 12 1:39 PM
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.
2007 Jul 12 1:38 PM
well STOP doing tables with headerlines and your Problems will stop.
besides headerlines are obsolete anyway.
2007 Jul 12 1:39 PM
How else should I declare it? I tried doing it various ways and the sytax was incorrect.
2007 Jul 12 1:42 PM
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
2007 Jul 12 1:39 PM
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
2007 Jul 12 1:39 PM
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.
2007 Jul 12 1:47 PM
Hi,
Declare like this..
DATA: IT_ACC_NAM TYPE STANDARD TABLE OF ACC_NAM,
WA_ACC_NAME TYPE ACC_NAM.
Regards,
Nagaraj