Skip to Content
author's profile photo
Former Member

how to get our own F4 help in table maintanance generator

hi all,

i developed a table maint generator.

in this i have 3 fields out of three there is a field called subtype. for this i ahve to create f4 help for this. foir this field i have to display two descptions calles' sub type1 and subtype2. these are not coming from any database tables. any body can tell me how to wrote. and send me the sample code for it.

thanks,

maheedhar

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • author's profile photo
    Former Member
    Oct 11, 2007 at 01:37 PM

    Go to SE51..Give the program name..in your case..SAPL + function group name.

    Give the screen number...that you gave when you created the table maintenance..

    THen press change..

    Create an event process on value-request for F4..

    PROCESS ON VALUE-REQUEST.

    FIELD ZTABLE-F4 MODULE F4_FOR_F4.

    **In the module use the function module F4IF_INT_TABLE_VALUE_REQUEST.

    Check this example for how to use this function module

    TABLES: T005T.

    DATA: BEGIN OF t_t005 OCCURS 0,

    land1 TYPE t005-land1,

    END OF t_t005.

    SELECTION-SCREEN BEGIN OF LINE.

    SELECTION-SCREEN COMMENT 1(6) v_text FOR FIELD P_LAND1.

    PARAMETERS: p_land1 TYPE t005-land1.

    SELECTION-SCREEN COMMENT 13(35) v_text1.

    SELECTION-SCREEN END OF LINE.

    INITIALIZATION.

    v_text = 'Country'.

    v_text1 = ' '.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_land1.

    REFRESH: t_t005.

    SELECT land1

    INTO TABLE t_t005

    FROM t005.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    • DDIC_STRUCTURE = 'T005'

    PVALKEY = ' '

    retfield = 'LAND1'

    dynpprog = sy-repid

    DYNPNR = sy-dynnr

    dynprofield = 'P_LAND1'

    callback_program = sy-repid

    value_org = 'S'

    TABLES

    value_tab = t_t005

    EXCEPTIONS

    parameter_error = 1

    no_values_found = 2

    OTHERS = 3.

    IF sy-subrc <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 11, 2007 at 01:37 PM

    You will have to create a data element and domain for your table fields to get the F4 values in table maintenence...

    Define your possible values in the domain.

    Once you do this, you will have the f4 values populated accoring to the domain you have defined. .

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Oct 17, 2007 at 06:28 AM

    hi,

    problem has been sloved....

    Add comment
    10|10000 characters needed characters exceeded