Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to use CALL METHOD

Former Member
0 Likes
441

Hi Xperts,

how To CAll Methods In SE38.

isit just like calling function module .

Can any one guide me through the process with small example and TCODE.

Thank You in Advance.

Hi Xperts,

how To CAll Methods In SE38.

isit just like calling function module .

Can any one guide me through the process with small example and TCODE.

Thank You in Advance.

1 REPLY 1
Read only

Former Member
0 Likes
391

Hi,

to call a method u should use syntax from SAP help...

Static Method Call

1. [CALL METHOD] meth_identifier( parameter_list ).

CALL METHOD meth_identifier parameter_list.

Short Forms

2. [CALL METHOD] { meth_identifier( )

| meth_identifier( a )

| meth_identifier( p1 = a1 p2 = a2 ... ) }.

Dynamic Method Call

3. CALL METHOD meth_identifier { parameter_list

| parameter_tables }.

Effect

Call of a method in ABAP Objects. There is a difference between a static method call, in which the method ID must be fully known in the program, and a dynamic method call, in which the method ID is determined entirely or in parts at runtime. The static method call can be executed in different forms. In one form, the parameters are passed in a parenthetical expression, in the other without a parenthetical expression. For the parenthetical expression, short forms are allowed. With the dynamic method call, you are not allowed to specify the parameters in parentheses and you must use the statement CALL METHOD.

When you call an instance method using a reference variable and the static type of the reference variable is a superclass of the dynamic type, then you can use the dynamic method call to call all visible methods of the dynamic type, whereas with the static method call, you can call only the visible methods of the static type.

Note

Functional methods cannot only be called with CALL METHOD, but also at operand positions.

rewards points if answer was helpful,

Regards,

Tejas