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

Selection screen F4 help.

Former Member
0 Likes
2,033

Hi

i need to create a f4 help for a selection screen for the field BKPF-BELNR. Can you please tell how with samples.

Thanks in advance.....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,693

use the FM F4IF_INT_TABLE_VALUE_REQUEST

or use the FM

CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'

EXPORTING

endpos_col = 80

endpos_row = 20

startpos_col = 45

startpos_row = 1

titletext = text-013

IMPORTING

choise = g_repid

TABLES

valuetab = it_repid

EXCEPTIONS

break_off = 1

OTHERS = 2.

Hi

i need to create a f4 help for a selection screen for the field BKPF-BELNR. Can you please tell how with samples.

Thanks in advance.....

11 REPLIES 11
Read only

Former Member
0 Likes
1,693

Hi,

Please refer this thread:

Best regards,

Prashant

Read only

Former Member
0 Likes
1,694

use the FM F4IF_INT_TABLE_VALUE_REQUEST

or use the FM

CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'

EXPORTING

endpos_col = 80

endpos_row = 20

startpos_col = 45

startpos_row = 1

titletext = text-013

IMPORTING

choise = g_repid

TABLES

valuetab = it_repid

EXCEPTIONS

break_off = 1

OTHERS = 2.

Read only

Former Member
0 Likes
1,693

Hi,

http://help.sap.com/saphelp_nw2004s/helpdata/en/79/34a246d9b511d1950e0000e8353423/content.htm

parameters: werks like MARD-werks.

here it gets value from the main table of WERKS that is T001W

if suppose u want to have F4 help value OR want to customise for ST_NAME... then u do like this

AT SELECTION-SCREEN ON VALUE-REQUEST FOR ST_NAME.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'ST_NAME'

DYNPPROG = SY-CPROG

DYNPNR = SY-DYNNR

DYNPROFIELD = 'ST_NAME'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = TEMP_ITAB

RETURN_TAB = RETURN.

Regards,

Priyanka.

Read only

Former Member
0 Likes
1,693

Hi,

You need to write in AT SELECTION SCREEN ON VALUE REQUEST event

Look at the Demo Program

SELECTION_SCREEN_F4_DEMO

demo_selection_screen_f4

Regards

Sudheer

Read only

Former Member
0 Likes
1,693

Hi,

Use this piece of code

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_belnr-HIGH .

Select all the required BELNR values into a table i_belnr to be displayed in the search help in the below form.

perform select.

perform help.

&----


*& Form help

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form help.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = 'BELNR'

  • PVALKEY = ' '

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 'S_BELNR-LOW'

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

tables

value_tab = i_belnr

  • 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.

endform. " help

Read only

Former Member
0 Likes
1,693

Hello,

Create a match code object/search help in se11 and attach it to your selection screen.

Regards

Read only

Former Member
0 Likes
1,693

HI ,

go through this code for F4 help.

revert me back for further queries on this.

Reward points if helpful.

REPORT YMP.

Parameter: p_belnr type Bkpf-belnr.

types: begin of tys_itab,

belnr type bkpf-belnr,

end of tys_itab.

data: itab type table of tys_itab.

at selection-screen on value-request for p_belnr.

select belnr from bkpf into table itab .

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE =

retfield = 'BELNR'

  • PVALKEY = ' '

DYNPPROG = Sy-repid

DYNPNR = SY-DYNNR

  • DYNPROFIELD = ' '

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

tables

value_tab = 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
1,693

hi,

check the below example.

REPORT Zsr_F4.

tables: mara,dfies.

data: begin of it_table occurs 0,

matkl like mara-matkl,

desc like mara-ernam,

end of it_table.

data : LT_FIELDS TYPE TABLE OF DFIES,

LS_FIELD TYPE DFIES.

parameter: zintid like mara-matkl.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR zintid.

DATA: l_prgnam TYPE sy-repid, " For program name

l_dynpnr TYPE sy-dynnr, " For screen number

l_dynprofield TYPE help_info-dynprofld, " For field name.

l_retfield TYPE dfies-fieldname. " For retfield.

refresh it_table. " to avoid repetation of field values

clear : l_prgnam,

l_dynpnr,

l_dynprofield,

l_retfield.

l_prgnam = sy-cprog.

l_dynpnr = sy-dynnr.

l_dynprofield = 'zintid'.

l_retfield = 'matkl'.

it_table-matkl = 'ZF117A'.

it_table-desc = 'Po data'.

append it_table.

clear it_table.

it_table-matkl = 'ZF117B'.

it_table-desc = 'Po Invoices'.

append it_table.

clear it_table.

it_table-matkl = 'ZF117C'.

it_table-desc = 'Fi Invoices'.

append it_table.

CLEAR LS_FIELD.

LS_FIELD-FIELDNAME = 'MATKL'.

LS_FIELD-INTLEN = 20.

LS_FIELD-LENG = 20.

LS_FIELD-OUTPUTLEN = 20.

*LS_FIELD-SCRTEXT_S = 'helo'.

*LS_FIELD-SCRTEXT_M = 'matno'.

*LS_FIELD-SCRTEXT_L = LS_FIELD-FIELDNAME.

LS_FIELD-REPTEXT = 'Interfaceid Desc'.

APPEND LS_FIELD TO LT_FIELDS.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = 'MATKL'

  • PVALKEY = ' '

DYNPPROG = l_prgnam

DYNPNR = l_dynpnr

DYNPROFIELD = 'MATKL'

  • STEPL = 0

  • WINDOW_TITLE = WINDOW_TITLE

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

  • MARK_TAB = MARK_TAB

  • IMPORTING

  • USER_RESET = USER_RESET

TABLES

value_tab = it_table

FIELD_TAB = LT_FIELDS

  • RETURN_TAB = RETURN_TAB

  • DYNPFLD_MAPPING = 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.

clear LT_FIELDS.

Read only

Former Member
0 Likes
1,693

hi swarna...

if search help is available for that field means just get that search help name and used it in the selection screen as follows,

parameter <A> LIKE <BKPF-BELNR> matchcode object <SEARCH HELP NAME>.

in select option as follows

SELECT-OPTIONS <BELNR> FOR <BKPF-BELNR> MATCHCODE OBJECT <SEARCH HELP NAME>.

Read only

Former Member
0 Likes
1,693

Jus try this

in the Parameter section

PARAMETERS: p_belnr TYPE BKPF-BELNR.

Read only

Former Member
0 Likes
1,693

HI use the function Module..

''F4IF_FIELD_VALUE_REQUEST'.