‎2009 Nov 29 3:26 AM
I have a program that has several statements starting with this CALL_METHOD_* and then some parameters. Is this the same as PERFORM Z_TEST_1(Para1, para2,etc..).
For example, CALL_METHOD_CHECK_ALL 'DOC_TYPE' DOC_TYPE ZTABLE1-fielda_A.
Where can find source code for these CALL_METHOD statements?
What are the CALL_METHOD statements?
‎2009 Nov 29 7:00 PM
‎2009 Nov 29 5:37 AM
WE call methods of a class using the CALL METHOD statement.
If you will double click on this method name you will be navigated to class and there you can search for your method.
Further , you can also check the class documentation for purpose of methods.
Hope you understand it.
‎2009 Nov 29 6:33 AM
The CALL METHOD is a key word for calling the OO methods.
We have global classes (created using SE24 transaction) and local classes (using SE38), which contains the collection of methods and attributes.
The method is a block of code which will have the business logic (like Subroutine as you mentioned) and the attributes are the parameters wherein you will inport/ export the data.
The above said methods in the class will be called using the keyword "CALL METHOD".
Before calling the method, we need to create an Object for the class. (If it is a static class we can call the method using the class name itself)
TYPES: obj1 TYPE REF TO zcl_sample.
CREATE OBJECT obj1
EXPPORTING
IMPORTING
EXCEPTIONS.
(while creating the method, the special method constructor will be called)
After the creation of the method, we need to call the method like the below,
CALL METHOD obj1->add
EXPORTING
IMPORTING
The above method is call as "Instance Method"
Static method does not require any method.
CALL METHOD zcl_sample=>add
Hope you understand.
Rgds,
Benu
‎2009 Nov 29 7:00 PM
‎2009 Nov 30 2:36 AM
‎2009 Nov 30 2:57 AM
Hi Sam,
if this code
CALL_METHOD_CHECK_ALL 'DOC_TYPE' DOC_TYPE ZTABLE1-fielda_A.comes from your program it must be a macro call. Double-click on the word CALL_METHOD_CHECK_ALL and you get to the macro definition. Then check F1 online help on macros.
And next time,please use the above <_> code button after selecting code with the mouse. This enables the reader to know what is ABAP code and what is freestyle writing.
Regards,
Clemens