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

F4 Help

Former Member
0 Likes
948

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

6 REPLIES 6
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
902

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.

Read only

Former Member
0 Likes
902

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

Read only

Former Member
0 Likes
902

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

Read only

0 Likes
902

thank you very much .

issue resolved.

Read only

Former Member
0 Likes
902

Hi,

Check this FM POPUP_TO_SELECT_MONTH for F4 help

Read only

Former Member
0 Likes
902

Hi,

you can use search help /BI0/SCALMONTH.