04-11-2008 5:05 AM
Hi Abapers,
I need to give only month and year (like 012007) in a field instead of date (like 01.01.200) in the Input screen ..Wat to do?
04-11-2008 5:07 AM
in the trnasfer rule or in the update rule select the Zinfo object to which you need to do conversion
in details select formula and create.
Select all functions and follow the steps below.
use the conversion function DATE_MONTH( )
Short Text
Function: Date -> Month
Functionality
Calculates the month from a specified date.
Requirements
The date must appear in the format yyyymmdd.
Parameters
DATE_MONTH (date)
Result
The result is calculated in the format yyyymm
Reward points..
04-11-2008 5:08 AM
04-11-2008 5:15 AM
HI,
1. for MOnth, u can use the table T247
month LIKE t247-ltx.
2. For year (2006), u can use MSEG-MJAHR.
Reply back..
With Rgds,
S.Barani
04-11-2008 5:33 AM
Hi Arthi,
Try this code:
REPORT ZPOPDATE.
DATA: V_CODE LIKE SY-SUBRC.
PARAMETER: V_MONTH LIKE ISELLIST-MONTH.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR V_MONTH.
CALL FUNCTION 'POPUP_TO_SELECT_MONTH'
EXPORTING
ACTUAL_MONTH = '200205'
LANGUAGE = SY-LANGU
START_COLUMN = 8
START_ROW = 5
IMPORTING
SELECTED_MONTH = V_MONTH
RETURN_CODE = V_CODE
EXCEPTIONS
FACTORY_CALENDAR_NOT_FOUND = 1
HOLIDAY_CALENDAR_NOT_FOUND = 2
MONTH_NOT_FOUND = 3
OTHERS = 4.
04-11-2008 6:08 AM
Hi,
Declare parameter as shown below.
Parameters: p_month type FAPER.
04-11-2008 6:28 AM
Hi Arthi ,
Check out this function module in SE37 .
" CACS_DATE_GET_YEAR_MONTH " .
If u give input as 11.04.2008 which is today's date ,
u will get output as Month = 04 and Year = 2008 .
Thanks .