Insert include program in a main program dynamically

Hi All,
I would like to add one 'Z' INCLUDE program in my 'Z' Executable Program. Is there any Standard Function module or Class and Method or any other option available?
Example:
Include Program name:ZINCLUDE (which is already existing in SAP)
Standard Program Name: ZEXECUTE (which is already existing in SAP)
Now, I want to insert include program ZINCLUDE in my executable program ZEXECUTE.Could you please sugget me on this?
Thanks,
Vishnu.

Hi All,
Below is the samle program which i did for my requirement.
DATA:itab TYPE TABLE OF string,
     wa_tab LIKE LINE OF itab,
     lv_string TYPE string.
* Read the data from already existing Executable Program
READ REPORT 'YVISHNU_TEST127' INTO itab.
IF sy-subrc = 0.
* Append Include program to itab
  lv_string = 'INCLUDE ole2incl.'.
  wa_tab = lv_string.
  APPEND wa_tab TO itab.
  BREAK 50120c1941.
* Insert Main program by Including above Include program
  INSERT REPORT 'YVISHNU_TEST127' FROM itab.
ENDIF.
Thanks for your help.
Thanks,
Vishnu

Similar Messages

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

    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

    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

  • How to find out  number of includes for a given program dynamically

    Hi all
    I have a requirement in which, I have to find out  number of includes and their names for a given  user defined program dynamically
    if u know the answer pls let me know
    Thanks in advance
    Devi

    Hi rama,
    1. use this FM - RS_GET_ALL_INCLUDES_FOR_PRTAB
    regards,
    amit m .

  • To debug an include program

    How to debug and include program.
    points will be assigned.
    tahnks,
    Subha

    You get to know what is the main program, the one that calls the include you want to debug.
    Then you can place a break-point into the include, and execute the main program.
    Remember includes work right the same way like their code was just "inserted" into the main program.
    Hope it helps!

  • How to perform subroutine form in an include program?

    Hi all,
    I would like to perform an external subroutine form residing in an include program from a customer function user exit. I tried using the following code, but it dumps:
    PERFORM <form name> IN PROGRAM (lv_program)
               TABLES <a> <b> USING <c>.
    In the dump analysis I see that "Program <include name> is type I and therefore cannot be generated" and "The current ABAP/4 program attempts to call the program <include name> but this program cannot be executed. Therefore,the current program had to be terminated. "
    If the include can't be generated, is there another way or method I could directly call the form without needing to copy the standard code to an own function or form?
    Best regards,
    Mikko

    Hi,
    take this example..
         perform idoc_status_record_write in program sapmsed7 using
                                                    x_edidc-docnum
                                                    c_idoc_status_ready
                                                    space
                                                    space
                                                    space
                                                    space
                                                    space
                                                    space.
    in this the from is in include, but while calling you need to call with the help of main program.
    in this case <b>SAPMSED7</b> main program, but form is in include <b>MSED7F05</b>
    Regards
    vijay

  • Problem in creating include program for customer exit for BC425_01

    Hi,
         I want to write a customer exit for transaction BC425_01. For identifying the include program for exit , i go to System->Status.There I double click on the program name(GUI).Then I perform a 'FIND' in main program for 'customer-function' keyword. I get 3 search results with "CALL CUSTOMER-FUNCTION '001' " , "CALL CUSTOMER-FUNCTION '002' " , "CALL CUSTOMER-FUNCTION '003' ".
    Now i double click on CALL CUSTOMER-FUNCTION '001'  and i am taken to the code of program where this function is called in MODULE cust_check INPUT. I double click on CALL CUSTOMER-FUNCTION '001'  and then I am taken to the function module code which contains a single statement 'INCLUDE ZXBC425G01U01 .' .
    Now I double click on this include program so that I can write my own code. But when i double click on it , a message displayed 'Program names ZX.. are reserved for includes of exit function groups'. Hence I am not able to creates this include program and write my coding.
    Kindly Help
    THANKS

    Hi Amber,
    Then you click enter button.It is asking to create object with that include name ZXBC425G01U01 in a pop-up.You  should select YES option.It will ask package . Give the package name and save.Then include program is created and allowed you to write your own code.
    Thanks,
    Prasad GVK.

  • Subroutine inconsistency due to deletion of Include program

    Hi All,
          I created an include program(saved in local object) within my report(this was previously stored in a package) and I copied a few performs and forms from my report into the include program, but then i decided to go for the code without the include and commented the include statement in my report and deleted the include program(in se38). But now when I click on the perform statement in my report it gives a message "Object ZXY not found". The ZXY is my include program. Also when I view the report in se80 I find repetitive sub routines.Also I am not able to delete the duplicate sub routines in se80.
         How can we overcome this inconsistency in duplication of subroutines, how to suppress the message and make sure the code is consistent?

    Hi,
          So currently all the performs in program are part of some other include which is part of your main program?Because if not , obviously an error will be thrown.
    Have you tried the option of rebuilding object  list for the whole program?
    Right click on the program name in SE80--> Other functions->Rebuild object List
    Regards,
    Arun
    Edited by: arun warrier on Nov 30, 2011 1:36 PM

  • Table for Include Programs.

    Hi,
    Can anyone tell me which table stores the include program names of a Module Pool.??
    regards,
    Ramakanth

    Thanks for your Reply..
    My exact requirement is to identify the main program for all the include programs. REPOSRC gives the include program name but i think it doesnt give the main program name from where include is fetched.
    So I need table which stores the main program / Module Pool and its includes.

  • Changes in an INCLUDE Program not being transported

    Hi all,
    I have done some changes in the main program of a sapscript form in SE38. This main program calls an INCLUDE program, in which I have done some changes also. But when I transport the program, the changes done in the INCLUDE are not being transported, but only the changes in the main are transported!!
    Can anyone tell me why? I generated both the main and the INCLUDE but it still is not ok.
    Regards,
    Nelmaz

    Make sure the INCLUDE is also in the same request as that of Main Program
    Regards
    - Gopi

  • Finding include program of the subroutine by program

    Hi All
    Is it possible to find the include program name of the sub-routine by any FM .
    Thanks
    Vinay kolla

    i have got sub routine name , is there way to program and find the main include program of it .if yes how .
    Thanks
    Vinay kolla

  • Include program

    Hi all,
    I am tyring to develop an report.In this I want the definition of the subroutine in an include. This the code I have written :
    <b>Main program :</b>
    REPORT zotcrgt003 .
    INCLUDE z_i_otcrgt003. " include for data Declarations.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001 .
    PARAMETERS : p_zbukr TYPE regup-zbukr  ,
                 p_zlsch TYPE regup-zlsch  ,
                 zw_laufd LIKE f110v-laufd ,
                 zw_laufi LIKE f110v-laufi .
    SELECT-OPTIONS : s_kunnr FOR regup-kunnr.
    SELECTION-SCREEN END OF BLOCK b1 .
    PERFORM language_translation.
    INCLUDE z_i_otcrgt0031. " include in whihc i Defined the above form
    break-point.
    <b>Include program :</b>
    form language_translation.
    SELECT SINGLE * FROM ZTFIN WHERE
                               fname = 'Z_F140_ACC_ST_01'
                          AND  spras = 'E'.
    SELECT SINGLE * FROM ztfin INTO t_ztfin WHERE
                                        fname = 'Z_F140_ACC_ST_01'
                                   AND  spras = 'I'.
    endform.                    " language_translation
    This is working fine, but when I keep the include statements together like this  :
    INCLUDE z_i_otcrgt003.
    INCLUDE z_i_otcrgt0031.
    I am getting an error saying statement is not accessible.
    Can anyone explain me what is it so ?
    Regards,
    Varun.
    Message was edited by: varun sonu

    Hi
    I think the problem isn't the INCLUDE statament, but the PERFORM statament.
    You can write this code:
    REPORT ZCCCC.
    INCLUDE ZCCCC0.
    INCLUDE ZCCCC1.
    START-OF-SELECTION.
    PERFORM WRITE_NUMBER.
    The form WRITE_NUMBER is defined in ZCCCC1.
    But you can't write this code:
    INCLUDE ZCCCC0.
    INCLUDE ZCCCC1.
    PERFORM WRITE_NUMBER.
    START-OF-SELECTION.
    Max

  • Include program MV45AFZZ

    hi all...
    CC:to Anjith
    how to creat an include program in "MV45AFZZ"....for USER exit....VA01
    Pls post ur comments...on urgent basis.
    thnanks & regards
    sankar

    Dear srinivas,
    my client requirement is this...
    In va01 or va02.....i've to restrict the end user upto the maximum of 4 line items, they can able to give at a single time...while entering 5th....it throws an error and revert back to the main......(restricting to 4 line items)...and also saving the same to the table xvbap or vbap....
    Just advise me...how to go for it.....
    Expecting ur reply...
    my mail-id is [email protected]...
    will come and check ur mail tom mng since i've to leave right now....
    Pls post ur comments.....and check here tomorow for my reply....dont mind,pls
    bye
    sankar

  • Include program error

    Hello to all,
    I am including one program to my main program. itab is defined in include program.
    I am reading itab in main program using  'read table itab index x'.
    but after executing main program there is error that this statement is not accessible.
    can u tell me ?
    Thanks a lot.
    Regards.

    Thanks for reply.
    data is filled in   itab  in include program .
    & reading in main program with index .

  • How to insert the program RSWWWIDE in the work flow

    i have awork flow where i need to delete the work items onits own if the emploeeis termed in managers inbox so do i insert this program in the workflow

    Hi,
    Archiving is not necessary in your system?
    It's a better solution to include in the workflow an option to complete the workitem based on time or a certain condition
    you can use BO TRDIR to execute progams, or TSTC to execute transactions.
    Kind regards, Rob Dielemans

  • No authorized for enhance include program

    I'd like to enhance include program such as v50rincl.
    SAP reject me because I have no authorized. However, I can change or create ABAP program. so, should I can do?
    I also would like enhance structure such as SHP_VL10_SELECT_OPTIONS. should I can do?
    thanks
    Henry

    Hi,
    Check this thread.
    [Re: problem in VL10A;
    You can create an your own Z-report as copy of report RVV50R10C A or B (relevent to u ) and insert the new select-options and manage it in the user-exit V50R_USEREXIT_TRANSF:
    FORM USEREXIT_SELECT_OPTIONS_TRANSF
    CHANGING CX_SELECT_OPTIONS TYPE SHP_VL10_SELECT_OPTIONS
    CX_LIST_PROFIL TYPE SHP_VL10_LIST_PROFIL.
    cx_select_options-z_new_criterium = SO_NEWOPTION[] (ur range).
    ENDFORM.
    So here you have to transfer your new select-option to cx_select_options and you can do it enhancing the structure SHP_VL10_SELECT_OPTIONS.
    From note 198137:
    You can also check the enhanced selection criteria from customer-specific reports ZZ50R10. Enhanced selection criteria from user-defined reports, for example, ZZ50R10 can also be checked. To do this, the DDIC type SHP_VL10_SELECT_OPTIONS must be enhance using a new selection criterion that can be included in a user-defined selection screen.
    Rhea.
    Edited by: rhea on Nov 4, 2008 12:08 PM

Maybe you are looking for

  • How to sync multiple iPhones on same iPhoto library

    My wife has reached her limit of storahe on her iphone 4s and needs to put her photos somewhere else to free up space. I currently have my iPhone 4s set up to where it will sync photos via photo stream to my iPhoto library. Is there a way to allow he

  • The web app input form is not holding what i enter in it

    Am setting up a business directory using the web apps, and two of fields are custom, one for map and video, {tag_map embed} {tag_video embed}. Now when I add a business using the web app input form. All the other fields work perfect in the list and d

  • To calculate the 90th percentile in OBIEE

    Hi All, Can anyone help me how to calculate the 90th percentile in OBIEE. Thanks in advance; Rajeev.

  • Toshiba LX835-D320​5 all-in-1de​sktop problem

    My questions is , when I turn the computer on it starts the power up phase and I hear the fan start but nothing comes up on the screen, and then he keeps repeating over and over almost like it doesn't want to start the boot up process of the bios or

  • Vidoes only play the first 10 seco

    When I transfer my .avi videos to my Zen Vision:M it says transfer successful but when I go to play it on my Zen, only the first 6 to 0 seconds play. I don't know why this happens, but when I go to check out the videos first it says "Play time 22:08"