‎2008 Nov 24 8:45 AM
Moved to correct forum by moderator.
hi ppl,
I have created an interface and assigned that to a class(global class and interface in se24).
Here my problem is in interface->parameters tab,
IT_MARA Exporting Type MARA
P_MATNR_LOW Importing Type MARA-MATNR
P_MATNR_HIGH Importing Type MARA-MATNR
here i want to create a table but from above parametrs first line-
IT_MARA Exporting Type MARA -> its not allowing me declare as LIKE,its throwing an error
ERROR-Type MARA-MATNR cannot be referenced using LIKE
method Z_INTERFACE~SELECT_METHOD.
SELECT * FROM MARA INTO table IT_MARA WHERE MATNR = P_MATNR_LOW AND MATNR = P_MATNR_HIGH.
ENDSELECT.
endmethod.
Edited by: Matt on Nov 24, 2008 10:50 AM
‎2008 Nov 24 9:54 AM
Hi Priyank,
In OO ABAP you cannot pass ranges or select-options directly.
create a table type in SE11 TCODE and pass it here
try it out.
regards
Ramchander Rao.k
‎2008 Nov 24 9:48 AM
Hello Priyank,
You can't use LIKE with ABAP Objects, you need to declare the table using TYPE.
You can no longer use this kind of type reference in ABAP Objects classes.
[http://help.sap.com/saphelp_nw04/helpdata/EN/9b/239fa610de11d295390000e8353423/frameset.htm]
‎2008 Nov 24 9:54 AM
Hi Priyank,
In OO ABAP you cannot pass ranges or select-options directly.
create a table type in SE11 TCODE and pass it here
try it out.
regards
Ramchander Rao.k
‎2008 Nov 24 11:03 AM
hi ramchandra,
Thanks a lot for your vital information.Can you send me the steps how to create the table types as per my above requirement for mara.I have tried a lot but its not working.
‎2008 Nov 24 12:08 PM
‎2008 Nov 24 11:23 AM
Hello Priyank
In order to have itabs as method parameter you need to use tables types. In case of MARA you can use either MARA_TT or MARA_TAB.
IT_MARA TYPE mara_tt
P_MATNR_LOW Importing Type MARA-MATNR
P_MATNR_HIGH Importing Type MARA-MATNR
Regards
Uwe