SAP Program to find the odd and even numbers using function call

Program: 


*&---------------------------------------------------------------------*

*& Report Z_ODD_EVEN

*&---------------------------------------------------------------------*

*&

*&---------------------------------------------------------------------*

REPORT Z_ODD_EVEN.


PARAMETERS: im_a TYPE int4.

DATA: lv_reslt TYPE int4.


CALL FUNCTION 'ZSP_ODDEVEN'

  EXPORTING

    im_number       = im_a

 IMPORTING

  EX_RESULT       = lv_reslt.

if sy-subrc = 0.

WRITE: 'The number is: ', lv_reslt.

endif.

Post a Comment

0 Comments