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

pricing routine error.

Former Member
0 Likes
1,319

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
947

Hi,

Yes...You can declare the same variable in another routine..inside FORM...ENDFORM..

Thanks

Naren

5 REPLIES 5
Read only

Former Member
0 Likes
947

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.

Read only

0 Likes
947

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.

Read only

Former Member
0 Likes
947

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

Read only

Former Member
0 Likes
947

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

Read only

Former Member
0 Likes
948

Hi,

Yes...You can declare the same variable in another routine..inside FORM...ENDFORM..

Thanks

Naren