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
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / thanveer
Hi
use this FM "LAST_DAY_OF_MONTHS" to get the last date of
the month in the initialization event and append the values
to select option internal table with low and high values.
Regards
Thanveer
Is This Answer Correct ? | 0 Yes | 6 No |
Answer / abira
Hi,
Use the FM "HR_MX_GET_PAYROLL_PERIOD" to get first and
last date of the month .for eg . If u are using date1
variable in select options then assign the values of FM
to date1-low date1-high.
If anybody has a better answer please let me know.
Regards,
Abira
Is This Answer Correct ? | 0 Yes | 7 No |
Answer / gvkreddy
By using following it is possible.
select-options ddate default '1/10/2006' to '31/10/2006'
Is This Answer Correct ? | 3 Yes | 12 No |
what r clients?what r the clients number available in a company?eg..800 client is for which application??
How to get the status of an IDOC in a report without using WE02 transaction ?
Difference between SY-CPROG and SY-REPID? Plz give me the answer,its urgent!
How to process the session dynamically?
After transferring of data from flat file to application server i found that it is showing wrong data .Say i had currency in flat file as 1000.00 USD. After transferring i found it is showing as 100.000 in the application server. How will you handle this case?
HOW TO TRANSFER MATERIAL MASTER DATA FROM LEGACY SYSTEM (ORACLE) TO SAP USING A FUNCTION MODULE BAPI_MATERIAL_SAVE_DATA. IF ANYBODY KNOW THE ANSWER PLZ MAIL TO MY ID SHAIKZIA@GMAIL.COM
what is Bapi?what is the functionality of Bapi?why we go for Bapi?
list some middlewares used in EDI ?
What is the difference b/w BAPI and Function module
What is logo in sap script?
CAN ANY BODY TELL ME IN A COMPANY HOW BAPI WORK WILL GOES? WHO WILL TELL WHICH BAPI WILL SET FOR THE PRESENT REQUIRENT?
what is difference between User Exit and BADI