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

Std F4 help

Former Member
0 Likes
1,352

Hello Experts,

I m want F4 search help for Billing type & billing doc no, for which std F4 help exists in SAP .

Plz suggest how to populate F4 help for these fields using std f4 help.

select-options: s_bill FOR vbrk-vbeln MATCHCODE OBJECT F4_VBRK .

Aastha

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,222

hi,

you can apply search help in following manner:

using function module :

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
  EXPORTING
*   DDIC_STRUCTURE         = 'tab'
    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_tab[]
*   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

i hope it will help u a lot

another methods of applyind search help:

For search help sometimes we use MATCHCODE--->when we apply it directly to parameter or select option.they are obselete now ii.For search help sometimes we CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' ??----->if we want to populate data of internal table as search help.

iii.For search help sometimes we declare tablename-fieldname in selection?------>if that field in that table is having seach help or check table ..F4 will be avaliable directly.

also:

Fixed value of domain can also work as search help.

u can also refer:

http://help.sap.com/saphelp_nw04/helpdata/en/63/1b70c2c32111d1950600a0c929b3c3/frameset.htm

regards

rahul

Edited by: RAHUL SHARMA on Feb 10, 2009 11:21 AM

Edited by: RAHUL SHARMA on Feb 10, 2009 11:22 AM

9 REPLIES 9
Read only

Former Member
0 Likes
1,222

Hi,

If you are referring to a standard field then and if there is a Search help defined for it then you'll get it for your screen field.

If you dont then you have do the following way.

Get all the Billing Document Number and populate in an intenal table.

Use Function Module "VRM_SET_VALUES" and pass the values to it.

Note that you have to use it in event AT SELECTION_SCREEN ON VALUE REQUEST FOR <Screen Field name>.

Hope this might help you.

Thanks,

Prashanth

Read only

Former Member
0 Likes
1,222

Sorry repeated it again

Edited by: Prashanth KR on Feb 10, 2009 5:16 AM

Read only

Former Member
0 Likes
1,222

Hi ,

No nedd to create the search help as it is already attached:

try this :

select-options: p_FKART for vbrk-FKART.

Regards,

Nilesh

Read only

MarcinPciak
Active Contributor
0 Likes
1,222

Hi,

Refer [Attaching search help to screen field|http://help.sap.com/saphelp_nw04/helpdata/en/63/1b70c2c32111d1950600a0c929b3c3/frameset.htm]

Regards

Marcin

Read only

Former Member
0 Likes
1,223

hi,

you can apply search help in following manner:

using function module :

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
  EXPORTING
*   DDIC_STRUCTURE         = 'tab'
    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_tab[]
*   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

i hope it will help u a lot

another methods of applyind search help:

For search help sometimes we use MATCHCODE--->when we apply it directly to parameter or select option.they are obselete now ii.For search help sometimes we CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' ??----->if we want to populate data of internal table as search help.

iii.For search help sometimes we declare tablename-fieldname in selection?------>if that field in that table is having seach help or check table ..F4 will be avaliable directly.

also:

Fixed value of domain can also work as search help.

u can also refer:

http://help.sap.com/saphelp_nw04/helpdata/en/63/1b70c2c32111d1950600a0c929b3c3/frameset.htm

regards

rahul

Edited by: RAHUL SHARMA on Feb 10, 2009 11:21 AM

Edited by: RAHUL SHARMA on Feb 10, 2009 11:22 AM

Read only

Former Member
0 Likes
1,222

Hi,

Try this FM it will work perfectly....

HELP_VALUES_GET_WITH_TABLE.

Ex:

CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'

EXPORTING

fieldname = 'WERKS'

tabname = 'T001W'

title_in_values_list = 'Select a value'

IMPORTING

select_value = lc_werks

TABLES

fields = ltab_fields

valuetab = ltab_values

EXCEPTIONS

field_not_in_ddic = 01

more_then_one_selectfield = 02

no_selectfield = 03.

Read only

Former Member
0 Likes
1,222

hi,

A search help can be directly assigned to a screen field. In this case, the search help is only available for this screen. If the same field is used on several screens, the search help should generally be attached to the referenced table field or structure field .

You can attach a search help directly to a screen in the following ways.

The name of the search help must be entered in the Screen Painter in the Attributes for the field in the field Search help.

The name of the search help can be defined for selection screens in ABAP reports in the PARAMETERS or SELECT-OPTIONS statement directly following the supplement AS SEARCH PATTERN.

In both cases this assigns the first parameter of the search help to the screen field. As a result, only a value from the hit list can be returned to the screen template.

thanks

durga.K

Read only

Former Member
0 Likes
1,222

Hi,

You can directly use it, no need to write any statement "Match code object" while defining in the select options.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
1,222

Hi ,

U can use

AT SELECTION SCREEN ON VALUE-REQUEST FOR <<field-name>>

*==wirte the code block here like

MESSAGE ' F4 pressed ' TYPE 'I'.

(or)

Goto se11 -->choose SearchHelp -->Give a name --> create.

choose elementary search help. Enter Short Description.

chose d database table in Selection method and Dialog type as 'Display values immediately'. (U can chose any option from the list box)

Give the search help parameter . Click on Import and export where ever needed.

Save and activate.

Associate the Search Help in the Data element level ( in further characteristics tab).

Collection of elementary Search help forms the collective search help.

Hope it helps