ABAPCALL_METHOD_STATIC - CALL METHOD STATIC

ROGBILLS - Synchronize billing plans   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

CALL METHOD - static

Short Reference



Syntax

[CALL METHOD] static_meth(parameter_list ).

  CALL METHOD static_meth parameter_list.

Effect

Both statements call the method that is statically specified by the identifier static_meth.

Use parameter_list to assign actual parameters to the formal parameters of the method and return values to thenon-class-based exceptions. You can specify parameter_list with or without parentheses. If you use parentheses,short forms are possible. If you do not use parentheses, no short forms are allowed.

You can and should omit CALL METHOD when using parentheses.

Note

We recommend that you do not specify the optional CALL METHOD expression if you use parenthesis.

Example

In method m2, method m1 of the own class is called. The interface parameters are filledand the possible exceptions are treated in a CASE structure.

CLASS c1 DEFINITION.
  PUBLIC SECTION.
    METHODS: m1 IMPORTING  p1 TYPE string
                           p2 TYPE I
                EXPORTING  p3 TYPE d
                           p4 TYPE decfloat16
                EXCEPTIONS ex1
                           ex2,
             m2.
ENDCLASS.

CLASS c1 IMPLEMENTATION.
  METHOD m1.
    ...
  ENDMETHOD.
  METHOD m2.
    DATA: text   TYPE string,
          number TYPE i,
          date   TYPE d,
          amount TYPE decfloat16
    ...
    m1( EXPORTING p1 = text
                 p2 = number
        IMPORTING p3 = date
                  p4 = amount
        EXCEPTIONS ex1 = 10
                   ex2 = 20
                   OTHERS = 30 ).
    CASE sy-subrc.
      WHEN 10.
        ...
      WHEN 20.
        ...
      WHEN 30.
        ...
    ENDCASE.
  ENDMETHOD.
ENDCLASS.


PERFORM Short Reference   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.


Length: 4825 Date: 20120518 Time: 201525     triton ( 62 ms )