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

Internal table contents are f4 help values

can i have internal table values as f4 help value for

a particular field on the screen

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Dec 06, 2004 at 08:47 PM

    Try this FM F4IF_INT_TABLE_VALUE_REQUEST.

    Regards,

    Srini S

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 06, 2004 at 10:27 PM

    Hi Kaushik

    This is a renowned subject here. Srini's suggestion is OK. And here is an example I have posted in this forum before.

    *--Screen 100:
    ...
    
    PROCESS ON VALUE-REQUEST.
    
      FIELD gv_user MODULE f4_user .
    
    *-------------------------------
    MODULE gv_user INPUT.
    
    *--Branching to a form since the variables are defined 
    *-as global when you define here...
      PERFORM f4_user CHANGING gv_user .
    
    ENDMODULE .
    *-------------------------------
    
    FORM f4_user CHANGING ep_user LIKE sy-uname .
    
    *--You can have this internal table as you want
      DATA: BEGIN OF lt_users OCCURS 1 ,
        bname LIKE usr21-bname ,
        kostl LIKE usr21-kostl ,
      END OF lt_users .
    
      DATA lt_return LIKE ddshretval OCCURS 0 
           WITH HEADER LINE .
    
    *--You can get the internal table content from any  
    *--table you want. Here I use "USR21" 
      SELECT bname kostl FROM usr21
             INTO TABLE lt_users .
    
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
    *--retfield must contain the name of the field of  
    *--the internal table which will be assigned to   
    *--your screen field in case you select it. 
          retfield = 'BNAME'
          window_title = 'User Selection'
          value_org = 'S' "Use this value"
        TABLES
    *--your int. tab holding values to be selected
          value_tab = lt_users 
    *--int table having your selection(s)
          return_tab = lt_return 
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS = 3.
    
      IF sy-subrc = 0 .
        READ TABLE lt_return INDEX 1 .
        IF sy-subrc = 0 .
    *--Here is the assignment
          ep_user = lt_return-fieldval . 
        ENDIF .
      ENDIF.
    
    ENDFORM .

    *--Serdar

    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.