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

Dates in selection screens

Former Member
0 Likes
982

I need to ask for the month in a selection screen (january, feb...) witha F4, wathever

How can I do that???

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
914

hi check this ,

report .

tables: t247 , DFIES.

parameters:p_month LIKE T247-MNR.

data: begin of itab occurs 0,

mnr like t247-mnr,

ktx like t247-ktx,

end of itab .

DATA : LT_FIELDS TYPE TABLE OF DFIES,

LS_FIELD TYPE DFIES.

at selection-screen on value-request for p_month.

select MNR

KTX

from t247 into corresponding fields of table itab

where spras = 'EN'.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'P_MONTH'

DYNPPROG = sy-cprog

DYNPNR = sy-dynnr

DYNPROFIELD = 'MNR'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = itab

FIELD_TAB = LT_FIELDS .

regards,

venkat.

I need to ask for the month in a selection screen (january, feb...) witha F4, wathever

How can I do that???

Thanks

7 REPLIES 7
Read only

Former Member
0 Likes
915

hi check this ,

report .

tables: t247 , DFIES.

parameters:p_month LIKE T247-MNR.

data: begin of itab occurs 0,

mnr like t247-mnr,

ktx like t247-ktx,

end of itab .

DATA : LT_FIELDS TYPE TABLE OF DFIES,

LS_FIELD TYPE DFIES.

at selection-screen on value-request for p_month.

select MNR

KTX

from t247 into corresponding fields of table itab

where spras = 'EN'.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'P_MONTH'

DYNPPROG = sy-cprog

DYNPNR = sy-dynnr

DYNPROFIELD = 'MNR'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = itab

FIELD_TAB = LT_FIELDS .

regards,

venkat.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
914

Try this.

REPORT  rich_0001.

data: begin of imonths occurs 0,
       month type numc2,
      end of imonths.

parameter: p_month type numc2.

INITIALIZATION.

imonths-month = 0.
do 12 times.
  imonths-month = imonths-month + 1.
  append imonths.
enddo.

at selection-screen on value-request for p_month.

  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
       exporting
            retfield    = 'MONTH'
            dynprofield = 'P_MONTH'
            dynpprog    = sy-cprog
            dynpnr      = sy-dynnr
            value_org   = 'S'
       tables
            value_tab   = imonths.

start-of-selection.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
914

parameters: p_month type month.

you can create the search help using table T247.

Thanks,

Srinivas

Edited by: Srinivas R on Apr 24, 2008 8:21 PM

Read only

former_member125661
Contributor
0 Likes
914

This should give u Months in text format in the selection screen.

data: begin of imonths occurs 0,
       month type fcltx,
      end of imonths.

parameter: p_month type FCLTX.
 
INITIALIZATION.
 
select ltx from t247 into table imonths where spras eq 'EN'.

 
at selection-screen on value-request for p_month.
 
  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
       exporting
            retfield    = 'MONTH'
            dynprofield = 'P_MONTH'
            dynpprog    = sy-cprog
            dynpnr      = sy-dynnr
            value_org   = 'S'
       tables
            value_tab   = imonths.
 
start-of-selection.

Read only

Former Member
0 Likes
914

There is a table "T015M" which stores the names of the months. You can try

with that, i.e. you can provide value help using that table.. still some

problem.. contact me..

Read only

Former Member
0 Likes
914

Hi,

Please refer the code below:



PARAMETERS: sp_month(18) TYPE c.
 
DATA:BEGIN OF itab OCCURS 0,
      month(20) type c,
     END OF itab.
 
AT SELECTION-SCREEN ON VALUE-REQUEST FOR sp_month.
 
 
  itab-month = 'January'.
  APPEND itab.
  clear itab.

"Append all months to itab


  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield    = 'MONTH'
      dynpprog    = sy-repid
      dynpnr      = sy-dynnr
      dynprofield = 'SP_MONTH'
      value_org   = 'S'
    TABLES
      value_tab   = itab.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
914

Hi ASHUTOSH,

I HAVE WRITTEN THIS CODE ONCE FOR MY USE TRY IT ....

tables: t247 , DFIES.

parameters:P_Month LIKE T247-MNR.

data: begin of itab occurs 0,

MNR like T247-MNR,

KTX like T247-KTX,

end of itab .

DATA : LTF_FIELDS TYPE TABLE OF DFIES,

LTF_FIELD TYPE DFIES.

at selection-screen on value-request for P_MONTH.

select MNR

KTX

from t247 into corresponding fields of table itab

where spras = 'EN'.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'P_MONTH'

DYNPPROG = sy-cprog

DYNPNR = sy-dynnr

DYNPROFIELD = 'MNR'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = itab

FIELD_TAB = LTF_FIELDS .

regards,

JYOTHI