‎2007 Jul 09 7:35 AM
Hi,
I am getting run time error while executing the program for calling the subroutine. when i executed the subroutine i got the answer. But when i am calling subroutine oi am getting the run time error while executing for the values.
This is my program to call sub routine.
REPORT ZAC_TAB22.
PARAMETERS: P_VAR1 TYPE I,
P_VAR2 TYPE I.
PERFORM ADDNUM(ZAC_TAB21) USING P_VAR1 P_VAR2.
This is my program to perform subroutine.
PERFORM ADDNUM.
FORM ADDNUM.
DATA:
NUM1 TYPE I VALUE 10,
NUM2 TYPE I VALUE 20,
RESULT TYPE I.
RESULT = NUM1 + NUM2.
WRITE:/ RESULT.
ENDFORM.
Here iam getting the correct answer. But when i am calling this subroutine I am getting the error
Message was edited by:
rams s
‎2007 Jul 09 7:36 AM
‎2007 Jul 09 7:36 AM
‎2007 Jul 09 7:38 AM
hi ,
check whether u have used the include statement in the program.
regards
reena
‎2007 Jul 09 7:40 AM
Hi
Try to call like this
TYPES word(10) TYPE c.
DATA text TYPE word.
text = '1234567890'. WRITE / text.
PERFORM datatest.
WRITE / text.
FORM datatest.
TYPES word(5) TYPE c.
DATA text TYPE word.
text = 'ABCDEFGHJK'. WRITE / text.
ENDFORM.
Reward all helpfull answers
Regards
Pavan
‎2007 Jul 09 7:51 AM
Hi ,
use both the perform either with using parameters or without ussing
parameters.
REPORT ZAC_TAB22.
PARAMETERS: P_VAR1 TYPE I,
P_VAR2 TYPE I.
PERFORM ADDNUM(ZAC_TAB21) USING P_VAR1 P_VAR2.
NUM1 TYPE I VALUE 10,
NUM2 TYPE I VALUE 20,
PERFORM ADDNUM using num1 num2.
FORM ADDNUM using num1 like num1
num2 like num2. .
DATA:
RESULT TYPE I.
RESULT = NUM1 + NUM2.
WRITE:/ RESULT.
ENDFORM.
Regards,
sudha