‎2009 Jan 27 7:22 PM
Hi,
I am trying to build a class. I am creating methods in it. I have few importing parameters, few exporting parameters & few tables that needs to passed. I am fine with importing & exporting. When it comes to tables, when I don't have a table type known to refer to the table variable... how should I pass the tables... Should be in Changing? Also I am referring to the declaration like this:
LANGUAGES Changing Type BAPIADMVL where BAPIADMVL is a structure. I don't have a corresponding table type in this case..
Can you suggest how can I do this..
Thanks
Geetha
‎2009 Jan 27 8:42 PM
You may also create a type "locally" (with TYPES statement) in the class that you may refer externally if the class is global (SE24) and the type is public (or protected). As you use the type for typing a method parameter, it should be the same visibility as the method.
‎2009 Jan 27 8:04 PM
Hi,
In methods you don't have tables parameters. Instead use changing as you where suspecting. As you don't know table type I think it is the best to create a table type in DDIC with this include BAPIADMVL and use that type for typing the parameter.
Hope this helps you
Marcin
‎2009 Jan 27 8:42 PM
You may also create a type "locally" (with TYPES statement) in the class that you may refer externally if the class is global (SE24) and the type is public (or protected). As you use the type for typing a method parameter, it should be the same visibility as the method.
‎2009 Jan 27 10:21 PM
Hi Sandra..
I am not getting it very clear... I am trying to develop a global class through SE24. Is there a way to define a table type & use it in the CHANGING parameter... plz let me know..
Thanks
Geetha
‎2009 Jan 27 10:32 PM
You can declare your table types in the public section if you want to use it as the parameter of any public method. If you need to have it only for private method's parameter, you can define your type in the private section.
Open your class in change mode in SE24
Go To > Public Section ( I assume your method is public)
types:
ty_t_tab type table of BAPIADMVL.
Now, you can use this type TY_T_TAB to declare the parameter of the method.
Regards,
Naimesh Patel
‎2009 Jan 27 10:47 PM