In addition to this description of a low level Unix / Linux installation there is the

The goal is to bring ELP in between the used spooling system. Usually every spooling system does have a possibility to plug in external filters, like CUPS or HP Dazel .

An easy way  for testing is to install ELP on a local PC and then add a printer to SAP using the communication method / Koppelart U (Berkeley). Then SAP will directly print using its requested DeviceType to the shared Windows queue.
Do not print using the SAP-WIN method, as then the job will go as well through the Windows queue, but also be ripped by the queue. The reason why most larger companies do NOT use SAP-WIN is, that the print results look different from printer to printer, and SAP can't control, if the job was really printed, which is in a productive environment more than important.

Applying rules to an SAP data stream is more than easy, as the stream looks nearly like an ASCII data stream. 

If SAP is running on an Unix / Linux environment and just uses the operating system lp command for printing (communication method L) then one possible method for the usage of ELP within SAP but also other software packages is like this:

In this case connection method (Koppelart) L seem to be the easiest and also the best solution to integrate ELP within SAP. Other software packages might also have a field for calling the spooler or lp command.

Generate in Transaction SPAD a new printer, store it and call the Pull-Down Menu Edit->Command set (Bearbeiten ->Kommandosatz). A new field is opened and enter there for example an "e" for ELP. After the double click on that "e" a new windows is popping up, where the commands can be edited. Enter the exact same command as used in the Instance or Default-Profile. The only difference is to add to the lp command an "_e" to lp_e.
In the example below the lp command was replaced by a shell script /opt/elp/elp_st.

In this example: Instance profile: rspo/host_spool/print = lp -d " &P" "&F"

New command set: lp_e -d "&P" "&F" "&o" "&T"

The last step is to generate a shell script in the search path of the R/3 systems names "lp_e"   (or the elp_st script in the named path), which performs the following actions:
- The input needs to be send through the ELP converter and most likely via stdout
- the real lp programme is called using the piped command, see page 19.

Here is an example of the lp_e shell script, how the above values can be passed into ELP:

/opt/elp/elp.HP-UX $3 STDOUT -d/opt/elp -c/opt/elp/convert.ini -p1"$2" -p3"$4" -p4"$5" | lp $1 $2

$2 is the printer name
$3 the print file name
$4 the user name
$5 the document name (Title)
see also: ELP Command Line Arguments 

Once this addon works, the ELP service can easily be activated on any printer within the system, as only the "e" needs to be set via edit->command set.

Here is a list of  all available parameter SAP can pass into the shell script, and there they can be passed by command line into the ELP printing process:

If the command is to contain a '&' character then this must be written as '&&'. The following replacement parameters are defined:

&C

Number of copies

&D Department of the recipient
&F Name of file with the print date (including path)
&f Name of file without path
&H if host spool cover page required
&I Job name with DB ID
&J Job name without DB ID
&L Format type
&M Client of spool request owner
&m Client of print request owner
&O (SAP) Name of spool request owner
&o (SAP) Name of print request owner
&P Name of external output device
&p Path name of output file
&R Name of recipient
&S Name of SAP output device
&T Host spool cover page required (X=yes, N=no)
&t Fax number
&U Title
&Y SAP priority (1-99) 1 is the highest priority


Alongside these standard parameters the following parameters are also available for the OMS command template:

&EI

SAP spool ID

&EG Confirmation group
&ES SAP instance name for call-back (if required, otherwise "-")
&ET Maximum buffer time for call-back events
&EA Maximum number of buffered events
&EP Fax recipient (future addition)
&E1 R/3 flag of LOMS
&E2 OMS flag of LOMS
&E3 R/3 flag of ROMS
&E4 OMS flag of ROMS

If you need to modify a DeviceType see here for Bar codes or here for a more complete presentation

Here are some SAP Spool System Variables, which can be used in layout sets (PJL initialisations) by any SAP DeviceType, copied from the "SAP Printing Guide"

Variable Meaning
$(ANZAHL) Number of copies to be printed.
$(ABTEILUNG) Department of the user who created the spool request.
$(ANGELEGT) Date and time when the spool request was created.
$(BENUTZER) User who requested the print out. $(USER)
$(DB) Storage location of the output request.
$(DRUCKAUFTRAG) ID number of the output request (sequential number starting with 1 and referring only to the output requests generated from a particular spool request.
$(DRUCKER) Name of the destination output device, as defined in the SAP spool system.
$(DRUCKERTYP) Type of output device, as defined in the SAP spool system.
$(DSN) First part of the three-part name generated by the SAP System for a spool request. (See also the SUFFIX1, SUFFIX2, and TITLE variables.)
$(ERZEUGT) Date and time when the output request was generated.
$(EIGNER) User who generated the spool request. (This may be a different user than the creator of the output request in the BENUTZER variable).
$(EMPFAENGER) The user to whom the print out should be delivered.
$(FORMULAR) The spool format used for an output request. If the document is an SAPscript document, then this is also the name of the SAPscript form used to format the document.
$(GEDRUCKT) Date and time when an output request was processed by the SAP spool system.
$(MANDANT) Client in which an output request was generated.
$(PRIO) Priority within the SAP spool system.
$(RECHNER) The name of the host system in which an output was processed.
$(SPOOLID) ID number of the spool request in the SAP spool system.
$(SUFFIX1) Second part of the three-part name generated by the SAP System for a spool request. (See also the DSN, SUFFIX2, and TITLE variables.)
$(SUFFIX2) Third part of the three-part name generated by the SAP System for a spool request. (See also the DSN, SUFFIX1, and TITLE variables.)
$(TITEL) Name given to a spool request by a user. Shown instead of the spool name (variables DSN, SUFFIX1, and SUFFIX2) if defined.

Support issue: My Bar Codes are NOT printed, instead the bar code user information is mostly printed in big letters:

  1. If older devices are printing bar codes with ELP and a newer one dos not, then in 95% of all cases this is the reason for it.
  2. Other wise you may use the Quickset AnalyseBarCodes option for further help on this topic.