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 the field

Former Member
0 Likes
2,933

HI all,

in the report selection screen i have one field for which F4 HELP doesnt exits, even in the table for that field F4 HELP is not there but the user requests me to get the F4 HELP for that field in the selection screen .

please help how to get F4 HELP for the field

thanks in advance.

HI all,

in the report selection screen i have one field for which F4 HELP doesnt exits, even in the table for that field F4 HELP is not there but the user requests me to get the F4 HELP for that field in the selection screen .

please help how to get F4 HELP for the field

thanks in advance.

14 REPLIES 14
Read only

shishupalreddy
Active Contributor
0 Likes
2,046

Hello ,

U can create a searchhelp using SE11 and u can attaqch the same to the field on selection screen using MATCHCODE Object ADDITION .

oR

U can use AT SELECTION-SCREEN ON VALUE-REQUEST FOR <Field name >

event and then u can fill the internal tabel with all the required values to be shown in the F4 Help popup using Function moduel

F4IF_INT_TABLE_VALUE_REQUEST .

Regards

Read only

Former Member
0 Likes
2,046

Hi Hems

create a search help in se11 and assign it to the screen field.

regards,

Madhu

Read only

Former Member
0 Likes
2,046

Hi.. u can create search help and make available that search help to that field.

Create a search help lets ZZZZ.

Select-option: s_xxx for xxx matchcode object <zzzz>

Regards,

KP.

Read only

Former Member
0 Likes
2,046

Hi,

use this Fm F4IF_INT_TABLE_VALUE_REQUEST

[Sample Code|] Check the Vijay Babu Dudla answer

Read only

Former Member
0 Likes
2,046

Hi,

Create a search help in se11 on the field.

and make your selection screen like that field on which you have created search help.

it will automatically trigger the F4 help for that field.

Or

use Field_on_Value_request FM.

hope it will help you.

Regards

Rajesh Kumar

Read only

faisalatsap
Active Contributor
0 Likes
2,046

Hi,

Please go through the following Link hope will solve out you problem,

[F4 help for 10 items |]

[F4 help for Period |]

Please Test the Sample Code Posted by Me.

Kind Regards,

Faisal

Read only

abap_team
Explorer
0 Likes
2,046

Hi Hema

Use the link below .

it will b helpfull for u.

Read only

Former Member
0 Likes
2,046

Hi Hema,

1.You can cretae a search help in se11 and the atttach the serach help name in the table field.

Or

2 .

U can use AT SELECTION-SCREEN ON VALUE-REQUEST FOR <Field name >/<(select-options field)-low>/<(select-options field)-high>

event and then u can fill the internal tabel with all the required values to be shown in the F4 Help popup from the table and then use the Function moduel

F4IF_INT_TABLE_VALUE_REQUEST an d pass the parameters.

Thanks

Read only

Former Member
0 Likes
2,046

Hi hema,

Kindly go through this link below:

http://sapprograms.blogspot.com/2008/04/f4-help-for-field-with-ztable.html

It might be helpful for you

Regrds

Mansi

Read only

Former Member
0 Likes
2,046

Hi,

Its working try it.........



MODULE GET_F4_HELP INPUT.

  TYPES : BEGIN OF EMPLOYEE,
          EMPNO TYPE ZTG_EMP-EMPNO,
          END OF EMPLOYEE.

  DATA : EMPTAB TYPE STANDARD TABLE OF EMPLOYEE WITH HEADER LINE,
         TB_DYNPFIELDS LIKE DYNPREAD OCCURS 0 WITH HEADER LINE,
         PLAN_ID TYPE ZTG_HEALTH-PLAN_ID.


  CLEAR:   TB_DYNPFIELDS.
  REFRESH: TB_DYNPFIELDS.

  MOVE 'ZTG_EMP-HLTH_PLAN' TO TB_DYNPFIELDS-FIELDNAME.
  APPEND TB_DYNPFIELDS.

  CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
      DYNAME                               = 'SAPMZTG01'
      DYNUMB                               = '1010'
*   TRANSLATE_TO_UPPER                   = ' '
*   REQUEST                              = ' '
*   PERFORM_CONVERSION_EXITS             = ' '
*   PERFORM_INPUT_CONVERSION             = ' '
*   DETERMINE_LOOP_INDEX                 = ' '
*   START_SEARCH_IN_CURRENT_SCREEN       = ' '
*   START_SEARCH_IN_MAIN_SCREEN          = ' '
*   START_SEARCH_IN_STACKED_SCREEN       = ' '
*   START_SEARCH_ON_SCR_STACKPOS         = ' '
*   SEARCH_OWN_SUBSCREENS_FIRST          = ' '
*   SEARCHPATH_OF_SUBSCREEN_AREAS        = ' '
    TABLES
      DYNPFIELDS                           = TB_DYNPFIELDS
* EXCEPTIONS
*   INVALID_ABAPWORKAREA                 = 1
*   INVALID_DYNPROFIELD                  = 2
*   INVALID_DYNPRONAME                   = 3
*   INVALID_DYNPRONUMMER                 = 4
*   INVALID_REQUEST                      = 5
*   NO_FIELDDESCRIPTION                  = 6
*   INVALID_PARAMETER                    = 7
*   UNDEFIND_ERROR                       = 8
*   DOUBLE_CONVERSION                    = 9
*   STEPL_NOT_FOUND                      = 10
*   OTHERS                               = 11
            .
  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 TB_DYNPFIELDS INDEX 1.
  IF SY-SUBRC EQ 0.
    PLAN_ID = TB_DYNPFIELDS-FIELDVALUE.
  ENDIF.

  SELECT EMPNO FROM ZTG_EMP
  INTO TABLE EMPTAB
  WHERE HLTH_PLAN = PLAN_ID.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
