‎2007 Mar 09 8:39 PM
Hello,
i have created a business object type object along with attributes and methods. Now inside the method i want to access the attributes. inside the method i am writing:
data a type XXX.
a = me->attribute
this is creating a compilation error.
Now the method is defined as a function module in some package, so can anyone inform me how to access object attributes from the function module ?
pointes are awarded
Regards
‎2007 Mar 09 9:04 PM
‎2007 Mar 09 9:04 PM
‎2007 Mar 09 9:11 PM
Hello,
thanks for your answer, but this too did not work, "=>" is for static attributes and the attributes i have are not static. Moreover, i tried it but it gave the same error :
the abap error was when i was checking the code is :
the type me=>documenttype is unknown
as you know in SWO1 i created an object and when i create a method you link it to a function module and this is where you have the implementation of the method, so from this method how can i access the attributes on the main object that i created in SWO1
regards
‎2007 Mar 09 9:26 PM
You may check this example for some idea?
http://help.sap.com/saphelp_nw2004s/helpdata/en/48/4aad83b75211d194f50000e8353423/frameset.htm
Thanks,
Santosh
‎2007 Mar 09 9:39 PM
Hello Hassan
<b>A business "object" has nothing to do with (ABAP) OO-objects.</b> It is just a hierarchical representation that looks object-like. For example, the business object USER probably has a GET_DETAIL "method". However, the functional representation of this "method" is the function module BAPI_USER_GET_DETAIL.
All "methods" of business objects are realized using BAPIs.
Regards
Uwe