Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

SAP ABAP programming the last day of the month, the first day of or.

Shulou Source: shulou.com Published: 2022-06-03 00:25:32 10月04日 Update

DATA: FIR_DATA TYPE SY-DATUM. "the first day

DATA: LAS_DATA TYPE SY-DATUM. "the last day.

FIR_DATA = SY-DATUM.

LAS_DATA = SY-DATUM.

FIR_DATA+6 (2) = '288. "make the current date 28.

LAS_DATA = LAS_DATA + 5. "the maximum number of days in a month is 31 days, and after + 5, it must be the first day of next month.

LAS_DATA+6 (2) = '01mm. "the first day of next month

LAS_DATA = LAS_DATA-1. "the last day of the month

WRITE: SY-DATUM,FIR_DATA,LAS_DATA.

* * in the end, you can find the first or last day of any month.

Tags: Month days date affirmation programming Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker macOS Redmi MariaDB Xiaomi