Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Google
 

Thursday, December 29, 2011

SAP ABAP Issue:how to make select option with todays date as default?

I'm trying to show todays date as the default value in a select date.
INITIALIZATION.
select-OPTIONS: so_date FOR sy-datlo.

START-OF-SELECTION.
so_date-sign = 'I'.
so_date-option = 'BT'.
so_date-low = sy-datum.
so_date-high = sy-datum.
APPEND so_date.
This isn't working though. Any ideas?
Answer:
You must set the value before START-OF_SELECTION:
select-OPTIONS: so_date FOR sy-datlo.

INITIALIZATION.
  so_date-sign = 'I'.
  so_date-option = 'EQ'.
  so_date-low = sy-datum.
  CLEAR so_date-high.
  APPEND so_date.
Did you try the easy version:
select-OPTIONS: so_date FOR sy-datlo default SY-DATUM.
I think it should work (can't test is actual).

No comments:

Post a Comment

Mega Search