Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

data type

Former Member
0 Kudos

is there any data type for the field in the selection screen, so that i can enter only the year value?

1 ACCEPTED SOLUTION

former_member632991
Active Contributor
0 Kudos

Hi,

use the int type and then validate ur input as per the year requirement

Regards,

Sonika

8 REPLIES 8

Former Member
0 Kudos

according to my knowledge we dont have.

if u want to display only the year means why cant u use the integer data type

former_member632991
Active Contributor
0 Kudos

Hi,

use the int type and then validate ur input as per the year requirement

Regards,

Sonika

0 Kudos

u can use data element<b>GJAHR</b>(Fiscal Year)

kishan negi

0 Kudos

is it possible to get the F4 help for that field?

0 Kudos

try ..

parameters: year like bkpf-GJAHR.

i check it is not work so u have to create f4 help for perticular field.

kishan negi

0 Kudos

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.

Former Member
0 Kudos

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

0 Kudos

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.