0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ABAPデータ定義

Last updated at Posted at 2018-11-09

メモ書きです、間違っていたら訂正お願いします><
ABAPを使ってレポートを作成する上で事前に変数や定数を定義する必要がある

変数はDATAで定義

DATA:
   W_DATE(14) TYPE C,    "現在日付
   W_TIME(12) TYPE C.      "現在時刻

定数はCONSTANTSで定義

CONSTANTS:
    C_DATE(8) TYPE C VALUE '現在日付
    C_TIME(8) TYPE C VALUE '現在時刻

()の仲の長さは数値は1,テキストは2として数える

書式変換

WRITE SY-DATUM TO W_DATE
  USING EDIT MASK '____年__月__日'.
WRITE SY-UZEIT TO W_TIME
  USING EDIT MASK '__時__分__秒'.

WRITE TO で変数へ転送
SYは構造

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?