0% found this document useful (0 votes)
272 views2 pages

Maintenance Order Program SAP

This document provides instructions for printing a control ticket report in ABAP. It includes: 1. An overview that the standard form used is PM_COMMON and the ABAP steps are to import data, parse the data for the form, and save print records. 2. The main FORM PRINT_PAPER drives the printing and accepts parameters for the form name, print options, and data structures. 3. Details of the MAIN_PRINT section that controls printing including opening the form, setting titles, reading text tables, and printing order headers, details, partners, and classifications before closing the form.

Uploaded by

ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
272 views2 pages

Maintenance Order Program SAP

This document provides instructions for printing a control ticket report in ABAP. It includes: 1. An overview that the standard form used is PM_COMMON and the ABAP steps are to import data, parse the data for the form, and save print records. 2. The main FORM PRINT_PAPER drives the printing and accepts parameters for the form name, print options, and data structures. 3. Details of the MAIN_PRINT section that controls printing including opening the form, setting titles, reading text tables, and printing order headers, details, partners, and classifications before closing the form.

Uploaded by

ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

REPORT RIPRCT00 .

************************************************************************
* Print Drive ABAP for CONTROL TICKET *
* *
* Standard FORM is PM_COMMOM *
* *
*----------------------------------------------------------------------*
* ABAP STEPS: *
* 1: IMPORT data to print. *
* *
* 2: Parse of Data to print FORM. *
* The external text tables will be read as necessary. *
* *
* 3: Save Print-Protocol records in PMPL *
************************************************************************
*$*$ D A T A S E C T I O N I N C L U D E S ---------------------*
INCLUDE RIPRID01. " General DATA and TABLE struct.
*------------------*
START-OF-SELECTION.
*------------------*
PERFORM PRINT_PAPER. "can be started via SUBMIT or PERFORM PRINT_PAPER

*$*$ ................ M A I N F O R M .............................*


*... DATA STRUCTURE: ..................................................*
*... *
*... CAUFVD (AFIH AUFK AFKO plus other dialog fields: ORDER HEADER) *
*... | *
*... |-- AFVGD (AFVC AFVV plus dialog fields) Order operatns *
*... | | *
*... | |-- The sub operations also stored AFVGD and are pre *
*... | sorted. The SUMNR fields distinguishes Main operaitons*
*... | and sub operations *
*... | *
*... |-- RESBD Materials *
*... |-- RIPW0 Object list dialog area
* ------VIQMEL First Notification from Object list
*... |-- IHPAD Partners to Orders *
*...
*......................................................................*

*----------------------------------------------------------------------*
* FORM PRINT_PAPER *
*----------------------------------------------------------------------*
* Main driving Form behind the Printing of Papers *
* All information is imported from MEMORY *
*----------------------------------------------------------------------*
* --> FORM Name of SAPSCRIPT form to use. *
* --> WWORKPAPER Print options for SAPSCRIPT. *
* Structure command to define wworkpaper so the *
* individual fields can be addressed. *
* --> DATA STRUCTURES See form DATA_IMPORT INCLUDE RIPRID01 *
*----------------------------------------------------------------------*
*$*$ - P R I N T P A P E R
FORM PRINT_PAPER. " This form name must be used !!!
*$*$ - STARTED BY EXTERNAL PERFORM
PERFORM ORDER_DATA_IMPORT. " See INCLUDE RIPRIf02
PERFORM MAIN_PRINT. " Print the PAPER now
ENDFORM.
*$*$ MAIN PRINT SECTION CONTROLLED HERE................................
*... If you are making changes to Print ABAPS, (Naturally a copied
*... version) here is the place you can alter the logic and
*... and data supplied to the form. You should not alter logic
*... before this point if you wish it to operate successfully
*... with the standard transactions. Form PRINT_PAPER must exist !!
*... However if you wish the PRINT LOG to work you must take
*... care to make sure the LOG records are written to PMPL.
*......................................................................

FORM MAIN_PRINT.
*... Workpaper is controlled at a HEADER LEVEL (ORDERS)
*... ONLY THOSE OPERATIONS WITH A VALID CONTROL KEY FOR PRINT will
*... be LISTED.

PERFORM SET_GV_ARC_TYPE_AUFK USING caufvd-auart. "n766146

* start of node 766146:


* PERFORM OPEN_FORM USING C_ARC_TYPE_AUFK "Archive link for order
PERFORM OPEN_FORM USING gv_ARC_TYPE_AUFK "Archive link for order
* end of node 766146
CAUFVD-AUFNR"order number as key
' '. "New form for each Order
PERFORM LOCK_AND_SET " Enque and determine copy number
USING C_HEADER_ORDER. " open for Header level
PERFORM SET_TITLE.
PERFORM TITLE_PAGE.
PERFORM READ_ORDER_TEXT_TABLES. " Read tables for CAUFVD
PERFORM ORDER_HEADER_DETAIL. " Now print the order header see f02
PERFORM PERMITS USING CAUFVD-OBJNR. "special permits
PERFORM PARTNER_DETAILS " prints partner details
TABLES ORDER_IHPAD_TAB. "
PERFORM TECH_OBJECT_PARTNER " partner address equi / F.Locat
USING CAUFVD-EQUNR CAUFVD-TPLNR.
PERFORM PRINT_CLASSIFICATION USING CAUFVD-EQUNR 'EQUI' 'EQUNR'.
PERFORM PRINT_CLASSIFICATION USING CAUFVD-TPLNR 'IFLOT' 'TPLNR'.
PERFORM ORDER_OPERATIONS. " Operation details and reservations
PERFORM OBJECT_LIST USING YES. " object list with new page true
PERFORM END_OF_REPORT. " Print end of report line
PERFORM CLOSE_FORM. " Close the form.
PERFORM UNLOCK_AND_LOG. " Dequeue and Log print
ENDFORM.
*$*$ F O R M R O U T I N E S -------------------------------------*
*... Includes for General and Sepcific form routines
INCLUDE RIPRIF01. " General PRINT routines
INCLUDE RIPRIF02. " General PRINT routines ORDERS
*.......................................................................
*$*$ G E N E R A L F O R M R O U T I N E S ....................*

You might also like