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

How to Include other include into a main program

Former Member
0 Likes
2,312

Hi,

I have a standard program in that i have one include which is standard one.My question is ..that include contains 1 internal table know how to include that internal table data to z include.I can't modify that standard include.so how to access that internal table data.I want that internal table data(STANDARD INCLUDE) to my z include?

Kindly give some solutions.

4 REPLIES 4
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
1,583

Hi,

You have to use INCLUDE statement to inlcude a include program in your program. But just by including an inlcude in your program will not populate data declared in that include unless the code required to populate this data is in the same include. IF this is the case use the following.

INCLUDE <standard include>

INCLUDE <Zinclude>

In your Z include you can write code that copies data declared in the standard include into your own data declared in the Z include.

Its not advised to include standard included in your own zcomponents it might create problems when the standard inlcude is modifed by SAP.

Regards,

Sesh

Read only

Former Member
0 Likes
1,583

dear 1st find include program name

INCLUDE <b>ZNN001_OTHERS_ABCF01</b>.

the open it in SE38 and copy it to ZProgram

now you can edit it.

it you want to use it in Main standard program same way, copy standard report to Zprogram and call your Include name

Reward if helpful.

Read only

Former Member
0 Likes
1,583

hi

Are you allowed to change the Main Program itself?? if so then create a 'Z' include and then copy the entire contents of the standard include to the 'Z' include created.

Now call the Z include instead of Standard include and in this include you can export the tables which you would like to use.

-

Santosh

Read only

Former Member
0 Likes
1,583

Shankar,

First add includes to your program in below order.

INCLUDE <standard include>

INCLUDE <Zinclude>

When excute the program first include will get process and that internal table will have the data.

Pls. Mark if useful