SAP Function RS_COPY_PROGRAM - Copy Program Objects in Development Environment System

Parameter Reference Type Length Default Optional Text
CORRNUMBER E071-TRKORR C 20 ' ' X Correction Number if SUPPRESS_POPUP is Mandatory
DEVCLASS TDEVC-DEVCLASS C 30 ' ' X Development Class if SUPPRESS_POPUP is Mandatory
GENERATED SYST-INPUT C 1 ' ' X Generated Program
PROGRAM SYST-REPID C 40 X Target Program (30 Bytes)
SKIP_PROGRESS_IND SYST-INPUT C 1 ' ' X Suppress Progress Indicator
SOURCE_PROGRAM SYST-REPID C 40 Source Program (30 Bytes)
SUPPRESS_CHECKS SYST-INPUT C 1 ' ' X Suppress Authorization Checks
SUPPRESS_COMMIT SYST-INPUT C 1 ' ' X internal use only!!!!!!!!!!!!!!!!!!!!!!!
SUPPRESS_NORM_CHECK SYST-INPUT C 1 ' ' X Internal use only
SUPPRESS_POPUP SYST-INPUT C 1 ' ' X Suppress Dialog
SUPPRESS_SCREEN SYST-INPUT C 1 ' ' X Internal use only
WITH_CUA SYST-INPUT C 1 ' ' X Menu Will be Copied by Default
WITH_DOCUMENTATION SYST-INPUT C 1 ' ' X Documentation Will be Copied by Default
WITH_DYNPRO SYST-INPUT C 1 ' ' X Screens Will be Copied by Default
WITH_INCLUDES SYST-INPUT C 1 ' ' X Includes Will Be Copied - Defined by User
WITH_TEXTPOOL SYST-INPUT C 1 'X' X Text Pool Will be Copied by Default
WITH_VARIANTS SYST-INPUT C 1 ' ' X Variants Will be Copied by User

Parameter Reference Type Length Text
CORRNUMBER E071-TRKORR C 20 Correction Number if SUPPRESS_POPUP is Mandatory
DEVCLASS TDEVC-DEVCLASS C 30 Development Class if SUPPRESS_POPUP is Mandatory
PROGRAM SYST-REPID C 40 Target Program (30 Bytes)

Exception Text
ENQUEUE_LOCK Copy Aborted Because SAP Locks Exist
OBJECT_NOT_FOUND Object Not Found
PERMISSION_FAILURE Insert Unsuccessful
REJECT_COPY Reject Copy Because of Norm Errors or Internal Error


Use RS_COPY_PROGRAM to copy a main program or an include program.
If the program is a main program, you can choose which subobjects willbe copied, such as screens, menus, and so on. (Type: M,F,1,S) If youwant to use RS_COPY_PROGRAM internally you can use parameterSUPPRESS_POPUP so that all screens will be suppressed.
For SUPPRESS_POPUP, you need to initialize the DEVCLASS paramater andfor development class ne $xxx or Txxx you need to initialize correctionnumber ( CORRNUMBER ). Use RS_CORR_INSERT to get a correction number.To copy programs longer than 30 bytes or/and with '=' charactersincluded, you nedd to use suppress_popup mode. Program names > 30 Bytesare only available as source programs in dark mode.
If you want to use suppress_popup ( suppress all screens), you have toqualify the devclass parameter and corrnumber parameter for developmentclasses that do not start with $ or T . To get a correction number, useRS_CORR_INSERT.
If you use the parameter suppress_popup (suppress all screens) you mustqualify the parameter devclass. If devclass is not $TMP or the firstletter of the development class is not "T", you must qualify thecorrection number as well.

Description
Target program name. Only first 30 bytes allowed for external use.
If you want to use suppress_popup ( suppress all screens), you have toqualify the devclass parameter and corrnumber parameter for developmentclasses that do not start with $ or T . To get a correction number, useRS_CORR_INSERT.
If you use the parameter suppress_popup (suppress all screens) you mustqualify the parameter devclass. If devclass is not $TMP or the firstletter of the development class is not "T", you must qualify thecorrection number as well.

Functionality
Whenever a program is generated it should have an entry in table TADIR
Field GENFLAG.
If the condition of TADIR-GENFLAG NE SPACE is given, the program willbe copied from active source to active source. Otherwise active sourcewill be copied into inactive source. Generally using parameterSUPPRESS_POPUP will copy from active to active .

Notes
If you have a generated program but not an entry in TADIR-GENFLAG, youcan force RS_COPY_PROGRAM to behave as if your program has set an entryinto field TADIR-GENFLAG.

Description
Target program name. Only first 30 bytes allowed for external use.

Description
Source program name. Only first 30 bytes allowed for external use .
If you do not want the program name to be checked by naming convention,RS_PROGRAM_CHECK_NAME will be ignored. This parameter only works incomparison with parameter SUPPRESS_POPUP.
This function is only created to copy a program internally. No screenswill be executed . You need to move a correct program name to thePARAMETER PROGRAM as well as a DEVELOPMENT CLASS . In case ofDEVELOPMENT CLASS NE $xxx or Txxx a valid CORRECTION NUMBER is needed.Use RS_CORR_INSERT to get a correction number.
The program will be terminated if you use reserved program names.Therefore call RS_PROGRAM_CHECK_NAME before RS_COPY_PROGRAM. As of4.0C, the target program will be created as an active program usingSUPPRESS_POPUP. No Commit will be performed. NEVER USE SUPPRESS_COMMITsince that parameter is for internal use only.
Progam documentation will be copied in all languages for type T and fortype E.

Description
Include programs will be copied and substituted in source (INCLUDE ...)on all levels whenever the include name matches standard critera.