Skip to Content

Mass Change of ABAP Programs

Hello. I need a way to insert an include module into every "Z" report we have. Does anyone know of a way to do this?



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 17, 2005 at 01:34 PM

    Hi Jim,

    It is possible. But the approach I'm suggesting is to be used with extreme caution.

    The algorithm would something like this -

    1. Select * from D010SINF where program name like 'Z*' and program type ne 'I' (excluding Include programs) into an internal table (say ITAB_REPORTS).


    * itab_source_code will now contain the code of the program.
    * Insert you include statement into this internal table. 
    * May be at the second line or the third line or whatever 
    * you think is appropriate.

    This is just the idea. you can develop on this. You may also want to do a syntax check etc., programmatically. Get back if you face any specific problems.


    anand mandalika.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 17, 2005 at 03:42 PM

    Anand pointed out the way to make the mass change and he is correct in pointing out that you need to be extremely cautious. Here are certain things you need to keep in mind before you embark on that effort.

    1. Keep selection criteria in such a way that you include only your Z objects not SAP delivered ones. One way to achieve that would be by specifying the <b>development classes</b> you are interested in. Another criteria could be program type(only executables if you are interested in only report programs).

    2. Make sure that you don't actually update the report until you find out the list that you got is absolutely accurate.

    3. <b> Above all, I am not sure how you are going to take care of versioning and transporting these changes.</b> If you change the program through normal SE38, SAP keeps track of the versions and also requires you to create a transport request(for transportable development classes of course), to be able to transport the changes to test and production environments. But if you do this mass change, how are you planning on keeping this intact? This will be particularly an issue, if you have tighter audit controls and change management controls.


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 17, 2005 at 01:45 PM

    Hi Jim,

    you can do this with a batch input program:

    -> transaction recorder (TA SHDB) for transaction SE38:

    - insert a line at line nr. 2 with abap-command

    include "ZI123".

    - generate program and assign all programs to 1

    workbench request.

    so you play it safe and you've an error log,

    if changes failed.

    regards Andreas

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.