Translate

Thursday, 7 June 2012

Date Ranges in Selection Screen in ABAP Programming

TABLES: VBAK.

SELECTION-SCREEN BEGIN OF BLOCK g1 WITH FRAME TITLE text-000.
SELECT-OPTIONS sdocdat FOR vbak-erdat. "Document date
SELECTION-SCREEN END OF BLOCK g1.
* Initialization *
*----------------------------------------------------------------------*
INITIALIZATION.
* Default dates to dsel screen
MOVE 'I' TO sdocdat-sign.
WRITE:/ sdocdat-sign.

MOVE 'BT' TO sdocdat-option.
WRITE:/ sdocdat-option.

MOVE sy-datum TO sdocdat-high.
WRITE:/ sdocdat-high.

SUBTRACT 10 FROM sy-datum.
MOVE sy-datum TO sdocdat-low.
WRITE:/ sdocdat-low.

APPEND sdocdat.

No comments: