SlideShare a Scribd company logo
1 of 7
Download to read offline
Print to Text File at OS Level
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2006 SAP AG 1
Print to Text File at OS Level
Applies to:
All SAP products based on ABAP stack
Summary
A tutorial on how to print to text file at OS Level from SAP. The tutorial provides detailed step-by-step
configuration details to create a printer which prints to text file at OS level in designated File System.
Example configuration is done for SAP products installed on HP-UX 11i.
Author(s): Harpreet Singh
Company: Accenture (Bangalore – India)
Created on: 29 September 2006
Author Bio
I am working as SAP-BASIS Team Lead at Accenture. I have around 6Yrs in SAP-BASIS
experience which include two implementation projects.
Certifications:
• WAS 640 certified technology consultant
• OCP (Oracle Certified professional – DBA Track)
Print to Text File at OS Level
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2006 SAP AG 2
Table of Contents
Applies to: ........................................................................................................................................ 1
Summary.......................................................................................................................................... 1
Author Bio ........................................................................................................................................ 1
Business Requirement..................................................................................................................... 2
Procedure ........................................................................................................................................ 2
Example........................................................................................................................................... 5
Disclaimer and Liability Notice......................................................................................................... 7
Business Requirement
You want to redirect the spool output to a text file at OS Level rather than the Real Printer.
Procedure
• Execute transaction SPAD
• Click output devices and switch to change mode
• Click Create
Print to Text File at OS Level
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2006 SAP AG 3
• On “Device Attribute tab” Provide necessary details like
o Output Device name
o Short Name
o Device type as “ASCIIPRI : Some generic ASCII printer”
o Spool Server – provide name of the app server running spool work process and whose file
system you would like to use for print files.
o Provide other details as required.
• On Access method tab provide details such as
o Host Spool Access method as “L : Print Locally Using LP/LPR”
o Host printer any name you would like to have this is just a dummy name.
o Click Edit Command Set
o You will get one more box in Access tab named “Command Set ID” as show below
Print to Text File at OS Level
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2006 SAP AG 4
o Provide one character name and double click on that. Following screen will popup
o Provide the necessary details as described below
Description : Any description for command set ID
Command to transfer print data : Here (in below Fig)
/usr/bin/cp &F <File System Path>
This will copy the contents of output to file system you specified in place of <File
System Path>
&F is the file name with default storage path and default storage path is data
directory for instance i.e. /usr/sap/<SID>/<instance>/data and default file name is
<OUTPUT_ID>.<SID>
Second part after semicolon is the script at OS level you would like to execute after
completing the first step, this would be required to rename the file to understandable
file name. You can pass on parameter to this scripts following parameter are allowed
&P : output device
&F : transfer file
&f : name of transfer file without path name share (as of 4.0A)
&p : path name of transfer file (as of 4.0A)
&C : number of copies
&I : job name of SAP spooler
&J : job name of SAP spooler with database name
&L : layout
&M : client of owner
&O : owner
&m : printing client
Print to Text File at OS Level
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2006 SAP AG 5
&o : printing user
&t : phone number (FAX)
&T : title
&R : recipient (cover sheet)
&D : department (cover sheet)
&S : SAP name of output device
&Y : priority
&U : UNIX cover sheet requested? ('N'=No, 'X'=Yes, 'D'=Default)
&N: number of the spool request (as of Release 4.5A)
&n: number of the output request (as of Release 4.5A)
c: number of pages (as of Release 4.0A)
&s: field 'Suffix2' of the spool request (as of Release 4.0A)
Command to query job status : This is required to know the status of the output at
OS level, if this not that much important you can provide “echo ok” but don’t leave it
blank.
Click Enter and Save the printer definition
Its done
Example
For example if you would like to create the file to /intf/rq1/outb/mm/pending and rename the file to
<CREATOR>-<TITLE>-<SPOOL ID>_<YYYYMMDDHHMMSS>.done
Create the following script (say name spool_output_to_os.sh and placed at /var/adm/scripts/BASIS/general )
Print to Text File at OS Level
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2006 SAP AG 6
J=$1
N=$2
O=$3
T=$4
E=".done"
d=`date '+20%y%m%d%H%M%S'`
FN=`echo $J | awk -F/ '{printf("%s",$7)}'`
FN1=${O}-${T}-${N}_${d}${E}
mv /intf/rq1/outb/mm/pending/${FN} /intf/rq1/outb/mm/pending/${FN1}
and in “Command to transfer print data “ enter
/usr/bin/cp &F /intf/rq1/outb/mm/pending/ ; /var/adm/scripts/BASIS/general/spool_output_to_os.sh &F &N &O
&T
Here parameter &F &N &O &T are passed to scripts.
Print to Text File at OS Level
SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com
© 2006 SAP AG 7
Disclaimer and Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces
and therefore is not supported by SAP. Changes made based on this information are not supported and can
be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods
suggested in this document, and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of
this technical article or code sample, including any liability resulting from incompatibility between the content
within this document and the materials and services offered by SAP. You agree that you will not hold, or seek
to hold, SAP responsible or liable with respect to the content of this document.

