‎2008 May 21 10:14 AM
Hi,
How to call a method in reports ?
thanks in advance.
kaladhar
‎2008 May 21 10:17 AM
Hi,
Using
call method <method name>
ex: CALL METHOD team_red->execution.
Regards,
Narasimha
‎2008 May 21 10:21 AM
Hi,
Use the button "pattern" --> CALL METHOD.
To call a static method of a class you can directly use the class_name=>method_name ()
but for non static methods, first you will have to create an instance of the class and using that instance in the pattern you can call the method.
regards,
Advait
‎2008 May 21 10:18 AM
uh ähm, making use of the statement "Call Method"
but to make it easier for you got in SE80 the button Pattern.
then check the abap objects pattern.
rest is kinda intuitive.
‎2008 May 21 10:19 AM
Hi,
SAP ABAP SYNTAX FOR CALL METHOD of an external object
Basic form
CALL METHOD OF obj m.
Additions
1. ... = f
2. ... EXPORTING p1 = f1 ... pn = fn
3. ... NO FLUSH
Effect
Calls the method m of the object obj . m can be a literal or a variable.
CALL METHOD
Addition 1
... = f
Effect
Stores the return value of the method in the variable f . The return value can also be of type OLE2_OBJECT . This addition must always come before other additions.
Addition 2
... EXPORTING p1 = f1 ... pn = fn
Effect
EXPORTING passes values of fields to the parameters of the method. p1 , p2 , ... are either key word parameters or position parameters. If assignment of parameters is by sequence, p1 , p2 , ... must begin with "#", followed by the position number of the parameter. At present, only position parameters are supported. The export parameters always come at the end of the statement.
Addition 3
... NO FLUSH
Open an EXCEL file with the method 'Open'.
Reward If helpfull,
Naresh.