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

data declaration in Include program

Former Member
0 Likes
987

Hello SAP Seniors,

This might be a simple question. please excuse me for my inexperience with ABAP.

I am working in MV45AFZZ program.

perform zprice_update. (custom subroutine).

In between form zprice_update and endform. there are several data declarations whch are more than 100 lines.

to aviod confusion, can I add a include program and copy all the data declaration in this include.

example ..

form zprice_update.

Data : yyyyy

xxxxxx

tttttt

ppppp

iiiii.

logic ..

endform.

Noe I want to change. it as

form zprice_update.

include : zdata. (and in zdata include< i want to copy all the data declations).

logic ..

endform.

Is this method right ??

Thank you all

Anitha

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
875

Yes

6 REPLIES 6
Read only

Former Member
0 Likes
876

Yes

Read only

Former Member
0 Likes
875

Not a bad idea. But SAP is not recommending to have INCLUDES. So please dont do that. Leave them as it is.

Thanks

Kiran

Read only

kanishakgupta1
Contributor
0 Likes
875

yes

Read only

Former Member
0 Likes
875

Hi,

I donot think that SAP do not Recommend INCLUDE.

Even I do coding the same way, but for global Variable and not for Subroutine variable.

Thanks & Regards,

Read only

0 Likes
875

It was told by SAP at one of the ASUG meetings that they are not going to support INCLUDES henceforthe and they would probably support for the now existing once.

For your verification, if you are on a new editor? you double click on the INCLUDE statement of yours and it would navigate to the INCLUDE Program. This proves.

Thanks

Kiran

Read only

0 Likes
875

Thank you for all person who answered my question and who viewed this question.

I am going to close this thread. My conclusion is not to use include for data declaration within perform statement.

Thank you.

Anitha.