‎2009 Jun 10 12:03 PM
Hi,
Month and Year are the inputs in the selection screen as below
MONTH RANGE = 11/2008 TO 12/2008
I need to get the F4 help for the above select option to choose month and year.
please let me know how to get the F4 help, if possible please provide the code.
thanks in advance
‎2009 Jun 10 12:19 PM
This is not the exact code
Work around with this
data:input_pattern(7).
data:begin of itab occurs 0,
limit_l(7),
dash(1),
limit_h(7),
end of itab.
data: v_lineno like sy-tabix.
select-options:so_dat for input_pattern no-extension no intervals.
initialization.
itab-limit_l = '11/2008'.
itab-dash = '-'.
itab-limit_h = '12/2008'.
append itab.
itab-limit_l = '12/2008'.
itab-dash = '-'.
itab-limit_h = '01/2009'.
append itab.
at selection-screen on value-request for so_dat-low .
call function 'POPUP_WITH_TABLE_DISPLAY'
exporting
endpos_col = 44
endpos_row = 20
startpos_col = 30
startpos_row = 05
titletext = 'Select Period'
importing
choise = v_lineno
tables
valuetab = itab
exceptions
break_off = 1
others = 2.
if sy-subrc eq 0.
read table itab index v_lineno.
if sy-subrc = 0.
so_dat-low = itab-limit_l.
endif.
endif.
‎2009 Jun 10 12:19 PM
call a screen with calender control on it.. reduce the size and position of the screen as you want in call screen so as to adjust calender controls position. then whatever value is selected just get the month and year field and pass them to the screen.
For calender control
http://help.sap.com/printdocu/core/print46b/en/data/en/pdf/BCCICALENDAR/SAP_KALENDER.pdf
‎2009 Jun 10 12:28 PM
Hi,
Try it this way
DATA G_SPMON TYPE SPMON.
SELECT-OPTIONS: DATE FOR G_SPMON.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR DATE-LOW.
CALL FUNCTION 'POPUP_TO_SELECT_MONTH'
EXPORTING
ACTUAL_MONTH = '200801'
* FACTORY_CALENDAR = ' '
* HOLIDAY_CALENDAR = ' '
* LANGUAGE = SY-LANGU
* START_COLUMN = 8
* START_ROW = 5
IMPORTING
SELECTED_MONTH = DATE-LOW
* RETURN_CODE =
* EXCEPTIONS
* FACTORY_CALENDAR_NOT_FOUND = 1
* HOLIDAY_CALENDAR_NOT_FOUND = 2
* MONTH_NOT_FOUND = 3
* OTHERS = 4
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Regards
‎2009 Jun 10 1:03 PM
‎2009 Jun 10 12:40 PM
‎2009 Jun 10 12:42 PM