Implementation Options
Direct control of the IGP printer takes place in separate layout modules. If you wish to adapt an existing label layout or define a new one, you need to define a new label layout for the new label.
Prerequisites
To adapt or define the label layout, you need to define a new layout module. For this you need to be familiar with the ABAP Development Workbench and the control language of the printer used.
Process Flow
The interface of the layout module is defined by the respective print program. The program RVADWAHN is assigned as processing program for the material label with the output type MALB and the transmission medium 1.
The following processes are defined in the program RDVWAHN.
Here certain print parameters are set by the system and the layout module is called up for controlling the printer. The printer, device type, and the label data are transmitted to the layout module. Examples for these layout modules include:
Creating a New Layout Module
You must not change the interface of the layout module, that is, the parameters LABEL_PRINTER, PRINTER_TYPE and LABEL_DATA must be kept.
The control commands to be used are listed in the printer manual.
The control sequence should, as a rule, be mixed with the data of the label, as they are transmitted in the parameter LABEL_DATA.
The data is transmitted to the printer using the ABAP statement WRITE. For example, with WRITE: / '~AF17;*' NO-GAP, LABEL_DATA-MATNR NO-GAP, '*' in IGP, the material number is assigned to the printer variable AF17.
You can specify the device type or the printer to distinguish between the control languages. This is important if you are using printers with different description languages (for example, IGP and ZPL), but printing the same label (for example, Odette Transport Label). In this case, define a common function module as layout module (for example, ZZ_ODETTE) and make a distinction within the function module (it is best if the different controls are separated by different routines, for example ZZ_ODETTE_ZPL and FORM ZZ_ODETTE_IGP).
The label data that are provided by the parameter LABEL_DATA are of key importance. The reference is stored in the repository through the structure VWAHN. The following fields are available:
Label Data of the Structure VWAHN
EXIDV |
Identification of the package |
EXIDE |
Supplement to identification |
VHILM |
Packaging material |
VHMKU |
Packaging material at customer |
NTGEW |
Net weight |
BRGEW |
Gross weight |
GEWEI |
Weight unit |
SMGKN |
SMG ID |
VEMNG |
Maximum quantity |
VEMEH |
Unit of measure |
MATNR |
Material number |
KDMAT |
Material number customer |
CHARG |
Batch |
AESKD |
Change-status customer |
ARKTX |
Material text |
KUNNR |
Customer number |
KUADR |
Address of customer |
KULAN |
Country of customer |
ABLAD |
Unloading point |
VBRST |
Point of consumption |
EIKTO |
Identification at customer |
VSTEL |
Shipping point |
VSADR |
Address of shipping point |
VBELN |
Delivery number |
LIFEX |
External delivery number |
TKNUM |
Shipment number |
ANZPK |
Number of uppermost packages in the delivery |
WADAT |
Date of goods issue |
The fields are only filled if the data is unique. If the data entered is not unique or clear, the respective field receives the value * (asterisk).
Initial situation
Result
If crate 2 were empty, pallet 3 would have the value A for the field MATNR, that is, in the case of initial values, the values are unique.
The shipping point serves as sender, and the customer as receiver. The addresses of the shipping point and the customer are represented by address numbers in the central address management file (Table ADRC). A function module is available for editing the address. This is also used in the layout modules supplied.