DATA: w_file(100) TYPE c,
w_length1 LIKE sy-fdpos,
w_length2 LIKE sy-fdpos,
w_char TYPE c.
FIELD-SYMBOLS
pt = '//Out/Ended/20140210_080114.txt'.
PERFORM FIND_FILENAME USING pt.
write: pt.
FORM FIND_FILENAME CHANGING W_FILE.
W_LENGTH1 = STRLEN( W_FILE ).
W_LENGTH2 = W_LENGTH1 - 1.
MOVE W_FILE+W_LENGTH2(1) TO W_CHAR.
WHILE W_CHAR NE '/'.
IF W_LENGTH1 EQ 0.EXIT.ENDIF.
SUBTRACT 1 FROM W_LENGTH1.
MOVE W_FILE+W_LENGTH1(1) TO W_CHAR.
ENDWHILE.
ASSIGN W_FILE+W_LENGTH1(*) TO
MOVE
Hiç yorum yok:
Yorum Gönder