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

F1 help for a field on the screen

Hi All,

I have designed a screen in an dialog program. My requirement is i have to get f1 help for a field on the screen.

in the flow logic of that screen i have used PROCESS ON HELP-REQUEST EVENT.

in this event for that particular field i have created a module and in the se38 program i have written the text that needs to be displayed when the user presses F1.

But I' am unable to display F1 help for that field.

I know that we can display F1 help for a field by maintaining documentation in the data element of that field.

but my requirement is i should use the event PROCESS ON HELP-REQUEST.

I have documented the way I followed for the F1 help in the attachment that has been attached.

Can you please let me know, where the mistake has been done.

Thanks,

Begineer Abap.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on May 02, 2012 at 04:38 PM

    Hi AK,

    Where you placed this module.

    CALL FUNCTION 'DOCU_GET_FOR_F1HELP'

    EXPORTING

    ID = ID_HY "docid_hy type LIKE DOKHL-ID VALUE 'HY'

    LANGU = SY-LANGU

    OBJECT = V_OBJECT like LIKE DOKHL-OBJECT

    IMPORTING

    HEAD = XHEAD:like thead

    TABLES

    LINE = T_LINE

    EXCEPTIONS

    RET_CODE = 1

    OTHERS = 2.

    CASE SY-SUBRC

    Check this once.

    Regards,

    Madhu.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Madhu Vadlamani

      Hi Madhu & Shimbhu,

      thanks for your replies. I tried with another FM DSYS_SHOW_FOR_F1HELP. I have created a document in SE61 and passed the name of that document into this FM and now it is working fine. in my earlier attempt i have not created document thru SE61, may that might be the reason for the F1HELP not getting displayed.

      Thank you for helping me

      Beginner Abap

  • author's profile photo Former Member
    Former Member
    Posted on May 03, 2012 at 09:50 AM

    Hi Shambu,

    the code is within module stdnid_help,

    MODULE stdnid_help INPUT.

    * WRITE:/ 'this field is from zstudent_info table'.
    * WRITE:/ 'this is of 8 characters'.
    DATA: v_text1 TYPE string,
    v_text2 TYPE string,
    v_object TYPE dokhl-object,
    v_id TYPE dokhl-id VALUE 'TX',
    v_langu TYPE sy-langu,
    wa_line TYPE tline,
    v_header LIKE thead,
    it_line TYPE TABLE OF tline. "-tdline.

    v_langu = sy-langu.
    v_text1 = 'this field is from zstudent_info table'(001).
    v_text2 = 'this is of 8 characters'(002).

    wa_line-tdline = v_text1.
    APPEND wa_line TO it_line.
    CLEAR wa_line.

    wa_line-tdline = v_text2.
    APPEND wa_line TO it_line.
    CLEAR wa_line.

    v_object = 'HELP_FOR_HELP'.

    CALL FUNCTION 'DOCU_GET_FOR_F1HELP'
    EXPORTING
    id = v_id
    langu = v_langu
    object = v_object
    TYP = 'I'
    IMPORTING
    * DOKSTATE =
    HEAD = v_header
    TABLES
    line = it_line
    EXCEPTIONS
    ret_code = 1
    OTHERS = 2.

    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.


    ENDMODULE. " STDNID_HELP INPUT

    just omitted MODULE and ENDMODULE statements while copying.

    Thanks,

    Beginner Abap.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 03, 2012 at 09:50 AM

    Hi Shambu,

    the code is within module stdnid_help,

    MODULE stdnid_help INPUT.

    * WRITE:/ 'this field is from zstudent_info table'.
    * WRITE:/ 'this is of 8 characters'.
    DATA: v_text1 TYPE string,
    v_text2 TYPE string,
    v_object TYPE dokhl-object,
    v_id TYPE dokhl-id VALUE 'TX',
    v_langu TYPE sy-langu,
    wa_line TYPE tline,
    v_header LIKE thead,
    it_line TYPE TABLE OF tline. "-tdline.

    v_langu = sy-langu.
    v_text1 = 'this field is from zstudent_info table'(001).
    v_text2 = 'this is of 8 characters'(002).

    wa_line-tdline = v_text1.
    APPEND wa_line TO it_line.
    CLEAR wa_line.

    wa_line-tdline = v_text2.
    APPEND wa_line TO it_line.
    CLEAR wa_line.

    v_object = 'HELP_FOR_HELP'.

    CALL FUNCTION 'DOCU_GET_FOR_F1HELP'
    EXPORTING
    id = v_id
    langu = v_langu
    object = v_object
    TYP = 'I'
    IMPORTING
    * DOKSTATE =
    HEAD = v_header
    TABLES
    line = it_line
    EXCEPTIONS
    ret_code = 1
    OTHERS = 2.

    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.


    ENDMODULE. " STDNID_HELP INPUT

    just omitted MODULE and ENDMODULE statements while copying.

    Thanks,

    Beginner Abap.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 04, 2012 at 11:07 PM

    Hi Shambu,

    although everything is possible the complex way, why not just keep it simple: Create a data element for your field, create documentation for the data element and the rest is SAP standard: F1 on the field shows the documentation. No modules no functions required.

    If you are not familiar with this, just copy an existing (similar) data element to customer name space and then change as required.

    It is easy.

    Regards

    Clemens

    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.