Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

RUN TIME ERROR

Former Member
0 Likes
570

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
554

Hi,

May be you can use INCLUDE ZAC_TAB21.

Reward if useful!

4 REPLIES 4
Read only

Former Member
0 Likes
555

Hi,

May be you can use INCLUDE ZAC_TAB21.

Reward if useful!

Read only

Former Member
0 Likes
554

hi ,

check whether u have used the include statement in the program.

regards

reena

Read only

Former Member
0 Likes
554

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

Read only

S0025444845
Active Participant
0 Likes
554

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