Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

In select-options, how to get the default values as current
month first date and last date by default?

Eg: 1/10/2006 and 31/10/2006

Answer Posted / sinu mathew

DATA : lv_last_day_of_month TYPE sy-datum,
lv_datum_low TYPE sy-datum.

SELECT-OPTIONS : s_data FOR sy-datum.

INITIALIZATION.
s_data-sign = 'I'.
s_data-option = 'BT'.
s_data-low = sy-datum.
lv_datum_low = sy-datum.

REPLACE SECTION OFFSET 6 LENGTH 2 OF lv_datum_low WITH '01'.
if sy-subrc eq 0.
s_data-low = lv_datum_low.
endif.

CALL FUNCTION 'LAST_DAY_OF_MONTHS'
EXPORTING
day_in = sy-datum
IMPORTING
last_day_of_month = lv_last_day_of_month
EXCEPTIONS
day_in_no_date = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
s_data-high = lv_last_day_of_month.
ENDIF.


APPEND s_data.

Is This Answer Correct ?    14 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are your ways to performance optimization?

1381


What is the difference between upload and ws_upload ? : abap bdc

1239


Write special commands of list?

1034


Can we create a gui status in a program from the object browser?

1193


Event handling in oops

1533


What does nw 7.4 sp 05/nw 7.5 sp 02 offers in abap?

1099


Can we access static attribute from instance method

1485


What is the use of 'table index'?

1088


What is the significance of technical settings (specified while creating a table in the data dictionary) ?

1040


What is delivery class? : abap data dictionary

1238


Structures can contain data only during the runtime of a program (t/f) : abap data dictionary

1324


What is meant by authorization? Did you ever work on it? : sap abap hr

944


What is the difference between scrolling a table horizontally and vertically?

1073


In selection screen I have three fields, plant mat no and material group. If I input plant how do I get the mat no and material group based on plant dynamically?

1136


How to split one Invoice into Multiple ( Step by Step)?

2182