Code: Alles auswählen.
AT LINE-SELECTION.
CASE sy-sysid.
WHEN 'C01'.
IF gs_file-file IS INITIAL.
SUBMIT RLPLAT00 WITH LOGINAME = 'Z_RLPLAT00_DEV' WITH CALTR = 'X'.
ELSE.
MESSAGE E208(00) WITH 'Überprüfen Sie die Fehlermeldungen!'.
ENDIF.
WHEN 'CQ1'.
IF gs_file-file IS INITIAL.
SUBMIT RLPLAT00 WITH LOGINAME = 'Z_RLPLAT00_QUAL' WITH CALTR = 'X'.
ELSE.
MESSAGE E208(00) WITH 'Überprüfen Sie die Fehlermeldungen!'.
ENDIF.
WHEN 'C02'.
IF gs_file-file IS INITIAL.
SUBMIT RLPLAT00 WITH LOGINAME = 'Z_RLPLAT00' WITH CALTR = 'X'.
ELSE.
MESSAGE E208(00) WITH 'Überprüfen Sie die Fehlermeldungen!'.
ENDIF.
ENDCASE.
Code: Alles auswählen.
FORMAT COLOR 5.
FORMAT HOTSPOT ON.
WRITE: 'RLPLAT00 Absprung'.
FORMAT HOTSPOT OFF.
FORMAT reset.
Code: Alles auswählen.
prflgnum = strlen( wa-lgnum ).
IF prflgnum > 3.
WRITE 98 'Lagernummer zu lange'.
gs_file-file = '1'.
ELSE.
READ TABLE gt_t300 INTO gs_t300 WITH KEY lgnum = wa-lgnum.
IF gs_t300-lgnum NE wa-lgnum.
WRITE 98 'Lagernummer ungültig'.
gs_file-file = '1'.
ENDIF.
ENDIF.
Code: Alles auswählen.
FORM phyname.
TYPES: BEGIN OF lty_xls,
* 3. prüfen feldlänge der 5 felder
lgnum TYPE lgnum,
lgtyp TYPE lgtyp,
lgpla TYPE lgpla,
lgber TYPE lgber,
lvs_lptyp TYPE lvs_lptyp,
END OF lty_xls.
DATA: lt_xls TYPE TABLE OF lty_xls,
ls_xls TYPE lty_xls.
DATA: phynam TYPE string.
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING LOGICAL_FILENAME = p_lognam
IMPORTING FILE_NAME = phynam
EXCEPTIONS
FILE_NOT_FOUND = 01.
IF NOT SY-SUBRC IS INITIAL.
MESSAGE E651(M7) WITH PHYNAM.
ENDIF.
OPEN DATASET PHYNAM FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT gt_xls INTO gs_xls.
MOVE gs_xls-lgnum TO ls_xls-lgnum.
MOVE gs_xls-lgtyp TO ls_xls-lgtyp.
MOVE gs_xls-lgber TO ls_xls-lgber.
MOVE gs_xls-lvs_lptyp TO ls_xls-lvs_lptyp.
MOVE gs_xls-lgpla TO ls_xls-lgpla.
APPEND ls_xls TO lt_xls.
ENDLOOP.
LOOP AT lt_xls INTO ls_xls.
TRANSFER ls_xls TO phynam.
ENDLOOP.
CLOSE DATASET PHYNAM.
ENDFORM.