Skip to Content
avatar image
Former Member

Change type program from M to I

Hi Experts!!

I have a development that was made as an Top Include type Module Pool, so when I try to transport to Prod System it shows the following log message:

Program SAPMZMM002_TOP: Syntax error in line 000029

REPORT/PROGRAM statement missing, or program typeis I (INCLUDE).

So when I try to change the type from M to I the system send me a message "Objects that do not exist for includes will be deleted (text elements, documentation, menus, screens, variants)."

I have never done a change like this one before, so I don't know what is going to happen once I change the type. What is going to happen to the objects that are referenced to the include?

Can you help me with this issue?????


Antonio PiƱa.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 25, 2008 at 08:03 PM


    I want to make sure I understand your scenario. Does the following describe it correctly?

    • You created a module pool (type M) program SAPMZMM002.

    • When creating the module pool program, you allowed a top include SAPMZMM002_TOP to be created.

    • The program type for SAPMZMM002_TOP is type 'I'.

    • The program type for SAPMZMM002 is type 'M'.

    • You are trying to transport SAPMZMM002_TOP and you receive the syntax error mentioned in your post.

    • Now you want to change the program type of SAPMZMM002 from 'M' to 'I'.

    First of all, with regard to the syntax error, please note that it is simply telling you that the REPORT/PROGRAM statement is missing OR the program type is 'I'. Since you are trying to transport the top include SAPMZMM002_TOP then clearly your situation is the OR case (i.e. the program type is 'I'), and there is no need to change any program type from 'M' to 'I'.

    Please DO NOT change the program type of SAPMZMM002 from 'M' to 'I' because, as the message has already told you, "Objects that do not exist for includes will be deleted (text elements, documentation, menus, screens, variants)." This would render your module pool program SAPMZMM002 basically useless.

    I think the issue here is a simple misunderstanding of the original syntax error. Type 'I' programs (like your SAPMZMM002_TOP) should not have a REPORT/PROGRAM statement which is why the message includes the part about "or the program is type 'I' (INCLUDE).

    I hope this helps. If not, please clarify your scenario by including the program name that you believe should be changed from 'M' to 'I'.

    Best Regards,


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member


      Thank you for explaining. Now I understand the scenario better. I'd be curious to know how the top include program came to be type M since the system will automatically give it type I. Of course, I am assuming the top include was created at the same time as your main program via the "with TOP Include" checkbox/popup. I notice that the program name SAPMZMM002_TOP is not the suggested SAP name MZMM002TOP, which is not a problem since you can rename the top include to whatever name you choose. But since it is not following the normal naming convention then I can only guess that the program type for SAPMZMM002_TOP was also manually changed (maybe during creation?) from the suggested type I to type M. Regardless of how the top include came to get type M instead of the correct type I, the question at hand is whether anything "bad" will happen if you change it now from M to I.

      First I need to give a disclaimer and then I'll give you my opinion:

      Disclaimer: I have not seen the programs in question and can't really know what objects might be affected (i.e. deleted), so please proceed with caution and certainly make a backup of SAPMZMM002 and SAPMZMM002_TOP by copying the programs before changing the program type.

      My opinion: If the program SAPMZMM002_TOP does not have any of the mentioned objects (text elements, documentation, menus, screens, variants) then you should have no issues with changing it from type M to type I. If SAPMZMM002_TOP does have text elements, documentation, menus, screens, or variants then these will be deleted when you change from M to I. In the second case (i.e. it does have one or more of the mentioned objects), I would think your module pool would need to be slightly re-designed to work properly. Again, I will refer you to my disclaimer since I don't want to give you the wrong advice without seeing the entire picture for myself.

      Here's the long text from the first message you get when changing from type M to type I (message DS 161):

      Program type changed from type M to type I

      Message no. DS161


      You tried to change the program type to or from Executable program (type 1) or Include program (type I).

      This can affect other program attributes, and possibly the entire program structure.

      The following attributes only apply to executable programs:

      Logical database

      Selection screen version

      Include programs may not contain the following:

      Text elements

      User interface elements (screens and menus)



      System response

      If the previous program type was Executable program, the attributes listed above will be lost when you save.

      If the new program type is Include program, text elements, and the other elements listed above, will be deleted when you save.

      Best Regards (and best of luck),


  • avatar image
    Former Member
    Sep 25, 2008 at 05:31 PM


    Check whether this line is present in your program include.


    If not there then error will come as you have asked, try to check the above mentioned line will solve your issue.


    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 25, 2008 at 05:45 PM


    go to se38 with your program name and place cursor on program name and press where-used list icon.

    Then you find the program name(s) where this include has been used. There you have to activate and transport the same to PRD or QAS...

    Add comment
    10|10000 characters needed characters exceeded