SAP Scripts Tutorial
SAP Scripts Useful Resources
Selected Reading
- Create a Script in the System
- SAP Scripts - Output Mode IDOC
- SAP Scripts - Output Mode Spool
- SAP Scripts - Raw Data Interface
- SAP Scripts - Format Conversion
- Print Preview of a Document
- SAP Scripts - Delete a Document
- SAP Scripts - Save a Document
- SAP Scripts - Find a Document
- SAP Scripts - Update a Document
- SAP Scripts - Create a Document
- SAP Scripts - Word Processing
- SAP Scripts - Standard Text
- SAP Scripts - Copy Scripts
- SAP Scripts - Control Commands
- SAP Scripts - Text & Graphics
- SAP Scripts - Control Tables
- SAP Scripts - Import
- SAP Scripts - Export
- SAP Scripts - Data Formats
- SAP Scripts - Control Print Output
- SAP Scripts - Output Types
- SAP Scripts - Format Options
- SAP Scripts - Grouping Text
- SAP Scripts - Text Module
- SAP Scripts - Output Area
- SAP Scripts - Creating a Window
- SAP Scripts - Print Program
- SAP Scripts - Layout Set
- SAP Scripts - Form Painter
- SAP Scripts - Smart Forms
- SAP Scripts - Overview
- SAP Scripts - Home
SAP Scripts Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
SAP Scripts - Print Program
SAP Scripts - Print Program
在SAP 标语中,Print Program 用于印刷实际表格并从数据库表中获取数据,选择一个表格,并按规定格式印刷文本内容。 它从数据库中检索数据,并将数据与用户投入、数据格式和印刷材料结合起来。
所有印刷节目和表格都储存在表TNAPR。
印刷方案使用不同的功能单元。 为了启动印刷方案,使用OPEN-FORM功能模块,并结束CLOSE方案。 通用标准功能模块使用。
OPEN_FORM-在印刷节目中,这一功能应首先在任何印刷之前使用。 请具体说明表格和印刷语言的名称。
CALL FUNCTION OPEN_FORM
<START_FORM- 这项职能需要在一项请求中采用具有类似特征的不同形式。
CALL FUNCTION ’START_FORM’
CALL FUNCTION ‘WRITE_FORM’
CALL FUNCTION ‘CONTROL_FORM’
<END_FORM 这项职能最终被指定,没有出口参数。
CALL FUNCTION ‘END_FORM’
CLOSE_FORM 查阅标准表格和标准印刷方案, 《运输法:NACE
输入应用类型,并点击顶端的输出类型。
在以下屏幕上,你可以看到选定服务的申请名称。
Print Program − Example
下面是一份印刷样本方案,用公司相关信息,如客户数据、日期、飞行簿等,制作发票。
Section 1 - Get customer data
TABLES: zcustom, zbook, zpfp. DATA: bookings pke zbook... select * from... /In this section, you are reading the data from tables in database./
Section 2 - Open form
CALL FUNCTION OPEN_FORM EXPORTING DEVICE = PRINTER FORM = EXAMPLE1 DIALOG = X OPTIONS = EXCEPTIONS CANCELLED = 1 DEVICE = 2 FORM = 3 OTHERS = 11 /In this section, you are calpng OPEN_FORM function module to initiapze print output./
在上述职能模块中,参数——
DEVICE可以是PRINTER(印刷机)、TELEFAX(传真输出)或SCREEN(投影机)。
Section 3 - Print table heading
CALL FUNCTION WRITE_FORM EXPORTING ELEMENT = textelement’ TYPE = TOP WINDOW = MAIN FUNCTION = SET ... /In this section, you use WRITE_FORM function to output general text elements and column heading/
Section 4 - Print customer bookings
LOOP AT bookings WHERE CALL FUNCTION WRITE_FORM EXPORTING ELEMENT = BOOKING TYPE = BODY WINDOW = MAIN ... ENDLOOP /In this section, text element BOOKING is used to output the bookings of a customer from the loop from BOOKING table in database./
Section 5 - Close form
CALL FUNCTION CLOSE_FORM IMPORTING * RESULT = EXCEPTIONS UNOPENED = 1 OTHERS = 5 /To end the Print Program/
您最终称这一功能模块,没有出口参数。
Advertisements