2007 Mar 01 11:49 AM
Hi,
I need to know how i can call this method: STATUS_PROFILE_CHANGE that is inside this class: CL_CGPL_STATUS_MANAGEMENT.
I'm inside this badi: ZCRM_MKTPL, and i want to put the method STATUS_PROFILE_CHANGE inside these method: IF_EX_CRM_MKTPL~SET_ATTRIBUTES.
So, my basic question is how i can call methods??
I'm doing like this:
call method ?????????->STATUS_PROFILE_CHANGE
exporting
im_stsma = cm_stsma
im_update_flag = 'X'.
I dont know what can i put after call method.
Thanks in advance.
BR
2007 Mar 01 11:51 AM
Hi,
Create Object <OBJ> TYPE REF TO <Class>
Use that object name <OBJ> after call method.
Regards,
Anji
Hi,
Create Object <OBJ> TYPE REF TO <Class>
Use that object name <OBJ> after call method.
Regards,
Anji
2007 Mar 01 11:51 AM
Hi,
Create Object <OBJ> TYPE REF TO <Class>
Use that object name <OBJ> after call method.
Regards,
Anji
2007 Mar 01 11:52 AM
HI,
<b>Calling Methods</b>
To call a method, use the following statement:
CALL METHOD <meth> EXPORTING... <ii> =.<f i>...
IMPORTING... <ei> =.<g i>...
CHANGING ... <ci> =.<f i>...
RECEIVING r = h
EXCEPTIONS... <ei> = rc i...The way in which you address the method <method> depends on the method itself and from where you are calling it. Within the implementation part of a class, you can call the methods of the same class directly using their name <meth>.
CALL METHOD <meth>...
Outside the class, the visibility of the method depends on whether you can call it at all. Visible instance methods can be called from outside the class using
CALL METHOD <ref>-><meth>...
where <ref> is a reference variable whose value points to an instance of the class. Visible instance methods can be called from outside the class using
CALL METHOD <class>=><meth>...
where <class> is the name of the relevant class.
http://help.sap.com/saphelp_nw2004s/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
Regards
Sudheer
2007 Mar 01 11:55 AM
2007 Mar 01 11:58 AM
just call like this
CALL METHOD CL_CGPL_STATUS_MANAGEMENT=>STATUS_PROFILE_CHANGE
EXPORTING
IM_GUID =
IM_STSMA =
* EXCEPTIONS
* FAILED = 1
* others = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |