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



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

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

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

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

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

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

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

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

Post New Answer

More SAP ABAP Interview Questions

what r clients?what r the clients number available in a company?eg..800 client is for which application??

2 Answers   IBM,


How to get the status of an IDOC in a report without using WE02 transaction ?

1 Answers  


Difference between SY-CPROG and SY-REPID? Plz give me the answer,its urgent!

6 Answers   Accenture,


How to process the session dynamically?

2 Answers   Cap Gemini,


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?

1 Answers   Thomson Reuters,






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

1 Answers  


what is Bapi?what is the functionality of Bapi?why we go for Bapi?

3 Answers  


list some middlewares used in EDI ?

3 Answers  


What is the difference b/w BAPI and Function module

7 Answers   HP,


What is logo in sap script?

0 Answers  


CAN ANY BODY TELL ME IN A COMPANY HOW BAPI WORK WILL GOES? WHO WILL TELL WHICH BAPI WILL SET FOR THE PRESENT REQUIRENT?

1 Answers  


what is difference between User Exit and BADI

4 Answers   IBM,


Categories
  • SAP Basis Interview Questions SAP Basis (1262)
  • SAP ABAP Interview Questions SAP ABAP (3939)
  • SAPScript Interview Questions SAPScript (236)
  • SAP SD (Sales & Distribution) Interview Questions SAP SD (Sales & Distribution) (2716)
  • SAP MM (Material Management) Interview Questions SAP MM (Material Management) (911)
  • SAP QM (Quality Management) Interview Questions SAP QM (Quality Management) (99)
  • SAP PP (Production Planning) Interview Questions SAP PP (Production Planning) (523)
  • SAP PM (Plant Maintenance) Interview Questions SAP PM (Plant Maintenance) (252)
  • SAP PS (Project Systems) Interview Questions SAP PS (Project Systems) (138)
  • SAP FI-CO (Financial Accounting & Controlling) Interview Questions SAP FI-CO (Financial Accounting & Controlling) (2766)
  • SAP HR (Human Resource Management) Interview Questions SAP HR (Human Resource Management) (1180)
  • SAP CRM (Customer Relationship Management) Interview Questions SAP CRM (Customer Relationship Management) (432)
  • SAP SRM (Supplier Relationship Management) Interview Questions SAP SRM (Supplier Relationship Management) (132)
  • SAP APO (Advanced Planner Optimizer) Interview Questions SAP APO (Advanced Planner Optimizer) (92)
  • SAP BW (Business Warehouse) Interview Questions SAP BW (Business Warehouse) (896)
  • SAP Business Workflow Interview Questions SAP Business Workflow (72)
  • SAP Security Interview Questions SAP Security (597)
  • SAP Interfaces Interview Questions SAP Interfaces (74)
  • SAP Netweaver Interview Questions SAP Netweaver (282)
  • SAP ALE IDocs Interview Questions SAP ALE IDocs (163)
  • SAP Business One Interview Questions SAP Business One (110)
  • SAP BO BOBJ (Business Objects) Interview Questions SAP BO BOBJ (Business Objects) (388)
  • SAP CPS (Central Process Scheduling) Interview Questions SAP CPS (Central Process Scheduling) (14)
  • SAP GTS (Global Trade Services) Interview Questions SAP GTS (Global Trade Services) (21)
  • SAP Hybris Interview Questions SAP Hybris (132)
  • SAP HANA Interview Questions SAP HANA (700)
  • SAP PI (Process Integration) Interview Questions SAP PI (Process Integration) (113)
  • SAP PO (Process Orchestration) Interview Questions SAP PO (Process Orchestration) (25)
  • SAP BI (Business Intelligence) Interview Questions SAP BI (Business Intelligence) (174)
  • SAP BPC (Business Planning and Consolidation) Interview Questions SAP BPC (Business Planning and Consolidation) (38)
  • SAP BODS (Business Objects Data Services) Interview Questions SAP BODS (Business Objects Data Services) (49)
  • SAP BODI (Business Objects Data Integrator) Interview Questions SAP BODI (Business Objects Data Integrator) (26)
  • SAP Ariba Interview Questions SAP Ariba (9)
  • SAP Fiori Interview Questions SAP Fiori (45)
  • SAP EWM (Extended Warehouse Management) Interview Questions SAP EWM (Extended Warehouse Management) (58)
  • Sap R/3 Interview Questions Sap R/3 (150)
  • SAP FSCM Financial Supply Chain Management Interview Questions SAP FSCM Financial Supply Chain Management (101)
  • SAP WM (Warehouse Management) Interview Questions SAP WM (Warehouse Management) (31)
  • SAP GRC (Governance Risk and Compliance) Interview Questions SAP GRC (Governance Risk and Compliance) (64)
  • SAP MDM (Master Data Management) Interview Questions SAP MDM (Master Data Management) (0)
  • SAP MRS (Multi Resource Scheduling) Interview Questions SAP MRS (Multi Resource Scheduling) (0)
  • SAP ESS MSS (Employee Manager Self Service) Interview Questions SAP ESS MSS (Employee Manager Self Service) (13)
  • SAP CS (Customer Service) Interview Questions SAP CS (Customer Service) (0)
  • SAP TRM (Treasury and Risk Management) Interview Questions SAP TRM (Treasury and Risk Management) (0)
  • SAP Web Dynpro ABAP Interview Questions SAP Web Dynpro ABAP (198)
  • SAP IBP (Integrated Business Planning) Interview Questions SAP IBP (Integrated Business Planning) (0)
  • SAP OO-ABAP (Object Oriented ABAP) Interview Questions SAP OO-ABAP (Object Oriented ABAP) (70)
  • SAP S/4 HANA Finance (Simple Finance) Interview Questions SAP S/4 HANA Finance (Simple Finance) (143)
  • SAP FS-CD (Collections and Disbursements) Interview Questions SAP FS-CD (Collections and Disbursements) (0)
  • SAP PLM (Product Lifecycle Management) Interview Questions SAP PLM (Product Lifecycle Management) (0)
  • SAP SuccessFactors Interview Questions SAP SuccessFactors (33)
  • SAP Vistex Interview Questions SAP Vistex (0)
  • SAP ISR (IS Retail) Interview Questions SAP ISR (IS Retail) (28)
  • SAP IdM (Identity Management) Interview Questions SAP IdM (Identity Management) (0)
  • SAP IM (Investment Management) Interview Questions SAP IM (Investment Management) (0)
  • SAP UI5 Interview Questions SAP UI5 (59)
  • SAP SCM (Supply Chain Management) Interview Questions SAP SCM (Supply Chain Management) (51)
  • SAP XI (Exchange Infrastructure) Interview Questions SAP XI (Exchange Infrastructure) (49)
  • SAP Cloud Platform Interview Questions SAP Cloud Platform (34)
  • SAP Testing Interview Questions SAP Testing (89)
  • SAP SolMan (Solution Manager) Interview Questions SAP SolMan (Solution Manager) (63)
  • SAP MaxDB Interview Questions SAP MaxDB (116)
  • SAP GUI Interview Questions SAP GUI (15)
  • SAP AllOther Interview Questions SAP AllOther (329)