Skip to Content
avatar image
Former Member

Como guardar, bajar o exportar un paquete?

Como puedo guardar, bajar o exportar un paquete de abap para despues poder pasarlo a otro cliente o a otro sistema de sap?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 20, 2009 at 01:37 PM

    Necesitas crear un transporte.

    Hay suficiente ayuda en help.sap.com para darte instrucciones de como crear un transporte asi que por favor haz un poquito de research.

    Saludos

    Juan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 19, 2009 at 12:03 AM

    Rafael, entiendo que quieres copiar un programa abap con todo y sus include a manera de respaldo. el siguiente codigo guarda la biblioteca que le indiques en un directorio en tu pc. Espero te sea de utlilidad.

    REPORT ZDOWN_PACKG .

    ***********************************************************************

    • Table declaration *

    ***********************************************************************

    TABLES: TADIR.

    ***********************************************************************

    • Data declaration *

    ***********************************************************************

    TYPES: ABAPLINE(255) TYPE C.

    TYPES: BEGIN OF TY_REPOSIT,

    PGMID TYPE TADIR-PGMID,

    OBJECT TYPE TADIR-OBJECT,

    OBJ_NAME TYPE TADIR-OBJ_NAME,

    DEVCLASS TYPE TADIR-DEVCLASS,

    END OF TY_REPOSIT.

    DATA: IT_REPOSIT TYPE STANDARD TABLE OF TY_REPOSIT,

    WA_REPOSIT TYPE TY_REPOSIT.

    DATA: IT_REPSRC TYPE STANDARD TABLE OF ABAPLINE,

    WA_REPSRC TYPE ABAPLINE.

    DATA: PROG(60) TYPE C,

    MC_FILENAME TYPE RLGRAP-FILENAME,

    FILENAME TYPE STRING.

    ***********************************************************************

    • Selection Screen *

    ***********************************************************************

    PARAMETERS: P_DEV TYPE TADIR-DEVCLASS. "Package Name

    *****Program Logic

    SELECT PGMID

    OBJECT

    OBJ_NAME

    DEVCLASS

    FROM TADIR

    INTO TABLE IT_REPOSIT

    WHERE PGMID = 'R3TR' AND

    OBJECT = 'PROG' AND

    DEVCLASS = P_DEV.

    IF SY-SUBRC NE 0.

    MESSAGE 'No existen programas en el paquete proporcionado' TYPE 'E'.

    EXIT.

    ENDIF.

    • Consigue los programas y los baja a la ruta especificada

    LOOP AT IT_REPOSIT INTO WA_REPOSIT.

    PROG = WA_REPOSIT-OBJ_NAME.

    clear it_repsrc.

    READ REPORT PROG INTO IT_REPSRC.

    CONCATENATE 'C:My ABAP ProgramsReport' PROG '.txt'

    INTO MC_FILENAME.

    FILENAME = MC_FILENAME.

    *****Function module para bajar archivos a un sistema local

    CALL FUNCTION 'GUI_DOWNLOAD'

    EXPORTING

    FILENAME = FILENAME

    TABLES

    DATA_TAB = IT_REPSRC

    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.

    CLEAR PROG.

    CLEAR WA_REPSRC.

    ENDLOOP.

    *****Aviso al usuario después de bajar todos los programas.

    MESSAGE 'Verifica la carpeta con los programas grabados' TYPE 'S'.

    Add comment
    10|10000 characters needed characters exceeded