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

Doubts in F4 help

Hi,

I want to attach value help to a field. I also want to make that field as non-editable so that the user chooses only from F4 help. So i made an input field as non-editable and attached a F4 help to it. But when i try to choose value from the F4 help, it is not filling in the input field. Can some one help me with this.

Thanks and Regards,

Chander

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Nov 18, 2005 at 06:39 AM

    Hi,

    Instead of F4 Help for a parameter,if you made the parameter as listbox you can make the user to select only from the values available.

    Here is the sample code.Try this and if it helps you,kindly reward points by clikcing the star on the left of reply.

    PROGRAM zcmtest01.

    TYPE-POOLS: vrm.

    DATA: name TYPE vrm_id,

    list TYPE vrm_values,

    value LIKE LINE OF list.

    PARAMETERS: ps_parm(10) AS LISTBOX VISIBLE LENGTH 10.

    AT SELECTION-SCREEN OUTPUT.

    name = 'PS_PARM'.

    value-key = '1'.

    value-text = 'Line 1'.

    APPEND value TO list.

    value-key = '2'.

    value-text = 'Line 2'.

    APPEND value TO list.

    CALL FUNCTION 'VRM_SET_VALUES'

    EXPORTING id = name

    values = list.

    START-OF-SELECTION.

    WRITE: / 'Parameter:', ps_parm.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      You cannot make that as non-editable.But here is the way that you can restrict other values in module pool.If you pressed enter after executing this code,then if that value entered is not in f4 help,it will automatically be removed.

      PROCESS AFTER INPUT.

      FIELD s_begru MODULE abc ON INPUT.

      Process on value-request.

      field s_begru module f4_help.

      REPORT ZZZ_JAYTEST1 .

      tables kna1.

      data:

      begin of t_values occurs 2,

      value like kna1-begru,

      end of t_values,

      t_return like ddshretval occurs 0 with header line.

      data s_begru like kna1-begru.

      call screen 9000.

      module f4_help input.

      refresh t_values.

      t_values = 'PAR*'.

      append t_values.

      t_values = 'UGG'.

      append t_values.

      call function 'F4IF_INT_TABLE_VALUE_REQUEST'

      exporting

      retfield = 'BEGRU'

      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.

      s_begru = t_return-fieldval.

      endif.

      endmodule. " f4_help INPUT

      module abc input.

      read table t_values with key value = s_begru.

      if sy-subrc ne 0.

      clear s_begru.

      endif.

      endmodule. " abc INPUT

      Kindly let me know if you need further clarification.Otherwise,kindly reward points by clicking the star on the left of reply,if it helps.

  • author's profile photo Former Member
    Former Member
    Posted on Nov 18, 2005 at 06:35 AM

    Hi,

    See the link below.........

    http://www.sapdevelopment.co.uk/reporting/alv/alvscr.htm

    I hope this will serve your purpose.

    Thanks.

    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.