‎2006 May 17 12:41 PM
Hi All,
I need to copy a standard program(SAPMF05A-FB05 transaction).
There are so many includes in that.Again in those includes there are another set of includes are there.
Please let me know if there is any way to do that, instead of copying each and every include separately.
Thanks and Regards
Sowmmya Balakrishnan.
‎2006 May 17 12:46 PM
in SE38 there is direct button available to copy.
OR in se80 also has provision.
So u can use that button to copy to z program.
Why do u need to download the report.
regards
vinod
‎2006 May 17 12:48 PM
Hi Sowmya,
When you use Copy , click on Includes check box as well.
This shoudl give you screen with all includes , select and rename them.
Rgds,
Mano Sri
‎2006 May 17 12:48 PM
Hai Sowmmya
Try with the following Code
REPORT ZDownload.
TABLES TADIR.
TYPES: BEGIN OF T_TYPE,
LINE(72),
END OF T_TYPE.
DATA REP_TABLE TYPE STANDARD TABLE OF T_TYPE WITH
NON-UNIQUE DEFAULT KEY INITIAL SIZE 500.
DATA: FILE TYPE STRING,"RLGRAP-FILENAME.
PATH TYPE STRING.
PARAMETER: OBJ_NAME LIKE TADIR-OBJ_NAME DEFAULT 'Z%'.
SELECT-OPTIONS: OBJECT FOR TADIR-OBJECT DEFAULT 'PROG',
AUTHOR FOR TADIR-AUTHOR DEFAULT SY-UNAME,
DEVCLASS FOR TADIR-DEVCLASS.
DATA: BEGIN OF IT_TABLE OCCURS 0,
OBJ_NAME LIKE TADIR-OBJ_NAME,
END OF IT_TABLE.
DATA: BEGIN OF WA_TABLE,
OBJ_NAME LIKE TADIR-OBJ_NAME,
END OF WA_TABLE.
DATA: MESSAGE_TEXT TYPE STRING.
***********************************************************************
START-OF-SELECTION.
IF DEVCLASS-HIGH <> ''.
CONCATENATE 'C:\BACKUP-' SY-DATUM6(2) '.' SY-DATUM4(2) '.'
SY-DATUM+0(4) '-' SY-SYSID '-' DEVCLASS-LOW
'-' DEVCLASS-HIGH '\'
INTO PATH.
ELSE.
CONCATENATE 'C:\BACKUP-' SY-DATUM6(2) '.' SY-DATUM4(2) '.'
SY-DATUM+0(4) '-' SY-SYSID '-' DEVCLASS-LOW
'\'
INTO PATH.
ENDIF.
CONDENSE PATH NO-GAPS.
SELECT OBJ_NAME
INTO TABLE IT_TABLE
FROM TADIR
WHERE OBJ_NAME LIKE OBJ_NAME AND
OBJECT IN OBJECT AND
AUTHOR IN AUTHOR AND
DEVCLASS IN DEVCLASS.
SORT IT_TABLE BY OBJ_NAME.
LOOP AT IT_TABLE INTO WA_TABLE.
READ REPORT WA_TABLE-OBJ_NAME INTO REP_TABLE.
IF WA_TABLE-OBJ_NAME CS '\'.
ELSE.
CLEAR FILE.
CONCATENATE PATH WA_TABLE-OBJ_NAME '.TXT' INTO FILE.
IF SY-SUBRC = 0.
CALL FUNCTION 'DOWNLOAD'
EXPORTING
FILENAME = FILE
FILETYPE = 'ASC' "ASC, WK1, DBF, DAT, bin
MODE = ' ' "Mode ' ' = Rewrite Mode 'A' = Appending
TABLES
DATA_TAB = REP_TABLE.
WRITE: / 'File Saved Successfully'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = FILE
FILETYPE = 'ASC'
APPEND = 'X'
WRITE_FIELD_SEPARATOR = 'X'
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = REP_TABLE
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22 .
IF SY-SUBRC <> 0.
WRITE 😕 'File download error,Message code:',SY-SUBRC,
' creating file ',FILE.
ENDIF.
ELSE.
WRITE: / 'Error Occured'.
ENDIF.
ENDIF.
ENDLOOP.
MESSAGE_TEXT = 'FILE(S) CREATED IN FOLDER'.
CONCATENATE MESSAGE_TEXT PATH INTO MESSAGE_TEXT SEPARATED BY SPACE.
MESSAGE MESSAGE_TEXT TYPE 'I'.
Thanks & regards
Sreenivasulu P
‎2006 May 17 12:52 PM
in se38 if you give that program name & select COPY,
give your target name ZSAPMF05A.
then on the next screen select all check boxes (documentation etc). & now you will see a popup with all the includes exists in that program SAPMF05A. if you want to copy any one of them or all of them then select the check box & give your Z include name in the next field.
it will copy that include to your new z include. else that include will exists in your new program with the same name.
Regards
Srikanth
‎2006 May 17 12:59 PM
Hi
for downloading all the programs better use the report listed above ...
else for copying a single program goto se38 -> enter the program name and click the copy button above it will prompt u with the new include name give some z stuff and copy all the fields..
reward points if it helps
gunjan
‎2006 May 17 1:05 PM
Hi Frnds,
I am able to copy the first set of Includes which are present in the main program.
Again if we go into the includes present in the main program it has its own set of includes.I am not able copy those includes in single step.
IS copying each and every include separately is the only way to do tht?
please let me know.
Regards
Sowmmya B
‎2006 May 17 1:04 PM
Hi,
Check out these links:
Zhttp://www.sap-img.com/abap/download-and-upload-your-abap-program.htm
Hope they help you.
Regards.
Anjali
‎2006 May 17 1:21 PM
Hi Sowmya
Please see the link https://www.sdn.sap.com/irj/sdn/developerareas/abap?rid=/library/uuid/840ad679-0601-0010-cd8e-9989fd...
in ABAP FAQ's area
Last FAQ gives the code how to download the ABAP code.
Best Regards
Naresh