Skip to Content
author's profile photo Former Member
Former Member

F4 search, looking for tutorial/how-to

I'm looking for a step-by-step tutorial for creating a F4 search help.

The bapi i'm using is working, however i have no clue how to get these data in:

SHLP_TAB

RECORD_TAB

A tutorial, how-to, guide for dummies or what so ever would be appreciated

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2007 at 08:34 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2007 at 08:42 AM

    Hi,

    CHeck the Demo programs on F4 help for Module programs.

    it is well explained.

    DEMO_DYNPRO_F4_HELP_DICTIONARY

    DEMO_DYNPRO_F4_HELP_DYNPRO

    DEMO_DYNPRO_F4_HELP_MODULE

    HEre is a sample.

    report zsure_0001 .

    tables: t001.

    data: begin of it001 occurs 0,

    bukrs type t001-bukrs,

    butxt type t001-butxt,

    ort01 type t001-ort01,

    land1 type t001-land1,

    end of it001.

    select-options s_bukrs for t001-bukrs.

    initialization.

    <b>

    • Since you are select data from the db for your value

    • help, you can get rid of records and use fields

    • according to your requirement.

    select bukrs butxt ort01 land1 into table it001 from t001.

    sort it001 ascending by bukrs.

    delete adjacent duplicates from it001 comparing bukrs.</b>

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

    call function 'F4IF_INT_TABLE_VALUE_REQUEST'

    exporting

    retfield = 'BUKRS'

    dynprofield = 'S_BUKRS'

    dynpprog = sy-cprog

    dynpnr = sy-dynnr

    value_org = 'S'

    tables

    value_tab = it001.

    start-of-selection.

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/daeda0d7-0701-0010-8caa-edc983384237

    Check this..

    creating-collective-search-help

    help-needed-in-configuring-dynamic-f4

    <b>Reward points</b>

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2007 at 08:45 AM

    Try this...

    DATA: BEGIN OF int_light OCCURS 10,

    color(10) TYPE c,

    value(1) type c,

    END OF int_light.

    DATA: rep TYPE syrepid.

    DATA: dyn TYPE sydynnr.

    DATA : l_t_ddtab TYPE TABLE OF ddshretval WITH HEADER LINE.

    PARAMETERS: p_light(1) TYPE c.

    INITIALIZATION.

    int_light-color = 'gray'.

    int_light-value = '0'.

    APPEND int_light.

    int_light-color = 'red'.

    int_light-value = '1'.

    APPEND int_light.

    int_light-color = 'yellow'.

    int_light-value = '2'.

    APPEND int_light.

    int_light-color = 'green'.

    int_light-value = '3'.

    APPEND int_light.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_light.

    rep = sy-repid.

    dyn = sy-dynnr.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    retfield = 'p_light'

    dynpprog = rep

    dynpnr = dyn

    value_org = 'S'

    TABLES

    value_tab = int_light

    return_tab = l_t_ddtab.

    Regards,

    Pavan.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2007 at 08:47 AM

    Hi,

    take help of the below code for creating F4 help on selection screen

    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_usnam-low.

    **//To provide F4 help to S_USNAM-LOW

    • PERFORM f_f4help_usnam USING 'S_USNAM-LOW'.

    *

    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_usnam-high.

    **//To provide F4 help to S_USNAM-HIGH

    • PERFORM f_f4help_usnam USING 'S_USNAM-HIGH'.

    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_wbs-low.

    **//To provide F4 help to S_WBS-LOW

    • PERFORM f_f4help_wbs USING 'S_WBS-LOW'.

    *

    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_wbs-high.

    **//To provide F4 help to S_WBS-HIGH

    • PERFORM f_f4help_wbs USING 'S_WBS-HIGH'.

    &----


    *& Form f_f4help_usnam

    *&----


    • To provide F4 help to username

    *----


    • -->P_0019 text

    *----


    *FORM f_f4help_usnam USING value(p_0019) TYPE any.

    **// To retrieve username from mkpf.

    • SELECT bname

    • FROM usr01

    • INTO TABLE it_usnam.

    *

    • SORT: it_usnam BY usnam.

    • DELETE ADJACENT DUPLICATES FROM it_usnam COMPARING usnam.

    *

    • CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    • EXPORTING

    • DDIC_STRUCTURE = ' '

  • retfield = c_retusnam

    • PVALKEY = ' '

  • dynpprog = c_dynpprog

  • dynpnr = c_dynpnr

  • dynprofield = p_0019

    • STEPL = 0

    • WINDOW_TITLE =

    • VALUE = ' '

  • value_org = c_s

    • MULTIPLE_CHOICE = ' '

    • DISPLAY = ' '

    • CALLBACK_PROGRAM = ' '

    • CALLBACK_FORM = ' '

    • MARK_TAB =

    • IMPORTING

    • USER_RESET =

  • TABLES

  • value_tab = it_usnam

    • field_tab = it_usnam.

    • return_tab = l_it_ret

    • DYNPFLD_MAPPING =

    • EXCEPTIONS

    • PARAMETER_ERROR = 1

    • NO_VALUES_FOUND = 2

    • OTHERS = 3

    *.

    *

    *ENDFORM. " f_f4help_usnam

    &----


    *& Form f_f4help_wbs

    &----


    • To create F4 help for wbs element

    ----


    • -->P_0039 text

    ----


    *FORM f_f4help_wbs USING value(p_0039) TYPE any.

    **// To retrive wbs element from mseg

    • SELECT pspel

    • FROM pspl

    • INTO TABLE it_wbs.

    *

    • SORT:it_wbs BY wbs.

    • DELETE ADJACENT DUPLICATES FROM it_wbs COMPARING wbs.

    *

    • CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    • EXPORTING

    • DDIC_STRUCTURE = ' '

  • retfield = c_retwbs

    • PVALKEY = ' '

  • dynpprog = c_dynpprog

  • dynpnr = c_dynpnr

  • dynprofield = p_0039

    • STEPL = 0

    • WINDOW_TITLE =

    • VALUE = ' '

  • value_org = c_s

    • MULTIPLE_CHOICE = ' '

    • DISPLAY = ' '

    • CALLBACK_PROGRAM = ' '

    • CALLBACK_FORM = ' '

    • MARK_TAB =

    • IMPORTING

    • USER_RESET =

  • TABLES

  • value_tab = it_wbs

    • FIELD_TAB =

    • return_tab = l_it_ret1

    • DYNPFLD_MAPPING =

    • EXCEPTIONS

    • PARAMETER_ERROR = 1

    • NO_VALUES_FOUND = 2

    • OTHERS = 3

    *.

    *

    *ENDFORM. " f_f4help_wbs

    Regards,

    sudha

Add a comment
10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.