Application Development and Automation 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: 
Read only

data type

Former Member
0 Likes
841

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

1 ACCEPTED SOLUTION
Read only

former_member632991
Active Contributor
0 Likes
806

Hi,

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

Regards,

Sonika

8 REPLIES 8
Read only

Former Member
0 Likes
806

according to my knowledge we dont have.

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

Read only

former_member632991
Active Contributor
0 Likes
807

Hi,

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

Regards,

Sonika

Read only

0 Likes
806

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

kishan negi

Read only

0 Likes
806

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

Read only

0 Likes
806

try ..

parameters: year like bkpf-GJAHR.

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

kishan negi

Read only

0 Likes
806

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.

Read only

Former Member
0 Likes
806

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

Read only

0 Likes
806

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.