*     DDIC_STRUCTURE         = ' '
    RETFIELD               = 'EMPNO'
*     PVALKEY                = ' '
   DYNPPROG               = 'SAPMZTG01'
   DYNPNR                 = '1010'
   DYNPROFIELD            = 'TB1'
*     STEPL                  = 0
*     WINDOW_TITLE           =
*     VALUE                  = ' '
     VALUE_ORG              = 'S'
*     MULTIPLE_CHOICE        = ' '
*     DISPLAY                = ' '
*     CALLBACK_PROGRAM       = ' '
*     CALLBACK_FORM          = ' '
*     MARK_TAB               =
*   IMPORTING
*     USER_RESET             =
  TABLES
    VALUE_TAB              = EMPTAB
*     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.



ENDMODULE.                 " GET_F4_HELP  INPUT 

Thanks

Arun Kayal

Read only

Former Member
0 Likes
2,046

Hi,

Check the below thread

Regards,

Anki Reddy

Read only

kamesh_g
Contributor
0 Likes
2,046

The following are the options for F4 help

Code:

PARAMETERS: p_ccgrp LIKE rkpln-ksgru. "Cost Center Group

*Input help for Cost Center Group

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_ccgrp.

TYPES: BEGIN OF ty_ccenter_group,

setname TYPE setnamenew,

descript TYPE settext,

END OF ty_ccenter_group.

DATA: it_ccenter_group TYPE TABLE OF ty_ccenter_group.

CLEAR it_ccenter_group.

SELECT a~setname

b~descript

INTO TABLE it_ccenter_group

FROM setheader AS a INNER JOIN

setheadert AS b ON

asubclass EQ bsubclass AND

asetname EQ bsetname

WHERE a~setclass EQ '0101' AND

b~langu EQ sy-langu.

CALL FUNCTION

'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

ret field = 'SETNAME'

dynpprog = v_repid

dynpnr = SY-DYNR

dynprofield = 'P_CCGRP'

value_org = 'S'

TABLES

value_tab = it_ccenter_group.

F4IF_FIELD_VALUE_REQUEST:

This FM is used to display value help or input from ABAP dictionary. We have to pass the name of the structure or table (TABNAME) along with the field name (FIELDNAME). The selection can be returned to the specified screen field if three

parameters DYNPNR, DYNPPROG, DYNPROFIELD are also specified or to a table if RETRN_TAB is specified.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

TABNAME = table/structure

FIELDNAME = 'field name'

DYNPPROG = SY-CPROG

DYNPNR = SY-DYNR

DYNPROFIELD = 'screen field'

IMPORTING

RETURN_TAB = table of type DYNPREAD

Getting F4 help based on other field .

Suppose if there are 2 fields on selection screen user name and Purchasing Document and the case is getting values of Purchasing Document Number based on user name

Code:

TYPES: BEGIN OF ty_match_nast,

objky TYPE na_objkey,

END OF ty_match_nast.

Data: it_match_nast TYPE STANDARD TABLE OF ty_match_nast.

Data: it_dypr_val TYPE STANDARD TABLE OF dynpread.

DATA: wa_dypr_val TYPE dynpread.

DATA: it_return TYPE STANDARD TABLE OF ddshretval.

Case when only username value is entered.

SELECT objky

FROM nast

INTO TABLE it_match_nast

WHERE kappl = c_ef

AND kschl = c_neu

AND usnam = wa_dypr_val-fieldvalue.

ENDIF.

*Read User name on selection screen field value

CLEAR wa_dypr_val.

REFRESH it_dypr_val.

wa_dypr_val-fieldname = 'P_UNAME'. "User name

APPEND wa_dypr_val TO it_dypr_val.

*FM to get the value

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = sy-repid

dynumb = sy-dynnr

translate_to_upper = 'X'

TABLES

dynpfields = it_dypr_val_h.

*Pass the values to f4 table

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = u2018OBJKY'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'P_EBELN'

value_org = 'P'

TABLES

value_tab = it_match_nast

return_tab = it_return.

Read only

Former Member
0 Likes
2,046

Hi,

try like this.

types : begin of ty_itab,
           field1 type dbtab-field1,
          end of ty_itab.
data : it_itab type table of ty_itab.

parameters : p_field1 like dbtab-field1.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_field1.

select field1 from dbtab into table it_itab.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
*   DDIC_STRUCTURE         = ' '
      retfield               = 'FIELD1'
*   PVALKEY                = ' '
     dynpprog               = sy-repid
     dynpnr                 = sy-dynnr
     dynprofield            = 'P_FIELD1'
*   STEPL                  = 0
*   WINDOW_TITLE           =
*   VALUE                  = ' '
     value_org              = 'S'
*   MULTIPLE_CHOICE        = ' '
*   DISPLAY                = ' '
*   CALLBACK_PROGRAM       = ' '
*   CALLBACK_FORM          = ' '
*   MARK_TAB               =
* IMPORTING
*   USER_RESET             =
    TABLES
      value_tab              = IT_ITAB
*   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.

Read only

Former Member
0 Likes
2,046

Hi,

check below link.

Regards,

Madhu