Skip to content

New check - modification of importing parameter via field-symbol #32

@FreHu

Description

@FreHu
  methods EXECUTE
    importing
      !IR_OPERAND1 type ref to DATA
      !IR_OPERAND2 type ref to DATA
      !IR_RESULT type ref to DATA.

METHOD execute.      
   CHECK ir_operand1 IS BOUND AND
   ir_operand2 IS BOUND AND
   ir_result   IS BOUND.

    ASSIGN ir_operand1->* TO FIELD-SYMBOL(<operand1>).
    ASSIGN ir_operand2->* TO FIELD-SYMBOL(<operand2>).
    ASSIGN ir_result->*   TO FIELD-SYMBOL(<result>).

    TRY.
      <result> = <operand1> - <operand2>.
    CATCH cx_root.
    ENDTRY.
ENDMETHOD.

I found this method which treats an importing parameter as if it were changing/returning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions