Folgende Benutzer bedankten sich beim Autor a-dead-trousers für den Beitrag:
herr mb
Code: Alles auswählen.
WRITE: / '^XA'.
WRITE: / '~SD15^LH10,10'.
WRITE: / 'FO100,050B3N,N,100,NFDPPARTNO-1FS'.
WRITE: / 'FO150,200AD,75FDPARTNO-1FS'.
WRITE: / '^XZ'.
Code: Alles auswählen.
data: i_itcpo like table of itcpo with header line.
DATA: formular type tdform,
langu like sy-langu.
SELECTION-SCREEN BEGIN OF BLOCK rad3 WITH FRAME TITLE text-003.
parameters: anzahl type i default 1.
parameters: tddest like TSP03D-name.
parameters: TDIMMED like itcpo-TDIMMED as checkbox default 'X'.
SELECTION-SCREEN END OF BLOCK rad3
move: 1 to i_itcpo-TDCOPIES,
'Etikette' to i_itcpo-TDDATASET,
TDIMMED to i_itcpo-TDIMMED.
append i_itcpo.
write 'NAME_DES_FORMULARS' to formular.
perform open.
perform cust.
perform close.
*&---------------------------------------------------------------------*
*& Form open
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
form open.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = formular
device = 'PRINTER'
language = langu
options = i_itcpo
dialog = ' '.
CALL FUNCTION 'START_FORM'
EXPORTING
form = formular
language = langu.
endform.
*&---------------------------------------------------------------------*
*& Form cust
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
form cust.
* select single * from knmt into knmt
hier deine datenfelder füllen
do anzahl times.
perform print.
enddo.
endform.
*&---------------------------------------------------------------------*
*& Form print
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
form print.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ETIKETT'.
endform.
*&---------------------------------------------------------------------*
*& Form close
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
form close.
CALL FUNCTION 'END_FORM'.
CALL FUNCTION 'CLOSE_FORM'.
endform.