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 for Fields in Screen

Former Member
0 Likes
1,411

Hi Experts,

I need to implement F4 help for fields on the screen. These fields do not have a data elemnt in the PS structure. Pointers on how to give and where to give the code for F$ help will be a great deal of help.

TIA.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,371

Hi,

If you want to use F4 in the screen, see the following sample :

process on value-request.
field zebeln     "field name on the screen 
  module mod_get_value_po.

module mod_get_value_po input.

  perform sub_get_sch_data.
  perform sub_show_f4_help_po.

endmodule.      

form sub_get_sch_data.
  select ebeln
           from ekpo
       into table i_sch_hlp
endform.

form sub_show_f4_help_po.
  

  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
  exporting
      retfield               = 'EBELN'
     dynpprog               = 'ZMM16'  "program name
     dynpnr                 =  '0100'       "screen number
     dynprofield            = 'ZEBELN'  " screen field
   tables
      value_tab              = i_sch_hlp
  exceptions
    parameter_error        = 1
    no_values_found        = 2
    others                 = 3
            .
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.

endform.

Hi,

If you want to use F4 in the screen, see the following sample :

process on value-request.
field zebeln     "field name on the screen 
  module mod_get_value_po.

module mod_get_value_po input.

  perform sub_get_sch_data.
  perform sub_show_f4_help_po.

endmodule.      

form sub_get_sch_data.
  select ebeln
           from ekpo
       into table i_sch_hlp
endform.

form sub_show_f4_help_po.
  

  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
  exporting
      retfield               = 'EBELN'
     dynpprog               = 'ZMM16'  "program name
     dynpnr                 =  '0100'       "screen number
     dynprofield            = 'ZEBELN'  " screen field
   tables
      value_tab              = i_sch_hlp
  exceptions
    parameter_error        = 1
    no_values_found        = 2
    others                 = 3
            .
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.

endform.

8 REPLIES 8
Read only

anversha_s
Active Contributor
0 Likes
1,371

Hi,

Plz find the below sample code.

It may help u.

FORM F_GET_details .
REFRESH INT_RET.

*--THIS WILL FETCH THE details

SELECT a~Bill a~plant Number b~BillingDate 
INTO TABLE int_table
FROM ( ztable_numplant AS a
INNER JOIN
ztable_numdate AS b
ON a~billnimber = b~billnumber ).

IF SY-SUBRC NE 0.
*--MESSAGE IS 'NO data found'
ELSE.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'screen field'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = INT_tab
RETURN_TAB = INT_RET
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE INT_RET INDEX 1 INTO INT_RET.

WF_data_needed = INT_RET-FIELDVAL.

ENDIF.
ENDFORM.

Regards,

Anversha

Read only

Former Member
0 Likes
1,371

Hi,

1.you can assign search help(F4 help) at design time by double clicking the field.

2.use POV event in screen flow logic and call module for screen field in FIELD statment.

write code in module to show dynamic help by using FM f4if_int_table_value_request.

Read only

former_member787646
Contributor
0 Likes
1,371

Hi,

You can provide the input help to a screen field at PROCESS ON-VALUE REQUEST event.

Hope it helps.

Murthy

Read only

Former Member
0 Likes
1,371

Write this function module in AT SELECTION SCREEN:

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
  EXPORTING
*   DDIC_STRUCTURE         = '/FIR/REHS0BGST21'
    retfield               = 'WERKS'
*   PVALKEY                = ' '
   DYNPPROG               = sy-repid
   DYNPNR                 = sy-dynnr
   DYNPROFIELD            = 'S_WERKS'
*   STEPL                  = 0
*   WINDOW_TITLE           =
*   VALUE                  = ' '
   VALUE_ORG              = 'S'
*   MULTIPLE_CHOICE        = ' '
*   DISPLAY                = 'X'
*   CALLBACK_PROGRAM       = ' '
*   CALLBACK_FORM          = ' '
*   MARK_TAB               =
* IMPORTING
*   USER_RESET             =
  tables
    value_tab              = it_FIRREHS0BGST21[]
*   FIELD_TAB              =
*   RETURN_TAB             =
*   DYNPFLD_MAPPING        =
 EXCEPTIONS
   PARAMETER_ERROR        = 1
   NO_VALUES_FOUND        = 2
   OTHERS                 = 3
          .
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

or

can follow these simple steps for search help:

go to se11==> put some name after ticking search help radiobutton==> create==>

then tick " elementery search help " and press enter ===>then put description and table name in selection method ===>then put the field on which u want search help

in search help parameter==> tick IMP EXP ==> write 1 in lpos and spos===>save and activate===> double click on table name ===> select that field and press search help tab above===> then copy

Thanks & Regards:

Alok Bansal

Read only

Former Member
0 Likes
1,372

Hi,

If you want to use F4 in the screen, see the following sample :

process on value-request.
field zebeln     "field name on the screen 
  module mod_get_value_po.

module mod_get_value_po input.

  perform sub_get_sch_data.
  perform sub_show_f4_help_po.

endmodule.      

form sub_get_sch_data.
  select ebeln
           from ekpo
       into table i_sch_hlp
endform.

form sub_show_f4_help_po.
  

  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
  exporting
      retfield               = 'EBELN'
     dynpprog               = 'ZMM16'  "program name
     dynpnr                 =  '0100'       "screen number
     dynprofield            = 'ZEBELN'  " screen field
   tables
      value_tab              = i_sch_hlp
  exceptions
    parameter_error        = 1
    no_values_found        = 2
    others                 = 3
            .
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.

endform.

Read only

0 Likes
1,371

Hi Gu chris

Thanks for your reply

But where should I place this Process on Value Request Event. Between PAI and PBO or after PAI?

TIA

Read only

0 Likes
1,371

Hi,

There is no proper order. so, you can write Process on value request anywhere in flow logic. Better follow this sequence PBO,PAI,POV,POH.

Read only

Former Member
0 Likes
1,371

Check out with this function module

'F4IF_INT_TABLE_VALUE_REQUEST'