Different ways to call methods in ABAP

前端 未结 3 2088
暖寄归人
暖寄归人 2021-02-14 08:57

Sorry for this basic ABAP question. What are the different ways to call methods in ABAP? And what are their \"official\" names? I\'ve heard of perform, method call, and interna

3条回答
  •  广开言路
    2021-02-14 09:21

    Good luck in your quest - you will find this task to be much harder than anticipated. For example, ABAP contains a macro processing facility that will make it really hard to find out that an actual method call is taking place. A malicious example that will compile nonetheless:

    DATA: l_foo TYPE c LENGTH 32.
    
    DEFINE foo.
      l_&4 = cl_&1_&3&5&2&9if_&1_&3&5_&8~&7_&3&5_c&6( ).
    END-OF-DEFINITION.
    
    foo system = u foo uid 32 create static >.
    

    You will find that macros are used extensively in some parts of the system. Good luck finding method calls in that kind of stuff without using the built-in parser and macro processor.

提交回复
热议问题