01-02-2007 9:41 AM
is there any data type for the field in the selection screen, so that i can enter only the year value?
01-02-2007 9:49 AM
Hi,
use the int type and then validate ur input as per the year requirement
Regards,
Sonika
01-02-2007 9:47 AM
according to my knowledge we dont have.
if u want to display only the year means why cant u use the integer data type
01-02-2007 9:49 AM
Hi,
use the int type and then validate ur input as per the year requirement
Regards,
Sonika
01-02-2007 9:53 AM
01-02-2007 10:03 AM
01-02-2007 10:05 AM
try ..
parameters: year like bkpf-GJAHR.
i check it is not work so u have to create f4 help for perticular field.
kishan negi
01-02-2007 10:09 AM
yes u can create search help.
use this syntax.
parameters : year <data type> matchcode object <search help name>
u can create ur own search help in SE11.
01-10-2007 12:14 PM
use the data type date and the by using string concept remove it from month and date ,,system order for data type date is yyyy/mm/dd
01-10-2007 12:29 PM
HI Pramod.
Try this sample code..Is this what you are looking for.
TYPES: BEGIN OF ty_year,
year TYPE gjahr,
END OF ty_year.
DATA: i_years TYPE STANDARD TABLE OF ty_year,
wa_years TYPE ty_year.
PARAMETERS: ws_year TYPE gjahr.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR ws_year.
DO 20 TIMES.
IF wa_years-year IS INITIAL.
wa_years-year = sy-datum+0(4).
ELSE.
wa_years-year = wa_years-year - 1.
ENDIF.
APPEND wa_years TO i_years.
ENDDO.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'GJAHR'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'WS_YEAR'
value_org = 'S'
TABLES
value_tab = i_years
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.