ABAPCALL_METHOD - CALL METHOD
CPI1466 during Backup General Data in Customer MasterThis documentation is copyright by SAP AG.
CALL METHOD
Syntax Forms
Static Method Call
1. [CALL METHOD] static_meth(parameter_list ).
CALL METHOD static_meth parameter_list.
Short Forms
2. [CALL METHOD] { static_meth( )
|static_meth( a )
|static_meth( p1 = a1 p2 = a2 ... ) }.
Chained Method Call
3. {oref->}|{class=>}meth1(...)->meth2(...)->...->meth( parameter_list ).
Dynamic Method Call
4. CALL METHOD dynamic_meth {parameter_list
| parameter_tables }.
Effect
Method call in ABAP Objects. There is a difference between a static method call, in which the methodID must be fully known in the program, and a dynamic method call, in which the method ID is determinedentirely 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. You also have the option of chaining methods.In dynamic method calls, 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 variableis a superclass of the dynamic type, then you can use the dynamic method call to call all visible methodsof the dynamic type, whereas with the static method call, you can call only the visible methods of the static type.
System Fields
The system field sy-subrc is set to 0 when a method is called. If anon-class-basedexception is raised that was handled by the assignment of a value, then sy-subrc is set to this value.
Note
Functional methods can not only be called with CALL METHOD, but also atoperand positions for functions and expressions.
Exceptions
Catchable Exceptions
- Cause: Exception does not exist
Runtime Error: DYN_CALL_METH_EXCP_NOT_FOUND (catchable)
- Cause: Specified class does not exist
Runtime Error: DYN_CALL_METH_CLASS_NOT_FOUND (catchable)
- Cause: Method cannot be accessed.
Runtime Error: CALL_METHOD_NOT_ACCESSIBLE - Cause: The called method is not yet implemented.
Runtime Error: CALL_METHOD_NOT_IMPLEMENTED - Cause: Call of the static constructor
Runtime Error: DYN_CALL_METH_CLASSCONSTRUCTOR (catchable) - Cause: Call of the instance constructor
Runtime Error: DYN_CALL_METH_CONSTRUCTOR (catchable) - Cause: Method does not exist
Runtime Error: DYN_CALL_METH_NOT_FOUND (catchable) - Cause: Method is not static
Runtime Error: DYN_CALL_METH_NO_CLASS_METHOD (catchable) - Cause: Call of a non-visible method
Runtime Error: DYN_CALL_METH_PRIVATE (catchable) - Cause: Call of a non-visible method
Runtime Error: DYN_CALL_METH_PROTECTED (catchable)
- Cause: Type conflict during method call.
Runtime Error: CALL_METHOD_CONFLICT_GEN_TYPE - Cause: Type conflict during method call.
Runtime Error: CALL_METHOD_CONFLICT_TAB_TYPE - Cause: Type conflict during method call.
Runtime Error: CALL_METHOD_CONFLICT_TYPE - Cause: Wrong parameter kind
Runtime Error: DYN_CALL_METH_PARAM_KIND (catchable) - Cause: Actual parameter cannot be filled
Runtime Error: DYN_CALL_METH_PARAM_LITL_MOVE (catchable) - Cause: Wrong table type of a parameter
Runtime Error: DYN_CALL_METH_PARAM_TAB_TYPE (catchable) - Cause: Wrong parameter type
Runtime Error: DYN_CALL_METH_PARAM_TYPE (catchable)
- Cause: Missing actual parameter
Runtime Error: DYN_CALL_METH_PARAM_MISSING (catchable) - Cause: Parameter reference is empty
Runtime Error: DYN_CALL_METH_PARREF_INITIAL (catchable)
CX_SY_DYN_CALL_PARAM_NOT_FOUND
- Cause: Wrong parameter name
Runtime Error: DYN_CALL_METH_PARAM_NOT_FOUND (catchable)
- Cause: Reference variable is empty
Runtime Error: DYN_CALL_METH_REF_IS_INITIAL (catchable)
Non-Catchable Exceptions
- Cause: Illegal parameter at dynamic method call. Relevant for instance constructors at dynamic instantiation.
Runtime Error: CALL_METHOD_PARMS_ILLEGAL
General Data in Customer Master Fill RESBD Structure from EBP Component Structure
This documentation is copyright by SAP AG.
Length: 9757 Date: 20120518 Time: 200827 triton ( 186 ms )






