Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Program to copy all custom developments ( Z*) into local PC

Former Member
0 Likes
1,688

Hi SDN'ers ;

Does any of you has the Program to copy all custom developments ( Z*) into local PC ? Would appreciate help on the same.

Best Regards,

Ritesh Shrivastava

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,501

Hi.....

Just Execute this program....

It will copy all your Z programs into your PC......

REPORT ZDOWNLOAD.

DATA: W_PROGNAME(40) TYPE C.

DATA ITAB TYPE TABLE OF STRING.

DATA: W_PATH TYPE STRING.

DATA W_STRING TYPE STRING.

DATA T_PROGNAME LIKE STANDARD TABLE OF W_PROGNAME.

SELECT PROGNAME

FROM REPOSRC

INTO TABLE T_PROGNAME

WHERE PROGNAME LIKE 'Z%' .

WRITE W_PROGNAME.

LOOP AT T_PROGNAME INTO W_PROGNAME.

READ REPORT W_PROGNAME INTO ITAB.

CONCATENATE 'D:\PROGRAMS\' W_PROGNAME '.txt' INTO W_PATH.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = W_PATH

TABLES

DATA_TAB = ITAB

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.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDLOOP.

Let me know if you have any more Doubt......

Reward points if useful......

Suresh......

Hi SDN'ers ;

Does any of you has the Program to copy all custom developments ( Z*) into local PC ? Would appreciate help on the same.

Best Regards,

Ritesh Shrivastava

6 REPLIES 6
Read only

Former Member
0 Likes
1,501

hi,

all ur pgm wil be saved in TADIR table u can write an abap program for that so that it will look for obj starting with Z* and save it in ur pc.

if this infor help u rewarding points

ravi

Read only

Former Member
0 Likes
1,501

Ritesh,

Write a program like

DATA : begin of itab occurs 0,

TABNAME like DD02L-TABNAME ,

end of itab.

select TABNAME into table itab

from DD02L

where tabname like 'Z%' or

tabname like 'Y%'.

call function 'WS_EXCEL'

  • EXPORTING

  • FILENAME = ' '

  • SYNCHRON = ' '

tables

data = itab.

Don't forget to reward if useful

Read only

sourabhshah
Product and Topic Expert
Product and Topic Expert
0 Likes
1,501

hi,

you will get all the program names from TADIR for uname.

The function 'SVRS_GET_REPS_FROM_OBJECT' below gets the code of program which you then store as .txt by using the function GUI_UPLOAD.

CALL FUNCTION 'SVRS_GET_REPS_FROM_OBJECT'

EXPORTING

object_name = ls_tadir-obj_name

object_type = lv_obj_type

versno = '00000'

TABLES

repos_tab = lt_reptext_local

trdir_tab = lt_trdir_local

EXCEPTIONS

communication_failure = 1 MESSAGE sy-lisel

d010inc TABLE FOR FINDING INCLUDES IN A PROGRAM

A little programing to do the trick

Read only

Former Member
0 Likes
1,501

Please check the link

<a href="http://www.sap-img.com/abap/download-and-upload-your-abap-program.htm">http://www.sap-img.com/abap/download-and-upload-your-abap-program.htm</a>

Read only

Former Member
0 Likes
1,502

Hi.....

Just Execute this program....

It will copy all your Z programs into your PC......

REPORT ZDOWNLOAD.

DATA: W_PROGNAME(40) TYPE C.

DATA ITAB TYPE TABLE OF STRING.

DATA: W_PATH TYPE STRING.

DATA W_STRING TYPE STRING.

DATA T_PROGNAME LIKE STANDARD TABLE OF W_PROGNAME.

SELECT PROGNAME

FROM REPOSRC

INTO TABLE T_PROGNAME

WHERE PROGNAME LIKE 'Z%' .

WRITE W_PROGNAME.

LOOP AT T_PROGNAME INTO W_PROGNAME.

READ REPORT W_PROGNAME INTO ITAB.

CONCATENATE 'D:\PROGRAMS\' W_PROGNAME '.txt' INTO W_PATH.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

FILENAME = W_PATH

TABLES

DATA_TAB = ITAB

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.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDLOOP.

Let me know if you have any more Doubt......

Reward points if useful......

Suresh......

Read only

Former Member
0 Likes
1,501

Thanks everyone .It really helped.