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

Inserting an Include program into all Z programs dynamically using a BDC.

Former Member
0 Likes
736

Hi Experts.

I've created a BDC to insert a include program (for Authorisation) into all our Zprograms.

It works but if there is code written on the line where the include has to go it is simply overwritten by the new include.

Is there a way to search the code lines for example to see on which line the "REPORT" statement is and

to be able to then dynamically "Hit Enter" to insert a blank line after the report statement sothat the existing code is not

overwritten.

Regards

Vic

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
698

Hi Vic,

Use

1. READ REPORT prog INTO itab u2013 statement to get program into internal table.

2. Use FIND/SEARCH statement with u201CREPORTu201D to find the row position

And you can proceed with Row position u2026

Hope this helps.. let me know if u need more info

Nag

6 REPLIES 6
Read only

Former Member
0 Likes
699

Hi Vic,

Use

1. READ REPORT prog INTO itab u2013 statement to get program into internal table.

2. Use FIND/SEARCH statement with u201CREPORTu201D to find the row position

And you can proceed with Row position u2026

Hope this helps.. let me know if u need more info

Nag

Read only

0 Likes
698

Thanks for sharing your brilliance.

It's much appreciated

Read only

0 Likes
698

Thanks for sharing your brilliance.

It's much appreciated

If I have to insert my lines in, can I update directly from the itab or is there another process

behind that.

My reasoning is if there is no space for the Load-of-program and include I'll have to insert it.

Edited by: Vic Delport on Dec 10, 2009 11:12 AM

Read only

0 Likes
698

Hi,..

you are welcome..

You can give try INSERT REPORT prog FROM itab (i have never tried this options

Hope we can do it.

Nag

Read only

0 Likes
698

Thanks Nag

It Works

Regards

Vic

Read only

0 Likes
698

You are welcome Vic

Nag