Command Reference > pmrep Command Reference > GenerateAbapProgramToFile
  

GenerateAbapProgramToFile

Generates the ABAP program for a mapping with SAP table as the source and saves the program as a file. The GenerateAbapProgramToFile command generates the ABAP program for a mapping in the PowerCenter repository. The generated program is saved as a file. You can use the GenerateAbapProgramToFile command for mappings that use SAP tables as the source.
The naming convention for the file is mappingname_<version>_<program_mode>.ab4. You must enclose the path and the file name in double quotes. After you generate the ABAP program and save it to a file, use the InstallAbapProgram command to install it on an SAP system.
The GenerateAbapProgramToFile command uses the following syntax:
generateabapprogramtofile

-s <folder_name>

-m <mapping_name>

[-v <version_number>]

[-l <log_filename>]

-u <user_name>

-x <password>

-c <connect_string>

-t <client>

[-y <language>]

-p <program_mode (file, stream)>

-f <output_file_location>

{-e (enable override)

-o <override_name> }

[-a (authority check)]

[-n (use namespace)]

The following table describes pmrep GenerateAbapProgramToFile options and arguments:
Option
Argument
Description
-s
folder_name
Required. The name of the folder that contains the mapping for which the ABAP program needs to be generated.
-m
mapping_name
Required. Name of the mapping.
-v
version_number
Optional. Version number of the mapping. Default is the latest version.
-l
log_filename
Optional. Name of the log file where the information or error messages are written. By default, the log file is created in the directory where you run the command.
-u
user_name
Required. SAP source system connection user name. Must be a user for which you have created a source system connection.
-x
password
Required. Password for the user name. Use the command line program pmpasswd to encrypt the user password.
-c
connect_string
Required. DEST entry defined in the sapnwrfc.ini file for a connection to a specific SAP application server or for a connection that uses SAP load balancing.
-t
client
Required. SAP client number.
-y
language
Optional. SAP Logon language. Must be compatible with the PowerCenter Client code page. Default is the language of the SAP system.
-p
program_mode (file, stream)
Required. Mode in which the PowerCenter Integration Service extracts data from the SAP system. Select file or stream.
-f
output_file_location
Required. Location in the local machine where you want to save the ABAP program file.
-e
-
Optional. Overrides the default ABAP program file name.
-o
override_name
Required if you enable override. ABAP program file name.
-a
-
Optional. Adds authority checks to the ABAP program.
-n
-
Optional. Appends a namespace that you registered with SAP to the ABAP program name.

Example

The following example generates an ABAP program and saves it to a file:
generateabapprogramtofile -s folder_name -m mapping_name -l logfile_name -u user_name -x password -c connect_string -t 800 -y EN -p stream -e -o program_name -n -a -f "C:\<informatica_installation_dir>\ABAP_prog"