‎2008 Oct 21 7:35 PM
Hi Experts,
From VOFM T-code, I have created a new routine 913 by copying 911. I am having 2 issues. please clarify me. I have read many questions in forum before posting this question.
1) When I do Snytax Check, I got message ''There is no main program for include RV61A913''
a) I have activated program RV61A913 by EDIT->Activate.
b) I have ran program RV80HGEN, which activates all includes
c) I am able to see my program RV61913 in RV61ANNN program.
Everything looks fine but Why this message in coming.
2) and more important problem is .. Now my First program 911 is showing snytax error. it is saying a data is already declared and when I double click in the snytax error. It is taking me to program 913. why this connection is ther between program 911 and 913.
Please help me in these 2 issues.
Thank u.
Sunitha
‎2008 Oct 21 8:21 PM
Hi,
Yes...You can declare the same variable in another routine..inside FORM...ENDFORM..
Thanks
Naren
‎2008 Oct 21 7:38 PM
no need to wrry about the main program message
for the 2nd one, the data variable you declared was already declared in 913, you need to chose a different variable in 913 or comment the one in 913. Rememember all the routines are part of same main program, so thats the relation between your 911 and 913.
‎2008 Oct 21 8:18 PM
Dear Mxg / Naren, Chauhan,
Thanks for your quick replies.
1) I have ignored that missing main program message. (Issue resolved)
2) Actually I am still bit confused, if I understood MxG correctly, Data Object declared in a subroutine will act as a global variable.
if I declare
w_netwr like vbap-netwr in by 911 program, I can"t use the same data name in 913 program.
But As I learn ABAP, i remember that whatever u declare in form and endform is a local data object.
here I have declared i_netwr in form kobed_91, so I can again declare i_netwr in kobed_913 ??
Thank you for clarification.
Regards
Sunitha.
‎2008 Oct 21 7:41 PM
Hi,
for 2)
Make sure you declare within the FORM and ENDFORM...if you declare it outside...THen it will be global variables...looks like in the other routine..the variables are declared outside th FORM ...ENDFORM..
Thanks
naren
‎2008 Oct 21 7:43 PM
Hi Sunitha,
Thats the property of the SAP that you can declare everything in one program and use in other sub program.
You don't need to worry on this . Go ahead and do the changes and activate the program.
This will work.
Thanks,
Chidanand
‎2008 Oct 21 8:21 PM
Hi,
Yes...You can declare the same variable in another routine..inside FORM...ENDFORM..
Thanks
Naren