Application Development 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: 

F4 help

Former Member
0 Kudos

Hi,

I have created 5 fields(primary codes,secondary code1,secondary code2,secondary code3,secondary code4) as select-option fields.I am getting drop down menu for all the secondary code fields but not for primary code.Can i create F4 help for that field?If so what is the process?

Reply ASAP.

Regards,

Hema

3 REPLIES 3

Former Member
0 Kudos

hi

fields (5) - put into a table.

se11 --> u create a search help.

se11->search help name--> create >elementary search help>short description.--> check table name > field name>icheck import export>specify lpos and spos some numerical value>save check activate..

in se11 > table> select the complete row of the field --> search help -->give the search help name -->generate proposal --> copy. save check and activate..

else the field(primary) refers to any DB fields then foreign key relation ship is necessary..

reward if useful.

Former Member
0 Kudos

Plz check this:-

Providing Input Help (F4 Help)

Use

Users of an SAP System can use the F4 key to obtain information about the possible input values for a certain field on the screen.

Information about the possible values for a field should also be available to those users who are working with the data in the SAP System from an external program, via BAPI calls. For example, the user of a Visual Basic program, which incorporates a BAPI to display or modify data in an SAP System, should have transparent access to the functions of the F4 input help.

Features

In order to provide input help, a calling program can use the BAPI HelpValues.GetList(). This method is based on the RFC-enabled function module BAPI_HELPVALUES_GET, which obtains the possible input values for a field that is passed in a BAPI call. For detailed information about the structure and use of the HelpValues.GetList() BAPI, see the documentation on the function module BAPI_HELPVALUES_GET, which implements the Helpvalues.GetList method.

To determine the possible input values for a field in the check table, the BAPI HelpValues.GetList() uses the elementary search help or the domain fixed values linked to the field in the ABAP Dictionary.

For this reason, you have to create or specify relevant check tables, elementary search helps (matchcodes) or domain fixed values. Only then can the calling program access the relevant input values for your BAPI fields using the BAPI HelpValues.GetList().

As of Release 4.5A, you have to specify a foreign key, if a check table has been defined in the domain. Otherwise F4 input help cannot be displayed.

Authorization Check

In some cases you will only want to allow only those persons with a specific user profile to access information in F4 input help. To do this you can carry out authorization checks within the BAPI using table BAPIF4T.

Table BAPIF4T is provided for this purpose. This table comprises the following fields, which you have to fill with the values for your BAPI.

OBJTYPE (object type)

The technical name of the SAP business object type, for example, BUS1065.

METHOD (verb)

The name of a BAPI for the business object type named above, for example, GetList.

DTEL (data element)

The name of a data element for which a possible entry is specified. For example, an elementary input help could be specified for the data element PERNR_D and be protected from unauthorized access.

FNAM (name of the function module)

The name of the function module that you have to create and that checks authorizations for the data element. This function module must have the following predefined interface:

*"----


""Local interface:

*" IMPORTING

*" VALUE(OBJTYPE) LIKE BAPIF4F-OBJTYPE

*" VALUE(METHOD) LIKE BAPIF4F-METHOD

*" VALUE(DTEL) LIKE BAPIF4F-DTEL

*" VALUE(SHLPNAME) LIKE BAPIF4F-SHLPNAME

*" VALUE(TABNAME) LIKE BAPIF4F-TABNAME

*" EXPORTING

*" VALUE(RETURN) LIKE BAPIF4F-RETURN

*"----


As the template for your function module you can use the function module BF_BAPI_F4_AUTHORITY which provides exactly this interface. Copy this function module and follow the documentation provided with it.

The additional parameter SHLPNAME contained in the function module interface provides the name of the active input help for the table or for the data element. The parameter TABNAME contains the name of the value table.

The return code of the parameter RETURN is:

'X' if the user of the BAPI is not authorized to call up the valid input values for a field.

' ' (no value), if the user of the BAPI is authorized to display the input values for a field.

During runtime the function module is called dynamically by the BAPI HelpValues.GetList().

An authorization check can be carried out at business object type, method or data element level:

To check authorizations at this level…

... ......the following fields in table BAPIF4T must be filled.

Business object type

OBJTYPE, FNAM

BAPI

OBJTYPE, METHOD, FNAM

Data Element

OBJTYPE, METHOD, DTEL, FNAM

Rewards point if helpful......

regards...

Abhay singh.

Former Member
0 Kudos

Hi,

This is syntax for creating F4 help

AT SELECTION-SCREEN ON VALUE-REQUEST FOR (field).

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'field name'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'tablename-fieldname'

value_org = 'S'

TABLES

value_tab = internal table name

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.

CLEAR internal table

.