Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

F4 help in module pool program

Former Member
0 Likes
809

Dear Experts,

I am creating a module pool program. I have a field employee id. I am creating a F4 help for it using 'F4IF_FIELD_VALUE_REQUEST' FM. I used the code

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'PA0001'
fieldname = 'PERNR'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'EMP_ID' .

I am getting F4 values in above case. When I refer to a ztable field i am getting message in task bar as no input help available. Please tell me whether is it not possible to use custom tables and only standard tables should be used for F4 help.

KR,

Bharath

2 REPLIES 2
Read only

Former Member
0 Likes
552

Hi Bharath,

We can use F4 help for standard and Custom tables.

Try the below function module.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'YRDES'

DYNPPROG = SY-CPROG

DYNPNR = SY-DYNNR

DYNPROFIELD = 'IT_SPOC-YRDES'

WINDOW_TITLE = 'Unbilled Reason Code'

VALUE_ORG = 'S'

  • DISPLAY = GS_SPOC_DISPLAY

TABLES

VALUE_TAB = T_YRECO

RETURN_TAB = RETURN_TAB

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

Return_tab table will contain the field selected by the user. it will be in RETURN_TAB-FIELDVAL.

Return table type is like given below.

RETURN_TAB LIKE STANDARD TABLE OF DDSHRETVAL WITH HEADER LINE,

Pass the necessary values and try the same.

Regards,

Sanil

Read only

Former Member
0 Likes
552

check this small code for reference and try again.

IF w_entry EQ space.  "If No Entry Has Been Made For System Status
* Select from the system status table and move records into value table
    SELECT *
      FROM tj02t
      INTO TABLE t_tj02t
      WHERE spras EQ sy-langu.
    IF sy-subrc EQ 0.
      LOOP AT t_tj02t INTO wa_tj02t.
        MOVE: wa_tj02t-txt04 TO wa_values-txt04,
              wa_tj02t-txt30 TO wa_values-txt30.
        APPEND wa_values TO t_values.
        CLEAR wa_values.
      ENDLOOP.
    ENDIF.
    w_entry = c_x.  " Once System Status Parameter Is Filled, Flag's Switched
  ENDIF.

* Function module to get possible entries for system status
  REFRESH t_return[].
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield         = c_txt04
      value_org        = c_s
      callback_program = sy-repid
    TABLES
      value_tab        = t_values
      return_tab       = t_return
    EXCEPTIONS
      parameter_error  = 1
      no_values_found  = 2
      OTHERS           = 3.
  IF sy-subrc EQ 0.
    SORT t_return BY fieldname.
    READ TABLE t_return INTO wa_return INDEX 1.
    IF sy-subrc EQ 0.
      w_syst = wa_return-fieldval.
    ENDIF.
  ENDIF.

Regards,

Lalit Mohan Gupta