2009 Dec 08 8:20 AM
while using the code.
method ZIF_INTERFACE~SELECT_METHOD.
*select * from mara into table it_mara*
where matnr between p_matnr_low and p_matnr_high.
endmethod.
error generated : "IT_MARA" is not an internal table - the "OCCURS n" specification is missing
although i hav declared it_mara in parameter section while creating interface.
Kindly Suggest.
thanks in advance
while using the code.
method ZIF_INTERFACE~SELECT_METHOD.
*select * from mara into table it_mara*
where matnr between p_matnr_low and p_matnr_high.
endmethod.
error generated : "IT_MARA" is not an internal table - the "OCCURS n" specification is missing
although i hav declared it_mara in parameter section while creating interface.
Kindly Suggest.
thanks in advance
2009 Dec 08 8:27 AM
2009 Dec 08 8:32 AM
you have to declare your parameter as reference to a table type. Pls declare it_mara TYPE MARA_TT where MARA_TT is a table type.
Regards
Sathar
2009 Dec 08 11:36 AM
I hav defined in paramter in this manner.
parameter type typing method associated type
it_mara exporting type mara.
but its generating problem..that i cant use it as internal
2009 Dec 08 12:09 PM
Hi!
Create a tabletype in SE11.
Choose datatype radiobutton, give the name, like ZZMARA and click create.
Choose the tabletype from the popup and enter
Give MARA to the type of the line.
Save and activate it.
And of course use it in your method's parameters.
Regards
Tamá
2009 Dec 08 12:17 PM
>
> I hav defined in paramter in this manner.
>
> parameter type typing method associated type
> it_mara exporting type mara.
>
> but its generating problem..that i cant use it as internal
First of all, read the ABAP help, and SAP Help, specifically about "table types".
In this context mara is NOT a table type. It is a structure. As everyone has so far suggested: use a table type. You have a few choices
1. Define an appropriate table type in your class
2. Define an appropriate table type in the data dictionary
3. Use an appropriate table type already defined in the data dictionary
4. Define it_mara in the method, as being TYPE STANDARD TABLE, and define its actual type in the calling program.
matt
2009 Dec 08 12:54 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |