Professional Documents
Culture Documents
This document describes the steps for adding an office document to a screen. Note that Development
Training is necessary to complete this task.
In this example, were creating a new screen to add an Office Docs tab to the Sales Order Maintenance
function. To add an office document block to the screen, the block type should be set as Office and a
parameter will be required. This parameter must correspond to the field name for the office document on
the Fields tab, as shown below.
Once the block line is entered, right-click anywhere one the line and select Definition of Office sections.
This is where the desired type of office document is chosen. Word is the default value. Excel,
PowerPoint, and Universal are the other options.
Add the newly created screen as a tab line and revalidate the window. Remember to include an activity
code. If this object has entry transactions (e.g. Sales Orders, Shipments, Invoices, etc), the entry
transactions must also be revalidated.
Some code must be added to the SPE program associated with the new screen. If you are unsure of the
program name, look at the Specific Processing field in screen Maintenance.
The following code must be integrated into the SPE process. Care is required so as to not overwrite
anything currently there.
$ACTION
Case ACTION
When "LIENS" : Gosub LIENS
When "RAZCRE" : Gosub RAZCRE
When "INICRE" : Gosub INICRE
When "INIMOD" : Gosub INIMOD
When "ANNULE" : Gosub ANNULE
When default
Endcase
Return
############################################################################
$LIENS
# Read the office document
Call LECBLOB ("SOH",[M:SOH0]SOHNUM,"","",[M]OFFTYP,[M]OFFDOC) From SUBAON
Return
############################################################################
$ANNULE
# Deletion of the office document
Call SUPBLOB ("SOH",[F:SOH]SOHNUM,"","") From SUBAON
Return
############################################################################
$RAZCRE
# Set document type - should match up with block definition
# 4 = Universal
# 5 = Word
# 6 = Excel
# 7 = PowerPoint
[M]OFFTYP=4
Return
############################################################################
$INICRE
Gosub CHARGENETTE
Return
############################################################################
$INIMOD
Gosub CHARGENETTE
Return
############################################################################
$CHARGENETTE
GPE=1
Return