10-14-2011 5:51 AM
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.
10-14-2011 6:17 AM
Hi Visnu ,
Have u tried simply declaring zinclude in ur zexecute program .
Include zinclude just after data declarion .
hope yhis will help .
regards
ranjan
10-14-2011 6:19 AM
Hi Ranjan,
Thanks for your reply.
I do NOT want to do it manually. I need to do it through my program.
Thanks,
Vishnu
10-14-2011 6:46 AM
Not sure about your requirement.
You can have alook at [Insert report/Generate subroutine|http://help.sap.com/saphelp_nw04/helpdata/en/9f/db996e35c111d1829f0000e829fbfe/content.htm]
10-14-2011 7:04 AM
Hi Keshav,
Thanks for your reply, I will just look at the SAP help which you have provided and get back to you.
Thanks,
Vishnu.
10-18-2011 8:25 AM
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
10-14-2011 7:34 AM
Hi
You Can create a insert program.
There append the include program into the code.
Regards
Ajit