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

PASING VALUE FROM INCLUDE PROGRAM TO THE MAIN PROGRAM

Former Member
0 Likes
495

HII FRNDS

I AM USING A INCLUDE PROGRAM IN MY MAIN PRROGRAM . I WANT TO CHECK FOR A VARIABLE WHETHER IT CONTAINS DATA OR NOT IN MY INCLUDE PROGRAM . SO BASED ON THIS I WANT TO RETURN SOME VALUE LIKE A COUNTER BACK TO MY MAIN PROGRAM AND CAL SOME FUNCTIONS . CAN ANYBODY HELP ME WITH THIS HOW TO PASS THE VALUE BACK TO MY MAIN PROGRAM

THANX

ROHIT

1 ACCEPTED SOLUTION
Read only

sourabhshah
Product and Topic Expert
Product and Topic Expert
0 Likes
432

hi Rohit,

You can imagine the include program code as if it is written in the main program.At runtime the system places the code written in the include in the main at the place where the INCLUDE is included.So basically there no need to specially pass any variable from include to main program.

Regards,

Sourabh

2 REPLIES 2
Read only

sourabhshah
Product and Topic Expert
Product and Topic Expert
0 Likes
433

hi Rohit,

You can imagine the include program code as if it is written in the main program.At runtime the system places the code written in the include in the main at the place where the INCLUDE is included.So basically there no need to specially pass any variable from include to main program.

Regards,

Sourabh

Read only

Former Member
0 Likes
432

Hi Rohit,

Just declare the two variables var1(variable for checking data) & var2(variable for counter) in your include program.

Inside the include you can do the coding as under:

IF VAR1 <condition for checking data>.

VAR2 = VAR2 + 1.

ENDIF.

Now you can check the value of the variable VAR2 in the main program & call the desired function.

Regards,

Chetan.

PS:Reward points if this helps.