Skip to Content
avatar image
Former Member

F4 help for Period

Hi,

If i use like this i can able to select F4 help for date.

PARAMETERS:p_date TYPE sydatum.

Similarly, i want to select F4 help for Period. Like 2009/01, 2009/02, 2009/03 etc. Is it possible?. if yes how?. Could you pleasehelp me in this regard.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

7 Answers

  • Best Answer
    Jan 06, 2009 at 08:58 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 06, 2009 at 08:58 AM

    hi,

    use fm 'F4IF_INT_TABLE_VALUE_REQUEST'

    thanks

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 06, 2009 at 09:01 AM

    hi,

    use function module : 'FI_PERIOD_DETERMINE'

    regards

    rahul

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 06, 2009 at 09:02 AM

    Hi

    for period u can use monat and year gjahr field.

    but if u want to use it combinely ,

    u need to fetch period and year the entries from the table concatenate '/' and use

    F4_INT_TABLE VALUEREQUEST FM.

    reg

    Ramya

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 06, 2009 at 09:11 AM

    Hi,

    Use FM :POPUP_TO_SELECT_MONTH in AT Selection screen Onvalue request for the Field.

    Hope this help you. If you have any issues, please let me know

    Regards,

    Anki Reddy

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 06, 2009 at 09:11 AM

    hi,

    try below code

    tables mara .

    data: begin of t_values occurs 2,

    value like mara-matnr,

    end of t_values,

    t_return like ddshretval occurs 0 with header line.

    select-options s_matnr for mara-matnr.

    at selection-screen on value-request for s_matnr-low.

    t_values = 'MAT1'.

    append t_values.

    t_values = 'MAT2'.

    append t_values.

    call function 'F4IF_INT_TABLE_VALUE_REQUEST'

    exporting

    retfield = 'MATNR'

    value_org = 'S'

    tables

    value_tab = t_values

    return_tab = t_return

    exceptions

    parameter_error = 1

    no_values_found = 2

    others = 3.

    if sy-subrc = 0.

    read table t_return index 1.

    endif.

    thanks

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 06, 2009 at 09:27 AM

    hi,

    following Example will solve out your problem

    PARAMETERS: pdate TYPE spmon.
    
    ** Search Help for Period
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pdate.
      BREAK-POINT .
      TYPES: BEGIN OF p_date,
        pdate TYPE spmon,
      END OF p_date.
    
      DATA: it_p_date TYPE STANDARD TABLE OF p_date WITH HEADER LINE,
            pmy TYPE spmon.
      DATA: i_return TYPE ddshretval OCCURS 0 WITH HEADER LINE,
          c TYPE c VALUE 'S'.
    
      pmy = sy-datum+0(6).
      pmy+4(2) = '01'.
      SUBTRACT: 2 FROM pmy+0(4).
    
      DO 48 TIMES.
        it_p_date-pdate = pmy.
        ADD: 1 TO pmy+4(2).
        IF pmy+4(2) > 12.
          ADD: 1 TO pmy+0(4).
          pmy+4(2) = 1.
        ENDIF.
        APPEND it_p_date TO it_p_date.
      ENDDO.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'PDATE'
          dynpprog    = sy-repid
          dynpnr      = sy-dynnr
          dynprofield = 'crid'
          value_org   = c
        TABLES
          value_tab   = it_p_date
          return_tab  = i_return.

    Replay if any problem,

    Kind Regards,

    Faisal

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Use Data element ALMONTH as reference to your parameter.

      In selection screen, F4 help will be available along with list of months.