More Related Content

Similar to Dispositivos en SAP

Leveraging Open Source to Manage SAN Performance
Leveraging Open Source to Manage SAN PerformanceLeveraging Open Source to Manage SAN Performance
Leveraging Open Source to Manage SAN Performancebrettallison
 
Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0venkatakrishnan k
 
R12 d49656 gc10-apps dba 01
R12 d49656 gc10-apps dba 01R12 d49656 gc10-apps dba 01
R12 d49656 gc10-apps dba 01zeesniper
 
Chapter9 and10
Chapter9 and10Chapter9 and10
Chapter9 and10Saurav
 
Chapter9and10
Chapter9and10Chapter9and10
Chapter9and10Saurav
 
Sap abap training Overview
Sap abap training OverviewSap abap training Overview
Sap abap training Overviewraviadm100
 
What is DCA (Diploma of Computer Application) Detail, Syllabus,Coursess.pdf
What is DCA (Diploma of Computer Application) Detail, Syllabus,Coursess.pdfWhat is DCA (Diploma of Computer Application) Detail, Syllabus,Coursess.pdf
What is DCA (Diploma of Computer Application) Detail, Syllabus,Coursess.pdfRohitRoshanBengROHIT
 
What is DCA (Diploma of Computer Application) Detail, Syllabus,Coursess.pdf
What is DCA (Diploma of Computer Application) Detail, Syllabus,Coursess.pdfWhat is DCA (Diploma of Computer Application) Detail, Syllabus,Coursess.pdf
What is DCA (Diploma of Computer Application) Detail, Syllabus,Coursess.pdfRohitRoshanBengROHIT
 
Looking for best Sap abap training institute in Chennai
Looking for best Sap abap training institute in ChennaiLooking for best Sap abap training institute in Chennai
Looking for best Sap abap training institute in ChennaiRaja AMEKS Infotech
 
Embedded Android
Embedded AndroidEmbedded Android
Embedded Android晓东 杜
 
Graphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagiosGraphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagiosjasonholtzapple
 
R12 d49656 gc10-apps dba 05
R12 d49656 gc10-apps dba 05R12 d49656 gc10-apps dba 05
R12 d49656 gc10-apps dba 05zeesniper
 
Passenger 6 generic language support presentation
Passenger 6 generic language support presentationPassenger 6 generic language support presentation
Passenger 6 generic language support presentationHongli Lai
 

Similar to Dispositivos en SAP (20)

Leveraging Open Source to Manage SAN Performance
Leveraging Open Source to Manage SAN PerformanceLeveraging Open Source to Manage SAN Performance
Leveraging Open Source to Manage SAN Performance
 
Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
Sandy Report
Sandy ReportSandy Report
Sandy Report
 
Sandy Report
Sandy ReportSandy Report
Sandy Report
 
R12 d49656 gc10-apps dba 01
R12 d49656 gc10-apps dba 01R12 d49656 gc10-apps dba 01
R12 d49656 gc10-apps dba 01
 
Php
PhpPhp
Php
 
Sas
Sas Sas
Sas
 
SAS X
SAS XSAS X
SAS X
 
Chapter9 and10
Chapter9 and10Chapter9 and10
Chapter9 and10
 
Chapter9and10
Chapter9and10Chapter9and10
Chapter9and10
 
Sap abap training Overview
Sap abap training OverviewSap abap training Overview
Sap abap training Overview
 
What is DCA (Diploma of Computer Application) Detail, Syllabus,Coursess.pdf
What is DCA (Diploma of Computer Application) Detail, Syllabus,Coursess.pdfWhat is DCA (Diploma of Computer Application) Detail, Syllabus,Coursess.pdf
What is DCA (Diploma of Computer Application) Detail, Syllabus,Coursess.pdf
 
What is DCA (Diploma of Computer Application) Detail, Syllabus,Coursess.pdf
What is DCA (Diploma of Computer Application) Detail, Syllabus,Coursess.pdfWhat is DCA (Diploma of Computer Application) Detail, Syllabus,Coursess.pdf
What is DCA (Diploma of Computer Application) Detail, Syllabus,Coursess.pdf
 
Looking for best Sap abap training institute in Chennai
Looking for best Sap abap training institute in ChennaiLooking for best Sap abap training institute in Chennai
Looking for best Sap abap training institute in Chennai
 
Embedded Android
Embedded AndroidEmbedded Android
Embedded Android
 
Graphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagiosGraphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagios
 
Project eprom progr
Project eprom progrProject eprom progr
Project eprom progr
 
R12 d49656 gc10-apps dba 05
R12 d49656 gc10-apps dba 05R12 d49656 gc10-apps dba 05
R12 d49656 gc10-apps dba 05
 
Passenger 6 generic language support presentation
Passenger 6 generic language support presentationPassenger 6 generic language support presentation
Passenger 6 generic language support presentation
 

Recently uploaded

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Recently uploaded (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 

Dispositivos en SAP

  • 1. Print to Text File at OS Level SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 1 Print to Text File at OS Level Applies to: All SAP products based on ABAP stack Summary A tutorial on how to print to text file at OS Level from SAP. The tutorial provides detailed step-by-step configuration details to create a printer which prints to text file at OS level in designated File System. Example configuration is done for SAP products installed on HP-UX 11i. Author(s): Harpreet Singh Company: Accenture (Bangalore – India) Created on: 29 September 2006 Author Bio I am working as SAP-BASIS Team Lead at Accenture. I have around 6Yrs in SAP-BASIS experience which include two implementation projects. Certifications: • WAS 640 certified technology consultant • OCP (Oracle Certified professional – DBA Track)
  • 2. Print to Text File at OS Level SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 2 Table of Contents Applies to: ........................................................................................................................................ 1 Summary.......................................................................................................................................... 1 Author Bio ........................................................................................................................................ 1 Business Requirement..................................................................................................................... 2 Procedure ........................................................................................................................................ 2 Example........................................................................................................................................... 5 Disclaimer and Liability Notice......................................................................................................... 7 Business Requirement You want to redirect the spool output to a text file at OS Level rather than the Real Printer. Procedure • Execute transaction SPAD • Click output devices and switch to change mode • Click Create
  • 3. Print to Text File at OS Level SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 3 • On “Device Attribute tab” Provide necessary details like o Output Device name o Short Name o Device type as “ASCIIPRI : Some generic ASCII printer” o Spool Server – provide name of the app server running spool work process and whose file system you would like to use for print files. o Provide other details as required. • On Access method tab provide details such as o Host Spool Access method as “L : Print Locally Using LP/LPR” o Host printer any name you would like to have this is just a dummy name. o Click Edit Command Set o You will get one more box in Access tab named “Command Set ID” as show below
  • 4. Print to Text File at OS Level SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 4 o Provide one character name and double click on that. Following screen will popup o Provide the necessary details as described below Description : Any description for command set ID Command to transfer print data : Here (in below Fig) /usr/bin/cp &F <File System Path> This will copy the contents of output to file system you specified in place of <File System Path> &F is the file name with default storage path and default storage path is data directory for instance i.e. /usr/sap/<SID>/<instance>/data and default file name is <OUTPUT_ID>.<SID> Second part after semicolon is the script at OS level you would like to execute after completing the first step, this would be required to rename the file to understandable file name. You can pass on parameter to this scripts following parameter are allowed &P : output device &F : transfer file &f : name of transfer file without path name share (as of 4.0A) &p : path name of transfer file (as of 4.0A) &C : number of copies &I : job name of SAP spooler &J : job name of SAP spooler with database name &L : layout &M : client of owner &O : owner &m : printing client
  • 5. Print to Text File at OS Level SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 5 &o : printing user &t : phone number (FAX) &T : title &R : recipient (cover sheet) &D : department (cover sheet) &S : SAP name of output device &Y : priority &U : UNIX cover sheet requested? ('N'=No, 'X'=Yes, 'D'=Default) &N: number of the spool request (as of Release 4.5A) &n: number of the output request (as of Release 4.5A) c: number of pages (as of Release 4.0A) &s: field 'Suffix2' of the spool request (as of Release 4.0A) Command to query job status : This is required to know the status of the output at OS level, if this not that much important you can provide “echo ok” but don’t leave it blank. Click Enter and Save the printer definition Its done Example For example if you would like to create the file to /intf/rq1/outb/mm/pending and rename the file to <CREATOR>-<TITLE>-<SPOOL ID>_<YYYYMMDDHHMMSS>.done Create the following script (say name spool_output_to_os.sh and placed at /var/adm/scripts/BASIS/general )
  • 6. Print to Text File at OS Level SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 6 J=$1 N=$2 O=$3 T=$4 E=".done" d=`date '+20%y%m%d%H%M%S'` FN=`echo $J | awk -F/ '{printf("%s",$7)}'` FN1=${O}-${T}-${N}_${d}${E} mv /intf/rq1/outb/mm/pending/${FN} /intf/rq1/outb/mm/pending/${FN1} and in “Command to transfer print data “ enter /usr/bin/cp &F /intf/rq1/outb/mm/pending/ ; /var/adm/scripts/BASIS/general/spool_output_to_os.sh &F &N &O &T Here parameter &F &N &O &T are passed to scripts.
  • 7. Print to Text File at OS Level SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2006 SAP AG 7 Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.